[Windows] Remove redundant DirectSound error codes
[xbmc.git] / xbmc / platform / android / speech / SpeechRecognitionAndroid.h
blobcf0ee5d976f774c993afc9dbd4bf6d18e383a5ba
1 /*
2 * Copyright (C) 2012-2022 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "ISpeechRecognitionCallback.h"
12 #include "speech/ISpeechRecognition.h"
13 #include "threads/CriticalSection.h"
15 #include <memory>
16 #include <vector>
18 class CJNIContext;
20 namespace jni
22 class CJNIXBMCSpeechRecognitionListener;
25 class CSpeechRecognitionAndroid : public ISpeechRecognitionCallback,
26 public speech::ISpeechRecognition
28 public:
29 explicit CSpeechRecognitionAndroid(const CJNIContext& context);
30 ~CSpeechRecognitionAndroid() override;
32 // ISpeechRecognition implementation
33 void StartSpeechRecognition(
34 const std::shared_ptr<speech::ISpeechRecognitionListener>& listener) override;
36 // ISpeechRecognitionCallback implementation
37 void SpeechRecognitionDone(jni::CJNIXBMCSpeechRecognitionListener* listener) override;
39 private:
40 CSpeechRecognitionAndroid() = delete;
42 static void RegisterSpeechRecognitionListener(void* thiz);
44 const CJNIContext& m_context;
45 CCriticalSection m_speechRecognitionListenersMutex;
46 std::vector<std::unique_ptr<jni::CJNIXBMCSpeechRecognitionListener>> m_speechRecognitionListeners;