• 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 
16 #ifndef DEVICE_MANAGER_IPC_DEF_H
17 #define DEVICE_MANAGER_IPC_DEF_H
18 
19 namespace OHOS {
20 namespace DistributedHardware {
21 #define DEVICE_MANAGER_SERVICE_NAME "dev_mgr_svc"
22 #define MAX_DM_IPC_LEN 2048
23 
24 #define DECLARE_IPC_MODEL(className)                  \
25 public:                                               \
26     className() = default;                            \
27     virtual ~className() = default;                   \
28                                                       \
29 public:                                               \
30     className(const className &) = delete;            \
31     className &operator=(const className &) = delete; \
32     className(className &&) = delete;                 \
33     className &operator=(className &&) = delete
34 
35 #define DECLARE_IPC_INTERFACE(className) DECLARE_IPC_MODEL(className)
36 
37 enum IpcCmdID {
38     REGISTER_DEVICE_MANAGER_LISTENER = 0,
39     UNREGISTER_DEVICE_MANAGER_LISTENER,
40     GET_TRUST_DEVICE_LIST,
41     GET_LOCAL_DEVICE_INFO,
42     GET_UDID_BY_NETWORK,
43     GET_UUID_BY_NETWORK,
44     START_DEVICE_DISCOVER,
45     STOP_DEVICE_DISCOVER,
46     AUTHENTICATE_DEVICE,
47     UNAUTHENTICATE_DEVICE,
48     VERIFY_AUTHENTICATION,
49     SERVER_DEVICE_STATE_NOTIFY,
50     SERVER_DEVICE_FOUND,
51     SERVER_DISCOVER_FINISH,
52     SERVER_AUTH_RESULT,
53     SERVER_VERIFY_AUTH_RESULT,
54     SERVER_GET_DMFA_INFO,
55     SERVER_USER_AUTH_OPERATION,
56     SERVER_DEVICE_FA_NOTIFY,
57     REGISTER_DEV_STATE_CALLBACK,
58     UNREGISTER_DEV_STATE_CALLBACK,
59     //Add ipc msg here
60     IPC_MSG_BUTT
61 };
62 } // namespace DistributedHardware
63 } // namespace OHOS
64 #endif // DEVICE_MANAGER_IPC_DEF_H
65