+ CAManagerLEStopScan();
+ return CA_STATUS_OK;
+#else
+ OIC_LOG(DEBUG, TAG, "it is not supported");
+ return CA_NOT_SUPPORTED;
+#endif
+}
+#endif // __ANDROID__
+
+CAResult_t CAUtilStartLEAdvertising()
+{
+ OIC_LOG(DEBUG, TAG, "CAUtilStartLEAdvertising");
+#if (defined(__ANDROID__) || defined(__TIZEN__)) && defined(LE_ADAPTER)
+ return CAManagerLEStartAdvertising();
+#else
+ OIC_LOG(DEBUG, TAG, "it is not supported");
+ return CA_NOT_SUPPORTED;
+#endif
+}
+
+CAResult_t CAUtilStopLEAdvertising()
+{
+ OIC_LOG(DEBUG, TAG, "CAUtilStopLEAdvertising");
+#if (defined(__ANDROID__) || defined(__TIZEN__)) && defined(LE_ADAPTER)
+ return CAManagerLEStopAdvertising();
+#else
+ OIC_LOG(DEBUG, TAG, "it is not supported");
+ return CA_NOT_SUPPORTED;
+#endif
+}
+
+CAResult_t CAUtilSetBTConfigure(CAUtilConfig_t config)
+{
+ OIC_LOG_V(DEBUG, TAG, "CAUtilSetConfigure");
+#if (defined(__ANDROID__) && defined(LE_ADAPTER))
+ OIC_LOG_V(DEBUG, TAG, " - bleFlag [%d]", config.bleFlags);
+ CAManagerSetConfigure(config);
+ return CA_STATUS_OK;
+#else
+ (void) config;
+ OIC_LOG(DEBUG, TAG, "it is not supported");
+ return CA_NOT_SUPPORTED;
+#endif
+}
+
+void CAUtilSetLogLevel(CAUtilLogLevel_t level, bool hidePrivateLogEntries)
+{
+ OIC_LOG(DEBUG, TAG, "CAUtilSetLogLevel");
+ LogLevel logLevel = DEBUG;
+ switch (level) {
+ case CA_LOG_LEVEL_ALL:
+ logLevel = DEBUG;
+ break;
+ case CA_LOG_LEVEL_INFO:
+ logLevel = INFO;
+ break;
+ default:
+ logLevel = DEBUG;
+ break;
+ }
+
+ OCSetLogLevel(logLevel, hidePrivateLogEntries);
+}
+
+CAResult_t CAUtilSetMulticastTTL(size_t ttl)
+{
+ OIC_LOG(DEBUG, TAG, "CAUtilSetMulticastTTL");
+#ifdef IP_ADAPTER
+ if (ttl > 255) {
+ OIC_LOG(ERROR, TAG, "TTL value is invalid");
+ return CA_STATUS_INVALID_PARAM;
+ }
+ if (ttl > 32) {
+ OIC_LOG(INFO, TAG, "TTL value is not supported");
+ return CA_NOT_SUPPORTED;
+ }
+ return CASetMulticastTTL(ttl);