1/*
2 * Copyright (c) 2023 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 DATA_STORAGE_GLOBAL_PARAMS_DATA_H
17#define DATA_STORAGE_GLOBAL_PARAMS_DATA_H
18
19namespace OHOS {
20namespace Telephony {
21class NumMatchData {
22public:
23    /**
24     * @brief Id
25     */
26    static constexpr const char *ID = "id";
27    /**
28     * @brief name
29     */
30    static constexpr const char *NAME = "name";
31    /**
32     * @brief Mobile country code
33     */
34    static constexpr const char *MCC = "mcc";
35    /**
36     * @brief Mobile network code
37     */
38    static constexpr const char *MNC = "mnc";
39    /**
40     * @brief Mobile country code and network code
41     */
42    static constexpr const char *MCCMNC = "numeric";
43    /**
44     * @brief num_match
45     */
46    static constexpr const char *NUM_MATCH = "num_match";
47    /**
48     * @brief num_match_short
49     */
50    static constexpr const char *NUM_MATCH_SHORT = "num_match_short";
51};
52
53struct NumMatch {
54    int id = 0;
55    std::string name = "";
56    std::string mcc = "";
57    std::string mnc = "";
58    std::string numeric = "";
59    int numMatch = 0;
60    int numMatchShort = 0;
61};
62
63class EccData {
64public:
65    /**
66     * @brief Id
67     */
68    static constexpr const char *ID = "id";
69    /**
70     * @brief Mobile operator name
71     */
72    static constexpr const char *NAME = "name";
73    /**
74     * @brief Country code
75     */
76    static constexpr const char *MCC = "mcc";
77    /**
78     * @brief Network code
79     */
80    static constexpr const char *MNC = "mnc";
81    /**
82     * @brief Mobile country code and network code
83     */
84    static constexpr const char *NUMERIC = "numeric";
85    /**
86     * @brief Mobile emergency number list with card
87     */
88    static constexpr const char *ECC_WITH_CARD = "ecc_withcard";
89    /**
90     * @brief Mobile emergency number list no card
91     */
92    static constexpr const char *ECC_NO_CARD = "ecc_nocard";
93    /**
94     * @brief Mobile emergency number list is fake
95     */
96    static constexpr const char *ECC_FAKE = "ecc_fake";
97};
98
99struct EccNum {
100    int id = 0;
101    std::string name = "";
102    std::string mcc = "";
103    std::string mnc = "";
104    std::string numeric = "";
105    std::string ecc_withcard = "";
106    std::string ecc_nocard = "";
107    std::string ecc_fake = "";
108};
109
110constexpr const char *NUMERIC_INDEX = "numericIndex";
111constexpr const char *TABLE_NUMBER_MATCH = "number_match";
112static constexpr const char *TABLE_ECC_DATA = "ecc_data";
113static constexpr const char *GLOBAL_PARAMS_URI = "datashare:///com.ohos.globalparamsability";
114} // namespace Telephony
115} // namespace OHOS
116#endif // DATA_STORAGE_GLOBAL_PARAMS_DATA_H
117