Merge "Add restore logic when daemon get signal" into tizen
[platform/core/uifw/stt.git] / server / sttd_client_data.h
index 5a80c84..a1bc732 100644 (file)
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved 
+*  Copyright (c) 2011-2016 Samsung Electronics Co., Ltd All Rights Reserved
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 #ifndef __STTD_CLIENT_DATA_H_
 #define __STTD_CLIENT_DATA_H_
 
+#include <glib.h>
+#include <Ecore.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 typedef enum {
-       APP_STATE_READY         = 0,
-       APP_STATE_RECORDING     = 1,
-       APP_STATE_PROCESSING    = 2
-}app_state_e;
+       APP_STATE_CREATED       = 0,
+       APP_STATE_READY         = 1,
+       APP_STATE_RECORDING     = 2,
+       APP_STATE_PROCESSING    = 3
+} app_state_e;
 
 typedef struct {
        int     pid;
        int     uid;
+       char*   start_beep;
+       char*   stop_beep;
+
        app_state_e     state;
+/*     Ecore_Timer*    timer;  */
+
+       bool    app_agreed;
 } client_info_s;
 
-int sttd_client_add(const int pid, const int uid);
+typedef struct {
+       int     index;
+       int     event;
+       char*   text;
+       long    start_time;
+       long    end_time;
+} result_time_info_s;
+
+typedef bool (*time_callback)(int index, int event, const char* text, long start_time, long end_time, void *user_data);
+
+
+int sttd_client_add(int pid, int uid);
 
-int sttd_client_delete(const int uid);
+int sttd_client_delete(int uid);
 
-int sttd_client_get_state(const int uid, app_state_e* state);
+int sttd_client_get_start_sound(int uid, char** filename);
 
-int sttd_client_set_state(const int uid, const app_state_e state);
+int sttd_client_set_start_sound(int uid, const char* filename);
+
+int sttd_client_get_stop_sound(int uid, char** filename);
+
+int sttd_client_set_stop_sound(int uid, const char* filename);
+
+int sttd_client_get_state(int uid, app_state_e* state);
+
+int sttd_client_set_state(int uid, app_state_e state);
 
 int sttd_client_get_ref_count();
 
-int sttd_client_get_pid(const int uid);
+int sttd_client_get_pid(int uid);
 
+#if 0
 int sttd_client_get_current_recording();
 
 int sttd_client_get_current_thinking();
 
+int sttd_cliet_set_timer(int uid, Ecore_Timer* timer);
+
+int sttd_cliet_get_timer(int uid, Ecore_Timer** timer);
+#endif
+
+int sttd_client_get_list(int** uids, int* uid_count);
+
+int stt_client_set_current_recognition(int uid);
+
+int stt_client_get_current_recognition();
+
+int stt_client_unset_current_recognition();
+
+
+int stt_client_set_app_agreed(int uid);
+
+bool stt_client_get_app_agreed(int uid);
+
+
 #ifdef __cplusplus
 }
 #endif