#include <InterServerAPI.hpp>
◆ InterServerAPI()
template<class SessionType >
◆ ~InterServerAPI()
template<class SessionType >
◆ delete_game_account()
template<class SessionType >
Request inter to delete a game account from the server's storage.
- Use carefully, deletions performed will affect all other services.
- Parameters
-
[in] | account_id | game account ID to check against. |
137 {
139 _inter_socket->get_session()->get_packet_handler()->Send_CI_GAME_ACCOUNT_DEL(account_id);
140 }
std::shared_ptr< SessionType > _inter_socket
Definition: InterServerAPI.hpp:168
References Horizon::Interface::InterServerAPI< SessionType >::_inter_socket.
◆ delete_session()
template<class SessionType >
◆ get_game_account()
template<class SessionType >
Obtain game account data from the inter-server.
- Does not check if the inter-server is online (but returns nullptr if the session happens to be null).
- Parameters
-
[in] | account_id | game account ID to check against. |
- Returns
- shared_ptr to the game account data or nullptr if none found.
115 {
116 std::shared_ptr<Horizon::Models::GameAccount> game_account = std::make_shared<Horizon::Models::GameAccount>();
117 PACKET_CI_GAME_ACCOUNT_REQ send_pkt;
118 PACKET_IC_GAME_ACCOUNT_REQ_ACK recv_pkt;
119
120 send_pkt.account_id = account_id;
121
123 &&
_inter_socket->get_session()->get_packet_handler()->send_and_receive_packet(send_pkt, &recv_pkt) == Horizon::Base::inter_packets::IC_GAME_ACCOUNT_REQ_ACK) {
124 *game_account << recv_pkt.s;
125 return game_account;
126 }
127
128 return nullptr;
129 }
References Horizon::Interface::InterServerAPI< SessionType >::_inter_socket.
◆ get_inter_socket()
template<class SessionType >
◆ get_session_data()
template<class SessionType >
Obtain session data from the inter-server.
- Does not check if the inter-server is online (but returns nullptr if the session happens to be null).
- Parameters
-
[in] | auth_code | session auth code to check against. |
- Returns
- shared_ptr to the session data or nullptr if none found.
64 {
65 std::shared_ptr<SessionData> session_data = std::make_shared<Horizon::Models::SessionData>();
66 PACKET_CI_SESSION_REQ send_pkt;
67 PACKET_IC_SESSION_REQ_ACK recv_pkt;
68
69 send_pkt.auth_code = auth_code;
70
72 &&
_inter_socket->get_session()->get_packet_handler()->send_and_receive_packet(send_pkt, &recv_pkt) == Horizon::Base::inter_packets::IC_SESSION_REQ_ACK) {
73 *session_data << recv_pkt.s;
74 return session_data;
75 }
76
77 return nullptr;
78 }
References Horizon::Interface::InterServerAPI< SessionType >::_inter_socket.
◆ ping_inter_server()
template<class SessionType >
◆ request_authorisation()
template<class SessionType >
◆ set_inter_socket()
template<class SessionType >
◆ store_game_account()
template<class SessionType >
◆ store_session_data()
template<class SessionType >
◆ _inter_socket
template<class SessionType >
The documentation for this class was generated from the following file: