• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023-2025 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_DP_DISTRIBUTED_DEVICE_PROFILE_CONSTANTS_H
17 #define OHOS_DP_DISTRIBUTED_DEVICE_PROFILE_CONSTANTS_H
18 
19 #include <unordered_set>
20 #include <string>
21 #include <unistd.h>
22 
23 #ifdef __LP64__
24 constexpr const char* LIB_LOAD_PATH = "/system/lib64/";
25 constexpr const char* DMS_LIB_LOAD_PATH = "/system/lib64/platformsdk/";
26 #else
27 constexpr const char* LIB_LOAD_PATH = "/system/lib/";
28 constexpr const char* DMS_LIB_LOAD_PATH = "/system/lib/platformsdk/";
29 #endif
30 
31 namespace OHOS {
32 namespace DistributedDeviceProfile {
33 /* DeviceProfile Attribute */
34 extern const std::string DEVICE_ID;
35 extern const std::string DEVICE_TYPE_ID;
36 extern const std::string DEVICE_TYPE_NAME;
37 extern const std::string DEVICE_NAME;
38 extern const std::string MANUFACTURE_NAME;
39 extern const std::string DEVICE_MODEL;
40 extern const std::string STORAGE_CAPACITY;
41 extern const std::string OS_SYS_CAPACITY;
42 extern const std::string OS_API_LEVEL;
43 extern const std::string OS_VERSION;
44 extern const std::string OS_TYPE;
45 extern const std::string TYPE;
46 extern const std::string OH_PROFILE_SUFFIX;
47 extern const std::string ID;
48 extern const std::string DEV_TYPE;
49 extern const std::string MANU;
50 extern const std::string SN;
51 extern const std::string PRODUCT_ID;
52 extern const std::string PRODUCT_NAME;
53 extern const std::string SUB_PRODUCT_ID;
54 extern const std::string HIV;
55 extern const std::string MAC;
56 extern const std::string BLE_MAC;
57 extern const std::string BR_MAC;
58 extern const std::string SLE_MAC;
59 extern const std::string FWV;
60 extern const std::string HWV;
61 extern const std::string SWV;
62 extern const std::string PROT_TYPE;
63 extern const std::string SETUP_TYPE;
64 extern const std::string WISE_USER_ID;
65 extern const std::string WISE_DEVICE_ID;
66 extern const std::string ROOM_NAME;
67 extern const std::string REGISTER_TIME;
68 extern const std::string MODIFY_TIME;
69 extern const std::string SHARE_TIME;
70 extern const std::string PRODUCTOR_INFO_VERSION;
71 extern const std::string INTERNAL_MODEL;
72 extern const std::string DEVICE_PROFILE_TABLE;
73 extern const std::string DEVICE_ICON_INFO_TABLE;
74 extern const std::string PRODUCT_INFO_TABLE;
75 extern const std::string SYSTEM;
76 /* ServiceProfile Attribute */
77 extern const std::string SERVICE_NAME;
78 extern const std::string SERVICE_PROFILE_SERVICE_ID;
79 extern const std::string SERVICE_TYPE;
80 extern const std::string SERVICE_PROFILE_TABLE;
81 extern const std::string RDB_USER_ID;
82 extern const std::string SERVICE_PROFILE_DEVICE_PROFILE_ID;
83 extern const std::string SERVICE_PROFILE_SERVICE_TYPE;
84 /* CharacteristicProfile Attribute */
85 extern const std::string SERVICE_PROFILE_ID;
86 extern const std::string CHARACTERISTIC_PROFILE_TABLE;
87 extern const std::string CHARACTERISTIC_KEY;
88 extern const std::string CHARACTERISTIC_VALUE;
89 /* ProductInfo Attribute */
90 extern const std::string PRODUCT_NAME;
91 extern const std::string PRODUCT_SHORT_NAME;
92 extern const std::string IMAGE_VERSION;
93 /* DeviceIconInfo Attribute */
94 extern const std::string IMAGE_TYPE;
95 extern const std::string SPEC_NAME;
96 extern const std::string DEVICE_ICON;
97 extern const std::string DEVICE_ICON_VERSION;
98 extern const std::string DEVICE_ICON_URL;
99  /* ServiceInfoProfile Attribute */
100 extern const std::string SRNETWORK_ID;
101 extern const std::string SISERVICE_ID;
102 extern const std::string SERVICE_DISPLAY_NAME;
103 extern const std::string CUSTOM_DATA;
104 extern const std::string CUSTOM_DATA_LEN;
105 extern const std::string BUNDLE_NAME;
106 extern const std::string MODULE_NAME;
107 extern const std::string ABILITY_NAME;
108 extern const std::string AUTH_BOX_TYPE;
109 extern const std::string AUTH_TYPE;
110 extern const std::string PIN_EXCHANGE_TYPE;
111 extern const std::string PINCODE;
112 extern const std::string DESCRIPTION;
113 extern const std::string SERVICE_DISCOVERY_SCOPE;
114 extern const std::string EXTRAINFO;
115 extern const std::string PUT_SERVICE_INFO_PROFILE;
116 extern const std::string DELETE_SERVICE_INFO_PROFILE;
117 extern const std::string UPDATE_SERVICE_INFO_PROFILE;
118 extern const std::string GET_SERVICE_INFO_PROFILE_BY_UNIQUE_KEY;
119 extern const std::string GET_SERVICE_INFO_PROFILE_LIST_BY_TOKEN_ID;
120 extern const std::string GET_ALL_SERVICE_INFO_PROFILE_LIST;
121 extern const std::string GET_SERVICE_INFO_PROFILE_LIST_BY_BUNDLE_NAME;
122 /* LocalServiceInfo Attribute */
123 extern const std::string PUT_LOCAL_SERVICE_INFO;
124 extern const std::string UPDATA_LOCAL_SERVICE_INFO;
125 extern const std::string GET_LOCAL_SERVICE_INFO_BY_BINDLE_AND_PINTYPE;
126 extern const std::string DELETE_LOCAL_SERVICE_INFO;
127 /* TrustDeviceProfile Attribute */
128 extern const std::string SUBSCRIBE_TRUST_DEVICE_PROFILE;
129 extern const std::string DEVICE_ID_TYPE;
130 extern const std::string DEVICE_ID_HASH;
131 extern const std::string PEER_USER_ID;
132 extern const std::string LOCAL_USER_ID;
133 /* AccessControlProfile Attribute */
134 extern const std::string ACCESS_CONTROL_ID;
135 extern const std::string ACCESSER_ID;
136 extern const std::string ACCESSEE_ID;
137 extern const std::string TRUST_DEVICE_ID;
138 extern const std::string SESSION_KEY;
139 extern const std::string BIND_TYPE;
140 extern const std::string AUTHENTICATION_TYPE;
141 extern const std::string BIND_LEVEL;
142 extern const std::string STATUS;
143 extern const std::string VALID_PERIOD;
144 extern const std::string LAST_AUTH_TIME;
145 /* Accesser Attribute */
146 extern const std::string ACCESSER_DEVICE_ID;
147 extern const std::string ACCESSER_USER_ID;
148 extern const std::string ACCESSER_ACCOUNT_ID;
149 extern const std::string ACCESSER_TOKEN_ID;
150 extern const std::string ACCESSER_BUNDLE_NAME;
151 extern const std::string ACCESSER_HAP_SIGNATURE;
152 extern const std::string ACCESSER_BIND_LEVEL;
153 extern const std::string ACCESSER_DEVICE_NAME;
154 extern const std::string ACCESSER_SERVICE_NAME;
155 extern const std::string ACCESSER_CREDENTIAL_ID;
156 extern const std::string ACCESSER_STATUS;
157 extern const std::string ACCESSER_SESSION_KEY_ID;
158 extern const std::string ACCESSER_SESSION_KEY_TIMESTAMP;
159 /* Accessee Attribute */
160 extern const std::string ACCESSEE_DEVICE_ID;
161 extern const std::string ACCESSEE_USER_ID;
162 extern const std::string ACCESSEE_ACCOUNT_ID;
163 extern const std::string ACCESSEE_TOKEN_ID;
164 extern const std::string ACCESSEE_BUNDLE_NAME;
165 extern const std::string ACCESSEE_HAP_SIGNATURE;
166 extern const std::string ACCESSEE_BIND_LEVEL;
167 extern const std::string ACCESSEE_DEVICE_NAME;
168 extern const std::string ACCESSEE_SERVICE_NAME;
169 extern const std::string ACCESSEE_CREDENTIAL_ID;
170 extern const std::string ACCESSEE_STATUS;
171 extern const std::string ACCESSEE_SESSION_KEY_ID;
172 extern const std::string ACCESSEE_SESSION_KEY_TIMESTAMP;
173 /* subscribe info */
174 extern const std::string SA_ID;
175 extern const std::string SUBSCRIBE_KEY;
176 extern const std::string SUBSCRIBE_CHANGE_TYPES;
177 /* syncOptions */
178 extern const std::string SYNC_MODE;
179 extern const std::string SYNC_DEVICE_IDS;
180 /* Interface Name */
181 extern const std::string PUT_SESSION_KEY;
182 extern const std::string GET_SESSION_KEY;
183 extern const std::string UPDATE_SESSION_KEY;
184 extern const std::string DELETE_SESSION_KEY;
185 extern const std::string PUT_ACCESS_CONTROL_PROFILE;
186 extern const std::string UPDATE_ACCESS_CONTROL_PROFILE;
187 extern const std::string GET_ACCESS_CONTROL_PROFILE;
188 extern const std::string DELETE_ACCESS_CONTROL_PROFILE;
189 extern const std::string GET_TRUST_DEVICE_PROFILE;
190 extern const std::string GET_ALL_TRUST_DEVICE_PROFILE;
191 extern const std::string GET_ALL_ACCESS_CONTROL_PROFILE;
192 extern const std::string PUT_SERVICE_PROFILE;
193 extern const std::string PUT_SERVICE_PROFILE_BATCH;
194 extern const std::string PUT_CHARACTERISTIC_PROFILE;
195 extern const std::string PUT_CHARACTERISTIC_PROFILE_BATCH;
196 extern const std::string GET_DEVICE_PROFILE;
197 extern const std::string GET_SERVICE_PROFILE;
198 extern const std::string GET_CHARACTERISTIC_PROFILE;
199 extern const std::string DELETE_SERVICE_PROFILE;
200 extern const std::string DELETE_CHARACTERISTIC_PROFILE;
201 extern const std::string SUBSCRIBE_DEVICE_PROFILE;
202 extern const std::string UNSUBSCRIBE_DEVICE_PROFILE;
203 extern const std::string SYNC_DEVICE_PROFILE;
204 extern const std::string PUT_ALL_TRUSTED_DEVICES;
205 extern const std::string PUT_DEVICE_PROFILE_BATCH;
206 extern const std::string DELETE_DEVICE_PROFILE_BATCH;
207 extern const std::string GET_DEVICE_PROFILES;
208 extern const std::string PUT_PRODUCT_INFO_BATCH;
209 extern const std::string PUT_DEVICE_ICON_INFO_BATCH;
210 extern const std::string GET_DEVICE_ICON_INFOS;
211 /* Common constants */
212 constexpr int32_t MIN_STRING_LEN = 0;
213 constexpr int32_t MAX_STRING_LEN = 4096;
214 constexpr int64_t MIN_STORAGE_KB = 0;
215 constexpr int64_t MAX_STORAGE_KB = 5368709120;
216 constexpr int32_t MIN_OS_API_LEVEL = 0;
217 constexpr int32_t MAX_OS_API_LEVEL = 10000;
218 constexpr int32_t MIN_OS_TYPE = 0;
219 constexpr int32_t MAX_OS_TYPE = 10000;
220 constexpr int32_t MAX_PARAM_SIZE = 20;
221 constexpr int32_t MAX_PROFILE_SIZE = 10000;
222 constexpr int32_t MAX_DEVICE_SIZE = 1000;
223 constexpr int32_t MAX_SERVICE_SIZE = 1000;
224 constexpr int32_t MAX_CHAR_SIZE = 1000;
225 constexpr int32_t MAX_DB_SIZE = 1000;
226 constexpr int32_t MAX_DUMP_ARGS_SIZE = 1000;
227 constexpr int32_t MAX_LISTENER_SIZE = 100;
228 constexpr int32_t MAX_EVENT_HANDLER_SIZE = 50;
229 constexpr int32_t MAX_DB_RECORD_SIZE = 10000;
230 constexpr int32_t MAX_SUBSCRIBE_CHANGE_SIZE = 6;
231 constexpr int32_t MAX_INTERFACE_SIZE = 60;
232 constexpr int32_t MAX_SUBSCRIBE_INFO_SIZE = 500;
233 constexpr int32_t MAX_SYNC_RESULTS_SIZE = 50;
234 constexpr int32_t MAX_STATIC_CAPABILITY_SIZE = 100;
235 constexpr int32_t MAX_ID_SIZE = 1000;
236 constexpr int32_t MAX_ICON_SIZE = 4*1024*1024;
237 constexpr int32_t MIN_USER_ID = 0;
238 constexpr int32_t MAX_USER_ID = 100000;
239 constexpr uint32_t MAX_TRUSTED_DEVICE_SIZE = 1000;
240 constexpr int32_t MAX_SESSIONKEY_SIZE = 8*1024;
241 extern const std::string IS_MULTI_USER;
242 extern const std::string SEPARATOR;
243 extern const std::string SLASHES;
244 extern const std::string DEV_PREFIX;
245 extern const std::string SVR_PREFIX;
246 extern const std::string CHAR_PREFIX;
247 extern const std::string USER_ID;
248 extern const std::string TOKEN_ID;
249 extern const std::string DEVICE_PROFILE_ID;
250 extern const std::string ALL_PROC;
251 extern const std::string TYPE_UNKNOWN;
252 extern const std::string TYPE_PHONE;
253 extern const std::string TYPE_PAD;
254 extern const std::string TYPE_TV;
255 extern const std::string TYPE_CAR;
256 extern const std::string TYPE_WATCH;
257 extern const std::string TYPE_PC;
258 extern const std::string TYPE_2IN1;
259 extern const std::string HIV_VERSION;
260 extern const std::string INVALID_PINCODE;
261 constexpr int32_t NUM_1 = 1;
262 constexpr int32_t NUM_2 = 2;
263 constexpr int32_t NUM_3 = 3;
264 constexpr int32_t NUM_4 = 4;
265 constexpr int32_t NUM_5 = 5;
266 constexpr int32_t NUM_6 = 6;
267 constexpr int32_t DEFAULT_USER_ID = -1;
268 constexpr int32_t DEFAULT_USER_ID_EXTRA = 0;
269 constexpr int32_t U_100 = 100;
270 constexpr int64_t DEFAULT_SERVICE_ID = -1;
271 constexpr int32_t DEFAULT_ID = -1;
272 constexpr int32_t DEFAULT_SERVICE_PROFILE_ID = -1;
273 constexpr int32_t DEFAULT_DEVICE_PROFILE_ID = -1;
274 constexpr int32_t DEFAULT_AUTH_BOX_TYPE = -1;
275 constexpr int32_t DEFAULT_AUTH_TYPE = -1;
276 constexpr int32_t DEFAULT_PIN_EXCHANGE_TYPE = -1;
277 constexpr uint32_t NUM_1U = 1;
278 constexpr uint32_t NUM_8U = 8;
279 constexpr uint16_t CUR_SWITCH_LEN = 3;
280 extern const std::string DP_PKG_NAME;
281 extern const std::string IS_NUMSTRING_RULES;
282 constexpr int32_t OHOS_TYPE = 10;
283 constexpr int32_t OHOS_TYPE_UNKNOWN = -1;
284 /* rdb constants */
285 extern const std::string RDB_PATH;
286 extern const std::string DATABASE_NAME;
287 constexpr int32_t RDB_VERSION = 1;
288 constexpr int32_t RDB_VERSION_5_1 = 2;
289 constexpr int32_t RDB_INIT_MAX_TIMES = 30;
290 constexpr int32_t RDB_INIT_INTERVAL_TIME = 100000;
291 /* TrustProfile Manager */
292 extern const std::string USERID;
293 extern const std::string BUNDLENAME;
294 extern const std::string TOKENID;
295 extern const std::string ACCOUNTID;
296 extern const std::string PRODUCTID;
297 extern const std::string DEVICEID_EQUAL_CONDITION;
298 extern const std::string ACCESSCONTROLID_EQUAL_CONDITION;
299 extern const std::string ACCESSERID_EQUAL_CONDITION;
300 extern const std::string ACCESSEEID_EQUAL_CONDITION;
301 constexpr int32_t ROWCNT_INIT = -1;
302 constexpr int32_t RET_INIT = -1;
303 constexpr int32_t ROWCOUNT_INIT = -1;
304 constexpr int32_t CHANGEROWCNT_INIT = -1;
305 constexpr int32_t CHANGEROWCNT_INIT_ID = -1;
306 constexpr int32_t COLUMNINDEX_INIT = -1;
307 constexpr int32_t STATUS_INIT = 0;
308 constexpr int32_t STATUS_ACTIVE = 1;
309 constexpr int32_t STATUS_INACTIVE = 0;
310 constexpr int32_t BINDTYPE_INIT = -1;
311 constexpr int32_t BINDLEVEL_INIT = -1;
312 constexpr int32_t DELETEROWS_INIT = -1;
313 constexpr int32_t DELETE_ACCESSER_CONDITION = 1;
314 constexpr int32_t DELETE_ACCESSEE_CONDITION = 1;
315 constexpr int32_t DELETE_TRUST_CONDITION = 0;
316 constexpr int32_t MAX_SAID = 16777215;
317 constexpr int64_t ROWID_INIT = -1;
318 constexpr int64_t DEVICE_PROFILE_ID_INIT = -1;
319 constexpr int64_t ACCESSERID_INIT = -1;
320 constexpr int64_t ACCESSEEID_INIT = -1;
321 constexpr int64_t ACCESSCONTROLID_INIT = -1;
322 extern const std::string CREATE_TURST_DEVICE_TABLE_SQL;
323 extern const std::string CREATE_ACCESS_CONTROL_TABLE_SQL;
324 extern const std::string CREATE_ACCESSER_TABLE_SQL;
325 extern const std::string CREATE_ACCESSEE_TABLE_SQL;
326 extern const std::string CREATE_TURST_DEVICE_TABLE_UNIQUE_INDEX_SQL;
327 extern const std::string CREATE_ACCESS_CONTROL_TABLE_UNIQUE_INDEX_SQL;
328 extern const std::string CREATE_ACCESSER_TABLE_UNIQUE_INDEX_SQL;
329 extern const std::string CREATE_ACCESSEE_TABLE_UNIQUE_INDEX_SQL;
330 extern const std::string DROP_OLD_UNIQUE_INDEX_ON_ACER;
331 extern const std::string DROP_OLD_UNIQUE_INDEX_ON_ACEE;
332 extern const std::string ALTER_TABLE_ACER_ADD_COLUMN_ACER_DEVICE_NAME;
333 extern const std::string ALTER_TABLE_ACER_ADD_COLUMN_ACER_SERVICE_NAME;
334 extern const std::string ALTER_TABLE_ACER_ADD_COLUMN_ACER_CREDENTIAL_ID;
335 extern const std::string ALTER_TABLE_ACER_ADD_COLUMN_ACER_STATUS;
336 extern const std::string ALTER_TABLE_ACER_ADD_COLUMN_ACER_SESSION_KEY_ID;
337 extern const std::string ALTER_TABLE_ACER_ADD_COLUMN_ACER_SESSION_KEY_TIMESTAMP;
338 extern const std::string ALTER_TABLE_ACEE_ADD_COLUMN_ACEE_DEVICE_NAME;
339 extern const std::string ALTER_TABLE_ACEE_ADD_COLUMN_ACEE_SERVICE_NAME;
340 extern const std::string ALTER_TABLE_ACEE_ADD_COLUMN_ACEE_CREDENTIAL_ID;
341 extern const std::string ALTER_TABLE_ACEE_ADD_COLUMN_ACEE_STATUS;
342 extern const std::string ALTER_TABLE_ACEE_ADD_COLUMN_ACEE_SESSION_KEY_ID;
343 extern const std::string ALTER_TABLE_ACEE_ADD_COLUMN_ACEE_SESSION_KEY_TIMESTAMP;
344 extern const std::string TRUST_DEVICE_TABLE;
345 extern const std::string ACCESS_CONTROL_TABLE;
346 extern const std::string ACCESSER_TABLE;
347 extern const std::string ACCESSEE_TABLE;
348 extern const std::string SELECT_TRUST_DEVICE_TABLE;
349 extern const std::string SELECT_TRUST_DEVICE_TABLE_WHERE_DEVICEID;
350 extern const std::string SELECT_ACCESS_CONTROL_TABLE_WHERE_ACCESSCONTROLID;
351 extern const std::string SELECT_ACCESS_CONTROL_TABLE_WHERE_ACCESSEEID;
352 extern const std::string SELECT_ACCESS_CONTROL_TABLE_WHERE_ACCESSERID;
353 extern const std::string SELECT_ACCESS_CONTROL_TABLE_WHERE_BINDTYPE_AND_STATUS;
354 extern const std::string SELECT_ACCESS_CONTROL_TABLE;
355 extern const std::string SELECT_ACCESS_CONTROL_TABLE_WHERE_TRUSTDEVICEID;
356 extern const std::string SELECT_ACCESS_CONTROL_TABLE_WHERE_TRUSTDEVICEID_AND_STATUS;
357 extern const std::string SELECT_ACCESS_CONTROL_TABLE_WHERE_STATUS;
358 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID;
359 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERID;
360 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_ACCESSERUSERID_ACCESSERTOKENID;
361 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_ACCESSEEUSEEID_ACCESSEETOKENID;
362 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_ACCESSERUSERID_ACCESSERBUNDLENAME;
363 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_ACCESSEEUSEEID_ACCESSEEBUNDLENAME;
364 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_ACCESSERUSERID_ACCESSERACCOUNTID;
365 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_ACCESSEEUSEEID_ACCESSEEACCOUNTID;
366 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_ACCESSERUSERID;
367 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_ACCESSEEUSERID;
368 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_ACCESSERTOKENID;
369 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_ACCESSEETOKENID;
370 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_DEVICEID_AND_ACCESSERTOKENID;
371 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_DEVICEID_AND_ACCESSEETOKENID;
372 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_DEVICEID_AND_USERID;
373 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_DEVICEID_AND_USERID;
374 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_ACCESSERDEVICEID;
375 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_ACCESSEEDEVICEID;
376 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_ACCESSERBUNDLENAME;
377 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_ACCESSEEBUNDLENAME;
378 extern const std::string SELECT_ACCESSEE_TABLE;
379 extern const std::string SELECT_ACCESSER_TABLE;
380 extern const std::string SELECT_ACCESS_CONTROL_TABLE_WHERE_ALL_EXCEPT_STATUS;
381 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ALL;
382 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ALL;
383 extern const std::string SELECT_ACCESSER_TABLE_WHERE_ACCESSERDEVICEID_AND_ACCESSERUSERID;
384 extern const std::string SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEDEVICEID_AND_ACCESSEEUSERID;
385 extern const std::string SELECT_ACCESS_CONTROL_TABLE_WHERE_ACCESSERID_AND_ACCESSEEID;
386 /* SubscribeTrustInfoManager */
387 extern const std::string SUBSCRIBE_TRUST_INFO_TABLE;
388 extern const std::string CREATE_SUBSCRIBE_TRUST_INFO_TABLE_SQL;
389 extern const std::string CREATE_SUBSCRIBE_TRUST_INFO_TABLE_UNIQUE_INDEX_SQL;
390 extern const std::string TRUST_DEVICE_DELETE;
391 extern const std::string TRUST_DEVICE_ADD;
392 extern const std::string TRUST_DEVICE_UPDATE;
393 /* event handler factory */
394 extern const std::string DP_HANDLER;
395 extern const std::string EMPTY_STRING;
396 /* switch attribute */
397 extern const std::string SWITCH_CAPABILITY_PATH;
398 extern const std::string SWITCH_CALLERS;
399 extern const std::string SWITCH_SERVICE_NAMES;
400 extern const std::string SWITCH_STATUS;
401 extern const std::string SWITCH_ON;
402 extern const std::string SWITCH_OFF;
403 extern const std::string SWITCH_OPERATE_PUT;
404 extern const std::string SWITCH_OPERATE_GET;
405 /* static attribute */
406 extern const std::string STATIC_CAPABILITY_SVR_ID;
407 extern const std::string STATIC_CAPABILITY_CHAR_ID;
408 extern const std::string STATIC_CAPABILITY_PATH;
409 extern const std::string STATIC_INFO_PATH;
410 extern const std::string STATIC_CAPABILITY_ATTRIBUTE;
411 extern const std::string STATIC_INFO;
412 extern const std::string DEFAULT_STATIC_VAL;
413 extern const std::string STATIC_CHARACTERISTIC_KEY;
414 extern const std::string STATIC_CAPABILITY_VERSION;
415 extern const std::string STATIC_CAPABILITY_VALUE;
416 extern const std::string DP_VERSION;
417 extern const std::string ABILITIES;
418 extern const std::string ABILITY_KEY;
419 extern const std::string ABILITY_VALUE;
420 constexpr char NOT_SUPPORT_STATIC_VAL = '0';
421 constexpr char SUPPORT_STATIC_VAL = '1';
422 extern const std::string STATIC_CAP_HANDLER_NAME;
423 extern const std::string STATIC_CAP_HANDLER_LOC;
424 extern const std::string DMS_HANDLER_LOC;
425 extern const std::string STATIC_VERSION_RULES;
426 constexpr uint32_t SWITCH_LENGTH_MAX = 24;
427 } // namespace DistributedDeviceProfile
428 } // namespace OHOS
429 #endif // OHOS_DP_DISTRIBUTED_DEVICE_PROFILE_CONSTANTS_H
430