mmifw.tidl: add timestamp to struct voice_event 21/264121/1
authorSung-Jin Park <sj76.park@samsung.com>
Mon, 12 Jul 2021 17:21:16 +0000 (02:21 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Mon, 13 Sep 2021 12:14:32 +0000 (21:14 +0900)
Change-Id: Iad84b6712a99a7cae6ad98f42fbfaacf3dfc8de5
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
src/interface/mmifw_proxy.c
src/interface/mmifw_proxy.h
tidl/mmifw.tidl

index 43f6451..30c3769 100644 (file)
@@ -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) {
index 7f6cf88..0b08530 100644 (file)
@@ -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;
index 3baca86..6f95f65 100644 (file)
@@ -34,6 +34,7 @@ struct gesture_event {
 
 struct voice_event {
    int type;
+   int timestamp;
    string source;
 }