requests.hrl 1.1 KB

1234567891011121314151617181920212223
  1. -include("basic_types.hrl").
  2. % actions are being instantiated from client to server
  3. -record(session_attach, {token}).
  4. -record(login, {username, password}).
  5. -record(logout, {}).
  6. -record(join_game, {game}).
  7. -record(stats_action, {player_id :: 'PlayerId'(), game_type}).
  8. -record(chat, {chat_id :: 'GameId'(), message :: string()}).
  9. -record(game_action, {game :: 'GameId'(), action, args = []}).
  10. -record(social_action, {game :: 'GameId'(), type, recipient::'PlayerId'()}).
  11. -record(pause_game, {table_id :: integer(),game :: 'GameId'(),action}).
  12. % event notifications from server to client
  13. -record(game_event, {game :: 'GameId'(), event, args = [] }).
  14. -record(chat_event, {chat :: 'GameId'(), content, author_id::'PlayerId'(),author_nick::string() }).
  15. -record(social_event, {type,game::'GameId'(),initiator::'PlayerId'(),recipient::'PlayerId'()}).
  16. -record(stats_event, {player_id :: 'PlayerId'(), games, reveals, protocol}).
  17. -record(game_paused, {table_id :: integer(), game :: 'GameId'(),action,who :: 'PlayerId'(),retries}).
  18. -record(disconnect, {reason_id,reason}).
  19. -record(player_left, {player :: 'PlayerId'(),human_replaced=false,replacement::'PlayerId'()}).