summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungha Son <seungha.son@samsung.com>2017-09-19 06:14:12 (GMT)
committerSeungha Son <seungha.son@samsung.com>2017-09-27 04:51:08 (GMT)
commit3c1a537db31c5c7dbea051161d545d12f5d89285 (patch)
tree6272542698030b2cf2b4e01e45ec23a63b0e515c
parent7f7e94546c0d04ed8fff4f2fe6048dffef1a489e (diff)
downloadminicontrol-accepted/tizen_3.0_common.zip
minicontrol-accepted/tizen_3.0_common.tar.gz
minicontrol-accepted/tizen_3.0_common.tar.bz2
Signed-off-by: Seungha Son <seungha.son@samsung.com> Change-Id: Ic0ae3b421f45167d89ff6c2726f59b4fafeaa8b9
-rwxr-xr-xinclude/minicontrol-internal.h2
-rwxr-xr-xsrc/minicontrol-internal.c4
-rwxr-xr-xsrc/minicontrol-provider.c12
-rwxr-xr-xsrc/minicontrol-viewer.c2
4 files changed, 12 insertions, 8 deletions
diff --git a/include/minicontrol-internal.h b/include/minicontrol-internal.h
index 0ed1546..2cbb87f 100755
--- a/include/minicontrol-internal.h
+++ b/include/minicontrol-internal.h
@@ -85,7 +85,7 @@ typedef struct _minictrl_sig_handle minictrl_sig_handle;
int _minictrl_provider_message_send(int event, const char *minicontrol_name,
unsigned int witdh, unsigned int height,
- minicontrol_priority_e priority);
+ minicontrol_priority_e priority, time_t time);
int _minictrl_viewer_req_message_send(void);
diff --git a/src/minicontrol-internal.c b/src/minicontrol-internal.c
index 561320a..c3ec509 100755
--- a/src/minicontrol-internal.c
+++ b/src/minicontrol-internal.c
@@ -164,7 +164,7 @@ int _minictrl_send_event(const char *signal_name, const char *minicontrol_name,
int _minictrl_provider_message_send(int event, const char *minicontrol_name,
unsigned int witdh, unsigned int height,
- minicontrol_priority_e priority)
+ minicontrol_priority_e priority, time_t create_time)
{
int ret;
bundle *event_arg_bundle;
@@ -188,6 +188,8 @@ int _minictrl_provider_message_send(int event, const char *minicontrol_name,
sizeof(int));
bundle_add_byte(event_arg_bundle, "priority", (void *)&priority,
sizeof(int));
+ bundle_add_byte(event_arg_bundle, "create_time", (void *)&create_time,
+ sizeof(time_t));
ret = _minictrl_send_event(MINICTRL_DBUS_SIG_TO_VIEWER,
minicontrol_name, event, event_arg_bundle);
diff --git a/src/minicontrol-provider.c b/src/minicontrol-provider.c
index bf3e793..54b6e5b 100755
--- a/src/minicontrol-provider.c
+++ b/src/minicontrol-provider.c
@@ -40,6 +40,7 @@ struct _minicontrol_provider {
minictrl_sig_handle *running_sh;
minictrl_sig_handle *event_sh;
minicontrol_event_cb event_callback;
+ time_t create_time;
};
static void _minictrl_win_del_cb(void *data, Evas *e, Evas_Object *obj,
@@ -82,7 +83,7 @@ static void _running_req_cb(void *data, GVariant *parameters)
if (pd->state == MINICTRL_STATE_RUNNING) {
evas_object_geometry_get(pd->obj, NULL, NULL, &w, &h);
_minictrl_provider_message_send(MINICONTROL_EVENT_START,
- pd->name, w, h, 0);
+ pd->name, w, h, 0, pd->create_time);
}
}
@@ -118,7 +119,7 @@ static void _sig_to_provider_handler_cb(void *data, GVariant *parameters)
INFO("width[%d] height[%d]", width, height);
_minictrl_provider_message_send(
MINICONTROL_EVENT_RESIZE, pd->name,
- width, height, 0);
+ width, height, 0, 0);
}
if (pd->event_callback)
@@ -209,6 +210,7 @@ EXPORT_API Evas_Object *minicontrol_create_window(const char *name,
pd->name = name_inter;
pd->state = MINICTRL_STATE_READY;
pd->obj = win;
+ pd->create_time = time(NULL);
evas_object_data_set(win, MINICTRL_DATA_KEY, pd);
elm_win_autodel_set(win, EINA_TRUE);
@@ -299,7 +301,7 @@ static int minicontrol_win_start(Evas_Object *minicontrol)
evas_object_geometry_get(minicontrol, NULL, NULL, &w, &h);
_minictrl_provider_proc_send(MINICONTROL_DBUS_PROC_EXCLUDE);
ret = _minictrl_provider_message_send(MINICONTROL_EVENT_START,
- pd->name, w, h, 0);
+ pd->name, w, h, 0, pd->create_time);
}
return ret;
@@ -336,7 +338,7 @@ static int minicontrol_win_stop(Evas_Object *minicontrol)
pd->state = MINICTRL_STATE_READY;
_minictrl_provider_proc_send(MINICONTROL_DBUS_PROC_INCLUDE);
ret = _minictrl_provider_message_send(MINICONTROL_EVENT_STOP,
- pd->name, 0, 0, 0);
+ pd->name, 0, 0, 0, 0);
}
return ret;
@@ -382,7 +384,7 @@ static void _minictrl_win_resize_cb(void *data, Evas *e,
if (pd->state == MINICTRL_STATE_RUNNING) {
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
_minictrl_provider_message_send(MINICONTROL_EVENT_RESIZE,
- pd->name, w, h, 0);
+ pd->name, w, h, 0, 0);
}
}
diff --git a/src/minicontrol-viewer.c b/src/minicontrol-viewer.c
index a3a5ed7..456ee11 100755
--- a/src/minicontrol-viewer.c
+++ b/src/minicontrol-viewer.c
@@ -164,7 +164,7 @@ static void _minictrl_plug_server_del(Ecore_Evas *ee)
/* send message to remove plug */
_minictrl_provider_message_send(MINICONTROL_EVENT_STOP,
- minicontrol_name, 0, 0, MINICONTROL_PRIORITY_LOW);
+ minicontrol_name, 0, 0, MINICONTROL_PRIORITY_LOW, 0);
_minictrl_provider_proc_send(MINICONTROL_DBUS_PROC_INCLUDE);
free(minicontrol_name);
}