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 NSTACKX_DFINDER_MGT_MSG_LOG_H 17 #define NSTACKX_DFINDER_MGT_MSG_LOG_H 18 19 #ifndef DFINDER_USE_MINI_NSTACKX 20 #include "coap_discover.h" 21 #endif 22 #include "cJSON.h" 23 #include "nstackx_error.h" 24 25 #ifdef __cplusplus 26 extern "C" { 27 #endif 28 29 #ifdef DFINDER_MGT_MSG_LOG 30 #define DFINDER_MGT_UNPACK_LOG_LEN 400 31 #define DFINDER_MGT_UUID_LEN 14 32 33 void DFinderSetMgtMsgLog(int enable); 34 void DFinderMgtReqLog(CoapRequest *coapRequest); 35 void DFinderMgtUnpackLog(struct DeviceInfo *deviceInfo); 36 37 #define DFINDER_MGT_REQ_LOG(coapRequest) DFinderMgtReqLog(coapRequest) 38 #define DFINDER_MGT_UNPACK_LOG(deviceInfo) DFinderMgtUnpackLog(deviceInfo) 39 40 #else 41 #define DFINDER_MGT_REQ_LOG(coapRequest) 42 #define DFINDER_MGT_UNPACK_LOG(deviceInfo) 43 #endif 44 45 #ifdef __cplusplus 46 } 47 #endif 48 49 #endif /* END OF NSTACKX_DFINDER_MGT_MSG_LOG_H */ 50