replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / resource / csdk / connectivity / inc / caadapterutils.h
index 5f8c248..cb9692f 100644 (file)
@@ -27,6 +27,8 @@
 #ifndef CA_ADAPTER_UTILS_H_
 #define CA_ADAPTER_UTILS_H_
 
+#include "iotivity_config.h"
+
 #include <stdbool.h>
 #ifdef __ANDROID__
 #include <jni.h>
@@ -46,7 +48,7 @@
 
 #include "cacommon.h"
 #include "logger.h"
-#include "pdu.h"
+#include <coap/pdu.h>
 #include "uarraylist.h"
 #include "cacommonutil.h"
 
@@ -275,6 +277,13 @@ jmethodID CAGetJNIMethodID(JNIEnv *env, const char* className,
                            const char* methodFormat);
 
 /**
+ * check JNI exception occurrence
+ * @param[in]   env              JNI interface pointer.
+ * @return  true(occurrence) or false(no occurrence).
+ */
+bool CACheckJNIException(JNIEnv *env);
+
+/**
  * To Delete other Global References
  * Called during CATerminate to remove global references
  */
@@ -282,6 +291,34 @@ void CADeleteGlobalReferences();
 
 #endif
 
+#ifndef WITH_ARDUINO
+/**
+ * print send state in the adapter.
+ * @param[in]   adapter          transport adapter type.
+ * @param[in]   addr             remote address.
+ * @param[in]   port             port.
+ * @param[in]   sentLen          sent data length.
+ * @param[in]   isSuccess        sent state.
+ * @param[in]   message          detailed message.
+ */
+void CALogSendStateInfo(CATransportAdapter_t adapter,
+                        const char *addr, uint16_t port, ssize_t sentLen,
+                        bool isSuccess, const char* message);
+
+/**
+ * print adapter state in the adapter.
+ * @param[in]   adapter          transport adapter type.
+ * @param[in]   state            adapter state.
+ */
+void CALogAdapterStateInfo(CATransportAdapter_t adapter, CANetworkStatus_t state);
+
+/**
+ * print adapter type name in the adapter.
+ * @param[in]   adapter          transport adapter type.
+ */
+void CALogAdapterTypeInfo(CATransportAdapter_t adapter);
+#endif
+
 #ifdef __cplusplus
 } /* extern "C" */
 #endif