Added API to disable starting advertisement automatically
[platform/upstream/iotivity.git] / resource / csdk / connectivity / util / inc / camanagerleinterface.h
index c15b05c..f0bf2b9 100644 (file)
@@ -48,6 +48,67 @@ CAResult_t CASetLEClientAutoConnectionDeviceInfo();
  */
 CAResult_t CAUnsetLEClientAutoConnectionDeviceInfo();
 
+//custom advertisement data
+#if defined(__TIZEN__) && defined(LE_ADAPTER) && defined(BLE_CUSTOM_ADVERTISE)
+/**
+ * Set custom bluetooth advertisement data.
+ * @param[in]   data      Array of bluetooth advertisement data.
+ * @param[in]   length    Length of data array.
+ */
+CAResult_t CAManagerLEServerSetAdvertisementData(const char* data, int length);
+
+/**
+ * Set custom bluetooth advertisement data getter callback.
+ * @param[in]   getter    Custom bluetooth advertisement data getter callback.
+ */
+void CAManagerLEServerSetAdvertisementDataGetter(CAAdvertisementDataGetterCB getter);
+
+/**
+ * Set auto advertisement enabling flag.
+ * @param[in]   autoAdvertisement   Boolean flag to turn autoadvertisement on or off.
+ */
+void CAManagerLEServerSetAutoAdverisement(bool autoAdvertisement);
+
+/**
+ * Scan custom bluetooth advertisement data and write it to broadcaster.
+ * @param[in]   data      Array of bluetooth advertisement data.
+ * @param[in]   length    Lenght of data array.
+ */
+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();
+
+/**
+ * stop BLE scan.
+ */
+void CAManagerLEStopScan();
+
+/**
+ * start BLE scan.
+ */
+void CAManagerLEStartScan();
+
+/**
+ * Disconnect from peripheral
+ */
+void CAManagerLEDisconnect();
+
+#endif
+
 #if defined(__ANDROID__) && defined(LE_ADAPTER)
 /**
  * initialize client connection manager
@@ -74,8 +135,31 @@ CAResult_t CAManagerLEClientTerminate(JNIEnv *env);
  */
 void CAManagerLESetScanInterval(jint intervalTime, jint workingCount);
 
+/**
+ * stop BLE scan.
+ */
+void CAManagerLEStopScan();
 #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" */
 #endif