static const uint16_t STATE_SEND_SUCCESS = 1;
static const uint16_t STATE_SEND_FAILED = 2;
-static const jint STATE_CONNECTED = 2;
-static const jint STATE_DISCONNECTED = 0;
-
typedef struct le_state_info
{
char address[CA_MACADDR_SIZE];
jint connectedState;
uint16_t notificationState;
uint16_t sendState;
+ jboolean autoConnectFlag;
} CALEState_t;
/**
/**
* waiting to get scanned device from BT Platform.
* if there is no scanned device in the list.
+ * @param[in] env JNI interface pointer.
+ * @param[in] address LE address.
* @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
*/
-CAResult_t CALEClientIsThereScannedDevices();
+CAResult_t CALEClientIsThereScannedDevices(JNIEnv *env, const char* address);
/**
* send data for unicast (implement).
CAResult_t CALEClientStopScanImpl(JNIEnv *env, jobject callback);
/**
+ * set auto connect flag for connectGatt API.
+ * @param[in] env JNI interface pointer.
+ * @param[in] jni_address remote address.
+ * @param[in] flag auto connect flag.
+ */
+CAResult_t CALEClientSetAutoConnectFlag(JNIEnv *env, jstring jni_address, jboolean flag);
+
+/**
+ * get auto connect flag.
+ * @param[in] env JNI interface pointer.
+ * @param[in] jni_address remote address.
+ * @return current auto connect flag;
+ */
+jboolean CALEClientGetAutoConnectFlag(JNIEnv *env, jstring jni_address);
+
+/**
* connect to gatt server hosted.
* @param[in] env JNI interface pointer.
* @param[in] bluetoothDevice bluetooth Device object.
CAResult_t CALEClientRemoveAllDeviceState();
/**
+ * Reset values of device state for all of devices.
+ * this method has to be invoked when BT adapter is disabled.
+ * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
+ */
+CAResult_t CALEClientResetDeviceStateForAll();
+
+/**
* remove the device state for a remote device.
* @param[in] remoteAddress remote address.
* @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).