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 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 PUBLISH_DEVICE_DISCOVER, 47 UNPUBLISH_DEVICE_DISCOVER, 48 AUTHENTICATE_DEVICE, 49 UNAUTHENTICATE_DEVICE, 50 VERIFY_AUTHENTICATION, 51 SERVER_DEVICE_STATE_NOTIFY, 52 SERVER_DEVICE_FOUND, 53 SERVER_DISCOVER_FINISH, 54 SERVER_PUBLISH_FINISH, 55 SERVER_AUTH_RESULT, 56 SERVER_VERIFY_AUTH_RESULT, 57 SERVER_GET_DMFA_INFO, 58 SERVER_USER_AUTH_OPERATION, 59 SERVER_DEVICE_FA_NOTIFY, 60 SERVER_CREDENTIAL_RESULT, 61 REGISTER_DEV_STATE_CALLBACK, 62 UNREGISTER_DEV_STATE_CALLBACK, 63 REQUEST_CREDENTIAL, 64 IMPORT_CREDENTIAL, 65 DELETE_CREDENTIAL, 66 REGISTER_CREDENTIAL_CALLBACK, 67 UNREGISTER_CREDENTIAL_CALLBACK, 68 NOTIFY_EVENT, 69 GET_ENCRYPTED_UUID_BY_NETWOEKID, 70 GENERATE_ENCRYPTED_UUID, 71 // Add ipc msg here 72 IPC_MSG_BUTT 73 }; 74 } // namespace DistributedHardware 75 } // namespace OHOS 76 #endif // DEVICE_MANAGER_IPC_DEF_H 77