Changed to be used only once to create input stream.
[platform/upstream/iotivity.git] / resource / csdk / connectivity / src / bt_edr_adapter / android / caedrutils.h
index 85b4a52..6b83897 100644 (file)
@@ -27,7 +27,6 @@
 
 #include "cacommon.h"
 #include "cathreadpool.h"
-#include "uarraylist.h"
 #include "caedrinterface.h"
 #include "jni.h"
 
@@ -37,6 +36,15 @@ extern "C"
 #endif
 
 /**
+ * EDR Socket Information for EDR transport
+ */
+typedef struct
+{
+    jobject deviceSocket;   /**< Bluetooth device socket info */
+    jobject inputStream;    /**< InputStream for read data */
+} CAEDRSocketInfo_t;
+
+/**
  * Get address from device socket.
  * @param[in]   env                 JNI interface pointer.
  * @param[in]   bluetoothSocketObj  bluetooth socket object.
@@ -171,10 +179,10 @@ void CAEDRNativeRemoveDeviceSocketBaseAddr(JNIEnv *env, jstring address);
 
 /**
  * Get device socket object from the list.
- * @param[in]  idx              index of device list.
+ * @param[in]  index            index of device list.
  * @return Device socket object or NULL.
  */
-jobject CAEDRNativeGetDeviceSocket(uint32_t idx);
+jobject CAEDRNativeGetDeviceSocket(uint32_t index);
 
 /**
  * Get device socket address.
@@ -185,6 +193,13 @@ jobject CAEDRNativeGetDeviceSocket(uint32_t idx);
 jobject CAEDRNativeGetDeviceSocketBaseAddr(JNIEnv *env, const char* remoteAddress);
 
 /**
+ * Get input stream object from the list.
+ * @param[in]   index           index of device list.
+ * @return Input stream object or NULL.
+ */
+jobject CAEDRNativeGetInputStream(uint32_t index);
+
+/**
  * Get length of device socket list.
  * @return length of list.
  */