Resolve "Toggle Free Look with Hotkey"
[ryzomcore.git] / ryzom / client / src / connection.h
blob08e95d99fd91874d41d733a5c9bf6e82b07aaf84
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010-2021 Winch Gate Property Limited
3 //
4 // This source file has been modified by the following contributors:
5 // Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
6 //
7 // This program is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Affero General Public License as
9 // published by the Free Software Foundation, either version 3 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU Affero General Public License for more details.
17 // You should have received a copy of the GNU Affero General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef CL_CONNECTION_H
23 #define CL_CONNECTION_H
25 #include "nel/misc/types_nl.h"
26 //#include "game_share/jobs.h"
27 #include "game_share/mainland_summary.h"
29 extern uint8 ServerPeopleActive;
30 extern uint8 ServerCareerActive;
32 extern std::vector<CMainlandSummary> Mainlands;
33 extern uint8 PlayerSelectedSlot;
34 extern std::string PlayerSelectedFileName;
35 extern TSessionId PlayerSelectedMainland; // This is the mainland selected at the SELECT perso!!
36 extern std::string PlayerSelectedHomeShardName; // The home shard name (aniro, leanon etc....)
37 extern std::string PlayerSelectedHomeShardNameWithParenthesis; // Same with parenthesis
38 extern std::vector<CCharacterSummary> CharacterSummaries;
39 extern std::string UserPrivileges;
40 extern sint LoginCharsel;
42 extern std::string NewKeysCharNameWanted;
43 extern std::string NewKeysCharNameValidated;
44 extern std::string GameKeySet;
45 extern std::string RingEditorKeySet;
49 bool hasPrivilegeDEV();
50 bool hasPrivilegeSGM();
51 bool hasPrivilegeGM();
52 bool hasPrivilegeSG();
53 bool hasPrivilegeG();
54 bool hasPrivilegeEM();
55 bool hasPrivilegeEG();
56 bool hasPrivilegeVG();
57 bool hasPrivilegeOBSERVER();
58 bool hasPrivilegeTESTER();
61 // connection with the server. (login, shard list, etc.).
62 bool connection(const std::string &cookie, const std::string &fsaddr);
64 // reselect character after reconnection
65 bool reconnection();
67 enum TInterfaceState
69 AUTO_LOGIN, // -> GLOBAL_MENU, QUIT (if connection errors)
70 GLOBAL_MENU, // -> SELECT_CHARACTER, QUIT (if connection errors)
71 GOGOGO_IN_THE_GAME, // -> launch the game
72 QUIT_THE_GAME // -> quit the game
75 // All the functions associated to the Finite State Machine
76 TInterfaceState autoLogin (const std::string &cookie, const std::string &fsaddr, bool firstConnection);
79 std::string buildPlayerNameForSaveFile(const std::string &playerNameIn);
82 void globalMenuMovieShooter();
84 #ifdef RYZOM_BG_DOWNLOADER
85 void updateBGDownloaderUI();
86 #endif
88 // compute patcher priority, depending on the presence of one or more mainland characters : in this case, give the patch a boost
89 void updatePatcherPriorityBasedOnCharacters();
91 #endif // CL_CONNECTION_H
93 /* End of connection.h */