replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / resource / csdk / connectivity / src / bt_le_adapter / android / caleserver.h
index 1b7a862..516075e 100644 (file)
@@ -45,10 +45,9 @@ typedef void (*CAPacketReceiveCallback)(const char *address, const uint8_t *data
 
 /**
  * initialize server for BLE.
- * @param[in]   handle           thread pool handle object.
  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
  */
-CAResult_t CALEServerInitialize(ca_thread_pool_t handle);
+CAResult_t CALEServerInitialize();
 
 /**
  * terminate client for BLE.
@@ -129,12 +128,24 @@ CAResult_t CALEServerCreateJniInterfaceObject();
 
 /**
  * start advertise in gatt server.
+ * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
+ */
+CAResult_t CALEServerStartAdvertise();
+
+/**
+ * start advertise in gatt server.
  * @param[in]   env                JNI interface pointer.
  * @param[in]   advertiseCallback  callback to be notified on reception of
  *                                 advertisement result.
  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
  */
-CAResult_t CALEServerStartAdvertise(JNIEnv *env, jobject advertiseCallback);
+CAResult_t CALEServerStartAdvertiseImpl(JNIEnv *env, jobject advertiseCallback);
+
+/**
+ * stop advertise in gatt server.
+ * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
+ */
+CAResult_t CALEServerStopAdvertise();
 
 /**
  * stop advertise in gatt server.
@@ -143,7 +154,7 @@ CAResult_t CALEServerStartAdvertise(JNIEnv *env, jobject advertiseCallback);
  *                                 advertisement result.
  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
  */
-CAResult_t CALEServerStopAdvertise(JNIEnv *env, jobject advertiseCallback);
+CAResult_t CALEServerStopAdvertiseImpl(JNIEnv *env, jobject advertiseCallback);
 
 /**
  * open a gatt server.
@@ -292,13 +303,6 @@ CAResult_t CALEServerRemoveAllDevices(JNIEnv *env);
 CAResult_t CALEServerRemoveDevice(JNIEnv *env, jstring address);
 
 /**
- * Reordering for the list (connected device list).
- * @param[in]   index                 index of device list that want to reordering.
- * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
- */
-CAResult_t CALEServerReorderinglist(uint32_t index);
-
-/**
  * initialize mutex.
  * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
  */
@@ -320,6 +324,19 @@ CAResult_t CALEServerInitConditionVaraibles();
  */
 void CALEServerTerminateConditionVaraibles();
 
+/**
+ * check connection status.
+ * @param[in] address      the address of the remote device.
+ * @return  true or false.
+ */
+bool CALEServerIsConnected(const char* address);
+
+/**
+ * get MTU size.
+ * @param[in] address      the address of the remote device.
+ * @return  mtu size negotiated from remote device.
+ */
+uint16_t CALEServerGetMtuSize(const char* address);
 #ifdef __cplusplus
 } /* extern "C" */
 #endif