Tizen 2.1 base
[framework/osp/speech.git] / inc / FUixSpeechISpeechToTextEventListener.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file    FUixSpeechISpeechToTextEventListener.h
20  * @brief   This is the header file for the %ISpeechToTextEventListener interface.
21  *
22  * This header file contains the declarations of the %ISpeechToTextEventListener interface.
23  */
24
25 #ifndef _FUIX_SPEECH_ISPEECH_TO_TEXT_EVENT_LISTENER_H_
26 #define _FUIX_SPEECH_ISPEECH_TO_TEXT_EVENT_LISTENER_H_
27
28 #include <FUixSpeechSpeechToTextTypes.h>
29 #include <FBaseRtIEventListener.h>
30
31 namespace Tizen { namespace Uix { namespace Speech
32 {
33
34 /**
35  * @interface   ISpeechToTextEventListener
36  * @brief               This interface is a listener for speech recognition events.
37  *
38  * @since 2.0
39  *
40  * @remarks     @b Header @b %file: @b \#include @b <FUix.h> @n
41  *              @b Library : @b osp-speech-stt
42  *
43  * The %ISpeechToTextEventListener interface is a listener interface for speech recognition events.
44  * It provides methods that are invoked by the voice engine when the status is changed, an
45  * error or warning occurs or the result is received in the Speech-To-Text service. @n
46  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/speech_to_text.htm">Speech-To-Text</a>.
47  *
48  */
49
50 class _OSP_EXPORT_ ISpeechToTextEventListener
51         : virtual public Tizen::Base::Runtime::IEventListener
52 {
53 public:
54     /**
55      * This polymorphic destructor should be overridden if required. @n
56      * This way, the destructors of the derived classes are called when the destructor of this interface is called.
57      *
58      * @since 2.0
59      */
60     virtual ~ISpeechToTextEventListener(void) {}
61
62     /**
63      * Called when the Speech-To-Text service is initialized.
64      *
65      * @since 2.0
66      *
67      * @see SpeechToText::Initialize()
68      */
69     virtual void OnSpeechToTextInitialized(void) = 0;
70
71     /**
72      * Called when the Speech-To-Text recording status is changed.
73      *
74      * @since 2.0
75      *
76      * @param[in]   status  The recording status of the Speech-To-Text service
77      */
78     virtual void OnSpeechToTextStatusChanged(Tizen::Uix::Speech::SpeechToTextStatus status) = 0;
79
80     /**
81      * Called when an error occurs in the Speech-To-Text service.
82      *
83      * @since 2.0
84      *
85      * @param[in]   error   The reason for an error in the Speech-To-Text service
86      */
87     virtual void OnSpeechToTextErrorOccurred(Tizen::Uix::Speech::SpeechToTextError error) = 0;
88
89     /**
90      * Called when the Speech-To-Text service is completed.
91      *
92      * @since 2.0
93      *
94      * @param[in]   result  The result of the Speech-To-Text service
95      */
96     virtual void OnSpeechToTextCompleted(const Tizen::Base::String& result) = 0;
97
98 protected:
99     //
100     // This method is for internal use only. Using this method can cause behavioral, security-related,
101     // and consistency-related issues in the application.
102         //
103     virtual void ISpeechToTextEventListener_Reserved1(void) {}
104
105     //
106     // This method is for internal use only. Using this method can cause behavioral, security-related,
107     // and consistency-related issues in the application.
108     //
109     virtual void ISpeechToTextEventListener_Reserved2(void) {}
110
111     //
112     // This method is for internal use only. Using this method can cause behavioral, security-related,
113     // and consistency-related issues in the application.
114     //
115     virtual void ISpeechToTextEventListener_Reserved3(void) {}
116
117 }; // ISpeechToTextEventListener
118
119 }}} // Tizen::Uix::Speech
120
121 #endif