• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 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 #ifndef INTERFACES_CJ_INCLUDE_I18N_STRUCT_H_
16 #define INTERFACES_CJ_INCLUDE_I18N_STRUCT_H_
17 
18 #include <string>
19 
20 const int32_t I18N_NOT_VALID = 890001;
21 
22 extern "C" {
23     struct UnitInfo {
24         char* unit;
25         char* measureSystem;
26     };
27 
28     struct CDate {
29         int64_t year;
30         int64_t month;
31         int64_t day;
32         double icuUdate;
33         bool isNull;
34     };
35 
36     struct CHolidayLocalName {
37         char* language;
38         char* name;
39     };
40 
41     struct HolidayLocalNameArr {
42         int64_t size;
43         CHolidayLocalName *head;
44     };
45 
46     struct CHolidayInfoItem {
47         char* baseName;
48         int32_t year;
49         int32_t month;
50         int32_t day;
51         char* language;
52         HolidayLocalNameArr localNames;
53     };
54 
55     struct HolidayInfoItemArr {
56         int64_t size;
57         CHolidayInfoItem *head;
58     };
59 
60     struct CArrStr {
61         char** data;
62         int32_t length;
63     };
64 
65     struct CEntityInfoItem {
66         char* type;
67         int32_t begin;
68         int32_t end;
69     };
70 
71     struct CEntityInfoItemArr {
72         int32_t size;
73         CEntityInfoItem* head;
74     };
75 }
76 
77 
78 struct EntityInfoItem {
79     std::string type;
80     int32_t begin;
81     int32_t end;
82 };
83 
84 #endif  // INTERFACES_CJ_INCLUDE_I18N_STRUCT_H_
85