PlayerMessageBoxServiceProtocol.h 957 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef __PLAYER_MESSAGEBOX_SERVICE_PROTOCOL_H
  2. #define __PLAYER_MESSAGEBOX_SERVICE_PROTOCOL_H
  3. #include <string>
  4. #include "PlayerMacros.h"
  5. #include "PlayerServiceProtocol.h"
  6. PLAYER_NS_BEGIN
  7. class PlayerMessageBoxServiceProtocol : public PlayerServiceProtocol
  8. {
  9. public:
  10. static const int BUTTONS_OK = 0;
  11. static const int BUTTONS_OK_CANCEL = 1;
  12. static const int BUTTONS_YES_NO = 2;
  13. static const int BUTTONS_YES_NO_CANCEL = 3;
  14. static const int BUTTON_OK = 0;
  15. static const int BUTTON_CANCEL = 1;
  16. static const int BUTTON_YES = 2;
  17. static const int BUTTON_NO = 3;
  18. // Show a message box, return index of user clicked button
  19. //
  20. // @return int first button index is 0
  21. virtual int showMessageBox(const std::string &title,
  22. const std::string &message,
  23. int buttonsType = BUTTONS_OK) = 0;
  24. };
  25. PLAYER_NS_END
  26. #endif // __PLAYER_MESSAGEBOX_SERVICE_PROTOCOL_H