libspeechd.h 1.7 KB

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