• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-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 #ifndef HIAPPEVENT_FRAMEWORKS_NATIVE_LIB_HIAPPEVENT_CACHE_APP_EVENT_CACHE_COMMON_H
16 #define HIAPPEVENT_FRAMEWORKS_NATIVE_LIB_HIAPPEVENT_CACHE_APP_EVENT_CACHE_COMMON_H
17 
18 #include <string>
19 
20 namespace OHOS {
21 namespace HiviewDFX {
22 namespace AppEventCacheCommon {
23 constexpr int DB_SUCC = 0;
24 constexpr int DB_FAILED = -1;
25 const unsigned int HIAPPEVENT_DOMAIN = 0xD002D07;
26 
27 namespace Events {
28 const std::string TABLE = "events";
29 const std::string FIELD_SEQ = "seq";
30 const std::string FIELD_DOMAIN = "domain";
31 const std::string FIELD_NAME = "name";
32 const std::string FIELD_TYPE = "type";
33 const std::string FIELD_TIME = "time";
34 const std::string FIELD_TZ = "tz";
35 const std::string FIELD_PID = "pid";
36 const std::string FIELD_TID = "tid";
37 const std::string FIELD_TRACE_ID = "trace_id";
38 const std::string FIELD_SPAN_ID = "span_id";
39 const std::string FIELD_PSPAN_ID = "pspan_id";
40 const std::string FIELD_TRACE_FLAG = "trace_flag";
41 const std::string FIELD_PARAMS = "params";
42 const std::string FIELD_SIZE = "size";
43 } // namespace Events
44 
45 namespace Observers {
46 const std::string TABLE = "observers";
47 const std::string FIELD_SEQ = "seq";
48 const std::string FIELD_NAME = "name";
49 const std::string FIELD_HASH = "hash";
50 } // namespace Observers
51 
52 namespace AppEventMapping {
53 const std::string TABLE = "event_observer_mapping";
54 const std::string FIELD_SEQ = "seq";
55 const std::string FIELD_EVENT_SEQ = "event_seq";
56 const std::string FIELD_OBSERVER_SEQ = "observer_seq";
57 } // namespace AppEventMapping
58 
59 namespace UserIds {
60 const std::string TABLE = "user_ids";
61 const std::string FIELD_SEQ = "seq";
62 const std::string FIELD_NAME = "name";
63 const std::string FIELD_VALUE = "value";
64 } // namespace UserIds
65 
66 namespace UserProperties {
67 const std::string TABLE = "user_properties";
68 const std::string FIELD_SEQ = "seq";
69 const std::string FIELD_NAME = "name";
70 const std::string FIELD_VALUE = "value";
71 } // namespace UserProperties
72 } // namespace AppEventCacheCommon
73 } // namespace HiviewDFX
74 } // namespace OHOS
75 #endif // HIAPPEVENT_FRAMEWORKS_NATIVE_LIB_HIAPPEVENT_CACHE_APP_EVENT_CACHE_COMMON_H
76