Horizon Official Technical Documentation
CharClientInterface.hpp
Go to the documentation of this file.
1/***************************************************
2 * _ _ _ *
3 * | | | | (_) *
4 * | |_| | ___ _ __ _ _______ _ __ *
5 * | _ |/ _ \| '__| |_ / _ \| '_ \ *
6 * | | | | (_) | | | |/ / (_) | | | | *
7 * \_| |_/\___/|_| |_/___\___/|_| |_| *
8 ***************************************************
9 * This file is part of Horizon (c).
10 * Copyright (c) 2020- Horizon Dev Team.
11 *
12 * Base Author - Sagun Khosla. (sagunxp@gmail.com)
13 *
14 * This library is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * This library is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this library. If not, see <http://www.gnu.org/licenses/>.
26 **************************************************/
27
28#ifndef HORIZON_CHARCLIENTINTERFACE_HPP
29#define HORIZON_CHARCLIENTINTERFACE_HPP
30
34
35namespace Horizon
36{
37namespace Char
38{
39class CharSession;
40class CharClientInterface : public ClientInterface<CharSession>
41{
42public:
43 CharClientInterface(std::shared_ptr<CharSession> s);
45
46 bool authorize_new_connection(uint32_t account_id, uint32_t auth_code, uint32_t account_level, uint8_t gender);
47
48 bool make_new_character(std::string name, uint8_t slot, uint32_t hair_color, uint32_t hair_style, uint32_t job_class, uint8_t gender);
49 bool make_new_character(std::string name, uint8_t slot, uint8_t hair_color, uint8_t hair_style);
50
52 bool character_delete_reserve(uint32_t character_id);
53 bool character_delete_email(uint32_t character_id, std::string email);
54 bool character_delete_birthdate(uint32_t character_id, std::string birthdate);
55 bool character_delete_cancel(uint32_t character_id);
56
57 bool pincode_create(uint32_t account_id, char *new_pin);
58 bool pincode_change(uint32_t account_id, char *old_pin, char *new_pin);
59 bool pincode_verify(uint32_t account_id, char *pincode);
60 void pincode_decrypt(uint32_t seed, char *input, char *output);
61
62 bool select_character(int slot);
63
64 bool update_session(int32_t account_id);
65
66protected:
68};
69}
70}
71
72#endif /* HORIZON_CHARCLIENTINTERFACE_HPP */
character_delete_result
Definition: Client.hpp:154
#define MAX_PINCODE_STRING_LENGTH
Definition: Client.hpp:42
Definition: CharClientInterface.hpp:41
bool character_delete_birthdate(uint32_t character_id, std::string birthdate)
Definition: CharClientInterface.cpp:278
bool character_delete_reserve(uint32_t character_id)
Definition: CharClientInterface.cpp:363
~CharClientInterface()
Definition: CharClientInterface.cpp:45
void pincode_decrypt(uint32_t seed, char *input, char *output)
Definition: CharClientInterface.cpp:503
bool select_character(int slot)
Definition: CharClientInterface.cpp:594
character_delete_result character_delete_soft(uint32_t character_id)
Definition: CharClientInterface.cpp:206
bool pincode_create(uint32_t account_id, char *new_pin)
Definition: CharClientInterface.cpp:414
bool authorize_new_connection(uint32_t account_id, uint32_t auth_code, uint32_t account_level, uint8_t gender)
Definition: CharClientInterface.cpp:49
bool character_delete_cancel(uint32_t character_id)
Definition: CharClientInterface.cpp:379
CharClientInterface(std::shared_ptr< CharSession > s)
Definition: CharClientInterface.cpp:39
bool pincode_change(uint32_t account_id, char *old_pin, char *new_pin)
Definition: CharClientInterface.cpp:445
bool pincode_verify(uint32_t account_id, char *pincode)
Definition: CharClientInterface.cpp:532
bool update_session(int32_t account_id)
Definition: CharClientInterface.cpp:626
bool make_new_character(std::string name, uint8_t slot, uint32_t hair_color, uint32_t hair_style, uint32_t job_class, uint8_t gender)
Definition: CharClientInterface.cpp:136
char _pincode_confirm[MAX_PINCODE_STRING_LENGTH]
Definition: CharClientInterface.hpp:67
bool character_delete_email(uint32_t character_id, std::string email)
Definition: CharClientInterface.cpp:246
Definition: ClientInterface.hpp:38
Definition: Element.hpp:7