int icl_dbus_get_timeout()
{
- gint timeout = g_dbus_proxy_get_default_timeout(G_DBUS_PROXY(icl_dbus_object));
+ gint timeout;
+
+ RETV_IF(NULL == icl_dbus_object, ICL_DBUS_TIMEOUT_DEFAULT);
+
+ timeout = g_dbus_proxy_get_default_timeout(G_DBUS_PROXY(icl_dbus_object));
if (timeout <= 0) {
ERR("Invalid timeout (%d)", timeout);
return ICL_DBUS_TIMEOUT_DEFAULT;
icl_dbus_stop();
}
+API int iotcon_get_timeout(int *timeout_seconds)
+{
+ RETV_IF(NULL == timeout_seconds, IOTCON_ERROR_INVALID_PARAMETER);
+
+ *timeout_seconds = icl_dbus_get_timeout();
+
+ return IOTCON_ERROR_NONE;
+}
+
+
API int iotcon_set_timeout(int timeout_seconds)
{
int ret;
void iotcon_close(void);
/**
+ * @brief Gets timeout of asynchronous APIs.
+ *
+ * @since_tizen 3.0
+ *
+ * @param[out] timeout_seconds Seconds for timeout
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #IOTCON_ERROR_NONE Successful
+ * @retval #IOTCON_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @pre iotcon_open() should be called to open a connection to the iotcon.
+ *
+ * @see iotcon_get_device_info()
+ * @see iotcon_get_platform_info()
+ * @see iotcon_get_tizen_info()
+ * @see iotcon_find_resource()
+ * @see iotcon_remote_resource_get()
+ * @see iotcon_remote_resource_put()
+ * @see iotcon_remote_resource_post()
+ * @see iotcon_remote_resource_delete()
+ */
+int iotcon_get_timeout(int *timeout_seconds);
+
+
+/**
* @brief Set timeout of asynchronous APIs.
* @details Default timeout is 10 seconds.
* Maximum timeout is 60 seconds.