1 /* 2 * Copyright (c) 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 #ifndef WIFI_DIRECT_NEGOTIATE_CHANNEL_H 16 #define WIFI_DIRECT_NEGOTIATE_CHANNEL_H 17 18 #include "wifi_direct_types.h" 19 20 #ifdef __cplusplus 21 extern "C" { 22 #endif 23 24 #define WIFI_DIRECT_NEGOTIATE_CHANNEL_BASE \ 25 int32_t (*postData)(struct WifiDirectNegotiateChannel *base, const uint8_t *data, size_t size); \ 26 bool (*isRemoteTlvSupported)(struct WifiDirectNegotiateChannel *base); \ 27 int32_t (*getDeviceId)(struct WifiDirectNegotiateChannel *base, char *deviceId, size_t deviceIdSize); \ 28 int32_t (*getP2pMac)(struct WifiDirectNegotiateChannel *base, char *p2pMac, size_t p2pMacSize); \ 29 void (*setP2pMac)(struct WifiDirectNegotiateChannel *base, const char *p2pMac); \ 30 bool (*isP2pChannel)(struct WifiDirectNegotiateChannel *base); \ 31 bool (*isMetaChannel)(struct WifiDirectNegotiateChannel *base); \ 32 struct WifiDirectNegotiateChannel* (*duplicate)(struct WifiDirectNegotiateChannel *base); \ 33 void (*destructor)(struct WifiDirectNegotiateChannel *base); \ 34 bool (*isLocalTlvSupported)(struct WifiDirectNegotiateChannel *base) 35 36 struct WifiDirectNegotiateChannel { 37 WIFI_DIRECT_NEGOTIATE_CHANNEL_BASE; 38 }; 39 40 #ifdef __cplusplus 41 } 42 #endif 43 #endif