[CONPRO-1473] Fix for build error [-Werror=implicit-function-declaration]
[platform/upstream/iotivity.git] / resource / csdk / connectivity / util / src / cautilinterface.c
index 756a9fa..74b8b45 100644 (file)
@@ -25,7 +25,9 @@
 #include "cacommon.h"
 #include "logger.h"
 #include "caremotehandler.h"
-
+#ifdef TCP_ADAPTER
+#include "catcpadapter.h"
+#endif
 #define TAG "OIC_CA_COMMON_UTILS"
 
 CAResult_t CARegisterNetworkMonitorHandler(CAAdapterStateChangedCB adapterStateCB, CAConnectionStateChangedCB connStateCB)
@@ -219,11 +221,11 @@ CAResult_t CASetAdvertisementData(const char* data, int length)
 }
 void CASetAdvertisementDataGetter(CAAdvertisementDataGetterCB getter)
 {
-       return CAManagerLEServerSetAdvertisementDataGetter(getter);
+       CAManagerLEServerSetAdvertisementDataGetter(getter);
 }
 void CASetAutoAdvertisement(bool autoAdvertisement)
 {
-       return CAManagerLEServerSetAutoAdvertisement(autoAdvertisement);
+       CAManagerLEServerSetAutoAdvertisement(autoAdvertisement);
 }
 CAResult_t CASetScanResponseData(const char* data, int length)
 {
@@ -464,6 +466,16 @@ CAResult_t CAUtilTCPDisconnectSession(const char *address, uint16_t port, CATran
 #endif
 }
 
+void CAUtilSkipTCPCloseOnInterfaceDown(bool state)
+{
+#ifdef TCP_ADAPTER
+    CATCPSkipCloseOnInterfaceDown(state);
+#else
+    (void) state;
+    OIC_LOG(DEBUG, TAG, "Not supported!");
+#endif
+}
+
 CAResult_t CAUtilStartGattServer()
 {
        OIC_LOG(DEBUG, TAG, "CAUtilStartGattServer");
@@ -489,3 +501,19 @@ CAResult_t CAUtilStopGattServer()
 #endif
        return res;
 }
+
+CAResult_t CAGetTCPIPHeader(CATransportAdapter_t adapter, int flag, TCPHeaderInfo* info)
+{
+    CAResult_t res = CA_STATUS_OK;
+#ifdef TCP_ADAPTER
+    if (CA_ADAPTER_TCP & adapter) {
+        res = CAGetTCPIPHeaderInfo(flag,info);
+    }
+    else
+        res = CA_NOT_SUPPORTED;
+#else
+    res = CA_NOT_SUPPORTED;
+    OIC_LOG(DEBUG, TAG, "Not supported!");
+#endif
+    return res;
+}