1 /* 2 * Copyright (C) 2021-2022 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 IPC_SDK_H 17 #define IPC_SDK_H 18 19 #include <stdint.h> 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 25 #define IPC_RESULT_NUM_1 1 26 #define IPC_RESULT_NUM_2 2 27 28 #define IPC_CALL_BACK_STUB_AUTH_ID 0 29 #define IPC_CALL_BACK_STUB_BIND_ID 1 30 31 /* params type for ipc call */ 32 #define PARAM_TYPE_APPID 1 33 #define PARAM_TYPE_DEV_AUTH_CB 2 34 #define PARAM_TYPE_LISTERNER 3 35 #define PARAM_TYPE_REQID 4 36 #define PARAM_TYPE_CREATE_PARAMS 5 37 #define PARAM_TYPE_GROUPID 6 38 #define PARAM_TYPE_UDID 7 39 #define PARAM_TYPE_ADD_PARAMS 8 40 #define PARAM_TYPE_DEL_PARAMS 9 41 #define PARAM_TYPE_COMM_DATA 10 42 #define PARAM_TYPE_REQ_CFM 11 43 #define PARAM_TYPE_BIND 12 44 #define PARAM_TYPE_UNBIND 13 45 #define PARAM_TYPE_GROUP_TYPE 14 46 #define PARAM_TYPE_CREDENTIAL 15 47 #define PARAM_TYPE_MGR_APPID 16 48 #define PARAM_TYPE_FRIEND_APPID 17 49 #define PARAM_TYPE_QUERY_PARAMS 18 50 #define PARAM_TYPE_REG_INFO 19 51 #define PARAM_TYPE_DATA_NUM 20 52 #define PARAM_TYPE_SESS_KEY 21 53 #define PARAM_TYPE_OPCODE 22 54 #define PARAM_TYPE_IPC_RESULT 23 55 #define PARAM_TYPE_IPC_RESULT_NUM 24 56 #define PARAM_TYPE_ERRCODE 25 57 #define PARAM_TYPE_ERR_INFO 26 58 #define PARAM_TYPE_REQ_INFO 27 59 #define PARAM_TYPE_GROUP_INFO 28 60 #define PARAM_TYPE_DEVICE_INFO 29 61 #define PARAM_TYPE_AUTH_PARAMS 30 62 #define PARAM_TYPE_CB_OBJECT 31 63 #define PARAM_TYPE_OS_ACCOUNT_ID 32 64 #define PARAM_TYPE_RETURN_DATA 33 65 66 enum { 67 IPC_CALL_ID_REG_CB = 1, 68 IPC_CALL_ID_UNREG_CB, 69 IPC_CALL_ID_REG_LISTENER, 70 IPC_CALL_ID_UNREG_LISTENER, 71 IPC_CALL_ID_CREATE_GROUP, 72 IPC_CALL_ID_DEL_GROUP, 73 IPC_CALL_ID_ADD_GROUP_MEMBER, 74 IPC_CALL_ID_DEL_GROUP_MEMBER, 75 IPC_CALL_ID_GM_PROC_DATA, 76 IPC_CALL_ID_SAVE_CREDENTIAL, 77 IPC_CALL_ID_APPLY_REG_INFO, 78 IPC_CALL_ID_CHECK_ACCESS_TO_GROUP, 79 IPC_CALL_ID_GET_PK_INFO_LIST, 80 IPC_CALL_ID_GET_GROUP_INFO, 81 IPC_CALL_ID_SEARCH_GROUPS, 82 IPC_CALL_ID_GET_JOINED_GROUPS, 83 IPC_CALL_ID_GET_RELATED_GROUPS, 84 IPC_CALL_ID_GET_DEV_INFO_BY_ID, 85 IPC_CALL_ID_GET_TRUST_DEVICES, 86 IPC_CALL_ID_IS_DEV_IN_GROUP, 87 IPC_CALL_ID_DESTROY_INFO, 88 IPC_CALL_ID_GA_PROC_DATA, 89 IPC_CALL_ID_AUTH_DEVICE, 90 }; 91 92 #ifdef __cplusplus 93 } 94 #endif 95 #endif 96