Fix coverity issues
[platform/core/uifw/stt.git] / client / stt_client.h
index ed9803d..b11e164 100644 (file)
@@ -1,5 +1,5 @@
 /*
-*  Copyright (c) 2011-2014 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
@@ -17,6 +17,7 @@
 
 #include <pthread.h>
 #include "stt.h"
+#include "stt_internal.h"
 #include "stt_main.h"
 
 #ifdef __cplusplus
@@ -26,14 +27,14 @@ extern "C" {
 typedef enum {
        STT_INTERNAL_STATE_NONE         = 0,
        STT_INTERNAL_STATE_STARTING     = 1,
-       STT_INTERNAL_STATE_STOPING      = 2,
+       STT_INTERNAL_STATE_STOPPING     = 2,
        STT_INTERNAL_STATE_CANCELING    = 3
 } stt_internal_state_e;
 
 typedef struct {
        /* base info */
        stt_h   stt;
-       int     pid; 
+       int     pid;
        int     uid;    /*<< unique id = pid + handle */
 
        stt_recognition_result_cb       recognition_result_cb;
@@ -55,13 +56,16 @@ typedef struct {
        stt_supported_language_cb       supported_lang_cb;
        void*                           supported_lang_user_data;
 
+       stt_speech_status_cb            speech_status_cb;
+       void*                           speech_status_user_data;
+
        char*           current_engine_id;
        char*           credential;
 
        /* option */
        bool            silence_supported;
        stt_option_silence_detection_e  silence;
-       bool            credential_needed;
+       bool            credential_needed;
 
        /* state */
        stt_state_e     before_state;
@@ -69,6 +73,9 @@ typedef struct {
 
        stt_internal_state_e    internal_state;
 
+       /* speech status */
+       int     speech_status;
+
        /* mutex */
        int             cb_ref_count;
 
@@ -77,10 +84,13 @@ typedef struct {
        char**  data_list;
        int     data_count;
        char*   msg;
-       
+
        /* error data */
        int     reason;
        char*   err_msg;
+
+       /* is this internal? */
+       bool    internal;
 } stt_client_s;