X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fconnectivity%2Fsrc%2Fbt_le_adapter%2Fandroid%2Fcaleserver.h;h=516075e3f686e31d2ea540ce6b4c84cd3dbeb8ac;hb=7f00f942c39b7bc27c7eeecf213a239c3fe4173c;hp=48484b5bd4c692382d969e364285ec8af241e230;hpb=c0d343ad461c6506b2e9ddcb729151740a5e87b3;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/connectivity/src/bt_le_adapter/android/caleserver.h b/resource/csdk/connectivity/src/bt_le_adapter/android/caleserver.h index 48484b5..516075e 100644 --- a/resource/csdk/connectivity/src/bt_le_adapter/android/caleserver.h +++ b/resource/csdk/connectivity/src/bt_le_adapter/android/caleserver.h @@ -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. @@ -313,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