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