replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / resource / csdk / connectivity / util / inc / camanagerleinterface.h
index 9a175bf..4a0de07 100644 (file)
@@ -48,18 +48,45 @@ CAResult_t CASetLEClientAutoConnectionDeviceInfo();
  */
 CAResult_t CAUnsetLEClientAutoConnectionDeviceInfo();
 
+//custom advertisement data
+#if defined(__TIZEN__) && defined(LE_ADAPTER) && defined(BLE_CUSTOM_ADVERTISE)
+CAResult_t CAManagerLEServerSetAdvertisementData(const char* data, int length);
+CAResult_t CAManagerLEServerSetScanResponseData(const char* data, int length);
+#endif
+
+#if defined(__APPLE__) && defined(LE_ADAPTER)
+/**
+ * initialize client connection manager
+ *
+ * @return  ::CA_STATUS_OK or ::CA_STATUS_FAILED or ::CA_MEMORY_ALLOC_FAILED
+ */
+CAResult_t CAManagerLEClientInitialize();
+
+/**
+ * terminate client connection manager
+ *
+ * @return  ::CA_STATUS_OK or ::CA_STATUS_FAILED or ::CA_MEMORY_ALLOC_FAILED
+ */
+CAResult_t CAManagerLEClientTerminate();
+
 /**
- * Start advertise to receive request for scanning or connecting.
+ * stop BLE scan.
  */
-void CAStartServerLEAdvertising();
+void CAManagerLEStopScan();
 
 /**
- * Stop advertise to destroy advertiser.
+ * start BLE scan.
  */
-void CAStopServerLEAdvertising();
+void CAManagerLEStartScan();
+
+/**
+ * Disconnect from peripheral
+ */
+void CAManagerLEDisconnect();
+
+#endif
 
-#ifdef __ANDROID__
-#ifdef LE_ADAPTER
+#if defined(__ANDROID__) && defined(LE_ADAPTER)
 /**
  * initialize client connection manager
  * @param[in]   env                   JNI interface pointer.
@@ -77,8 +104,38 @@ CAResult_t CAManagerLEClientInitialize(JNIEnv *env, JavaVM *jvm, jobject context
  * @return  ::CA_STATUS_OK or ::CA_STATUS_FAILED or ::CA_MEMORY_ALLOC_FAILED
  */
 CAResult_t CAManagerLEClientTerminate(JNIEnv *env);
+
+/**
+ * set BLE scan interval time and working count.
+ * @param[in]  intervalTime         interval time(Seconds).
+ * @param[in]  workingCount         working count for selected interval time.
+ */
+void CAManagerLESetScanInterval(jint intervalTime, jint workingCount);
+
+/**
+ * stop BLE scan.
+ */
+void CAManagerLEStopScan();
 #endif
-#endif
+
+/**
+ * start BLE advertising.
+ * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
+ */
+CAResult_t CAManagerLEStartAdvertising();
+
+/**
+ * stop BLE advertising.
+ * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
+ */
+CAResult_t CAManagerLEStopAdvertising();
+
+
+/**
+ * set CAUtilConfig_t configure.
+ * @param[in]  config       ::CAUtilConfig_t value
+ */
+void CAManagerSetConfigure(CAUtilConfig_t config);
 
 #ifdef __cplusplus
 } /* extern "C" */