1 #ifndef __LOBBY_2_PRESENCE_H
2 #define __LOBBY_2_PRESENCE_H
3 
4 #include "RakString.h"
5 
6 namespace RakNet
7 {
8 	class BitStream;
9 
10 	/// Lobby2Presence is information about your online status. It is only held in memory, so is lost when you go offline.
11 	/// Set by calling Client_SetPresence and retrieve with Client_GetPresence
12 	struct Lobby2Presence
13 	{
14 		Lobby2Presence();
15 		~Lobby2Presence();
16 		void Serialize(RakNet::BitStream *bitStream, bool writeToBitstream);
17 
18 		enum Status
19 		{
20 			/// Set by the constructor, meaning it was never set. This is the default if a user is online, but SetPresence() was never called.
21 			UNDEFINED,
22 			/// Returned by Client_GetPresence() if you query for a user that is not online, whether or not SetPresence was ever called().
23 			NOT_ONLINE,
24 			/// Set by the user (you)
25 			AWAY,
26 			/// Set by the user (you)
27 			DO_NOT_DISTURB,
28 			/// Set by the user (you)
29 			MINIMIZED,
30 			/// Set by the user (you)
31 			TYPING,
32 			/// Set by the user (you)
33 			VIEWING_PROFILE,
34 			/// Set by the user (you)
35 			EDITING_PROFILE,
36 			/// Set by the user (you)
37 			IN_LOBBY,
38 			/// Set by the user (you)
39 			IN_ROOM,
40 			/// Set by the user (you)
41 			IN_GAME
42 		} status;
43 
44 		/// Visibility flag. This is not enforced by the server, so if you want a user's presence to be not visible, just don't display it on the client
45 		bool isVisible;
46 
47 		/// Although game name is also present in the titleName member of Client_Login, this is the visible name returned by presence queries
48 		/// That is because Client_Login::titleName member is optional, for example for lobbies that support multiple titles.
49 		/// Set by the user (you) or leave blank if desired.
50 		RakString titleName;
51 
52 		/// Anything you want
53 		RakString statusString;
54 	};
55 }
56 
57 #endif
58