*/
int syspopup_has_popup(bundle *b);
+/**
+ * @brief This API reset timeout value of system popup.
+ *
+ * This API reset timeout value of system popup.
+ *
+ * @param[in] b bundle received by app_reset handler (included system popup name)
+ * @param[in] time timeout time (sec)
+ * @return 0 if success, negative value(<0) if fail
+ * @retval 0 success
+ * @retval -1 generic error
+ */
+int syspopup_reset_timeout(bundle *b, unsigned int time);
+
/** @} */
#endif
Name: syspopup
Summary: syspopup package
-Version: 0.0.89
+Version: 0.0.90
Release: 1
Group: System/Libraries
-License: Apache-2.0
+License: Apache License, Version 2.0
Source0: syspopup-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: pkgconfig(sqlite3)
%{_libdir}/libsyspopup_caller.so
%{_includedir}/syspopup_caller.h
%{_libdir}/pkgconfig/syspopup-caller.pc
+
+%changelog
+* Tue Apr 2 2013 - Hyugdeuk Kim <hd3.kim@samsung.com>
+- Add syspopup_reset_timeout api
\ No newline at end of file
if (sp->timeout_id != 0)
g_source_remove(sp->timeout_id);
- sp->timeout_id = g_timeout_add_seconds(info->timeout, _timeout_handler,
+
+ if(info->timeout > 0) {
+ sp->timeout_id = g_timeout_add_seconds(info->timeout, _timeout_handler,
(void *)sp->id);
- _D("add timeout - timeout : id=%d,timeout=%d(sec)", sp->id,
- info->timeout);
+ _D("add timeout - timeout : id=%d,timeout=%d(sec)", sp->id,
+ info->timeout);
+ }
return 0;
}
#include "syspopup.h"
#include "syspopup-app.h"
-/*#include <quickpanel.h> */
#include <time.h>
+
+#include <dlog.h>
+
+#undef LOG_TAG
+#define LOG_TAG "SYSPOPUP-APP"
+
+#define _E(fmt, arg...) LOGE(fmt,##arg)
+#define _D(fmt, arg...) LOGD(fmt,##arg)
+
/*
struct quickpanel {
int type;
{
struct appdata *ad = data;
- printf("[SYSPOPUP] %s, %d\n", __func__, __LINE__);
+ _D("__app_terminate called");
if (ad->win)
evas_object_del(ad->win);
static void __prt_recvd_bundle(const char *key, const char *value, void *d)
{
- printf("recvd - key: %s, value: %s\n", key, value);
+ _D("recvd - key: %s, value: %s\n", key, value);
}
static void __response_cb(void *data, Evas_Object * obj, void *event_info)
.reset = __app_reset,
};
-// unsetenv("ELM_SCALE");
-
- /* appcore measure time example */
- printf("from AUL to %s(): %d msec\n", __func__,
- appcore_measure_time_from("APP_START_TIME"));
-
memset(&ad, 0x0, sizeof(struct appdata));
ops.data = &ad;
bundle *b;
char title[TITLE_BUF_LEN];
char content[CONTENT_BUF_LEN];
-
/* add more variables here */
};
return 0;
}
+API int syspopup_reset_timeout(bundle *b, unsigned int time)
+{
+ const char *popup_name;
+ syspopup_info_t *info;
+ syspopup *sp = NULL;
+ int ret;
+
+ popup_name = _syspopup_get_name_from_bundle(b);
+ if (popup_name == NULL) {
+ _E("popup_name is null");
+ return -1;
+ }
+
+ sp = _syspopup_find(popup_name);
+ if (!sp) {
+ _E("find syspopup error");
+ return -1;
+ } else {
+ info = _syspopup_info_get(popup_name);
+ if (info == NULL) {
+ _E("get syspopup info error");
+ return -1;
+ }
+ info->timeout = time;
+ ret = _syspopup_reset_timeout(sp, info);
+ }
+
+ return ret;
+}
+
/* Second, keydown event */
ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE,
__x_rotate_cb, (void *)id);
-
}
return 0;