• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #include "sysversion.h"
16 
17 /* *
18  * Major(M) version number.
19  */
20 static int g_majorVersion = 3;
21 
22 /* *
23  * Senior(S) version number.
24  */
25 static int g_seniorVersion = 2;
26 
27 /* *
28  * Feature(F) version number.
29  */
30 static int g_featureVersion = 13;
31 
32 /* *
33  * Build(B) version number.
34  */
35 static int g_buildVersion = 5;
36 
37 /* *
38  * Obtains the major (M) version number, which increases with any updates to the overall architecture.
39  * <p>The M version number monotonically increases from 1 to 99.
40  *
41  * @return Returns the M version number.
42  * @since 4
43  */
GetMajorVersion()44 int GetMajorVersion()
45 {
46     return g_majorVersion;
47 }
48 
49 /* *
50  * Obtains the senior (S) version number, which increases with any updates to the partial
51  * architecture or major features.
52  * <p>The S version number monotonically increases from 0 to 99.
53  *
54  * @return Returns the S version number.
55  * @since 4
56  */
GetSeniorVersion()57 int GetSeniorVersion()
58 {
59     return g_seniorVersion;
60 }
61 
62 /* *
63  * Obtains the feature (F) version number, which increases with any planned new features.
64  * <p>The F version number monotonically increases from 0 or 1 to 99.
65  *
66  * @return Returns the F version number.
67  * @since 3
68  */
GetFeatureVersion()69 int GetFeatureVersion()
70 {
71     return g_featureVersion;
72 }
73 
74 /* *
75  * Obtains the build (B) version number, which increases with each new development build.
76  * <p>The B version number monotonically increases from 0 or 1 to 999.
77  *
78  * @return Returns the B version number.
79  * @since 3
80  */
GetBuildVersion()81 int GetBuildVersion()
82 {
83     return g_buildVersion;
84 }
85