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 BIND_SESSION_COMMON_DEFINES_H 17 #define BIND_SESSION_COMMON_DEFINES_H 18 19 #include "base_session.h" 20 21 typedef void (*OnChannelOpenedFunc)(Session *, int64_t, int64_t); 22 typedef int32_t (*ProcessSessionFunc)(Session *, CJson *); 23 24 typedef struct { 25 Session base; 26 CJson *params; 27 OnChannelOpenedFunc onChannelOpened; 28 int32_t curTaskId; 29 int32_t opCode; 30 int32_t channelType; 31 int32_t moduleType; 32 int32_t osAccountId; 33 int64_t reqId; 34 int64_t channelId; 35 } BindSession; 36 37 #endif 38