From: Sung-Jin Park Date: Mon, 12 Jul 2021 17:21:16 +0000 (+0900) Subject: mmifw.tidl: add timestamp to struct voice_event X-Git-Tag: submit/tizen/20210914.042010~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ce610f3fe3ec22d1538075917e738eb605f060d4;p=platform%2Fcore%2Fuifw%2Fmmi-framework.git mmifw.tidl: add timestamp to struct voice_event Change-Id: Iad84b6712a99a7cae6ad98f42fbfaacf3dfc8de5 Signed-off-by: Sung-Jin Park --- diff --git a/src/interface/mmifw_proxy.c b/src/interface/mmifw_proxy.c index 43f6451..30c3769 100644 --- a/src/interface/mmifw_proxy.c +++ b/src/interface/mmifw_proxy.c @@ -1074,6 +1074,7 @@ int rpc_port_gesture_event_get_source(rpc_port_gesture_event_h h, char **source) struct voice_event_s { rpc_port_parcelable_t parcelable; int type; + int timestamp; char *source; }; @@ -1087,6 +1088,7 @@ static void __voice_event_to(rpc_port_parcel_h parcel, void *data) } rpc_port_parcel_write_int32(parcel, h->type); + rpc_port_parcel_write_int32(parcel, h->timestamp); rpc_port_parcel_write_string(parcel, h->source ? h->source : ""); } @@ -1100,6 +1102,7 @@ static void __voice_event_from(rpc_port_parcel_h parcel, void *data) } rpc_port_parcel_read_int32(parcel, &h->type); + rpc_port_parcel_read_int32(parcel, &h->timestamp); rpc_port_parcel_read_string(parcel, &h->source); } @@ -1157,6 +1160,7 @@ int rpc_port_voice_event_clone(rpc_port_voice_event_h h, rpc_port_voice_event_h } handle->type = h->type; + handle->timestamp = h->timestamp; if (h->source) { handle->source = strdup(h->source); if (!handle->source) { @@ -1182,6 +1186,17 @@ int rpc_port_voice_event_set_type(rpc_port_voice_event_h h, int type) return 0; } +int rpc_port_voice_event_set_timestamp(rpc_port_voice_event_h h, int timestamp) +{ + if (!h) { + _E("Invalid parameter"); + return -1; + } + + h->timestamp = timestamp; + return 0; +} + int rpc_port_voice_event_set_source(rpc_port_voice_event_h h, const char *source) { if (!h || !source) { @@ -1214,6 +1229,17 @@ int rpc_port_voice_event_get_type(rpc_port_voice_event_h h, int *type) return 0; } +int rpc_port_voice_event_get_timestamp(rpc_port_voice_event_h h, int *timestamp) +{ + if (!h || !timestamp) { + _E("Invalid parameter"); + return -1; + } + + *timestamp = h->timestamp; + return 0; +} + int rpc_port_voice_event_get_source(rpc_port_voice_event_h h, char **source) { if (!h || !source) { diff --git a/src/interface/mmifw_proxy.h b/src/interface/mmifw_proxy.h index 7f6cf88..0b08530 100644 --- a/src/interface/mmifw_proxy.h +++ b/src/interface/mmifw_proxy.h @@ -137,10 +137,14 @@ int rpc_port_voice_event_clone(rpc_port_voice_event_h h, rpc_port_voice_event_h int rpc_port_voice_event_set_type(rpc_port_voice_event_h h, int type); +int rpc_port_voice_event_set_timestamp(rpc_port_voice_event_h h, int timestamp); + int rpc_port_voice_event_set_source(rpc_port_voice_event_h h, const char *source); int rpc_port_voice_event_get_type(rpc_port_voice_event_h h, int *type); +int rpc_port_voice_event_get_timestamp(rpc_port_voice_event_h h, int *timestamp); + int rpc_port_voice_event_get_source(rpc_port_voice_event_h h, char **source); typedef struct action_event_s *rpc_port_action_event_h; diff --git a/tidl/mmifw.tidl b/tidl/mmifw.tidl index 3baca86..6f95f65 100644 --- a/tidl/mmifw.tidl +++ b/tidl/mmifw.tidl @@ -34,6 +34,7 @@ struct gesture_event { struct voice_event { int type; + int timestamp; string source; }