libnotify_loader.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 BRIGHTRAY_BROWSER_LINUX_LIBNOTIFY_LOADER_H_
  5. #define BRIGHTRAY_BROWSER_LINUX_LIBNOTIFY_LOADER_H_
  6. #include <libnotify/notify.h>
  7. #include <string>
  8. class LibNotifyLoader {
  9. public:
  10. LibNotifyLoader();
  11. ~LibNotifyLoader();
  12. bool Load(const std::string& library_name)
  13. __attribute__((warn_unused_result));
  14. bool loaded() const { return loaded_; }
  15. decltype(&::notify_is_initted) notify_is_initted;
  16. decltype(&::notify_init) notify_init;
  17. decltype(&::notify_get_server_caps) notify_get_server_caps;
  18. decltype(&::notify_get_server_info) notify_get_server_info;
  19. decltype(&::notify_notification_new) notify_notification_new;
  20. decltype(&::notify_notification_add_action) notify_notification_add_action;
  21. decltype(&::notify_notification_set_image_from_pixbuf)
  22. notify_notification_set_image_from_pixbuf;
  23. decltype(&::notify_notification_set_timeout) notify_notification_set_timeout;
  24. decltype(&::notify_notification_set_hint_string)
  25. notify_notification_set_hint_string;
  26. decltype(&::notify_notification_show) notify_notification_show;
  27. decltype(&::notify_notification_close) notify_notification_close;
  28. private:
  29. void CleanUp(bool unload);
  30. void* library_;
  31. bool loaded_;
  32. // Disallow copy constructor and assignment operator.
  33. LibNotifyLoader(const LibNotifyLoader&);
  34. void operator=(const LibNotifyLoader&);
  35. };
  36. #endif // BRIGHTRAY_BROWSER_LINUX_LIBNOTIFY_LOADER_H_