libspeechd.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // This is generated file. Do not modify directly.
  2. // Path to the code generator: tools/generate_library_loader/generate_library_loader.py .
  3. #ifndef LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBSPEECHD_H
  4. #define LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBSPEECHD_H
  5. #include "third_party/speech-dispatcher/libspeechd.h"
  6. #define LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBSPEECHD_H_DLOPEN
  7. #include <string>
  8. class LibSpeechdLoader {
  9. public:
  10. LibSpeechdLoader();
  11. ~LibSpeechdLoader();
  12. bool Load(const std::string& library_name)
  13. __attribute__((warn_unused_result));
  14. bool loaded() const { return loaded_; }
  15. decltype(&::spd_open) spd_open;
  16. decltype(&::spd_say) spd_say;
  17. decltype(&::spd_stop) spd_stop;
  18. decltype(&::spd_close) spd_close;
  19. decltype(&::spd_pause) spd_pause;
  20. decltype(&::spd_resume) spd_resume;
  21. decltype(&::spd_set_notification_on) spd_set_notification_on;
  22. decltype(&::spd_set_voice_rate) spd_set_voice_rate;
  23. decltype(&::spd_set_voice_pitch) spd_set_voice_pitch;
  24. decltype(&::spd_list_synthesis_voices) spd_list_synthesis_voices;
  25. decltype(&::spd_set_synthesis_voice) spd_set_synthesis_voice;
  26. decltype(&::spd_list_modules) spd_list_modules;
  27. decltype(&::spd_set_output_module) spd_set_output_module;
  28. decltype(&::spd_set_language) spd_set_language;
  29. private:
  30. void CleanUp(bool unload);
  31. #if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBSPEECHD_H_DLOPEN)
  32. void* library_;
  33. #endif
  34. bool loaded_;
  35. // Disallow copy constructor and assignment operator.
  36. LibSpeechdLoader(const LibSpeechdLoader&);
  37. void operator=(const LibSpeechdLoader&);
  38. };
  39. #endif // LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBSPEECHD_H