1 /* 2 * Copyright (C) 2021 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 COAP_DISCOVER_H 17 #define COAP_DISCOVER_H 18 19 #include "coap_def.h" 20 #include "nstackx_common.h" 21 22 typedef enum { 23 COAP_BROADCAST_TYPE_DEFAULT = 0, 24 COAP_BROADCAST_TYPE_USER = 1 25 } CoapBroadcastType; 26 27 void CoapServiceDiscoverInner(uint8_t userRequest); 28 void CoapServiceDiscoverInnerAn(uint8_t userRequest); 29 void CoapServiceDiscoverInnerConfigurable(uint8_t userRequest); 30 void CoapServiceDiscoverStopInner(void); 31 uint8_t CoapDiscoverRequestOngoing(void); 32 int32_t CoapDiscoverInit(EpollDesc epollfd); 33 void CoapDiscoverDeinit(void); 34 void ResetCoapDiscoverTaskCount(uint8_t isBusy); 35 void HndPostServiceDiscover(const CoapPacket *pkt); 36 void SetCoapDiscoverType(CoapBroadcastType type); 37 void SetCoapUserDiscoverInfo(uint32_t advCount, uint32_t advDuration); 38 void SendDiscoveryRsp(const NSTACKX_ResponseSettings *responseSettings); 39 #endif /* #ifndef COAP_DISCOVER_H */ 40