ipc_sdk.h 3.0 KB
Newer Older
X
xialiyun 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
/*
 * Copyright (C) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef IPC_SDK_H
#define IPC_SDK_H

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

#define IPC_RESULT_NUM_1 1
#define IPC_RESULT_NUM_2 2

#define IPC_CALL_BACK_STUB_AUTH_ID 0
#define IPC_CALL_BACK_STUB_BIND_ID 1

/* params type for ipc call */
#define PARAM_TYPE_APPID 1
#define PARAM_TYPE_DEV_AUTH_CB 2
#define PARAM_TYPE_LISTERNER 3
#define PARAM_TYPE_REQID 4
#define PARAM_TYPE_CREATE_PARAMS 5
#define PARAM_TYPE_GROUPID 6
#define PARAM_TYPE_UDID 7
#define PARAM_TYPE_ADD_PARAMS 8
#define PARAM_TYPE_DEL_PARAMS 9
#define PARAM_TYPE_COMM_DATA 10
#define PARAM_TYPE_REQ_CFM 11
#define PARAM_TYPE_BIND 12
#define PARAM_TYPE_UNBIND 13
#define PARAM_TYPE_GROUP_TYPE 14
#define PARAM_TYPE_CREDENTIAL 15
#define PARAM_TYPE_MGR_APPID 16
#define PARAM_TYPE_FRIEND_APPID 17
#define PARAM_TYPE_QUERY_PARAMS 18
#define PARAM_TYPE_REG_INFO 19
#define PARAM_TYPE_DATA_NUM 20
#define PARAM_TYPE_SESS_KEY 21
#define PARAM_TYPE_OPCODE 22
#define PARAM_TYPE_IPC_RESULT 23
#define PARAM_TYPE_IPC_RESULT_NUM 24
#define PARAM_TYPE_ERRCODE 25
#define PARAM_TYPE_ERR_INFO 26
#define PARAM_TYPE_REQ_INFO 27
#define PARAM_TYPE_GROUP_INFO 28
#define PARAM_TYPE_DEVICE_INFO 29
#define PARAM_TYPE_AUTH_PARAMS 30
#define PARAM_TYPE_CB_OBJECT 31

enum {
    IPC_CALL_ID_REG_CB = 1,
    IPC_CALL_ID_UNREG_CB,
    IPC_CALL_ID_REG_LISTENER,
    IPC_CALL_ID_UNREG_LISTENER,
    IPC_CALL_ID_CREATE_GROUP,
    IPC_CALL_ID_DEL_GROUP,
    IPC_CALL_ID_ADD_GROUP_MEMBER,
    IPC_CALL_ID_DEL_GROUP_MEMBER,
    IPC_CALL_ID_GM_PROC_DATA,
    IPC_CALL_ID_CFM_REQUEST,
    IPC_CALL_ID_BIND_PEER,
    IPC_CALL_ID_UNBIND_PEER,
    IPC_CALL_ID_PROC_LIGHT_DATA,
    IPC_CALL_ID_SAVE_CREDENTIAL,
    IPC_CALL_ID_APPLY_REG_INFO,
    IPC_CALL_ID_ADD_GROUP_MGR,
    IPC_CALL_ID_ADD_GROUP_FRIEND,
    IPC_CALL_ID_DEL_GROUP_MGR,
    IPC_CALL_ID_DEL_GROUP_FRIEND,
    IPC_CALL_ID_GET_GROUP_MGR,
    IPC_CALL_ID_GET_GROUP_FRIEND,
    IPC_CALL_ID_GET_GROUP_INFO,
    IPC_CALL_ID_SEARCH_GROUPS,
    IPC_CALL_ID_GET_JOINED_GROUPS,
    IPC_CALL_ID_GET_RELATED_GROUPS,
    IPC_CALL_ID_GET_DEV_INFO_BY_ID,
    IPC_CALL_ID_GET_TRUST_DEVICES,
    IPC_CALL_ID_IS_DEV_IN_GROUP,
    IPC_CALL_ID_DESTROY_INFO,
    IPC_CALL_ID_GA_PROC_DATA,
    IPC_CALL_ID_QUERY_TRUST_DEV_NUM,
    IPC_CALL_ID_IS_TRUST_DEVICE,
    IPC_CALL_ID_GET_AUTH_STATE,
    IPC_CALL_ID_AUTH_DEVICE,
    IPC_CALL_ID_INFORM_DEV_DISCONN
};

#ifdef __cplusplus
}
#endif
#endif