• 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 
16 #ifndef OHOS_ICC_STATE_H
17 #define OHOS_ICC_STATE_H
18 
19 #include <iostream>
20 
21 namespace OHOS {
22 namespace Telephony {
23 // matched to HRilSimState
24 const int ICC_CONTENT_UNKNOWN = -1;
25 const int ICC_CARD_ABSENT = 0;
26 const int ICC_CONTENT_READY = 1;
27 const int ICC_CONTENT_PIN = 2;
28 const int ICC_CONTENT_PUK = 3;
29 const int ICC_CONTENT_PIN2 = 4;
30 const int ICC_CONTENT_PUK2 = 5;
31 const int ICC_CONTENT_PH_NET_PIN = 6;
32 const int ICC_CONTENT_PH_NET_PUK = 7;
33 const int ICC_CONTENT_PH_NET_SUB_PIN = 8;
34 const int ICC_CONTENT_PH_NET_SUB_PUK = 9;
35 const int ICC_CONTENT_PH_SP_PIN = 10;
36 const int ICC_CONTENT_PH_SP_PUK = 11;
37 
38 const int CONTENT_INDEX_INVALID = -1;
39 const int ICC_CONTENT_NUM = 0;
40 const int PIN_SUBSTITUE_FALSE = 0;
41 const int PIN_SUBSTITUE_TRUE = 1;
42 
43 const int ICC_PIN_STATE_UNKNOWN = 0;
44 const int ICC_PIN_NOT_VERIFIED = 1;
45 const int ICC_PIN_VERIFIED = 2;
46 const int ICC_PIN_DISABLED = 3;
47 const int ICC_PIN_BLOCKED_ENABLED = 4;
48 const int ICC_PIN_BLOCKED_PERM = 5;
49 
50 const int ICC_UNKNOWN_TYPE = 0;
51 const int ICC_SIM_TYPE = 1;
52 const int ICC_USIM_TYPE = 2;
53 const int ICC_RUIM_TYPE = 4;
54 const int ICC_CG_TYPE = 5;
55 const int ICC_DUAL_MODE_ROAMING_TYPE = 7;
56 const int ICC_UNICOM_DUAL_MODE_TYPE = 8;
57 const int ICC_4G_LTE_TYPE = 9;
58 const int ICC_UG_TYPE = 10;
59 const int ICC_IMS_TYPE = 11;
60 
61 const int ICC_SIMLOCK_UNKNOWN = 0;
62 const int ICC_SIMLOCK_IN_PROGRESS = 1;
63 const int ICC_SIMLOCK_READY = 2;
64 
65 class IccContent {
66 public:
67     IccContent();
~IccContent()68     ~IccContent() {}
69 
70 public:
71     int32_t simLockSubState_;
72     int32_t substitueOfPin1_;
73     int32_t stateOfPin1_;
74     int32_t stateOfPin2_;
75 };
76 
77 // icc state
78 class IccState {
79 public:
80     IccState();
~IccState()81     ~IccState() {}
82 
83 public:
84     int32_t simType_;
85     int32_t simStatus_;
86 };
87 } // namespace Telephony
88 } // namespace OHOS
89 #endif // OHOS_ICC_STATE_H
90