• 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 #ifndef _AMS_DATA_ABILITY_TEST_DEF_H_
16 #define _AMS_DATA_ABILITY_TEST_DEF_H_
17 #include <string>
18 
19 namespace OHOS {
20 namespace AppExecFwk {
21 const int PAGE_ABILITY_CODE = 1;
22 const int DATA_ABILITY_CODE = 2;
23 const int SERVICE_ABILITY_CODE = 3;
24 
25 const int ABILITY_PAGE_A_CODE = 110;
26 const int ABILITY_DATA_A_CODE = 210;
27 const int ABILITY_PAGE_B_CODE = 120;
28 const int ABILITY_DATA_B_CODE = 220;
29 const int ABILITY_DATA_C1_CODE = 230;
30 const int ABILITY_DATA_C2_CODE = 240;
31 
32 const int ABILITY_KIT_PAGE_A_CODE = 130;
33 const int ABILITY_KIT_SERVICE_A_CODE = 310;
34 const int ABILITY_KIT_DATA_A1_CODE = 250;
35 const int LIFECYCLE_CALLBACKS_A1 = 251;
36 const int LIFECYCLE_OBSERVER_A1 = 252;
37 const int ABILITY_KIT_DATA_A2_CODE = 260;
38 const int LIFECYCLE_CALLBACKS_A2 = 261;
39 const int LIFECYCLE_OBSERVER_A2 = 262;
40 const int ABILITY_KIT_DATA_A3_CODE = 290;
41 const int LIFECYCLE_CALLBACKS_A3 = 291;
42 const int LIFECYCLE_OBSERVER_A3 = 292;
43 
44 const int ABILITY_KIT_PAGE_B_CODE = 140;
45 const int ABILITY_KIT_SERVICE_B_CODE = 320;
46 const int ABILITY_KIT_DATA_B_CODE = 270;
47 const int LIFECYCLE_CALLBACKS_B = 271;
48 const int LIFECYCLE_OBSERVER_B = 272;
49 
50 const std::string DEVICE_ID = "device";
51 
52 const std::string ABILITY_TYPE_PAGE = "0";
53 const std::string ABILITY_TYPE_SERVICE = "1";
54 const std::string ABILITY_TYPE_DATA = "2";
55 
56 const std::string ABILITY_EVENT_NAME = "event_data_ability_callback";
57 const std::string TEST_EVENT_NAME = "event_data_test_action";
58 
59 const std::string PAGE_STATE_ONSTART = "onStart";
60 const std::string PAGE_STATE_ONSTOP = "OnStop";
61 const std::string PAGE_STATE_ONACTIVE = "OnActive";
62 const std::string PAGE_STATE_ONINACTIVE = "OnInactive";
63 const std::string PAGE_STATE_ONFOREGROUND = "OnForeground";
64 const std::string PAGE_STATE_ONBACKGROUND = "OnBackground";
65 
66 const std::string DATA_STATE_ONSTART = "OnStart";
67 const std::string DATA_STATE_ONSTOP = "OnStop";
68 const std::string DATA_STATE_ONACTIVE = "OnActive";
69 const std::string DATA_STATE_ONINACTIVE = "OnInactive";
70 const std::string DATA_STATE_ONFOREGROUND = "OnForeground";
71 const std::string DATA_STATE_ONBACKGROUND = "OnBackground";
72 const std::string DATA_STATE_INSERT = "Insert";
73 const std::string DATA_STATE_DELETE = "Delete";
74 const std::string DATA_STATE_UPDATE = "Update";
75 const std::string DATA_STATE_QUERY = "Query";
76 const std::string DATA_STATE_GETFILETYPES = "GetFileTypes";
77 const std::string DATA_STATE_OPENFILE = "OpenFile";
78 
79 const std::string SERVICE_STATE_ONSTART = "onStart";
80 const std::string SERVICE_STATE_ONSTOP = "OnStop";
81 const std::string SERVICE_STATE_ONACTIVE = "OnActive";
82 const std::string SERVICE_STATE_ONINACTIVE = "OnInactive";
83 const std::string SERVICE_STATE_ONFOREGROUND = "OnForeground";
84 const std::string SERVICE_STATE_ONBACKGROUND = "OnBackground";
85 const std::string SERVICE_STATE_ONCOMMAND = "OnCommand";
86 
87 const std::string DATA_STATE_CHANGE = "OnStateChanged";
88 const std::string DATA_STATE_ONNEWWANT = "OnNewWant";
89 
90 const std::string OPERATOR_INSERT = "Insert";
91 const std::string OPERATOR_DELETE = "Delete";
92 const std::string OPERATOR_UPDATE = "Update";
93 const std::string OPERATOR_QUERY = "Query";
94 const std::string OPERATOR_GETFILETYPES = "GetFileTypes";
95 const std::string OPERATOR_OPENFILE = "OpenFile";
96 const std::string OPERATOR_GETTYPE = "GetType";
97 const std::string OPERATOR_TEST_LIFECYCLE = "TestLifeCycle";
98 const std::string OPERATOR_GETLIFECYCLESTATE = "GetLifecycleState";
99 const std::string OPERATOR_DEFAULT = "Default";
100 
101 const std::string DEFAULT_INSERT_RESULT = "1111";
102 const std::string DEFAULT_DELETE_RESULT = "2222";
103 const std::string DEFAULT_UPDATE_RESULT = "3333";
104 const std::string DEFAULT_OPENFILE_RESULT = "4444";
105 const std::string DEFAULT_GETFILETYPE_RESULT = "filetypes";
106 const std::string DEFAULT_QUERY_RESULT = "Query";
107 const std::string DEFAULT_GETTYPE_RESULT = "GetType";
108 }  // namespace AppExecFwk
109 }  // namespace OHOS
110 #endif  // _AMS_DATA_ABILITY_TEST_DEF_H_