1 #ifndef __LOBBY_2_MESSAGE_H
2 #define __LOBBY_2_MESSAGE_H
3 
4 #include "BitStream.h"
5 #include "Lobby2ResultCode.h"
6 #include "RakString.h"
7 #include "RakAssert.h"
8 #include "RakNetSmartPtr.h"
9 #include "SimpleMutex.h"
10 #include "Lobby2Presence.h"
11 
12 
13 
14 
15 
16 #pragma once
17 
18 namespace RakNet
19 {
20 
21 struct Lobby2Callbacks;
22 class Lobby2Client;
23 class Lobby2Server;
24 struct BinaryDataBlock;
25 struct Lobby2ServerCommand;
26 
27 const unsigned int L2_MAX_BINARY_DATA_LENGTH=1000000;
28 
29 
30 // --------------------------------------------- Enumeration list of all message IDs --------------------------------------------
31 
32 /// All enumerations for Lobby2Message. Each Lobby2Message has one enumeration
33 /// \ingroup LOBBY_2_COMMANDS
34 enum Lobby2MessageID
35 {
36 	L2MID_Platform_Startup,
37 	L2MID_Platform_Shutdown,
38 	L2MID_System_CreateDatabase,
39 	L2MID_System_DestroyDatabase,
40 	L2MID_System_CreateTitle,
41 	L2MID_System_DestroyTitle,
42 	L2MID_System_GetTitleRequiredAge,
43 	L2MID_System_GetTitleBinaryData,
44 	L2MID_System_RegisterProfanity,
45 	L2MID_System_BanUser,
46 	L2MID_System_UnbanUser,
47 	L2MID_CDKey_Add,
48 	L2MID_CDKey_GetStatus,
49 	L2MID_CDKey_Use,
50 	L2MID_CDKey_FlagStolen,
51 	L2MID_Client_Login,
52 	L2MID_Client_Logoff,
53 	L2MID_Client_RegisterAccount,
54 	L2MID_System_SetEmailAddressValidated,
55 	L2MID_Client_ValidateHandle,
56 	L2MID_System_DeleteAccount,
57 	L2MID_System_PruneAccounts,
58 	L2MID_Client_GetEmailAddress,
59 	L2MID_Client_GetPasswordRecoveryQuestionByHandle,
60 	L2MID_Client_GetPasswordByPasswordRecoveryAnswer,
61 	L2MID_Client_ChangeHandle,
62 	L2MID_Client_UpdateAccount,
63 	L2MID_Client_GetAccountDetails,
64 	L2MID_Client_StartIgnore,
65 	L2MID_Client_StopIgnore,
66 	L2MID_Client_GetIgnoreList,
67 	L2MID_Client_PerTitleIntegerStorage,
68 	L2MID_Client_PerTitleBinaryStorage,
69 	L2MID_Client_SetPresence,
70 	L2MID_Client_GetPresence,
71 	L2MID_Friends_SendInvite,
72 	L2MID_Friends_AcceptInvite,
73 	L2MID_Friends_RejectInvite,
74 	L2MID_Friends_GetInvites,
75 	L2MID_Friends_GetFriends,
76 	L2MID_Friends_Remove,
77 	L2MID_BookmarkedUsers_Add,
78 	L2MID_BookmarkedUsers_Remove,
79 	L2MID_BookmarkedUsers_Get,
80 	L2MID_Emails_Send,
81 	L2MID_Emails_Get,
82 	L2MID_Emails_Delete,
83 	L2MID_Emails_SetStatus,
84 	L2MID_Ranking_SubmitMatch,
85 	L2MID_Ranking_GetMatches,
86 	L2MID_Ranking_GetMatchBinaryData,
87 	L2MID_Ranking_GetTotalScore,
88 	L2MID_Ranking_WipeScoresForPlayer,
89 	L2MID_Ranking_WipeMatches,
90 	L2MID_Ranking_PruneMatches,
91 	L2MID_Ranking_UpdateRating,
92 	L2MID_Ranking_WipeRatings,
93 	L2MID_Ranking_GetRating,
94 	L2MID_Clans_Create,
95 	L2MID_Clans_SetProperties,
96 	L2MID_Clans_GetProperties,
97 	L2MID_Clans_SetMyMemberProperties,
98 	L2MID_Clans_GrantLeader,
99 	L2MID_Clans_SetSubleaderStatus,
100 	L2MID_Clans_SetMemberRank,
101 	L2MID_Clans_GetMemberProperties,
102 	L2MID_Clans_ChangeHandle,
103 	L2MID_Clans_Leave,
104 	L2MID_Clans_Get,
105 	L2MID_Clans_SendJoinInvitation,
106 	L2MID_Clans_WithdrawJoinInvitation,
107 	L2MID_Clans_AcceptJoinInvitation,
108 	L2MID_Clans_RejectJoinInvitation,
109 	L2MID_Clans_DownloadInvitationList,
110 	L2MID_Clans_SendJoinRequest,
111 	L2MID_Clans_WithdrawJoinRequest,
112 	L2MID_Clans_AcceptJoinRequest,
113 	L2MID_Clans_RejectJoinRequest,
114 	L2MID_Clans_DownloadRequestList,
115 	L2MID_Clans_KickAndBlacklistUser,
116 	L2MID_Clans_UnblacklistUser,
117 	L2MID_Clans_GetBlacklist,
118 	L2MID_Clans_GetMembers,
119 	L2MID_Clans_GetList,
120 	L2MID_Clans_CreateBoard,
121 	L2MID_Clans_DestroyBoard,
122 	L2MID_Clans_CreateNewTopic,
123 	L2MID_Clans_ReplyToTopic,
124 	L2MID_Clans_RemovePost,
125 	L2MID_Clans_GetBoards,
126 	L2MID_Clans_GetTopics,
127 	L2MID_Clans_GetPosts,
128 	L2MID_Console_GetServerStatus,
129 	L2MID_Console_GetWorldListFromServer,
130 	L2MID_Console_GetLobbyListFromWorld,
131 	L2MID_Console_JoinLobby,
132 	L2MID_Console_LeaveLobby,
133 	L2MID_Console_SendLobbyChatMessage,
134 	L2MID_Console_SearchRooms,
135 	L2MID_Console_GetRoomDetails,
136 	L2MID_Console_GetLobbyMemberData,
137 	L2MID_Console_CreateRoom,
138 	L2MID_Console_SetRoomSearchProperties,
139 	L2MID_Console_UpdateRoomParameters,
140 	L2MID_Console_JoinRoom,
141 	L2MID_Console_LeaveRoom,
142 	L2MID_Console_SendLobbyInvitationToRoom,
143 	L2MID_Console_SendGUIInvitationToRoom,
144 	L2MID_Console_SendDataMessageToUser,
145 	L2MID_Console_SendRoomChatMessage,
146 	L2MID_Notification_Client_RemoteLogin,
147 	L2MID_Notification_Client_IgnoreStatus,
148 	L2MID_Notification_Friends_StatusChange,
149 	L2MID_Notification_Friends_PresenceUpdate,
150 	L2MID_Notification_User_ChangedHandle,
151 	L2MID_Notification_Friends_CreatedClan,
152 	L2MID_Notification_Emails_Received,
153 	L2MID_Notification_Clans_GrantLeader,
154 	L2MID_Notification_Clans_SetSubleaderStatus,
155 	L2MID_Notification_Clans_SetMemberRank,
156 	L2MID_Notification_Clans_ChangeHandle,
157 	L2MID_Notification_Clans_Leave,
158 	L2MID_Notification_Clans_PendingJoinStatus,
159 	L2MID_Notification_Clans_NewClanMember,
160 	L2MID_Notification_Clans_KickAndBlacklistUser,
161 	L2MID_Notification_Clans_UnblacklistUser,
162 	L2MID_Notification_Clans_Destroyed,
163 	L2MID_Notification_Console_CableDisconnected,
164 	L2MID_Notification_Console_ContextError,
165 	L2MID_Notification_Console_MemberJoinedLobby,
166 	L2MID_Notification_Console_MemberLeftLobby,
167 	L2MID_Notification_Console_LobbyDestroyed,
168 	L2MID_Notification_Console_LobbyMemberDataUpdated,
169 	L2MID_Notification_Console_LobbyGotChatMessage,
170 	L2MID_Notification_Console_LobbyGotRoomInvitation,
171 	L2MID_Notification_Console_MemberJoinedRoom,
172 	L2MID_Notification_Console_MemberLeftRoom,
173 	L2MID_Notification_Console_KickedOutOfRoom,
174 	L2MID_Notification_Console_RoomWasDestroyed,
175 	L2MID_Notification_Console_UpdateRoomParameters,
176 	L2MID_Notification_Console_RoomOwnerChanged,
177 	L2MID_Notification_Console_RoomChatMessage,
178 	L2MID_Notification_Console_RoomMessage,
179 	L2MID_Notification_Console_RoomMemberConnectivityUpdate,
180 	L2MID_Notification_Console_ChatEvent,
181 	L2MID_Notification_Console_MuteListChanged,
182 	L2MID_Notification_Console_Local_Users_Changed,
183 	L2MID_Notification_ReceivedDataMessageFromUser,
184 
185 
186 	L2MID_COUNT,
187 };
188 
189 // Should match tab;e lobby2.clanMemberStates
190 /// \ingroup LOBBY_2_COMMANDS
191 enum ClanMemberState
192 {
193 	CMD_UNDEFINED=0,
194 	CMD_ACTIVE,
195 	CMD_BANNED,
196 	CMD_JOIN_INVITED,
197 	CMD_JOIN_REQUESTED,
198 };
199 // --------------------------------------------- Base class for all messages (functions and notifications --------------------------------------------
200 
201 /// \brief A Lobby2Message encapsulates a networked function call from the client.
202 /// \details The client should fill in the input parameters, call Lobby2Client::SendMsg(), and wait for the reply in the callback passed to Lobby2Client::SetCallbackInterface()
203 /// The input parameters are always serialized back from the server.
204 /// See resultCode for the result of the operation. L2RC_SUCCESS means success. Anything else means failure.
205 /// Any message may return between L2RC_NOT_LOGGED_IN and L2RC_EMAIL_ADDRESS_IS_INVALID, which indices formatting errors in the input.
206 /// All other return codes have the name of the message in the enumeration.
207 /// The system can be extended by deriving from Lobby2Message, adding your own input and output parameters, and deriving from Lobby2MessageFactory register your own class factory with RakNet::Lobby2Plugin::SetMessageFactory()
208 /// \ingroup LOBBY_2_COMMANDS
209 struct Lobby2Message
210 {
211 	Lobby2Message();
~Lobby2MessageLobby2Message212 	virtual ~Lobby2Message() {}
213 
214 	/// Every message has an ID identifying it across the network
215 	virtual Lobby2MessageID GetID(void) const=0;
216 
217 	/// Is this message something that should only be run by a system with admin privileges?
218 	/// Set admin privileges with Lobby2Server::AddAdminAddress()
219 	virtual bool RequiresAdmin(void) const=0;
220 
221 	/// Is this message something that should only be run by a system with ranking upload priviledges?
222 	/// Set ranking privileges with Lobby2Server::AddRankingAddress()
223 	virtual bool RequiresRankingPermission(void) const=0;
224 
225 	/// Should this message not be processed on the server if the requesting user disconnects before it completes?
226 	/// This should be true for functions that only return data. False for functions that affect other users, or change the database
227 	virtual bool CancelOnDisconnect(void) const=0;
228 
229 	/// Does this function require logging into the server before it can be executed?
230 	/// If true, the user id and user handle will be automatically inferred by the last login by looking up the sender's system address.
231 	/// If false, the message should include the username so the database query can lookup which user is performing this operation.
232 	virtual bool RequiresLogin(void) const=0;
233 
234 	// Serialize data in this class. Currently just the resultCode
235 	void SerializeBase(bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream);
236 
237 	/// Overridable serialization of the contents of this message. Defaults to SerializeBase()
238 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
239 
240 	/// If data members can be validated for correctness in the server's main thread, override this function and do those checks here.
241 	/// \return True for input OK. False if the input is bad and does not need to be further processed in the database threads.
242 	virtual bool PrevalidateInput(void);
243 
244 	/// Override to do any Lobby2Client functionality when the message is returned from the server (usually nothing).
245 	/// \return True to call CallCallback immediately. False to defer for some reason (always true on the PC)
246 	virtual bool ClientImpl( Lobby2Client *client);
247 
248 	/// This message has been processed by the server and has arrived back on the client.
249 	/// Call the client informing the user of this event.
250 	virtual void CallCallback(Lobby2Callbacks *cb)=0;
251 
252 	/// Do any Lobby2Server	functionality when the message first arrives on the server, and after it has returned true from PrevalidateInput()
253 	/// If it returns true, the message has been handled, and the result is sent to the client
254 	/// If it returns false, the message continues to ServerDBImpl
255 	virtual bool ServerPreDBMemoryImpl( Lobby2Server *server, RakString userHandle );
256 
257 	/// Do any Lobby2Server	functionality after the message has been processed by the database, in the server thread.
258 	virtual void ServerPostDBMemoryImpl( Lobby2Server *server, RakString userHandle );
259 
260 	/// Do any Lobby2Server	functionality when the message is processed in a database thread on the server.
261 	/// It is safe to do slow database calls in this function.
262 	/// If it returns true, the message has been handled, and the result is sent to the client
263 	/// If it returns false, that means ignore the message
264 	virtual bool ServerDBImpl( Lobby2ServerCommand *command, void *databaseInterface );
265 
266 	/// The only non-printable character is space
267 	/// Cannot start with space
268 	/// Cannot end with space
269 	/// Cannot have two spaces in a row
270 	bool ValidateHandle( RakNet::RakString *handle );
271 
272 	/// Binary data cannot be longer than L2_MAX_BINARY_DATA_LENGTH
273 	bool ValidateBinary( RakNetSmartPtr<BinaryDataBlock>binaryDataBlock);
274 
275 	/// Required text cannot be empty.
276 	bool ValidateRequiredText( RakNet::RakString *text );
277 
278 	/// Passwords must contain at least 5 characters
279 	bool ValidatePassword( RakNet::RakString *text );
280 
281 	/// Check email address format
282 	bool ValidateEmailAddress( RakNet::RakString *text );
283 
284 	/// Convert the enumeration representing this message to a string, and return it. Done automatically by macros.
285 	virtual const char *GetName(void) const=0;
286 
287 	/// Write the result of this message to out(). Done automatically by macros.
288 	virtual void DebugMsg(RakNet::RakString &out) const=0;
289 
290 	/// Print the result of DebugMsg
DebugPrintfLobby2Message291 	virtual void DebugPrintf(void) const
292 	{
293 		RakNet::RakString out; DebugMsg(out); printf(out.C_String());
294 	}
295 
296 	/// Result of the operation. L2RC_SUCCESS means the result completed. Anything else means an error
297 	RakNet::Lobby2ResultCode resultCode;
298 
299 	/// Just a number, uniquely identifying each allocation of Lobby2Message.
300 	/// Use it if you need to lookup queries on the callback reply
301 
302 
303 
304 
305 
306 	uint64_t requestId;
307 
308 
309 	/// Just a number, representing which instance of Lobby2Callbacks should process the result of this operation
310 	/// -1 means all
311 	unsigned char callbackId;
312 
313 	/// Used for consoles
314 	int extendedResultCode;
315 
316 
317 
318 
319 
AddRefLobby2Message320 	void AddRef(void) {refCountMutex.Lock(); refCount++; refCountMutex.Unlock(); }
DerefLobby2Message321 	void Deref(void) {refCountMutex.Lock(); refCount--; refCountMutex.Unlock();}
GetRefCountLobby2Message322 	int GetRefCount(void) {int r; refCountMutex.Lock(); r = refCount; refCountMutex.Unlock(); return r;}
323 
324 private:
325 
326 	SimpleMutex refCountMutex;
327 	/// Reference count
328 	int refCount;
329 };
330 
331 // --------------------------------------------- Prototypes --------------------------------------------
332 
333 struct Platform_Startup;
334 struct Platform_Shutdown;
335 struct System_CreateDatabase;
336 struct System_DestroyDatabase;
337 struct System_CreateTitle;
338 struct System_DestroyTitle;
339 struct System_GetTitleRequiredAge;
340 struct System_GetTitleBinaryData;
341 struct System_RegisterProfanity;
342 struct System_BanUser;
343 struct System_UnbanUser;
344 struct CDKey_Add;
345 struct CDKey_GetStatus;
346 struct CDKey_Use;
347 struct CDKey_FlagStolen;
348 struct Client_Login;
349 struct Client_Logoff;
350 struct Client_RegisterAccount;
351 struct System_SetEmailAddressValidated;
352 struct Client_ValidateHandle;
353 struct System_DeleteAccount;
354 struct System_PruneAccounts;
355 struct Client_GetEmailAddress;
356 struct Client_GetPasswordRecoveryQuestionByHandle;
357 struct Client_GetPasswordByPasswordRecoveryAnswer;
358 struct Client_ChangeHandle;
359 struct Client_UpdateAccount;
360 struct Client_GetAccountDetails;
361 struct Client_StartIgnore;
362 struct Client_StopIgnore;
363 struct Client_GetIgnoreList;
364 struct Client_PerTitleIntegerStorage;
365 struct Client_PerTitleBinaryStorage;
366 struct Client_SetPresence;
367 struct Client_GetPresence;
368 struct Friends_SendInvite;
369 struct Friends_AcceptInvite;
370 struct Friends_RejectInvite;
371 struct Friends_GetInvites;
372 struct Friends_GetFriends;
373 struct Friends_Remove;
374 struct BookmarkedUsers_Add;
375 struct BookmarkedUsers_Remove;
376 struct BookmarkedUsers_Get;
377 struct Emails_Send;
378 struct Emails_Get;
379 struct Emails_Delete;
380 struct Emails_SetStatus;
381 struct Ranking_SubmitMatch;
382 struct Ranking_GetMatches;
383 struct Ranking_GetMatchBinaryData;
384 struct Ranking_GetTotalScore;
385 struct Ranking_WipeScoresForPlayer;
386 struct Ranking_WipeMatches;
387 struct Ranking_PruneMatches;
388 struct Ranking_UpdateRating;
389 struct Ranking_WipeRatings;
390 struct Ranking_GetRating;
391 struct Clans_Create;
392 struct Clans_SetProperties;
393 struct Clans_GetProperties;
394 struct Clans_SetMyMemberProperties;
395 struct Clans_GrantLeader;
396 struct Clans_SetSubleaderStatus;
397 struct Clans_SetMemberRank;
398 struct Clans_GetMemberProperties;
399 struct Clans_ChangeHandle;
400 struct Clans_Leave;
401 struct Clans_Get;
402 struct Clans_SendJoinInvitation;
403 struct Clans_WithdrawJoinInvitation;
404 struct Clans_AcceptJoinInvitation;
405 struct Clans_RejectJoinInvitation;
406 struct Clans_DownloadInvitationList;
407 struct Clans_SendJoinRequest;
408 struct Clans_WithdrawJoinRequest;
409 struct Clans_AcceptJoinRequest;
410 struct Clans_RejectJoinRequest;
411 struct Clans_DownloadRequestList;
412 struct Clans_KickAndBlacklistUser;
413 struct Clans_UnblacklistUser;
414 struct Clans_GetBlacklist;
415 struct Clans_GetMembers;
416 struct Clans_GetList;
417 struct Clans_CreateBoard;
418 struct Clans_DestroyBoard;
419 struct Clans_CreateNewTopic;
420 struct Clans_ReplyToTopic;
421 struct Clans_RemovePost;
422 struct Clans_GetBoards;
423 struct Clans_GetTopics;
424 struct Clans_GetPosts;
425 struct Console_GetServerStatus;
426 struct Console_GetWorldListFromServer;
427 struct Console_GetLobbyListFromWorld;
428 struct Console_JoinLobby;
429 struct Console_LeaveLobby;
430 struct Console_SendLobbyChatMessage;
431 struct Console_SearchRooms;
432 struct Console_GetRoomDetails;
433 struct Console_GetLobbyMemberData;
434 struct Console_CreateRoom;
435 struct Console_SetRoomSearchProperties;
436 struct Console_UpdateRoomParameters;
437 struct Console_JoinRoom;
438 struct Console_LeaveRoom;
439 struct Console_SendLobbyInvitationToRoom;
440 struct Console_SendGUIInvitationToRoom;
441 struct Console_SendDataMessageToUser;
442 struct Console_SendRoomChatMessage;
443 struct Notification_Client_RemoteLogin;
444 struct Notification_Client_IgnoreStatus;
445 struct Notification_Friends_StatusChange;
446 struct Notification_Friends_PresenceUpdate;
447 struct Notification_User_ChangedHandle;
448 struct Notification_Friends_CreatedClan;
449 struct Notification_Emails_Received;
450 struct Notification_Clans_GrantLeader;
451 struct Notification_Clans_SetSubleaderStatus;
452 struct Notification_Clans_SetMemberRank;
453 struct Notification_Clans_ChangeHandle;
454 struct Notification_Clans_Leave;
455 struct Notification_Clans_PendingJoinStatus;
456 struct Notification_Clans_NewClanMember;
457 struct Notification_Clans_KickAndBlacklistUser;
458 struct Notification_Clans_UnblacklistUser;
459 struct Notification_Clans_Destroyed;
460 struct Notification_Console_CableDisconnected;
461 struct Notification_Console_ContextError;
462 struct Notification_Console_MemberJoinedLobby;
463 struct Notification_Console_MemberLeftLobby;
464 struct Notification_Console_LobbyDestroyed;
465 struct Notification_Console_LobbyMemberDataUpdated;
466 struct Notification_Console_LobbyGotChatMessage;
467 struct Notification_Console_LobbyGotRoomInvitation;
468 struct Notification_Console_MemberJoinedRoom;
469 struct Notification_Console_MemberLeftRoom;
470 struct Notification_Console_KickedOutOfRoom;
471 struct Notification_Console_RoomWasDestroyed;
472 struct Notification_Console_UpdateRoomParameters;
473 struct Notification_Console_RoomOwnerChanged;
474 struct Notification_Console_RoomChatMessage;
475 struct Notification_Console_RoomMessage;
476 struct Notification_Console_RoomMemberConnectivityUpdate;
477 struct Notification_Console_ChatEvent;
478 struct Notification_Console_MuteListChanged;
479 struct Notification_Console_Local_Users_Changed;
480 struct Notification_ReceivedDataMessageFromUser;
481 
482 // --------------------------------------------- Callback interface for all messages, notifies the user --------------------------------------------
483 
484 /// Every Lobby2Message processed with Lobby2Client::SendMsg() while connected will call the callback registered with Lobby2Client::SetCallbackInterface().
485 /// \ingroup LOBBY_2_GROUP
486 struct Lobby2Callbacks
487 {
Lobby2CallbacksLobby2Callbacks488 	Lobby2Callbacks() {callbackId=nextCallbackId++;}
~Lobby2CallbacksLobby2Callbacks489 	virtual ~Lobby2Callbacks() {}
490 	virtual void MessageResult(Platform_Startup *message);
491 	virtual void MessageResult(Platform_Shutdown *message);
492 	virtual void MessageResult(System_CreateDatabase *message);
493 	virtual void MessageResult(System_DestroyDatabase *message);
494 	virtual void MessageResult(System_CreateTitle *message);
495 	virtual void MessageResult(System_DestroyTitle *message);
496 	virtual void MessageResult(System_GetTitleRequiredAge *message);
497 	virtual void MessageResult(System_GetTitleBinaryData *message);
498 	virtual void MessageResult(System_RegisterProfanity *message);
499 	virtual void MessageResult(System_BanUser *message);
500 	virtual void MessageResult(System_UnbanUser *message);
501 	virtual void MessageResult(CDKey_Add *message);
502 	virtual void MessageResult(CDKey_GetStatus *message);
503 	virtual void MessageResult(CDKey_Use *message);
504 	virtual void MessageResult(CDKey_FlagStolen *message);
505 	virtual void MessageResult(Client_Login *message);
506 	virtual void MessageResult(Client_Logoff *message);
507 	virtual void MessageResult(Client_RegisterAccount *message);
508 	virtual void MessageResult(System_SetEmailAddressValidated *message);
509 	virtual void MessageResult(Client_ValidateHandle *message);
510 	virtual void MessageResult(System_DeleteAccount *message);
511 	virtual void MessageResult(System_PruneAccounts *message);
512 	virtual void MessageResult(Client_GetEmailAddress *message);
513 	virtual void MessageResult(Client_GetPasswordRecoveryQuestionByHandle *message);
514 	virtual void MessageResult(Client_GetPasswordByPasswordRecoveryAnswer *message);
515 	virtual void MessageResult(Client_ChangeHandle *message);
516 	virtual void MessageResult(Client_UpdateAccount *message);
517 	virtual void MessageResult(Client_GetAccountDetails *message);
518 	virtual void MessageResult(Client_StartIgnore *message);
519 	virtual void MessageResult(Client_StopIgnore *message);
520 	virtual void MessageResult(Client_GetIgnoreList *message);
521 	virtual void MessageResult(Client_PerTitleIntegerStorage *message);
522 	virtual void MessageResult(Client_PerTitleBinaryStorage *message);
523 	virtual void MessageResult(Client_SetPresence *message);
524 	virtual void MessageResult(Client_GetPresence *message);
525 	virtual void MessageResult(Friends_SendInvite *message);
526 	virtual void MessageResult(Friends_AcceptInvite *message);
527 	virtual void MessageResult(Friends_RejectInvite *message);
528 	virtual void MessageResult(Friends_GetInvites *message);
529 	virtual void MessageResult(Friends_GetFriends *message);
530 	virtual void MessageResult(Friends_Remove *message);
531 	virtual void MessageResult(BookmarkedUsers_Add *message);
532 	virtual void MessageResult(BookmarkedUsers_Remove *message);
533 	virtual void MessageResult(BookmarkedUsers_Get *message);
534 	virtual void MessageResult(Emails_Send *message);
535 	virtual void MessageResult(Emails_Get *message);
536 	virtual void MessageResult(Emails_Delete *message);
537 	virtual void MessageResult(Emails_SetStatus *message);
538 	virtual void MessageResult(Ranking_SubmitMatch *message);
539 	virtual void MessageResult(Ranking_GetMatches *message);
540 	virtual void MessageResult(Ranking_GetMatchBinaryData *message);
541 	virtual void MessageResult(Ranking_GetTotalScore *message);
542 	virtual void MessageResult(Ranking_WipeScoresForPlayer *message);
543 	virtual void MessageResult(Ranking_WipeMatches *message);
544 	virtual void MessageResult(Ranking_PruneMatches *message);
545 	virtual void MessageResult(Ranking_UpdateRating *message);
546 	virtual void MessageResult(Ranking_WipeRatings *message);
547 	virtual void MessageResult(Ranking_GetRating *message);
548 	virtual void MessageResult(Clans_Create *message);
549 	virtual void MessageResult(Clans_SetProperties *message);
550 	virtual void MessageResult(Clans_GetProperties *message);
551 	virtual void MessageResult(Clans_SetMyMemberProperties *message);
552 	virtual void MessageResult(Clans_GrantLeader *message);
553 	virtual void MessageResult(Clans_SetSubleaderStatus *message);
554 	virtual void MessageResult(Clans_SetMemberRank *message);
555 	virtual void MessageResult(Clans_GetMemberProperties *message);
556 	virtual void MessageResult(Clans_ChangeHandle *message);
557 	virtual void MessageResult(Clans_Leave *message);
558 	virtual void MessageResult(Clans_Get *message);
559 	virtual void MessageResult(Clans_SendJoinInvitation *message);
560 	virtual void MessageResult(Clans_WithdrawJoinInvitation *message);
561 	virtual void MessageResult(Clans_AcceptJoinInvitation *message);
562 	virtual void MessageResult(Clans_RejectJoinInvitation *message);
563 	virtual void MessageResult(Clans_DownloadInvitationList *message);
564 	virtual void MessageResult(Clans_SendJoinRequest *message);
565 	virtual void MessageResult(Clans_WithdrawJoinRequest *message);
566 	virtual void MessageResult(Clans_AcceptJoinRequest *message);
567 	virtual void MessageResult(Clans_RejectJoinRequest *message);
568 	virtual void MessageResult(Clans_DownloadRequestList *message);
569 	virtual void MessageResult(Clans_KickAndBlacklistUser *message);
570 	virtual void MessageResult(Clans_UnblacklistUser *message);
571 	virtual void MessageResult(Clans_GetBlacklist *message);
572 	virtual void MessageResult(Clans_GetMembers *message);
573 	virtual void MessageResult(Clans_GetList *message);
574 	virtual void MessageResult(Clans_CreateBoard *message);
575 	virtual void MessageResult(Clans_DestroyBoard *message);
576 	virtual void MessageResult(Clans_CreateNewTopic *message);
577 	virtual void MessageResult(Clans_ReplyToTopic *message);
578 	virtual void MessageResult(Clans_RemovePost *message);
579 	virtual void MessageResult(Clans_GetBoards *message);
580 	virtual void MessageResult(Clans_GetTopics *message);
581 	virtual void MessageResult(Clans_GetPosts *message);
582 	virtual void MessageResult(Console_GetServerStatus *message);
583 	virtual void MessageResult(Console_GetWorldListFromServer *message);
584 	virtual void MessageResult(Console_GetLobbyListFromWorld *message);
585 	virtual void MessageResult(Console_JoinLobby *message);
586 	virtual void MessageResult(Console_LeaveLobby *message);
587 	virtual void MessageResult(Console_SendLobbyChatMessage *message);
588 	virtual void MessageResult(Console_SearchRooms *message);
589 	virtual void MessageResult(Console_GetRoomDetails *message);
590 	virtual void MessageResult(Console_GetLobbyMemberData *message);
591 	virtual void MessageResult(Console_CreateRoom *message);
592 	virtual void MessageResult(Console_SetRoomSearchProperties *message);
593 	virtual void MessageResult(Console_UpdateRoomParameters *message);
594 	virtual void MessageResult(Console_JoinRoom *message);
595 	virtual void MessageResult(Console_LeaveRoom *message);
596 	virtual void MessageResult(Console_SendLobbyInvitationToRoom *message);
597 	virtual void MessageResult(Console_SendGUIInvitationToRoom *message);
598 	virtual void MessageResult(Console_SendDataMessageToUser *message);
599 	virtual void MessageResult(Console_SendRoomChatMessage *message);
600 	virtual void MessageResult(Notification_Client_RemoteLogin *message);
601 	virtual void MessageResult(Notification_Client_IgnoreStatus *message);
602 	virtual void MessageResult(Notification_Friends_StatusChange *message);
603 	virtual void MessageResult(Notification_Friends_PresenceUpdate *message);
604 	virtual void MessageResult(Notification_User_ChangedHandle *message);
605 	virtual void MessageResult(Notification_Friends_CreatedClan *message);
606 	virtual void MessageResult(Notification_Emails_Received *message);
607 	virtual void MessageResult(Notification_Clans_GrantLeader *message);
608 	virtual void MessageResult(Notification_Clans_SetSubleaderStatus *message);
609 	virtual void MessageResult(Notification_Clans_SetMemberRank *message);
610 	virtual void MessageResult(Notification_Clans_ChangeHandle *message);
611 	virtual void MessageResult(Notification_Clans_Leave *message);
612 	virtual void MessageResult(Notification_Clans_PendingJoinStatus *message);
613 	virtual void MessageResult(Notification_Clans_NewClanMember *message);
614 	virtual void MessageResult(Notification_Clans_KickAndBlacklistUser *message);
615 	virtual void MessageResult(Notification_Clans_UnblacklistUser *message);
616 	virtual void MessageResult(Notification_Clans_Destroyed *message);
617 	virtual void MessageResult(Notification_Console_CableDisconnected *message);
618 	virtual void MessageResult(Notification_Console_ContextError *message);
619 	virtual void MessageResult(Notification_Console_MemberJoinedLobby *message);
620 	virtual void MessageResult(Notification_Console_MemberLeftLobby *message);
621 	virtual void MessageResult(Notification_Console_LobbyDestroyed *message);
622 	virtual void MessageResult(Notification_Console_LobbyMemberDataUpdated *message);
623 	virtual void MessageResult(Notification_Console_LobbyGotChatMessage *message);
624 	virtual void MessageResult(Notification_Console_LobbyGotRoomInvitation *message);
625 	virtual void MessageResult(Notification_Console_MemberJoinedRoom *message);
626 	virtual void MessageResult(Notification_Console_MemberLeftRoom *message);
627 	virtual void MessageResult(Notification_Console_KickedOutOfRoom *message);
628 	virtual void MessageResult(Notification_Console_RoomWasDestroyed *message);
629 	virtual void MessageResult(Notification_Console_UpdateRoomParameters *message);
630 	virtual void MessageResult(Notification_Console_RoomOwnerChanged *message);
631 	virtual void MessageResult(Notification_Console_RoomChatMessage *message);
632 	virtual void MessageResult(Notification_Console_RoomMessage *message);
633 	virtual void MessageResult(Notification_Console_RoomMemberConnectivityUpdate *message);
634 	virtual void MessageResult(Notification_Console_ChatEvent *message);
635 	virtual void MessageResult(Notification_Console_MuteListChanged *message);
636 	virtual void MessageResult(Notification_Console_Local_Users_Changed *message);
637 	virtual void MessageResult(Notification_ReceivedDataMessageFromUser *message);
638 
ExecuteDefaultResultLobby2Callbacks639 	virtual void ExecuteDefaultResult(Lobby2Message *message) { (void)message; }
640 
641 	unsigned char callbackId;
642 	static unsigned char nextCallbackId;
643 };
644 
645 /// Just print out the name of the message by default. This class is used in the sample.
646 /// \ingroup LOBBY_2_GROUP
647 struct Lobby2Printf : public Lobby2Callbacks
648 {
ExecuteDefaultResultLobby2Printf649 	virtual void ExecuteDefaultResult(Lobby2Message *message) {message->DebugPrintf();}
650 };
651 
652 // --------------------------------------------- Types --------------------------------------------
653 
654 struct BinaryDataBlock
655 {
656 	char *binaryData;
657 	unsigned int binaryDataLength;
BinaryDataBlockBinaryDataBlock658 	BinaryDataBlock() {binaryData=0; binaryDataLength=0;}
~BinaryDataBlockBinaryDataBlock659 	~BinaryDataBlock() {
660 		if (binaryData)
661 			rakFree_Ex(binaryData, __FILE__, __LINE__ );
662 	}
663 	void Serialize(bool writeToBitstream, RakNet::BitStream *bitStream);
664 };
665 struct CreateAccountParameters
666 {
CreateAccountParametersCreateAccountParameters667 	CreateAccountParameters() {ageInDays=0; binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~CreateAccountParametersCreateAccountParameters668 	~CreateAccountParameters() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
669 	/// [in] Self-apparent
670 	RakNet::RakString firstName;
671 	/// [in] Self-apparent
672 	RakNet::RakString middleName;
673 	/// [in] Self-apparent
674 	RakNet::RakString lastName;
675 	/// [in] Self-apparent
676 	RakNet::RakString race;
677 	/// [in] Self-apparent
678 	bool sex_male;
679 	/// [in] Self-apparent
680 	RakNet::RakString homeAddress1;
681 	/// [in] Self-apparent
682 	RakNet::RakString homeAddress2;
683 	/// [in] Self-apparent
684 	RakNet::RakString homeCity;
685 	/// [in] Self-apparent
686 	RakNet::RakString homeState;
687 	/// [in] Self-apparent
688 	RakNet::RakString homeCountry;
689 	/// [in] Self-apparent
690 	RakNet::RakString homeZipCode;
691 	/// [in] Self-apparent
692 	RakNet::RakString billingAddress1;
693 	/// [in] Self-apparent
694 	RakNet::RakString billingAddress2;
695 	/// [in] Self-apparent
696 	RakNet::RakString billingCity;
697 	/// [in] Self-apparent
698 	RakNet::RakString billingState;
699 	/// [in] Self-apparent
700 	RakNet::RakString billingCountry;
701 	/// [in] Self-apparent
702 	RakNet::RakString billingZipCode;
703 	/// [in] Self-apparent
704 	RakNet::RakString emailAddress;
705 	/// [in] Self-apparent
706 	RakNet::RakString password;
707 	/// [in] If the user needs to retrieve their password; you could ask them this question.
708 	RakNet::RakString passwordRecoveryQuestion;
709 	/// [in] If the user needs to retrieve their password; you could use this for the answer.
710 	RakNet::RakString passwordRecoveryAnswer;
711 	/// [in] Lobbies often allow users to set a text description of their user in some fashion.
712 	RakNet::RakString caption1;
713 	/// [in] Lobbies often allow users to set a text description of their user in some fashion.
714 	RakNet::RakString caption2;
715 	/// [in] Self-apparent
716 	unsigned int ageInDays;
717 	/// [in] binary data
718 	RakNetSmartPtr<BinaryDataBlock> binaryData;
719 
720 
721 	void Serialize(bool writeToBitstream, RakNet::BitStream *bitStream);
722 };
723 struct PendingInvite
724 {
PendingInvitePendingInvite725 	PendingInvite() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~PendingInvitePendingInvite726 	~PendingInvite() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
727 	RakNet::RakString sender;
728 	RakNet::RakString subject;
729 	RakNet::RakString body;
730 	RakNetSmartPtr<BinaryDataBlock> binaryData;
731 
732 	void Serialize(bool writeToBitstream, RakNet::BitStream *bitStream);
733 };
734 struct UsernameAndOnlineStatus
735 {
UsernameAndOnlineStatusUsernameAndOnlineStatus736 	UsernameAndOnlineStatus() {isOnline=false;}
~UsernameAndOnlineStatusUsernameAndOnlineStatus737 	~UsernameAndOnlineStatus() {}
738 	RakNet::RakString handle;
739 	bool isOnline;
740 	RakNet::Lobby2Presence presence;
741 
742 	void Serialize(bool writeToBitstream, RakNet::BitStream *bitStream);
743 };
744 struct FriendInfo
745 {
746 	UsernameAndOnlineStatus usernameAndStatus;
SerializeFriendInfo747 	void Serialize(bool writeToBitstream, RakNet::BitStream *bitStream) {usernameAndStatus.Serialize(writeToBitstream,bitStream);}
748 };
749 struct EmailResult
750 {
EmailResultEmailResult751 	EmailResult() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~EmailResultEmailResult752 	~EmailResult() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
753 	RakNet::RakString sender;
754 	RakNet::RakString recipient;
755 	RakNet::RakString subject;
756 	RakNet::RakString body;
757 	unsigned int status;
758 	bool wasSendByMe;
759 	bool wasReadByMe;
760 	unsigned int emailID; // Unique ID for this email, used in Emails_Delete, etc.
761 	RakNetSmartPtr<BinaryDataBlock> binaryData;
762 	RakNet::RakString creationDate;
763 
764 	void Serialize(bool writeToBitstream, RakNet::BitStream *bitStream);
765 };
766 struct MatchParticipant
767 {
MatchParticipantMatchParticipant768 	MatchParticipant() {}
MatchParticipantMatchParticipant769 	MatchParticipant(RakNet::RakString _handle, float _score) : handle(_handle), score(_score) {}
770 	RakNet::RakString handle;
771 	float score;
772 
773 	void Serialize(bool writeToBitstream, RakNet::BitStream *bitStream);
774 };
775 struct SubmittedMatch
776 {
SubmittedMatchSubmittedMatch777 	SubmittedMatch() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~SubmittedMatchSubmittedMatch778 	~SubmittedMatch() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
779 	DataStructures::List<MatchParticipant> matchParticipants;
780 	RakNet::RakString matchNote;
781 	RakNetSmartPtr<BinaryDataBlock> binaryData;
782 	// Use EpochTimeToString to convert to a date
783 	double whenSubmittedDate;
784 	unsigned int matchID; // Unique key, Output parameter to Ranking_GetMatches
785 
786 	void Serialize(bool writeToBitstream, RakNet::BitStream *bitStream);
787 };
788 struct ClanInfo
789 {
ClanInfoClanInfo790 	ClanInfo() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~ClanInfoClanInfo791 	~ClanInfo() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
792 	RakNet::RakString clanName;
793 	RakNet::RakString description;
794 	RakNet::RakString clanLeader;
795 	RakNetSmartPtr<BinaryDataBlock> binaryData;
796 	DataStructures::List<RakNet::RakString> clanMembersOtherThanLeader;
797 
798 	void Serialize(bool writeToBitstream, RakNet::BitStream *bitStream);
799 };
800 struct OpenInvite
801 {
802 	RakNet::RakString clanHandle;
803 	void Serialize(bool writeToBitstream, RakNet::BitStream *bitStream);
804 };
805 struct ClanJoinRequest
806 {
807 	RakNet::RakString targetClan;
808 	RakNet::RakString dateSent;
809 	RakNet::RakString joinRequestSender;
810 	void Serialize(bool writeToBitstream, RakNet::BitStream *bitStream);
811 };
812 struct ClanJoinInvite
813 {
814 	RakNet::RakString sourceClan;
815 	RakNet::RakString dateSent;
816 	RakNet::RakString joinRequestTarget;
817 	void Serialize(bool writeToBitstream, RakNet::BitStream *bitStream);
818 };
819 struct BookmarkedUser
820 {
821 	RakNet::RakString targetHandle;
822 	int type;
823 	RakNet::RakString description;
824 	RakNet::RakString dateWhenAdded;
825 	void Serialize(bool writeToBitstream, RakNet::BitStream *bitStream);
826 };
827 
828 // --------------------------------------------- Actual body of all messages, including DB specific implementation --------------------------------------------
829 
830 #define __L2_MSG_BASE_IMPL(__NAME__) \
831 	virtual void CallCallback(Lobby2Callbacks *cb) {cb->MessageResult(this);}; \
832 	virtual Lobby2MessageID GetID(void) const {return (Lobby2MessageID) L2MID_##__NAME__;} \
833 	virtual const char* GetName(void) const {return #__NAME__;} \
834 	virtual void DebugMsg(RakNet::RakString &out) const {out.Set(#__NAME__ " result=%s\n", Lobby2ResultCodeDescription::ToEnglish(resultCode));};
835 
836 /// \brief Platform specific startup. Unused on the PC
837 /// \ingroup LOBBY_2_COMMANDS
838 struct Platform_Startup : public Lobby2Message
839 {
__L2_MSG_BASE_IMPLPlatform_Startup840 	__L2_MSG_BASE_IMPL(Platform_Startup)
841 	virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionPlatform_Startup842 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectPlatform_Startup843 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginPlatform_Startup844 	virtual bool RequiresLogin(void) const {return false;}
PrevalidateInputPlatform_Startup845 	virtual bool PrevalidateInput(void) {return true;}
ServerPreDBMemoryImplPlatform_Startup846 	virtual bool ServerPreDBMemoryImpl( Lobby2Server *server, RakString userHandle ) { (void)server; (void)userHandle; return true; }
847 };
848 
849 /// \brief Platform specific startup. Unused on the PC
850 /// \ingroup LOBBY_2_COMMANDS
851 struct Platform_Shutdown : public Lobby2Message
852 {
__L2_MSG_BASE_IMPLPlatform_Shutdown853 	__L2_MSG_BASE_IMPL(Platform_Shutdown)
854 	virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionPlatform_Shutdown855 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectPlatform_Shutdown856 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginPlatform_Shutdown857 	virtual bool RequiresLogin(void) const {return false;}
PrevalidateInputPlatform_Shutdown858 	virtual bool PrevalidateInput(void) {return true;}
ServerPreDBMemoryImplPlatform_Shutdown859 	virtual bool ServerPreDBMemoryImpl( Lobby2Server *server, RakString userHandle ) { (void)server; (void)userHandle; return true; }
860 };
861 
862 /// \brief Create all tables and stored procedures on a system that does not already have them
863 /// \ingroup LOBBY_2_COMMANDS
864 struct System_CreateDatabase : public Lobby2Message
865 {
__L2_MSG_BASE_IMPLSystem_CreateDatabase866 	__L2_MSG_BASE_IMPL(System_CreateDatabase)
867 	virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionSystem_CreateDatabase868 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectSystem_CreateDatabase869 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginSystem_CreateDatabase870 	virtual bool RequiresLogin(void) const {return false;}
PrevalidateInputSystem_CreateDatabase871 	virtual bool PrevalidateInput(void) {return true;}
872 };
873 /// \brief Destroy all tables and stored procedures created with System_CreateDatabase
874 /// \ingroup LOBBY_2_COMMANDS
875 struct System_DestroyDatabase : public Lobby2Message
876 {
__L2_MSG_BASE_IMPLSystem_DestroyDatabase877 	__L2_MSG_BASE_IMPL(System_DestroyDatabase)
878 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionSystem_DestroyDatabase879 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectSystem_DestroyDatabase880 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginSystem_DestroyDatabase881 	virtual bool RequiresLogin(void) const {return false;}
PrevalidateInputSystem_DestroyDatabase882 	virtual bool PrevalidateInput(void) {return true;}
883 };
884 /// \brief Each title essentially corresponds to a game. For example, the same lobby system may be used for both asteroids and Pac-man. When logging in, and for some functions, it is necessary to specify which title you are logging in under. This way users playing asteroids do not interact with users playing pac-man, where such interations are game specific (such as ranking).
885 /// \ingroup LOBBY_2_COMMANDS
886 struct System_CreateTitle : public Lobby2Message
887 {
System_CreateTitleSystem_CreateTitle888 	System_CreateTitle() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~System_CreateTitleSystem_CreateTitle889 	~System_CreateTitle() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
__L2_MSG_BASE_IMPLSystem_CreateTitle890 	__L2_MSG_BASE_IMPL(System_CreateTitle)
891 	virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionSystem_CreateTitle892 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectSystem_CreateTitle893 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginSystem_CreateTitle894 	virtual bool RequiresLogin(void) const {return false;}
895 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
896 	virtual bool PrevalidateInput(void);
897 
898 	// Input parameters
899 	RakNet::RakString titleName;
900 	RakNet::RakString titleSecretKey;
901 	int requiredAge;
902 	RakNetSmartPtr<BinaryDataBlock> binaryData;
903 };
904 /// \brief Destroy a previously added title
905 /// \ingroup LOBBY_2_COMMANDS
906 struct System_DestroyTitle : public Lobby2Message
907 {
__L2_MSG_BASE_IMPLSystem_DestroyTitle908 	__L2_MSG_BASE_IMPL(System_DestroyTitle)
909 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionSystem_DestroyTitle910 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectSystem_DestroyTitle911 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginSystem_DestroyTitle912 	virtual bool RequiresLogin(void) const {return false;}
913 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
PrevalidateInputSystem_DestroyTitle914 	virtual bool PrevalidateInput(void) {return true;}
915 
916 	// Input parameters
917 	RakNet::RakString titleName;
918 
919 };
920 /// \brief Get the required age set with System_CreateTitle
921 /// \ingroup LOBBY_2_COMMANDS
922 struct System_GetTitleRequiredAge : public Lobby2Message
923 {
__L2_MSG_BASE_IMPLSystem_GetTitleRequiredAge924 	__L2_MSG_BASE_IMPL(System_GetTitleRequiredAge)
925 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionSystem_GetTitleRequiredAge926 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectSystem_GetTitleRequiredAge927 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginSystem_GetTitleRequiredAge928 	virtual bool RequiresLogin(void) const {return false;}
929 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
PrevalidateInputSystem_GetTitleRequiredAge930 	virtual bool PrevalidateInput(void) {return true;}
931 
932 	// Input parameters
933 	RakNet::RakString titleName;
934 
935 	// Output parameters
936 	int requiredAge;
937 };
938 /// \brief Get the binary data set with System_CreateTitle
939 /// \ingroup LOBBY_2_COMMANDS
940 struct System_GetTitleBinaryData : public Lobby2Message
941 {
System_GetTitleBinaryDataSystem_GetTitleBinaryData942 	System_GetTitleBinaryData() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~System_GetTitleBinaryDataSystem_GetTitleBinaryData943 	~System_GetTitleBinaryData() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
__L2_MSG_BASE_IMPLSystem_GetTitleBinaryData944 	__L2_MSG_BASE_IMPL(System_GetTitleBinaryData)
945 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionSystem_GetTitleBinaryData946 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectSystem_GetTitleBinaryData947 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginSystem_GetTitleBinaryData948 	virtual bool RequiresLogin(void) const {return false;}
949 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
PrevalidateInputSystem_GetTitleBinaryData950 	virtual bool PrevalidateInput(void) {return true;}
951 
952 	// Input parameters
953 	RakNet::RakString titleName;
954 
955 	// Output parameters
956 	RakNetSmartPtr<BinaryDataBlock> binaryData;
957 };
958 /// \brief Adds the input strings to a table of profanity. non-unique or empty strings can be ignored. This table will be used internally to ensure that handles and clan names do not contain profanity. Multiple calls add to the table. This table will be used for functions that take a user-defined string that is highly visible, such as clan and user names. It does not need to be checked for emails or message boards.
959 /// \ingroup LOBBY_2_COMMANDS
960 struct System_RegisterProfanity : public Lobby2Message
961 {
__L2_MSG_BASE_IMPLSystem_RegisterProfanity962 	__L2_MSG_BASE_IMPL(System_RegisterProfanity)
963 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionSystem_RegisterProfanity964 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectSystem_RegisterProfanity965 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginSystem_RegisterProfanity966 	virtual bool RequiresLogin(void) const {return false;}
967 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
PrevalidateInputSystem_RegisterProfanity968 	virtual bool PrevalidateInput(void)
969 	{
970 		for (unsigned int i=0; i < profanityWords.Size(); i++)
971 		{
972 			if (profanityWords[i].IsEmpty())
973 			{
974 				resultCode=L2RC_System_RegisterProfanity_CANNOT_REGISTER_EMPTY_STRINGS;
975 				return false;
976 			}
977 		}
978 		return true;
979 	}
980 
981 	// Input parameters
982 	DataStructures::List<RakNet::RakString> profanityWords;
983 
984 	// Output parameters
985 };
986 /// \brief Bans a specific user (will be most likely called by a moderator). Adds the user's primary key to a ban table, along with the name of the moderator, the reason for the ban. Banning is used to prevent the banned user from logging on for some specified duration. A date column should be present and automatically filled in. When bans are expired, the ban can be deleted from the database. However, a separate table should log bans, so that even expired bans can be looked up in case.
987 /// \ingroup LOBBY_2_COMMANDS
988 struct System_BanUser : public Lobby2Message
989 {
__L2_MSG_BASE_IMPLSystem_BanUser990 	__L2_MSG_BASE_IMPL(System_BanUser)
991 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionSystem_BanUser992 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectSystem_BanUser993 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginSystem_BanUser994 	virtual bool RequiresLogin(void) const {return false;}
995 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
996 	virtual bool PrevalidateInput(void);
997 
998 	// Input parameters
999 	RakNet::RakString banReason;
1000 	unsigned int durationHours;
1001 	RakNet::RakString userName;
1002 
1003 	// Output parameters
1004 
1005 
1006 };
1007 /// \brief Unban a user banned with System_BanUser
1008 /// \ingroup LOBBY_2_COMMANDS
1009 struct System_UnbanUser : public Lobby2Message
1010 {
__L2_MSG_BASE_IMPLSystem_UnbanUser1011 	__L2_MSG_BASE_IMPL(System_UnbanUser)
1012 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionSystem_UnbanUser1013 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectSystem_UnbanUser1014 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginSystem_UnbanUser1015 	virtual bool RequiresLogin(void) const {return false;}
1016 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1017 
1018 	virtual bool PrevalidateInput(void);
1019 
1020 	// Input parameters
1021 	RakNet::RakString reason;
1022 	RakNet::RakString userName;
1023 };
1024 /// \brief Adds CDKeys to the database. Duplicate CDKeys for a particular title are ignored. CDKeys can be identical for different titles.
1025 /// \ingroup LOBBY_2_COMMANDS
1026 struct CDKey_Add : public Lobby2Message
1027 {
__L2_MSG_BASE_IMPLCDKey_Add1028 	__L2_MSG_BASE_IMPL(CDKey_Add)
1029 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionCDKey_Add1030 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectCDKey_Add1031 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginCDKey_Add1032 	virtual bool RequiresLogin(void) const {return false;}
1033 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1034 
1035 	virtual bool PrevalidateInput(void);
1036 
1037 	// Input parameters
1038 	DataStructures::List<RakNet::RakString> cdKeys;
1039 	RakNet::RakString titleName;
1040 
1041 	// Output parameters
1042 };
1043 /// \brief Returns if a CD key was previously added with AddCDKey.
1044 /// \ingroup LOBBY_2_COMMANDS
1045 struct CDKey_GetStatus : public Lobby2Message
1046 {
__L2_MSG_BASE_IMPLCDKey_GetStatus1047 	__L2_MSG_BASE_IMPL(CDKey_GetStatus)
1048 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionCDKey_GetStatus1049 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectCDKey_GetStatus1050 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginCDKey_GetStatus1051 	virtual bool RequiresLogin(void) const {return false;}
1052 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1053 
1054 	virtual bool PrevalidateInput(void);
1055 
1056 	// Input parameters
1057 	RakNet::RakString cdKey;
1058 	RakNet::RakString titleName;
1059 
1060 	// Output parameters
1061 	bool usable;
1062 	RakNet::RakString usedBy;
1063 	RakNet::RakString activationDate;
1064 	bool wasStolen;
1065 };
1066 /// \brief Associates a cd key with a user, such that the cd key cannot be used again. If Client_Login() is called with check cd key as true, then this table will be checked to make sure UserCDKey() was previously called with this user and a valid key. If this user is already associated with a CD Key, add the new key, and use the most recent key. All CD Key usage should be logged in a separate table, including the date used and result.
1067 /// \ingroup LOBBY_2_COMMANDS
1068 struct CDKey_Use : public Lobby2Message
1069 {
__L2_MSG_BASE_IMPLCDKey_Use1070 	__L2_MSG_BASE_IMPL(CDKey_Use)
1071 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionCDKey_Use1072 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectCDKey_Use1073 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginCDKey_Use1074 	virtual bool RequiresLogin(void) const {return false;}
1075 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1076 
1077 	virtual bool PrevalidateInput(void);
1078 
1079 	// Input parameters
1080 	RakNet::RakString cdKey;
1081 	RakNet::RakString titleName;
1082 	RakNet::RakString userName;
1083 
1084 	// Output parameters
1085 };
1086 
1087 /// \brief Flags one or more CD keys as stolen. Stolen CD keys will prevent Client_Login() if check cd key is true. They will also prevent these cd keys from being used with CDKey_Use. If this key is already in use by certain users for this particular title, then log this similarly to how CDKey_Use does so.
1088 /// \ingroup LOBBY_2_COMMANDS
1089 struct CDKey_FlagStolen : public Lobby2Message
1090 {
__L2_MSG_BASE_IMPLCDKey_FlagStolen1091 	__L2_MSG_BASE_IMPL(CDKey_FlagStolen)
1092 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionCDKey_FlagStolen1093 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectCDKey_FlagStolen1094 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginCDKey_FlagStolen1095 	virtual bool RequiresLogin(void) const {return false;}
1096 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1097 
1098 	virtual bool PrevalidateInput(void);
1099 
1100 	// Input parameters
1101 	RakNet::RakString cdKey;
1102 	RakNet::RakString titleName;
1103 	bool wasStolen;
1104 
1105 	// Output parameters
1106 	RakNet::RakString userUsingThisKey;
1107 };
1108 /// \brief Logon with a previously registered account
1109 /// \details Once a client creates an account with Client_RegisterAccount, the client is able to logon. The login process will check
1110 /// <OL>
1111 /// <LI>The CDKey associated with this user (See CDKey_Use) if checkCDKey is true
1112 /// <LI>The userPassword passed to this function
1113 /// <LI>The titleName and titleSecretKey, to ensure this title was previously created with System_CreateTitle
1114 /// <LI>If allowLoginWithoutEmailAddressValidation==false for this user (See Client_RegisterAccount) and System_SetEmailAddressValidated was not called for that email address, fail.
1115 /// <LI>If this user was banned with a ban still in effect via System_BanUser
1116 /// </OL>
1117 /// If all checks pass, store in a logging table that the user has logged in at this time. No status flag needs be set, this will be done in C++.
1118 /// \param[in] userHandle
1119 /// \param[in] userPassword
1120 /// \param[in] titleName
1121 /// \param[in] titleSecretKey
1122 /// \param[in] checkCDKey
1123 /// \param[out] userPrimaryKey Only returned on success
1124 /// \param[out] bannedReason Only returned on banned
1125 /// \param[out] whenBanned Only returned on banned
1126 /// \param[out] banningModeratorID Only returned on banned
1127 /// \ingroup LOBBY_2_COMMANDS
1128 struct Client_Login : public Lobby2Message
1129 {
1130 	__L2_MSG_BASE_IMPL(Client_Login)
Client_LoginClient_Login1131 	Client_Login() {allowMultipleLogins=false;}
~Client_LoginClient_Login1132 	virtual ~Client_Login() {}
RequiresAdminClient_Login1133 	virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClient_Login1134 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClient_Login1135 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginClient_Login1136 	virtual bool RequiresLogin(void) const {return false;}
1137 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1138 
1139 	virtual bool PrevalidateInput(void);
1140 
1141 	// Input parameters
1142 	RakNet::RakString userPassword;
1143 	bool allowMultipleLogins; // PC only, allow login with the same username from multiple computers at once
1144 	// Used if check
1145 	RakNet::RakString titleName;
1146 	RakNet::RakString titleSecretKey;
1147 	RakNet::RakString userName;
1148 
1149 	// Output parameters
1150 	RakNet::RakString bannedReason;
1151 	RakNet::RakString whenBanned;
1152 	RakNet::RakString bannedExpiration;
1153 };
1154 /// \brief Logoff, after logging in
1155 /// \ingroup LOBBY_2_COMMANDS
1156 struct Client_Logoff : public Lobby2Message
1157 {
__L2_MSG_BASE_IMPLClient_Logoff1158 	__L2_MSG_BASE_IMPL(Client_Logoff)
1159 	virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClient_Logoff1160 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClient_Logoff1161 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClient_Logoff1162 	virtual bool RequiresLogin(void) const {return true;}
1163 };
1164 /// \brief This creates a new account in the database, which can be used in a subsequent call to Login. Most parameters are optional. handle is not optional, and must be unique using case-insensitive compare. emailAddress should be validated to have a sensible format, including an @ sign and a period with a 3 letter extension. allowLoginWithoutEmailAddressValidation is used in Client_Login to potentially disallow logon attempts with unverified email addresses.
1165 /// \ingroup LOBBY_2_COMMANDS
1166 struct Client_RegisterAccount : public Lobby2Message
1167 {
__L2_MSG_BASE_IMPLClient_RegisterAccount1168 	__L2_MSG_BASE_IMPL(Client_RegisterAccount)
1169 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClient_RegisterAccount1170 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClient_RegisterAccount1171 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClient_RegisterAccount1172 	virtual bool RequiresLogin(void) const {return false;}
1173 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1174 
1175 	virtual bool PrevalidateInput(void);
1176 
1177 	// Input parameters
1178 	CreateAccountParameters createAccountParameters;
1179 	// Only used if registration requires a CD key
1180 	RakNet::RakString cdKey;
1181 	RakNet::RakString titleName;
1182 	RakNet::RakString userName;
1183 
1184 	// Output parameters
1185 };
1186 /// \brief For the client with the given handle, mark a column emailAddressValidated as true or false as appropriate. This is potentially used in Client_Login
1187 /// \ingroup LOBBY_2_COMMANDS
1188 struct System_SetEmailAddressValidated : public Lobby2Message
1189 {
__L2_MSG_BASE_IMPLSystem_SetEmailAddressValidated1190 	__L2_MSG_BASE_IMPL(System_SetEmailAddressValidated)
1191 	virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionSystem_SetEmailAddressValidated1192 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectSystem_SetEmailAddressValidated1193 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginSystem_SetEmailAddressValidated1194 	virtual bool RequiresLogin(void) const {return false;}
1195 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1196 	virtual bool PrevalidateInput(void);
1197 
1198 	// Input parameters
1199 	bool validated;
1200 	RakNet::RakString userName;
1201 
1202 	// Output parameters
1203 };
1204 /// \brief Looks up in the database if this handle is already in use, subject to the usual constraints of handles. This will be used by the user to quickly check for available handles.
1205 /// \ingroup LOBBY_2_COMMANDS
1206 struct Client_ValidateHandle : public Lobby2Message
1207 {
__L2_MSG_BASE_IMPLClient_ValidateHandle1208 	__L2_MSG_BASE_IMPL(Client_ValidateHandle)
1209 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClient_ValidateHandle1210 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClient_ValidateHandle1211 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginClient_ValidateHandle1212 	virtual bool RequiresLogin(void) const {return false;}
1213 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1214 	virtual bool PrevalidateInput(void);
1215 
1216 	RakNet::RakString userName;
1217 };
1218 /// \brief Flags as deleted an account registered with RegisterAccount. Accounts are not actually deleted, only tagged as deleted.
1219 /// \ingroup LOBBY_2_COMMANDS
1220 struct System_DeleteAccount : public Lobby2Message
1221 {
__L2_MSG_BASE_IMPLSystem_DeleteAccount1222 	__L2_MSG_BASE_IMPL(System_DeleteAccount)
1223 	virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionSystem_DeleteAccount1224 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectSystem_DeleteAccount1225 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginSystem_DeleteAccount1226 	virtual bool RequiresLogin(void) const {return false;}
1227 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1228 
1229 	virtual bool PrevalidateInput(void);
1230 
1231 	// Input parameters
1232 	RakNet::RakString userName;
1233 	RakNet::RakString password;
1234 };
1235 /// \brief Unused accounts are deleted. This is cascading, such that emails and other tables that reference this key are also deleted. unused accounts are defined as:
1236 /// \details
1237 /// <OL>
1238 /// <LI>Deleted accounts over deletedPruneTime seconds old
1239 /// <LI>Accounts which have not been logged into for over loggedInPruneTime seconds
1240 /// <\OL>
1241 /// \ingroup LOBBY_2_COMMANDS
1242 struct System_PruneAccounts : public Lobby2Message
1243 {
__L2_MSG_BASE_IMPLSystem_PruneAccounts1244 	__L2_MSG_BASE_IMPL(System_PruneAccounts)
1245 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionSystem_PruneAccounts1246 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectSystem_PruneAccounts1247 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginSystem_PruneAccounts1248 	virtual bool RequiresLogin(void) const {return false;}
1249 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1250 	virtual bool PrevalidateInput(void);
1251 
1252 	// Input parameters
1253 	unsigned int deleteAccountsNotLoggedInDays;
1254 
1255 	// Output parameters
1256 };
1257 /// \brief Returns the email address associated with a specific handle, invalid handle. This is used for password recovery.
1258 /// \ingroup LOBBY_2_COMMANDS
1259 struct Client_GetEmailAddress : public Lobby2Message
1260 {
__L2_MSG_BASE_IMPLClient_GetEmailAddress1261 	__L2_MSG_BASE_IMPL(Client_GetEmailAddress)
1262 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClient_GetEmailAddress1263 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClient_GetEmailAddress1264 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginClient_GetEmailAddress1265 	virtual bool RequiresLogin(void) const {return false;}
1266 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1267 	virtual bool PrevalidateInput(void);
1268 
1269 	// Input parameters
1270 	RakNet::RakString userName;
1271 
1272 	// Output parameters
1273 	RakNet::RakString emailAddress;
1274 	bool emailAddressValidated;
1275 
1276 };
1277 /// \brief Returns the passwordRecoveryQuestion associated with handle, invalid handle
1278 /// \ingroup LOBBY_2_COMMANDS
1279 struct Client_GetPasswordRecoveryQuestionByHandle : public Lobby2Message
1280 {
__L2_MSG_BASE_IMPLClient_GetPasswordRecoveryQuestionByHandle1281 	__L2_MSG_BASE_IMPL(Client_GetPasswordRecoveryQuestionByHandle)
1282 		virtual bool RequiresAdmin(void) const {return false;}virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClient_GetPasswordRecoveryQuestionByHandle1283 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginClient_GetPasswordRecoveryQuestionByHandle1284 	virtual bool RequiresLogin(void) const {return false;}
1285 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1286 	virtual bool PrevalidateInput(void);
1287 
1288 	// Input/output parameters
1289 	RakNet::RakString userName;
1290 
1291 	// Output parameters
1292 	RakNet::RakString emailAddress;
1293 	RakNet::RakString passwordRecoveryQuestion;
1294 };
1295 /// \brief Returns the password associated with a handle, if the passwordRecoveryAnswer is correct
1296 /// \ingroup LOBBY_2_COMMANDS
1297 struct Client_GetPasswordByPasswordRecoveryAnswer : public Lobby2Message
1298 {
__L2_MSG_BASE_IMPLClient_GetPasswordByPasswordRecoveryAnswer1299 	__L2_MSG_BASE_IMPL(Client_GetPasswordByPasswordRecoveryAnswer)
1300 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClient_GetPasswordByPasswordRecoveryAnswer1301 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClient_GetPasswordByPasswordRecoveryAnswer1302 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginClient_GetPasswordByPasswordRecoveryAnswer1303 	virtual bool RequiresLogin(void) const {return false;}
1304 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1305 	virtual bool PrevalidateInput(void);
1306 
1307 	// Input parameters
1308 	RakNet::RakString userName;
1309 	RakNet::RakString passwordRecoveryAnswer;
1310 
1311 	// Output parameters
1312 	RakNet::RakString password;
1313 };
1314 /// \brief Changes the handle for a user.
1315 /// \ingroup LOBBY_2_COMMANDS
1316 struct Client_ChangeHandle : public Lobby2Message
1317 {
1318 	__L2_MSG_BASE_IMPL(Client_ChangeHandle)
Client_ChangeHandleClient_ChangeHandle1319 	Client_ChangeHandle() {requiresPasswordToChangeHandle=false;}
RequiresAdminClient_ChangeHandle1320 	virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClient_ChangeHandle1321 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClient_ChangeHandle1322 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClient_ChangeHandle1323 	virtual bool RequiresLogin(void) const {return false;}
1324 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1325 
1326 	virtual bool PrevalidateInput(void);
1327 
1328 	// Input parameters
1329 	RakNet::RakString userName;
1330 	bool requiresPasswordToChangeHandle;
1331 	RakNet::RakString password;
1332 	RakNet::RakString newHandle;
1333 
1334 	// Output parameters
1335 };
1336 
1337 /// \brief Will update any or all of the inputs that were previously passed to Client_RegisterAccount, except handle.
1338 /// \details For input parameters, see Client_RegisterAccount() createAccountParameters
1339 /// \ingroup LOBBY_2_COMMANDS
1340 struct Client_UpdateAccount : public Lobby2Message
1341 {
__L2_MSG_BASE_IMPLClient_UpdateAccount1342 	__L2_MSG_BASE_IMPL(Client_UpdateAccount)
1343 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClient_UpdateAccount1344 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClient_UpdateAccount1345 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClient_UpdateAccount1346 	virtual bool RequiresLogin(void) const {return true;}
1347 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1348 
1349 	virtual bool PrevalidateInput(void);
1350 
1351 	// Input parameters
1352 	CreateAccountParameters createAccountParameters;
1353 
1354 	// Output parameters
1355 };
1356 
1357 /// \brief Get the parameters set with Client_RegisterAccount
1358 /// \ingroup LOBBY_2_COMMANDS
1359 struct Client_GetAccountDetails : public Lobby2Message
1360 {
__L2_MSG_BASE_IMPLClient_GetAccountDetails1361 	__L2_MSG_BASE_IMPL(Client_GetAccountDetails)
1362 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClient_GetAccountDetails1363 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClient_GetAccountDetails1364 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClient_GetAccountDetails1365 	virtual bool RequiresLogin(void) const {return true;}
1366 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1367 
1368 	// Input parameters
1369 
1370 	// Output parameters
1371 	CreateAccountParameters createAccountParameters;
1372 };
1373 
1374 /// \brief Adds the specified user to an ignore list for my user. Recommended to store the primary key of the remote user, both for speed and so if the other use changes their handle it still works. The ignore list is checked for friend invites, emails, and elsewhere where indicated. Ignoring is uni-directional, so if A ignores B, A will block messages from B where appropriate, but B will not immediately block messages from A.
1375 /// \ingroup LOBBY_2_COMMANDS
1376 struct Client_StartIgnore : public Lobby2Message
1377 {
__L2_MSG_BASE_IMPLClient_StartIgnore1378 	__L2_MSG_BASE_IMPL(Client_StartIgnore)
1379 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClient_StartIgnore1380 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClient_StartIgnore1381 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClient_StartIgnore1382 	virtual bool RequiresLogin(void) const {return true;}
1383 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1384 
1385 	virtual bool PrevalidateInput(void);
1386 
1387 	virtual bool ClientImpl( Lobby2Client *client);
1388 
1389 	// Input parameters
1390 	RakNet::RakString targetHandle;
1391 
1392 	// Output parameters
1393 };
1394 
1395 /// \brief Removes an entry in the database such that myHandle will no longer ignore theirHandle.
1396 /// \ingroup LOBBY_2_COMMANDS
1397 struct Client_StopIgnore : public Lobby2Message
1398 {
__L2_MSG_BASE_IMPLClient_StopIgnore1399 	__L2_MSG_BASE_IMPL(Client_StopIgnore)
1400 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClient_StopIgnore1401 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClient_StopIgnore1402 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClient_StopIgnore1403 	virtual bool RequiresLogin(void) const {return true;}
1404 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1405 
1406 	virtual bool PrevalidateInput(void);
1407 
1408 	virtual bool ClientImpl( Lobby2Client *client);
1409 
1410 	// Input parameters
1411 	RakNet::RakString targetHandle;
1412 
1413 	// Output parameters
1414 
1415 };
1416 /// \brief Returns all users I have ignored
1417 /// \ingroup LOBBY_2_COMMANDS
1418 struct Client_GetIgnoreList : public Lobby2Message
1419 {
__L2_MSG_BASE_IMPLClient_GetIgnoreList1420 	__L2_MSG_BASE_IMPL(Client_GetIgnoreList)
1421 	virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClient_GetIgnoreList1422 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClient_GetIgnoreList1423 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginClient_GetIgnoreList1424 	virtual bool RequiresLogin(void) const {return true;}
1425 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1426 
1427 	virtual bool ClientImpl( Lobby2Client *client);
1428 
1429 	// Input parameters
1430 
1431 	// Output parameters
1432 	DataStructures::List<RakNet::RakString> ignoredHandles;
1433 };
1434 struct Client_PerTitleIntegerStorage : public Lobby2Message
1435 {
__L2_MSG_BASE_IMPLClient_PerTitleIntegerStorage1436 	__L2_MSG_BASE_IMPL(Client_PerTitleIntegerStorage)
1437 	virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClient_PerTitleIntegerStorage1438 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClient_PerTitleIntegerStorage1439 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClient_PerTitleIntegerStorage1440 	virtual bool RequiresLogin(void) const {return true;}
1441 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1442 	virtual bool PrevalidateInput(void);
1443 
1444 	/// [in] Name of a created title
1445 	RakNet::RakString titleName;
1446 	/// [in] Slot index can be any value, and just lets you store more than one 64 bit integer
1447 	unsigned int slotIndex;
1448 	/// [in] Compared against the current value
1449 	double conditionValue;
1450 	/// [in] How conditionValue is compared against the conditional value
1451 	/// Used for PTISO_ADD only
1452 	enum PTIS_Condition
1453 	{
1454 		PTISC_EQUAL,
1455 		PTISC_NOT_EQUAL,
1456 		PTISC_GREATER_THAN,
1457 		PTISC_GREATER_OR_EQUAL,
1458 		PTISC_LESS_THAN,
1459 		PTISC_LESS_OR_EQUAL,
1460 	} addConditionForOperation;
1461 	/// [in] What value is written (used for PTISO_WRITE and PTISO_ADD only)
1462 	double inputValue;
1463 	/// [in] What to do. Write will overwrite the existing value with inputValue
1464 	/// Read will return the existing value in outputValue
1465 	/// Delete will delete the entry, if it exists
1466 	/// Add will add inputValue to the current value.
1467 	enum PTIS_Operation
1468 	{
1469 		PTISO_WRITE,
1470 		PTISO_READ,
1471 		PTISO_DELETE,
1472 		PTISO_ADD,
1473 	} operationToPerform;
1474 	/// [out] On return, new value is returned in outputValue
1475 	/// For write, it will be the same as inputValue
1476 	/// For read, it will be the current value (or 0, if the row does not exist)
1477 	/// For delete, it is undefined
1478 	/// For add, it is inputValue plus the existing value. If no existing value, 0 is used as the existing value.
1479 	double outputValue;
1480 };
1481 
1482 /// \brief For each combination of user and title, structures can be stored
1483 /// \ingroup LOBBY_2_COMMANDS
1484 struct Client_PerTitleBinaryStorage : public Lobby2Message
1485 {
1486 	__L2_MSG_BASE_IMPL(Client_PerTitleBinaryStorage)
Client_PerTitleBinaryStorageClient_PerTitleBinaryStorage1487 		Client_PerTitleBinaryStorage() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Client_PerTitleBinaryStorageClient_PerTitleBinaryStorage1488 	~Client_PerTitleBinaryStorage() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
RequiresAdminClient_PerTitleBinaryStorage1489 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClient_PerTitleBinaryStorage1490 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClient_PerTitleBinaryStorage1491 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClient_PerTitleBinaryStorage1492 	virtual bool RequiresLogin(void) const {return true;}
1493 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1494 	virtual bool PrevalidateInput(void);
1495 
1496 	/// [in] Name of a created title
1497 	RakNet::RakString titleName;
1498 	/// [in] Slot index can be any value, and just lets you store more than one 64 bit integer
1499 	unsigned int slotIndex;
1500 	/// [in/out] Binary data. On Write, will be written to the row. On Read, will be filled in with the value of the row. Unused for delete
1501 	/// Max length of binaryData is 256K
1502 	RakNetSmartPtr<BinaryDataBlock> binaryData;
1503 	/// [in] What to do. Write will overwrite the existing value with binaryData
1504 	/// Read will return the existing value in binaryData
1505 	enum PTIS_Operation
1506 	{
1507 		PTISO_WRITE,
1508 		PTISO_READ,
1509 		PTISO_DELETE,
1510 	} operationToPerform;
1511 };
1512 
1513 /// \brief Sets in-memory information about your login state, such as which game you are playing, or if you are playing a game
1514 /// Online friends will be notified when you presence changes
1515 struct Client_SetPresence : public Lobby2Message
1516 {
__L2_MSG_BASE_IMPLClient_SetPresence1517 	__L2_MSG_BASE_IMPL(Client_SetPresence)
1518 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClient_SetPresence1519 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClient_SetPresence1520 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginClient_SetPresence1521 	virtual bool RequiresLogin(void) const {return true;}
1522 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1523 //	virtual bool ServerPreDBMemoryImpl( Lobby2Server *server, RakString userHandle );
1524 
1525 	/// \param[in] Presence info to set.
1526 	RakNet::Lobby2Presence presence;
1527 };
1528 
1529 /// \brief Gets in-memory information about a user's login state, such as which game they are playing, or if they are playing a game
1530 /// This can also be a quick way to query if a user is logged in or not. If they are not logged in, \a presence will be set to Lobby2Presence::NOT_ONLINE
1531 struct Client_GetPresence : public Lobby2Message
1532 {
__L2_MSG_BASE_IMPLClient_GetPresence1533 	__L2_MSG_BASE_IMPL(Client_GetPresence)
1534 	virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClient_GetPresence1535 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClient_GetPresence1536 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginClient_GetPresence1537 	virtual bool RequiresLogin(void) const {return false;}
1538 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1539 //	virtual bool ServerPreDBMemoryImpl( Lobby2Server *server, RakString userHandle );
1540 
1541 	/// \param[in] Which user we are looking up ( can be ourselves )
1542 	RakNet::RakString userHandle;
1543 
1544 	/// \param[out] Presence info to set.
1545 	RakNet::Lobby2Presence presence;
1546 };
1547 
1548 /// \brief Stores in the database an add friend invite from my handle to their handle. The combination of my handle and their handle must be unique, so you cannot send more than one add friend invite to a single user. Sends an email to their handle the subject, body, and binary data. Note: if myHandle is ignored by theirHandle, then the function fails. See Client_StartIgnore.
1549 /// \ingroup LOBBY_2_COMMANDS
1550 struct Friends_SendInvite : public Lobby2Message
1551 {
Friends_SendInviteFriends_SendInvite1552 	Friends_SendInvite() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Friends_SendInviteFriends_SendInvite1553 	~Friends_SendInvite() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
__L2_MSG_BASE_IMPLFriends_SendInvite1554 	__L2_MSG_BASE_IMPL(Friends_SendInvite)
1555 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionFriends_SendInvite1556 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectFriends_SendInvite1557 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginFriends_SendInvite1558 	virtual bool RequiresLogin(void) const {return true;}
1559 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1560 
1561 	virtual bool PrevalidateInput(void);
1562 
1563 	// Input parameters
1564 	RakNet::RakString targetHandle;
1565 	RakNet::RakString subject;
1566 	RakNet::RakString body;
1567 	int emailStatus;
1568 	RakNetSmartPtr<BinaryDataBlock> binaryData;
1569 
1570 	// Output parameters
1571 };
1572 
1573 /// \brief Stores in the database that this user is now my friend. This is bidirectional, which is to say if someone accepts an add friend invite, they are my friend, and I am their friend. Recommended to store by primary key for speed and in case the friend's handle changes. Store in the emails table from my handle to their handle the subject, body, and binary data. Note: if myHandle is ignored by theirHandle, then the function fails. See AddToIgnoreList.
1574 /// \ingroup LOBBY_2_COMMANDS
1575 struct Friends_AcceptInvite : public Lobby2Message
1576 {
1577 
Friends_AcceptInviteFriends_AcceptInvite1578 	Friends_AcceptInvite() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Friends_AcceptInviteFriends_AcceptInvite1579 	~Friends_AcceptInvite() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
__L2_MSG_BASE_IMPLFriends_AcceptInvite1580 	__L2_MSG_BASE_IMPL(Friends_AcceptInvite)
1581 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionFriends_AcceptInvite1582 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectFriends_AcceptInvite1583 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginFriends_AcceptInvite1584 	virtual bool RequiresLogin(void) const {return true;}
1585 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1586 
1587 	virtual bool PrevalidateInput(void);
1588 
1589 	// Input parameters
1590 	RakNet::RakString targetHandle;
1591 	RakNet::RakString subject;
1592 	RakNet::RakString body;
1593 	int emailStatus;
1594 	RakNetSmartPtr<BinaryDataBlock> binaryData;
1595 
1596 	// Output parameters
1597 	// Your new buddy's presence status
1598 	RakNet::Lobby2Presence presence;
1599 };
1600 /// \brief Removes from the database the pending add friend invite. Operation completes even if ignored. Unless ignored, store in the emails table from my handle to their handle the subject, body,  binary data, and procedure type flag.
1601 /// \ingroup LOBBY_2_COMMANDS
1602 struct Friends_RejectInvite : public Lobby2Message
1603 {
1604 	__L2_MSG_BASE_IMPL(Friends_RejectInvite)
1605 
Friends_RejectInviteFriends_RejectInvite1606 	Friends_RejectInvite() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Friends_RejectInviteFriends_RejectInvite1607 	~Friends_RejectInvite() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
RequiresAdminFriends_RejectInvite1608 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionFriends_RejectInvite1609 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectFriends_RejectInvite1610 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginFriends_RejectInvite1611 	virtual bool RequiresLogin(void) const {return true;}
1612 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1613 
1614 	virtual bool PrevalidateInput(void);
1615 
1616 	// Input parameters
1617 	RakNet::RakString targetHandle;
1618 	RakNet::RakString subject;
1619 	RakNet::RakString body;
1620 	int emailStatus;
1621 	RakNetSmartPtr<BinaryDataBlock> binaryData;
1622 
1623 	// Output parameters
1624 };
1625 /// \brief Returns all invites for this user
1626 /// \ingroup LOBBY_2_COMMANDS
1627 struct Friends_GetInvites : public Lobby2Message
1628 {
__L2_MSG_BASE_IMPLFriends_GetInvites1629 	__L2_MSG_BASE_IMPL(Friends_GetInvites)
1630 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionFriends_GetInvites1631 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectFriends_GetInvites1632 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginFriends_GetInvites1633 	virtual bool RequiresLogin(void) const {return true;}
1634 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1635 
1636 	// Input parameters
1637 
1638 	// Output parameters
1639 	/// Up to caller to deallocate binaryData if needed
1640 	DataStructures::List<FriendInfo> invitesSent;
1641 	DataStructures::List<FriendInfo> invitesReceived;
1642 };
1643 /// \brief Gets all friends to this user
1644 /// \ingroup LOBBY_2_COMMANDS
1645 struct Friends_GetFriends : public Lobby2Message
1646 {
__L2_MSG_BASE_IMPLFriends_GetFriends1647 	__L2_MSG_BASE_IMPL(Friends_GetFriends)
1648 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionFriends_GetFriends1649 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectFriends_GetFriends1650 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginFriends_GetFriends1651 	virtual bool RequiresLogin(void) const {return true;}
1652 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1653 	// Input parameters
1654 
1655 	// Output parameters
1656 	DataStructures::List<FriendInfo> myFriends;
1657 };
1658 /// \brief Ends a friendship between two users. Remove from the database the friend entry between my handle and their handle. As with accept add friend invite, this is bidirectional. Either user can terminate the friendship. Store in the emails table from my handle to their handle the subject, body, and binary data, and procedure type flag.
1659 /// \ingroup LOBBY_2_COMMANDS
1660 struct Friends_Remove : public Lobby2Message
1661 {
Friends_RemoveFriends_Remove1662 	Friends_Remove() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Friends_RemoveFriends_Remove1663 	~Friends_Remove() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
1664 
__L2_MSG_BASE_IMPLFriends_Remove1665 	__L2_MSG_BASE_IMPL(Friends_Remove)
1666 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionFriends_Remove1667 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectFriends_Remove1668 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginFriends_Remove1669 	virtual bool RequiresLogin(void) const {return true;}
1670 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1671 
1672 	virtual bool PrevalidateInput(void);
1673 
1674 	// Input parameters
1675 	RakNet::RakString targetHandle;
1676 	RakNet::RakString subject;
1677 	RakNet::RakString body;
1678 	int emailStatus;
1679 	RakNetSmartPtr<BinaryDataBlock> binaryData;
1680 
1681 	// Output parameters
1682 };
1683 /// \brief Remembers a user, with a type integer and description for you to use, if desired.
1684 /// \details Can be used for recent users or other types of lists
1685 /// The combination of targetHandle and type uniquely identifies a bookmarked user.
1686 /// If you want more than one list of bookmarked usrs, use a different value for type
1687 /// \ingroup LOBBY_2_COMMANDS
1688 struct BookmarkedUsers_Add : public Lobby2Message
1689 {
__L2_MSG_BASE_IMPLBookmarkedUsers_Add1690 	__L2_MSG_BASE_IMPL(BookmarkedUsers_Add)
1691 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionBookmarkedUsers_Add1692 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectBookmarkedUsers_Add1693 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginBookmarkedUsers_Add1694 	virtual bool RequiresLogin(void) const {return true;}
1695 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1696 
1697 	virtual bool PrevalidateInput(void);
1698 
1699 	// Input parameters
1700 	RakNet::RakString targetHandle;
1701 	int type;
1702 	RakNet::RakString description;
1703 
1704 };
1705 /// \brief Remove a user added with BookmarkedUsers_Add
1706 /// \ingroup LOBBY_2_COMMANDS
1707 struct BookmarkedUsers_Remove : public Lobby2Message
1708 {
__L2_MSG_BASE_IMPLBookmarkedUsers_Remove1709 	__L2_MSG_BASE_IMPL(BookmarkedUsers_Remove)
1710 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionBookmarkedUsers_Remove1711 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectBookmarkedUsers_Remove1712 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginBookmarkedUsers_Remove1713 	virtual bool RequiresLogin(void) const {return true;}
1714 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1715 
1716 	virtual bool PrevalidateInput(void);
1717 
1718 	// Input parameters
1719 	RakNet::RakString targetHandle;
1720 	int type;
1721 };
1722 /// \brief Returns all users added to BookmarkedUsers_Add
1723 /// \ingroup LOBBY_2_COMMANDS
1724 struct BookmarkedUsers_Get : public Lobby2Message
1725 {
__L2_MSG_BASE_IMPLBookmarkedUsers_Get1726 	__L2_MSG_BASE_IMPL(BookmarkedUsers_Get)
1727 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionBookmarkedUsers_Get1728 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectBookmarkedUsers_Get1729 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginBookmarkedUsers_Get1730 	virtual bool RequiresLogin(void) const {return true;}
1731 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1732 
1733 	// Input parameters
1734 
1735 	// Output parameters
1736 	/// \param[out] recentlyMetUsers Handles of recently met users, by BookmarkedUsers_Add, subject to expirationTimeSeconds
1737 	DataStructures::List<BookmarkedUser> bookmarkedUsers;
1738 };
1739 /// \brief Adds to an emails table from myHandle (store primary key) to recipient handles (store primary key) the specified subject, body, and binary data. Emails are persistent, therefore emails should be stored in a separate table and referenced by the user. Deleting the user does not delete previously send email. Emails should have an automatic timestamp to store when they were created. Email should be flagged as sent=true (boolean), markedRead=true (boolean), deletedBySender=false (boolean), deletedByReciever=false (boolean).
1740 /// \ingroup LOBBY_2_COMMANDS
1741 struct Emails_Send : public Lobby2Message
1742 {
1743 
Emails_SendEmails_Send1744 	Emails_Send() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Emails_SendEmails_Send1745 	virtual ~Emails_Send() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
1746 
__L2_MSG_BASE_IMPLEmails_Send1747 	__L2_MSG_BASE_IMPL(Emails_Send)
1748 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionEmails_Send1749 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectEmails_Send1750 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginEmails_Send1751 	virtual bool RequiresLogin(void) const {return true;}
1752 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1753 
1754 	virtual bool PrevalidateInput(void);
1755 
1756 	// Input parameters
1757 	DataStructures::List<RakNet::RakString> recipients;
1758 	RakNet::RakString subject;
1759 	RakNet::RakString body;
1760 	int status;
1761 	RakNetSmartPtr<BinaryDataBlock> binaryData;
1762 
1763 	// Output parameters
1764 };
1765 /// \brief Returns emails as noted. Emails which were marked deleted are not returned.
1766 /// \ingroup LOBBY_2_COMMANDS
1767 struct Emails_Get : public Lobby2Message
1768 {
Emails_GetEmails_Get1769 	Emails_Get() {unreadEmailsOnly=false; emailIdsOnly=false;}
~Emails_GetEmails_Get1770 	virtual ~Emails_Get() {}
1771 
__L2_MSG_BASE_IMPLEmails_Get1772 	__L2_MSG_BASE_IMPL(Emails_Get)
1773 	virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionEmails_Get1774 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectEmails_Get1775 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginEmails_Get1776 	virtual bool RequiresLogin(void) const {return true;}
1777 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1778 
1779 	// Input parameters
1780 	bool unreadEmailsOnly;  //If this is true then it will only return emails that have not been read by the user.
1781 	bool emailIdsOnly; //When this is set only the emailIds are filled out and no data is returned.
1782 	DataStructures::List<unsigned int> emailsToRetrieve; //If this has entries then it will only get the emails in the list, otherwise it will get all emails.
1783 
1784 	// Output parameters
1785 	/// \param[out] emailResults Up to caller to deallocate binary data
1786 	DataStructures::List<EmailResult> emailResults;
1787 };
1788 /// \brief Deletes an email with a specified ID. This ID is returned in GetEmail and should uniquely identify an email (it's fine to use the primary key). Note: Emails are not actually deleted from the database in this function. This just sets the deletedBySender or deletedByReciever flags. Emails are actually stored in a log recording past emails and sender and receiver primary key. They are not truly destroyed until done so with System_PruneAccounts.
1789 /// \ingroup LOBBY_2_COMMANDS
1790 struct Emails_Delete : public Lobby2Message
1791 {
__L2_MSG_BASE_IMPLEmails_Delete1792 	__L2_MSG_BASE_IMPL(Emails_Delete)
1793 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionEmails_Delete1794 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectEmails_Delete1795 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginEmails_Delete1796 	virtual bool RequiresLogin(void) const {return true;}
1797 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1798 
1799 	// Input parameters
1800 	unsigned int emailId;
1801 
1802 	// Output parameters
1803 };
1804 /// \brief Sets the status flag for an email. This is a property defined by and used by the user
1805 /// \ingroup LOBBY_2_COMMANDS
1806 struct Emails_SetStatus : public Lobby2Message
1807 {
__L2_MSG_BASE_IMPLEmails_SetStatus1808 	__L2_MSG_BASE_IMPL(Emails_SetStatus)
1809 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionEmails_SetStatus1810 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectEmails_SetStatus1811 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginEmails_SetStatus1812 	virtual bool RequiresLogin(void) const {return true;}
1813 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1814 	virtual bool PrevalidateInput(void);
1815 
1816 	// Input parameters
1817 	unsigned int emailId;
1818 	bool updateStatusFlag;
1819 	bool updateMarkedRead;
1820 	int newStatusFlag;
1821 	bool isNowMarkedRead;
1822 
1823 	// Output parameters
1824 };
1825 /// \brief Will record in the database the results of a match. This will store in the database the the match which is defined by the the match notes, match id, winner and loser participant primary keys, winner and loser participant scores, and binary data.
1826 /// \ingroup LOBBY_2_COMMANDS
1827 struct Ranking_SubmitMatch : public Lobby2Message
1828 {
__L2_MSG_BASE_IMPLRanking_SubmitMatch1829 	__L2_MSG_BASE_IMPL(Ranking_SubmitMatch)
1830 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionRanking_SubmitMatch1831 	virtual bool RequiresRankingPermission(void) const {return true;}
CancelOnDisconnectRanking_SubmitMatch1832 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginRanking_SubmitMatch1833 	virtual bool RequiresLogin(void) const {return true;}
1834 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1835 
1836 	virtual bool PrevalidateInput(void);
1837 
1838 	// Input parameters
1839 	RakNet::RakString titleName;
1840 	RakNet::RakString gameType;
1841 	SubmittedMatch submittedMatch;
1842 
1843 	// Output parameters
1844 };
1845 /// \brief Gets matches recorded with Ranking_SubmitMatch ordered from most recent to least recent. Each returned match has all columns submitted to Ranking_SubmitMatch, except binary data, which can be retrieved with Ranking_GetMatchBinaryData. Additionally, each returned match returns the primary key of each match, to be passed to Ranking_GetMatchBinaryData
1846 /// \ingroup LOBBY_2_COMMANDS
1847 struct Ranking_GetMatches : public Lobby2Message
1848 {
__L2_MSG_BASE_IMPLRanking_GetMatches1849 	__L2_MSG_BASE_IMPL(Ranking_GetMatches)
1850 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionRanking_GetMatches1851 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectRanking_GetMatches1852 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginRanking_GetMatches1853 	virtual bool RequiresLogin(void) const {return true;}
1854 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1855 
1856 	virtual bool PrevalidateInput(void);
1857 
1858 	// Input parameters
1859 	RakNet::RakString titleName;
1860 	RakNet::RakString gameType;
1861 
1862 	// Output parameters
1863 	/// \param[out] submittedMatches (excluding binary data, up to caller to deallocate)
1864 	DataStructures::List<SubmittedMatch> submittedMatches;
1865 };
1866 /// \brief Because of the large amount of binary data potentially returned, this function is used to retrieve binary data for a particular match.
1867 /// \ingroup LOBBY_2_COMMANDS
1868 struct Ranking_GetMatchBinaryData : public Lobby2Message
1869 {
1870 
Ranking_GetMatchBinaryDataRanking_GetMatchBinaryData1871 	Ranking_GetMatchBinaryData() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Ranking_GetMatchBinaryDataRanking_GetMatchBinaryData1872 	~Ranking_GetMatchBinaryData() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
1873 
__L2_MSG_BASE_IMPLRanking_GetMatchBinaryData1874 	__L2_MSG_BASE_IMPL(Ranking_GetMatchBinaryData)
1875 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionRanking_GetMatchBinaryData1876 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectRanking_GetMatchBinaryData1877 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginRanking_GetMatchBinaryData1878 	virtual bool RequiresLogin(void) const {return true;}
1879 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1880 
1881 	// Input parameters
1882 	unsigned int matchID;
1883 
1884 	// Output parameters
1885 	RakNetSmartPtr<BinaryDataBlock> binaryData;
1886 };
1887 /// \brief When a match is submitted with Ranking_SubmitMatch, the total running score and number of matches played for each player for each game title and game mode combination should be recorded. Because matches can be pruned wth PruneMatches(), the total score sum and number of scores submitted should be stored, rather than summed up from prior submitted matches.
1888 /// \ingroup LOBBY_2_COMMANDS
1889 struct Ranking_GetTotalScore : public Lobby2Message
1890 {
__L2_MSG_BASE_IMPLRanking_GetTotalScore1891 	__L2_MSG_BASE_IMPL(Ranking_GetTotalScore)
1892 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionRanking_GetTotalScore1893 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectRanking_GetTotalScore1894 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginRanking_GetTotalScore1895 	virtual bool RequiresLogin(void) const {return true;}
1896 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1897 
1898 	virtual bool PrevalidateInput(void);
1899 
1900 	// Input parameters
1901 	RakNet::RakString titleName;
1902 	RakNet::RakString gameType;
1903 	RakNet::RakString targetHandle;
1904 
1905 	// Output parameters
1906 	float scoreSum;
1907 	unsigned int numScoresSubmitted;
1908 };
1909 
1910 /// \brief Resets the sum of all submitted scores to 0, the number of scores submitted to 0
1911 /// \ingroup LOBBY_2_COMMANDS
1912 struct Ranking_WipeScoresForPlayer : public Lobby2Message
1913 {
__L2_MSG_BASE_IMPLRanking_WipeScoresForPlayer1914 	__L2_MSG_BASE_IMPL(Ranking_WipeScoresForPlayer)
1915 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionRanking_WipeScoresForPlayer1916 	virtual bool RequiresRankingPermission(void) const {return true;}
CancelOnDisconnectRanking_WipeScoresForPlayer1917 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginRanking_WipeScoresForPlayer1918 	virtual bool RequiresLogin(void) const {return true;}
1919 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1920 
1921 	virtual bool PrevalidateInput(void);
1922 
1923 	// Input parameters
1924 	RakNet::RakString titleName;
1925 	RakNet::RakString gameType;
1926 	RakNet::RakString targetHandle;
1927 
1928 	// Output parameters
1929 };
1930 /// \brief Deletes all matches submitted with submit match. Also deletes all scores for all players associated with this titleName and gameType (e.g. same thing that WipeScoresForPlayer does, but for all players).
1931 /// \ingroup LOBBY_2_COMMANDS
1932 struct Ranking_WipeMatches : public Lobby2Message
1933 {
__L2_MSG_BASE_IMPLRanking_WipeMatches1934 	__L2_MSG_BASE_IMPL(Ranking_WipeMatches)
1935 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionRanking_WipeMatches1936 	virtual bool RequiresRankingPermission(void) const {return true;}
CancelOnDisconnectRanking_WipeMatches1937 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginRanking_WipeMatches1938 	virtual bool RequiresLogin(void) const {return true;}
1939 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1940 
1941 	virtual bool PrevalidateInput(void);
1942 
1943 	// Input parameters
1944 	RakNet::RakString titleName;
1945 	RakNet::RakString gameType;
1946 
1947 	// Output parameters
1948 };
1949 /// \brief Will delete all matches submitted with SubmitMatch over PruneTime days old. Will also prune matches if the total storage space of all matches exceeds PruneSizeMB megabytes in the database.
1950 /// \ingroup LOBBY_2_COMMANDS
1951 struct Ranking_PruneMatches : public Lobby2Message
1952 {
__L2_MSG_BASE_IMPLRanking_PruneMatches1953 	__L2_MSG_BASE_IMPL(Ranking_PruneMatches)
1954 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionRanking_PruneMatches1955 	virtual bool RequiresRankingPermission(void) const {return true;}
CancelOnDisconnectRanking_PruneMatches1956 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginRanking_PruneMatches1957 	virtual bool RequiresLogin(void) const {return true;}
1958 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1959 
1960 	// Input parameters
1961 	unsigned int pruneTimeDays;
1962 
1963 	// Output parameters
1964 };
1965 /// \brief Add or update a rating for a user, in a particular game and game mode
1966 /// \ingroup LOBBY_2_COMMANDS
1967 struct Ranking_UpdateRating : public Lobby2Message
1968 {
__L2_MSG_BASE_IMPLRanking_UpdateRating1969 	__L2_MSG_BASE_IMPL(Ranking_UpdateRating)
1970 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionRanking_UpdateRating1971 	virtual bool RequiresRankingPermission(void) const {return true;}
CancelOnDisconnectRanking_UpdateRating1972 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginRanking_UpdateRating1973 	virtual bool RequiresLogin(void) const {return true;}
1974 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1975 
1976 	virtual bool PrevalidateInput(void);
1977 
1978 	// Input parameters
1979 	RakNet::RakString titleName;
1980 	RakNet::RakString gameType;
1981 	RakNet::RakString targetHandle;
1982 	float targetRating;
1983 
1984 	// Output parameters
1985 };
1986 /// \brief Deletes all ratings for all players for this combination of titleName and gameType.
1987 /// \ingroup LOBBY_2_COMMANDS
1988 struct Ranking_WipeRatings : public Lobby2Message
1989 {
__L2_MSG_BASE_IMPLRanking_WipeRatings1990 	__L2_MSG_BASE_IMPL(Ranking_WipeRatings)
1991 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionRanking_WipeRatings1992 	virtual bool RequiresRankingPermission(void) const {return true;}
CancelOnDisconnectRanking_WipeRatings1993 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginRanking_WipeRatings1994 	virtual bool RequiresLogin(void) const {return true;}
1995 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
1996 
1997 	virtual bool PrevalidateInput(void);
1998 
1999 	// Input parameters
2000 	RakNet::RakString titleName;
2001 	RakNet::RakString gameType;
2002 
2003 	// Output parameters
2004 };
2005 /// \brief Get rating for a player
2006 /// \ingroup LOBBY_2_COMMANDS
2007 struct Ranking_GetRating : public Lobby2Message
2008 {
__L2_MSG_BASE_IMPLRanking_GetRating2009 	__L2_MSG_BASE_IMPL(Ranking_GetRating)
2010 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionRanking_GetRating2011 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectRanking_GetRating2012 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginRanking_GetRating2013 	virtual bool RequiresLogin(void) const {return true;}
2014 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2015 
2016 	virtual bool PrevalidateInput(void);
2017 
2018 	// Input parameters
2019 	RakNet::RakString titleName;
2020 	RakNet::RakString gameType;
2021 	RakNet::RakString targetHandle;
2022 
2023 	// Output parameters
2024 	/// \param[out] currentRating Defaults to 100 if no matches submitted yet
2025 	float currentRating;
2026 };
2027 
2028 /// \brief userHandle updates the clanDescription and clanBinaryData of a clan with the specified clanHandle. userHandle must be the clan leader.
2029 /// \ingroup LOBBY_2_COMMANDS
2030 struct Clans_Create : public Lobby2Message
2031 {
2032 
Clans_CreateClans_Create2033 	Clans_Create() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Clans_CreateClans_Create2034 	~Clans_Create() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
2035 
__L2_MSG_BASE_IMPLClans_Create2036 	__L2_MSG_BASE_IMPL(Clans_Create)
2037 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_Create2038 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_Create2039 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_Create2040 	virtual bool RequiresLogin(void) const {return true;}
2041 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2042 
2043 	virtual bool PrevalidateInput(void);
2044 
2045 	// Input parameters
2046 	RakNet::RakString clanHandle;
2047 	bool failIfAlreadyInClan;
2048 	bool requiresInvitationsToJoin;
2049 	RakNet::RakString description;
2050 	int emailStatus;
2051 	RakNetSmartPtr<BinaryDataBlock> binaryData;
2052 
2053 	// Output parameters
2054 };
2055 
2056 /// \brief userHandle updates the clanDescription and clanBinaryData of a clan with the specified clanHandle. userHandle must be the clan leader.
2057 /// \ingroup LOBBY_2_COMMANDS
2058 struct Clans_SetProperties : public Lobby2Message
2059 {
Clans_SetPropertiesClans_SetProperties2060 	Clans_SetProperties() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Clans_SetPropertiesClans_SetProperties2061 	~Clans_SetProperties() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
2062 
__L2_MSG_BASE_IMPLClans_SetProperties2063 	__L2_MSG_BASE_IMPL(Clans_SetProperties)
2064 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_SetProperties2065 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_SetProperties2066 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_SetProperties2067 	virtual bool RequiresLogin(void) const {return true;}
2068 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2069 
2070 	virtual bool PrevalidateInput(void);
2071 
2072 	// Input parameters
2073 	RakNet::RakString clanHandle;
2074 	RakNet::RakString description;
2075 	RakNetSmartPtr<BinaryDataBlock> binaryData;
2076 };
2077 /// \brief Returns clanDescription and clanBinaryData for the given clan.
2078 /// \ingroup LOBBY_2_COMMANDS
2079 struct Clans_GetProperties : public Lobby2Message
2080 {
Clans_GetPropertiesClans_GetProperties2081 	Clans_GetProperties() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Clans_GetPropertiesClans_GetProperties2082 	~Clans_GetProperties() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
2083 
__L2_MSG_BASE_IMPLClans_GetProperties2084 	__L2_MSG_BASE_IMPL(Clans_GetProperties)
2085 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_GetProperties2086 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_GetProperties2087 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginClans_GetProperties2088 	virtual bool RequiresLogin(void) const {return true;}
2089 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2090 
2091 	virtual bool PrevalidateInput(void);
2092 
2093 	// Input parameters
2094 	RakNet::RakString clanHandle;
2095 
2096 	// Output parameters
2097 	RakNet::RakString description;
2098 	RakNetSmartPtr<BinaryDataBlock> binaryData;
2099 };
2100 
2101 /// \brief Each member of each clan has the the properties clanMemberDescription and clanMemberBinaryData which default to empty. These properties can be set here, and retrieved via GetClanMemberProperties
2102 /// \ingroup LOBBY_2_COMMANDS
2103 struct Clans_SetMyMemberProperties : public Lobby2Message
2104 {
2105 
Clans_SetMyMemberPropertiesClans_SetMyMemberProperties2106 	Clans_SetMyMemberProperties() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Clans_SetMyMemberPropertiesClans_SetMyMemberProperties2107 	~Clans_SetMyMemberProperties() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
2108 
__L2_MSG_BASE_IMPLClans_SetMyMemberProperties2109 	__L2_MSG_BASE_IMPL(Clans_SetMyMemberProperties)
2110 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_SetMyMemberProperties2111 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_SetMyMemberProperties2112 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_SetMyMemberProperties2113 	virtual bool RequiresLogin(void) const {return true;}
2114 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2115 
2116 	virtual bool PrevalidateInput(void);
2117 
2118 	// Input parameters
2119 	RakNet::RakString clanHandle;
2120 	RakNet::RakString description;
2121 	RakNetSmartPtr<BinaryDataBlock> binaryData;
2122 
2123 	// Output parameters
2124 };
2125 /// \brief myPrimaryKey becomes a subleader. newLeaderHandle becomes the leader. An email is sent with Emails_Send() to all members with the specified subject and body
2126 /// \ingroup LOBBY_2_COMMANDS
2127 struct Clans_GrantLeader : public Lobby2Message
2128 {
__L2_MSG_BASE_IMPLClans_GrantLeader2129 	__L2_MSG_BASE_IMPL(Clans_GrantLeader)
2130 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_GrantLeader2131 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_GrantLeader2132 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_GrantLeader2133 	virtual bool RequiresLogin(void) const {return true;}
2134 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2135 
2136 	virtual bool PrevalidateInput(void);
2137 
2138 	// Input parameters
2139 	RakNet::RakString clanHandle;
2140 	RakNet::RakString targetHandle;
2141 };
2142 /// \brief Promotes a clan member to a subleader, or demotes a subleader to a regular member. On promotion, email is sent to all members from myPrimary key with the specified subject and body. On demotion, email is sent to all leaders from myPrimary key with the specified subject and body.
2143 /// \ingroup LOBBY_2_COMMANDS
2144 struct Clans_SetSubleaderStatus : public Lobby2Message
2145 {
__L2_MSG_BASE_IMPLClans_SetSubleaderStatus2146 	__L2_MSG_BASE_IMPL(Clans_SetSubleaderStatus)
2147 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_SetSubleaderStatus2148 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_SetSubleaderStatus2149 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_SetSubleaderStatus2150 	virtual bool RequiresLogin(void) const {return true;}
2151 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2152 
2153 	virtual bool PrevalidateInput(void);
2154 
2155 	// Input parameters
2156 	RakNet::RakString clanHandle;
2157 	RakNet::RakString targetHandle;
2158 	bool setToSubleader;
2159 };
2160 
2161 /// \brief Lets the clan leader set the rank property for a clan member
2162 /// \ingroup LOBBY_2_COMMANDS
2163 struct Clans_SetMemberRank : public Lobby2Message
2164 {
__L2_MSG_BASE_IMPLClans_SetMemberRank2165 	__L2_MSG_BASE_IMPL(Clans_SetMemberRank)
2166 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_SetMemberRank2167 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_SetMemberRank2168 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_SetMemberRank2169 	virtual bool RequiresLogin(void) const {return true;}
2170 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2171 
2172 	virtual bool PrevalidateInput(void);
2173 
2174 	// Input parameters
2175 	RakNet::RakString clanHandle;
2176 	RakNet::RakString targetHandle;
2177 	unsigned int newRank;
2178 };
2179 /// \brief Returns properties for a clan member of a given clan
2180 /// \ingroup LOBBY_2_COMMANDS
2181 struct Clans_GetMemberProperties : public Lobby2Message
2182 {
Clans_GetMemberPropertiesClans_GetMemberProperties2183 	Clans_GetMemberProperties() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Clans_GetMemberPropertiesClans_GetMemberProperties2184 	~Clans_GetMemberProperties() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
2185 
__L2_MSG_BASE_IMPLClans_GetMemberProperties2186 	__L2_MSG_BASE_IMPL(Clans_GetMemberProperties)
2187 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_GetMemberProperties2188 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_GetMemberProperties2189 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginClans_GetMemberProperties2190 	virtual bool RequiresLogin(void) const {return true;}
2191 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2192 
2193 	virtual bool PrevalidateInput(void);
2194 
2195 	// Input parameters
2196 	RakNet::RakString clanHandle;
2197 	RakNet::RakString targetHandle;
2198 
2199 	// Output parameters
2200 	RakNet::RakString description;
2201 	RakNetSmartPtr<BinaryDataBlock> binaryData;
2202 	unsigned int rank;
2203 	bool isSubleader;
2204 	ClanMemberState clanMemberState;
2205 	RakNet::RakString banReason;
2206 };
2207 /// \brief Renames the clan. Note that this may be called asynchronously, in which case the stored procedure should account for this occuring at the same time as another function that uses the old clan handle.
2208 /// \ingroup LOBBY_2_COMMANDS
2209 struct Clans_ChangeHandle : public Lobby2Message
2210 {
__L2_MSG_BASE_IMPLClans_ChangeHandle2211 	__L2_MSG_BASE_IMPL(Clans_ChangeHandle)
2212 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_ChangeHandle2213 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_ChangeHandle2214 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_ChangeHandle2215 	virtual bool RequiresLogin(void) const {return true;}
2216 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2217 
2218 	virtual bool PrevalidateInput(void);
2219 
2220 	// Input parameters
2221 	RakNet::RakString oldClanHandle;
2222 	RakNet::RakString newClanHandle;
2223 
2224 	// Output parameters
2225 };
2226 /// \brief Remove user identified by myPrimaryKey from clan identified by clanHandle.
2227 /// \details If this user is the leader of the clan, and dissolveIfClanLeader is true, then also destroy the clan and remove all members from the clan, as well as all data associated with the clan (clan boards, join requests, etc). If the clan is automatically destroyed in this way,  use Emails_Send() to each clan member with clanDissolvedSubject and clanDissolvedBody. The sender of the email should be the clan leader. If the clan is not destroyed, then leadership passes to the oldest subleader. If no subleaders exist, leadership passes to the oldest member. If no other members exist, the clan is destroyed.
2228 /// \ingroup LOBBY_2_COMMANDS
2229 struct Clans_Leave : public Lobby2Message
2230 {
Clans_LeaveClans_Leave2231 	Clans_Leave() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Clans_LeaveClans_Leave2232 	~Clans_Leave() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
2233 
__L2_MSG_BASE_IMPLClans_Leave2234 	__L2_MSG_BASE_IMPL(Clans_Leave)
2235 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_Leave2236 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_Leave2237 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_Leave2238 	virtual bool RequiresLogin(void) const {return true;}
2239 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2240 
2241 	virtual bool PrevalidateInput(void);
2242 
2243 	// Input parameters
2244 	RakNet::RakString clanHandle;
2245 	bool dissolveIfClanLeader;
2246 	RakNet::RakString subject;
2247 	RakNet::RakString body;
2248 	int emailStatus;
2249 	RakNetSmartPtr<BinaryDataBlock> binaryData;
2250 
2251 	// Output parameters
2252 	bool wasDissolved;
2253 	RakNet::RakString newClanLeader; // If not dissolved
2254 };
2255 /// \brief Returns all clans that userHandle is a member of. Clans and clan members should be sorted by name, using ascending or descending sort as specified.
2256 /// \ingroup LOBBY_2_COMMANDS
2257 struct Clans_Get : public Lobby2Message
2258 {
__L2_MSG_BASE_IMPLClans_Get2259 	__L2_MSG_BASE_IMPL(Clans_Get)
2260 	virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_Get2261 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_Get2262 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginClans_Get2263 	virtual bool RequiresLogin(void) const {return true;}
2264 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2265 
2266 
2267 	// Input parameters
2268 
2269 	// Output parameters
2270 	DataStructures::List<ClanInfo> clans;
2271 };
2272 /// \brief if myPrimaryKey is a leader or subleader of clanHandle, and invitedUserHandle is a valid user not already invited to this clan, add this user to the invite table. The invite table contains the clan, who send the invite, and who the invite was sent to, and when it was sent. Invites expire after expiration time in seconds. Also, use Emails_Send() to send an email from myPrimaryKey to invitedUserHandle with the specified subject and body.
2273 /// \ingroup LOBBY_2_COMMANDS
2274 struct Clans_SendJoinInvitation : public Lobby2Message
2275 {
2276 
Clans_SendJoinInvitationClans_SendJoinInvitation2277 	Clans_SendJoinInvitation() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Clans_SendJoinInvitationClans_SendJoinInvitation2278 		~Clans_SendJoinInvitation() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
2279 
__L2_MSG_BASE_IMPLClans_SendJoinInvitation2280 	__L2_MSG_BASE_IMPL(Clans_SendJoinInvitation)
2281 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_SendJoinInvitation2282 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_SendJoinInvitation2283 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_SendJoinInvitation2284 	virtual bool RequiresLogin(void) const {return true;}
2285 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2286 
2287 	virtual bool PrevalidateInput(void);
2288 
2289 	// Input parameters
2290 	RakNet::RakString clanHandle;
2291 	RakNet::RakString targetHandle;
2292 	RakNet::RakString subject;
2293 	RakNet::RakString body;
2294 	int emailStatus;
2295 	RakNetSmartPtr<BinaryDataBlock> binaryData;
2296 
2297 	// Output parameters
2298 };
2299 /// \brief if myPrimaryKey is a leader or subleader of clanHandle, and invitedUserHandle is a valid user with an invite to this clan, remove this invite.  Also, use Emails_Send() to send an email from myPrimaryKey to invitedUserHandle with the specified subject and body.
2300 /// \ingroup LOBBY_2_COMMANDS
2301 struct Clans_WithdrawJoinInvitation : public Lobby2Message
2302 {
Clans_WithdrawJoinInvitationClans_WithdrawJoinInvitation2303 	Clans_WithdrawJoinInvitation() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Clans_WithdrawJoinInvitationClans_WithdrawJoinInvitation2304 	~Clans_WithdrawJoinInvitation() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
2305 
__L2_MSG_BASE_IMPLClans_WithdrawJoinInvitation2306 	__L2_MSG_BASE_IMPL(Clans_WithdrawJoinInvitation)
2307 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_WithdrawJoinInvitation2308 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_WithdrawJoinInvitation2309 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_WithdrawJoinInvitation2310 	virtual bool RequiresLogin(void) const {return true;}
2311 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2312 
2313 	virtual bool PrevalidateInput(void);
2314 
2315 	// Input parameters
2316 	RakNet::RakString clanHandle;
2317 	RakNet::RakString targetHandle;
2318 	RakNet::RakString subject;
2319 	RakNet::RakString body;
2320 	int emailStatus;
2321 	RakNetSmartPtr<BinaryDataBlock> binaryData;
2322 };
2323 /// \brief If myPrimaryKey has an invitation to the specified clan, add him to the clan. Fail on specified output parameters. Use Emails_Send() to send an email from myPrimaryKey to all clan members with the specified subject and body.
2324 /// \ingroup LOBBY_2_COMMANDS
2325 struct Clans_AcceptJoinInvitation : public Lobby2Message
2326 {
Clans_AcceptJoinInvitationClans_AcceptJoinInvitation2327 	Clans_AcceptJoinInvitation() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Clans_AcceptJoinInvitationClans_AcceptJoinInvitation2328 	~Clans_AcceptJoinInvitation() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
2329 
__L2_MSG_BASE_IMPLClans_AcceptJoinInvitation2330 	__L2_MSG_BASE_IMPL(Clans_AcceptJoinInvitation)
2331 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_AcceptJoinInvitation2332 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_AcceptJoinInvitation2333 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_AcceptJoinInvitation2334 	virtual bool RequiresLogin(void) const {return true;}
2335 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2336 
2337 	virtual bool PrevalidateInput(void);
2338 
2339 	// Input parameters
2340 	RakNet::RakString clanHandle;
2341 	RakNet::RakString subject;
2342 	RakNet::RakString body;
2343 	int emailStatus;
2344 	RakNetSmartPtr<BinaryDataBlock> binaryData;
2345 	bool failIfAlreadyInClan;
2346 
2347 	// Output parameters
2348 };
2349 /// \brief If we have an open clan invitation, reject it (just delete it from the database).
2350 /// \ingroup LOBBY_2_COMMANDS
2351 struct Clans_RejectJoinInvitation : public Lobby2Message
2352 {
Clans_RejectJoinInvitationClans_RejectJoinInvitation2353 	Clans_RejectJoinInvitation() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Clans_RejectJoinInvitationClans_RejectJoinInvitation2354 	~Clans_RejectJoinInvitation() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
2355 
__L2_MSG_BASE_IMPLClans_RejectJoinInvitation2356 	__L2_MSG_BASE_IMPL(Clans_RejectJoinInvitation)
2357 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_RejectJoinInvitation2358 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_RejectJoinInvitation2359 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_RejectJoinInvitation2360 	virtual bool RequiresLogin(void) const {return true;}
2361 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2362 
2363 	virtual bool PrevalidateInput(void);
2364 
2365 	// Input parameters
2366 	RakNet::RakString clanHandle;
2367 	RakNet::RakString subject;
2368 	RakNet::RakString body;
2369 	int emailStatus;
2370 	RakNetSmartPtr<BinaryDataBlock> binaryData;
2371 
2372 	// Output parameters
2373 };
2374 /// \brief Returns all invites sent by Clans_SendJoinInvitation that were not yet acted upon (withdrawn, accepted, rejected).
2375 /// \ingroup LOBBY_2_COMMANDS
2376 struct Clans_DownloadInvitationList : public Lobby2Message
2377 {
__L2_MSG_BASE_IMPLClans_DownloadInvitationList2378 	__L2_MSG_BASE_IMPL(Clans_DownloadInvitationList)
2379 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_DownloadInvitationList2380 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_DownloadInvitationList2381 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginClans_DownloadInvitationList2382 	virtual bool RequiresLogin(void) const {return true;}
2383 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2384 
2385 	// Output parameters
2386 	DataStructures::List<OpenInvite> invitationsSentToMe;
2387 
2388 	DataStructures::List<ClanJoinInvite> usersThatHaveAnInvitationFromClansThatIAmAMemberOf;
2389 };
2390 /// \brief Function has two forms:
2391 /// \details If requiresInvitationsToJoin==true when CreateClan() was called, will join the specified clan immediately. Sends subject and body to all other members in the clan.
2392 /// If requiresInvitationsToJoin==false when CreateClan() was called, send a join request to the specified clan, if we don't have one already. Join request expires after expiration time in seconds. Also, use Emails_Send() to send an email from myPrimaryKey to the clan leader and all subleaders with the specified subject and body.
2393 /// \ingroup LOBBY_2_COMMANDS
2394 struct Clans_SendJoinRequest : public Lobby2Message
2395 {
Clans_SendJoinRequestClans_SendJoinRequest2396 	Clans_SendJoinRequest() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Clans_SendJoinRequestClans_SendJoinRequest2397 	~Clans_SendJoinRequest() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
2398 
__L2_MSG_BASE_IMPLClans_SendJoinRequest2399 	__L2_MSG_BASE_IMPL(Clans_SendJoinRequest)
2400 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_SendJoinRequest2401 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_SendJoinRequest2402 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_SendJoinRequest2403 	virtual bool RequiresLogin(void) const {return true;}
2404 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2405 
2406 	virtual bool PrevalidateInput(void);
2407 
2408 	// Input parameters
2409 	RakNet::RakString clanHandle;
2410 	RakNet::RakString subject;
2411 	RakNet::RakString body;
2412 	int emailStatus;
2413 	RakNetSmartPtr<BinaryDataBlock> binaryData;
2414 
2415 	// Output parameters
2416 	bool clanJoined;
2417 };
2418 /// \brief Withdraws a previously sent clan join request via SendClanJoinRequest.  Use Emails_Send() to send an email from myPrimaryKey to the clan leader and all subleaders with the specified subject and body.
2419 /// \ingroup LOBBY_2_COMMANDS
2420 struct Clans_WithdrawJoinRequest : public Lobby2Message
2421 {
Clans_WithdrawJoinRequestClans_WithdrawJoinRequest2422 	Clans_WithdrawJoinRequest() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Clans_WithdrawJoinRequestClans_WithdrawJoinRequest2423 	~Clans_WithdrawJoinRequest() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
2424 
__L2_MSG_BASE_IMPLClans_WithdrawJoinRequest2425 	__L2_MSG_BASE_IMPL(Clans_WithdrawJoinRequest)
2426 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_WithdrawJoinRequest2427 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_WithdrawJoinRequest2428 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_WithdrawJoinRequest2429 	virtual bool RequiresLogin(void) const {return true;}
2430 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2431 
2432 	virtual bool PrevalidateInput(void);
2433 
2434 	// Input parameters
2435 	RakNet::RakString clanHandle;
2436 	RakNet::RakString subject;
2437 	RakNet::RakString body;
2438 	int emailStatus;
2439 	RakNetSmartPtr<BinaryDataBlock> binaryData;
2440 
2441 	// Output parameters
2442 
2443 };
2444 /// \brief A clan leader or subleader accepts a join request from requestingUserHandle to this clan. requestingUserHandle joins the clan as a regular member.  Use Emails_Send() to send an email from requestingUserHandle to all clan members with the specified subject and body.
2445 /// \ingroup LOBBY_2_COMMANDS
2446 struct Clans_AcceptJoinRequest : public Lobby2Message
2447 {
Clans_AcceptJoinRequestClans_AcceptJoinRequest2448 	Clans_AcceptJoinRequest() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Clans_AcceptJoinRequestClans_AcceptJoinRequest2449 	~Clans_AcceptJoinRequest() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
2450 
__L2_MSG_BASE_IMPLClans_AcceptJoinRequest2451 	__L2_MSG_BASE_IMPL(Clans_AcceptJoinRequest)
2452 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_AcceptJoinRequest2453 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_AcceptJoinRequest2454 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_AcceptJoinRequest2455 	virtual bool RequiresLogin(void) const {return true;}
2456 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2457 
2458 	virtual bool PrevalidateInput(void);
2459 
2460 	// Input parameters
2461 	RakNet::RakString clanHandle;
2462 	RakNet::RakString subject;
2463 	RakNet::RakString body;
2464 	int emailStatus;
2465 	RakNetSmartPtr<BinaryDataBlock> binaryData;
2466 	RakNet::RakString requestingUserHandle;
2467 	bool failIfAlreadyInClan;
2468 
2469 	// Output parameters
2470 };
2471 /// \brief Rejects a clan join request from requestingUserHandle. Send an email from myPrimaryKey to requestingUserHandle with the specified subject and body.
2472 /// \details
2473 struct Clans_RejectJoinRequest : public Lobby2Message
2474 {
Clans_RejectJoinRequestClans_RejectJoinRequest2475 	Clans_RejectJoinRequest() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Clans_RejectJoinRequestClans_RejectJoinRequest2476 	~Clans_RejectJoinRequest() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
2477 
__L2_MSG_BASE_IMPLClans_RejectJoinRequest2478 	__L2_MSG_BASE_IMPL(Clans_RejectJoinRequest)
2479 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_RejectJoinRequest2480 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_RejectJoinRequest2481 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_RejectJoinRequest2482 	virtual bool RequiresLogin(void) const {return true;}
2483 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2484 
2485 	virtual bool PrevalidateInput(void);
2486 
2487 	// Input parameters
2488 	RakNet::RakString clanHandle;
2489 	RakNet::RakString subject;
2490 	RakNet::RakString body;
2491 	int emailStatus;
2492 	RakNetSmartPtr<BinaryDataBlock> binaryData;
2493 	RakNet::RakString requestingUserHandle;
2494 
2495 	// Output parameters
2496 };
2497 /// \brief Returns all open requests this user has sent to clans, that have not yet acted upon (withdrawn, accepted, rejected, expired).
2498 /// \ingroup LOBBY_2_COMMANDS
2499 struct Clans_DownloadRequestList : public Lobby2Message
2500 {
__L2_MSG_BASE_IMPLClans_DownloadRequestList2501 	__L2_MSG_BASE_IMPL(Clans_DownloadRequestList)
2502 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_DownloadRequestList2503 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_DownloadRequestList2504 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginClans_DownloadRequestList2505 	virtual bool RequiresLogin(void) const {return true;}
2506 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2507 
2508 
2509 	// Input parameters
2510 
2511 	// Output parameters
2512 	// joinRequestsToMyClan is only filled out for clans you are a leader or subleader in
2513 	DataStructures::List<ClanJoinRequest> joinRequestsToMyClan, joinRequestsFromMe;
2514 };
2515 /// \brief Kicks a user from the clan and/or blacklists a user so they cannot join. Only a clan leader or subleader can perform this operation. The operation can only be performed on members of lower status (leader can perform on subleader or regular member or nonmember, subleader on regular members or nonmember). If a member is banned, they are added to the banned table which contains the member's primary key, which user banned them, and the reason. Email is sent from myPrimaryKey to all leaders if a clan member is banned. Emails is furthermore sent to all clan members if successfully kicked.
2516 /// \ingroup LOBBY_2_COMMANDS
2517 struct Clans_KickAndBlacklistUser : public Lobby2Message
2518 {
Clans_KickAndBlacklistUserClans_KickAndBlacklistUser2519 	Clans_KickAndBlacklistUser() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Clans_KickAndBlacklistUserClans_KickAndBlacklistUser2520 	~Clans_KickAndBlacklistUser() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
2521 
__L2_MSG_BASE_IMPLClans_KickAndBlacklistUser2522 	__L2_MSG_BASE_IMPL(Clans_KickAndBlacklistUser)
2523 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_KickAndBlacklistUser2524 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_KickAndBlacklistUser2525 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_KickAndBlacklistUser2526 	virtual bool RequiresLogin(void) const {return true;}
2527 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2528 
2529 	virtual bool PrevalidateInput(void);
2530 
2531 	// Input parameters
2532 	RakNet::RakString clanHandle;
2533 	RakNet::RakString subject;
2534 	RakNet::RakString body;
2535 	int emailStatus;
2536 	RakNetSmartPtr<BinaryDataBlock> binaryData;
2537 	RakNet::RakString targetHandle;
2538 	bool kick;
2539 	bool blacklist;
2540 	RakNet::RakString reason;
2541 };
2542 /// \brief Removes a user from the blacklist for this clan.
2543 /// \ingroup LOBBY_2_COMMANDS
2544 struct Clans_UnblacklistUser : public Lobby2Message
2545 {
Clans_UnblacklistUserClans_UnblacklistUser2546 	Clans_UnblacklistUser() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Clans_UnblacklistUserClans_UnblacklistUser2547 	~Clans_UnblacklistUser() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
2548 
__L2_MSG_BASE_IMPLClans_UnblacklistUser2549 	__L2_MSG_BASE_IMPL(Clans_UnblacklistUser)
2550 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_UnblacklistUser2551 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_UnblacklistUser2552 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_UnblacklistUser2553 	virtual bool RequiresLogin(void) const {return true;}
2554 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2555 
2556 	virtual bool PrevalidateInput(void);
2557 
2558 	// Input parameters
2559 	RakNet::RakString clanHandle;
2560 	RakNet::RakString targetHandle;
2561 	RakNet::RakString subject;
2562 	RakNet::RakString body;
2563 	int emailStatus;
2564 	RakNetSmartPtr<BinaryDataBlock> binaryData;
2565 };
2566 /// \brief Returns a list of all members  blacklisted from this clan. Each element in the list contains the handle of the user that did the ban, who was banned, when the user was banned, and the reason passed to ClanKickAndBlacklistUser
2567 /// \ingroup LOBBY_2_COMMANDS
2568 struct Clans_GetBlacklist : public Lobby2Message
2569 {
__L2_MSG_BASE_IMPLClans_GetBlacklist2570 	__L2_MSG_BASE_IMPL(Clans_GetBlacklist)
2571 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_GetBlacklist2572 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_GetBlacklist2573 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_GetBlacklist2574 	virtual bool RequiresLogin(void) const {return true;}
2575 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2576 
2577 	virtual bool PrevalidateInput(void);
2578 
2579 	// Input parameters
2580 	RakNet::RakString clanHandle;
2581 
2582 	// Output parameters
2583 	DataStructures::List<RakNet::RakString> blacklistedUsers;
2584 };
2585 /// \brief Returns all clan members for this clan. Each entry returned contains handle, description, binary data, status (leader, regular member, subleader).
2586 /// \ingroup LOBBY_2_COMMANDS
2587 struct Clans_GetMembers : public Lobby2Message
2588 {
__L2_MSG_BASE_IMPLClans_GetMembers2589 	__L2_MSG_BASE_IMPL(Clans_GetMembers)
2590 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_GetMembers2591 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_GetMembers2592 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginClans_GetMembers2593 	virtual bool RequiresLogin(void) const {return true;}
2594 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2595 
2596 	virtual bool PrevalidateInput(void);
2597 
2598 	// Input parameters
2599 	RakNet::RakString clanHandle;
2600 
2601 	// Output parameters
2602 	RakNet::RakString clanLeader;
2603 	DataStructures::List<RakNet::RakString> clanMembersOtherThanLeader;
2604 };
2605 /// \brief Returns all clans names
2606 /// \ingroup LOBBY_2_COMMANDS
2607 struct Clans_GetList : public Lobby2Message
2608 {
__L2_MSG_BASE_IMPLClans_GetList2609 	__L2_MSG_BASE_IMPL(Clans_GetList)
2610 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_GetList2611 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_GetList2612 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginClans_GetList2613 	virtual bool RequiresLogin(void) const {return true;}
2614 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2615 
2616 	// Input parameters
2617 
2618 	// Output parameters
2619 	DataStructures::List<RakNet::RakString> clanNames;
2620 };
2621 /// \brief Creates a new clan board for clan members to post in using AddPostToClanBoard. Clan boards are unique, and are destroyed when the clan is destroyed, or if DestroyClanBoard is called.
2622 /// \ingroup LOBBY_2_COMMANDS
2623 struct Clans_CreateBoard : public Lobby2Message
2624 {
Clans_CreateBoardClans_CreateBoard2625 	Clans_CreateBoard() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Clans_CreateBoardClans_CreateBoard2626 	~Clans_CreateBoard() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
2627 
__L2_MSG_BASE_IMPLClans_CreateBoard2628 	__L2_MSG_BASE_IMPL(Clans_CreateBoard)
2629 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_CreateBoard2630 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_CreateBoard2631 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_CreateBoard2632 	virtual bool RequiresLogin(void) const {return true;}
2633 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2634 
2635 	virtual bool PrevalidateInput(void);
2636 
2637 	// Input parameters
2638 	RakNet::RakString clanHandle;
2639 	RakNet::RakString clanBoardName;
2640 	bool allowPublicReads;
2641 	bool allowPublicWrites;
2642 	RakNet::RakString description;
2643 	RakNetSmartPtr<BinaryDataBlock> binaryData;
2644 
2645 	// Output parameters
2646 };
2647 /// \brief Success, invalid parameter syntax, myPrimaryKey is not the leader or subleader of clanHandle, unknown myPrimaryKey, unknown clanHandle, unknown clanBoardName
2648 /// \ingroup LOBBY_2_COMMANDS
2649 struct Clans_DestroyBoard : public Lobby2Message
2650 {
__L2_MSG_BASE_IMPLClans_DestroyBoard2651 	__L2_MSG_BASE_IMPL(Clans_DestroyBoard)
2652 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_DestroyBoard2653 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_DestroyBoard2654 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_DestroyBoard2655 	virtual bool RequiresLogin(void) const {return true;}
2656 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2657 
2658 	virtual bool PrevalidateInput(void);
2659 
2660 	// Input parameters
2661 	RakNet::RakString clanHandle;
2662 	RakNet::RakString clanBoardName;
2663 
2664 	// Output parameters
2665 };
2666 /// \brief Each clan has a clan board that only clan members can post to. This adds a topic to the clan board. Posts should reference the primary key of the poster, so that even if the poster chagnes his or her handle, the post author is updated properly. Each post automatically stores the timestamp when it was created. Banned users may not add new posts to the clan board.
2667 /// \ingroup LOBBY_2_COMMANDS
2668 struct Clans_CreateNewTopic : public Lobby2Message
2669 {
Clans_CreateNewTopicClans_CreateNewTopic2670 	Clans_CreateNewTopic() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Clans_CreateNewTopicClans_CreateNewTopic2671 	~Clans_CreateNewTopic() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
2672 
__L2_MSG_BASE_IMPLClans_CreateNewTopic2673 	__L2_MSG_BASE_IMPL(Clans_CreateNewTopic)
2674 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_CreateNewTopic2675 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_CreateNewTopic2676 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_CreateNewTopic2677 	virtual bool RequiresLogin(void) const {return true;}
2678 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2679 
2680 	virtual bool PrevalidateInput(void);
2681 
2682 	// Input parameters
2683 	RakNet::RakString clanHandle;
2684 	RakNet::RakString clanBoardName;
2685 	RakNet::RakString body;
2686 	RakNet::RakString subject;
2687 	RakNetSmartPtr<BinaryDataBlock> binaryData;
2688 
2689 	// Output parameters
2690 	unsigned int postId; // (unique for clanHandle)
2691 };
2692 /// \brief Replies to a topic created with Clans_CreateTopic(). If postId references a post within a topic, just add the reply to the last post.  Banned users may not add new posts to the clan board.
2693 /// \ingroup LOBBY_2_COMMANDS
2694 struct Clans_ReplyToTopic : public Lobby2Message
2695 {
Clans_ReplyToTopicClans_ReplyToTopic2696 	Clans_ReplyToTopic() {binaryData=RakNet::OP_NEW<BinaryDataBlock>(__FILE__,__LINE__);}
~Clans_ReplyToTopicClans_ReplyToTopic2697 	~Clans_ReplyToTopic() {/*RakNet::OP_DELETE(binaryData,__FILE__,__LINE__);*/}
2698 
__L2_MSG_BASE_IMPLClans_ReplyToTopic2699 	__L2_MSG_BASE_IMPL(Clans_ReplyToTopic)
2700 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_ReplyToTopic2701 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_ReplyToTopic2702 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_ReplyToTopic2703 	virtual bool RequiresLogin(void) const {return true;}
2704 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2705 
2706 	virtual bool PrevalidateInput(void);
2707 
2708 	// Input parameters
2709 	unsigned int postId; // returned from Clans_CreateTopic()
2710 	RakNet::RakString subject;
2711 	RakNet::RakString body;
2712 	RakNetSmartPtr<BinaryDataBlock> binaryData;
2713 };
2714 /// \brief The clan leader or subleaders may remove posts or topics from a clan board.
2715 /// \ingroup LOBBY_2_COMMANDS
2716 struct Clans_RemovePost : public Lobby2Message
2717 {
__L2_MSG_BASE_IMPLClans_RemovePost2718 	__L2_MSG_BASE_IMPL(Clans_RemovePost)
2719 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_RemovePost2720 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_RemovePost2721 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginClans_RemovePost2722 	virtual bool RequiresLogin(void) const {return true;}
2723 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2724 
2725 	// Input parameters
2726 	unsigned int postId; // returned from Clans_CreateTopic()
2727 	bool removeEntireTopic;
2728 
2729 
2730 };
2731 
2732 /// \brief Gets clan boards created for clanHandle. Boards are returned if we are a clan member, or if allowPublicReads in Clans_CreateBoard() was passed as false. However, if we are banned from this clan, no boards are returned.
2733 /// \ingroup LOBBY_2_COMMANDS
2734 struct Clans_GetBoards : public Lobby2Message
2735 {
__L2_MSG_BASE_IMPLClans_GetBoards2736 	__L2_MSG_BASE_IMPL(Clans_GetBoards)
2737 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_GetBoards2738 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_GetBoards2739 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginClans_GetBoards2740 	virtual bool RequiresLogin(void) const {return true;}
2741 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2742 
2743 	virtual bool PrevalidateInput(void);
2744 
2745 	// Input parameters
2746 	RakNet::RakString clanHandle;
2747 
2748 	// Output parameters
2749 	DataStructures::List<RakNet::RakString> clanBoardsNames;
2750 
2751 
2752 };
2753 /// \brief Gets topics (posts that are not replies to other posts, created with Clans_CreateTopic()) for the specified clanHandle and clanBoardName. If we are not a clan member and the clan was created with allowPublicReads==false, then the user is not allowed to read topics
2754 /// \ingroup LOBBY_2_COMMANDS
2755 struct Clans_GetTopics : public Lobby2Message
2756 {
__L2_MSG_BASE_IMPLClans_GetTopics2757 	__L2_MSG_BASE_IMPL(Clans_GetTopics)
2758 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_GetTopics2759 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_GetTopics2760 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginClans_GetTopics2761 	virtual bool RequiresLogin(void) const {return true;}
2762 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2763 
2764 	virtual bool PrevalidateInput(void);
2765 
2766 	// Input parameters
2767 	RakNet::RakString clanHandle;
2768 	RakNet::RakString clanBoardName;
2769 };
2770 /// \brief Gets all posts for a particular topic. If postId is not a topic but is instead a post in a topic, treat it as if the topic postId was passed. If we are not a clan member and the clan was created with allowPublicReads==false, then the user is not allowed to read topics
2771 /// \ingroup LOBBY_2_COMMANDS
2772 struct Clans_GetPosts : public Lobby2Message
2773 {
__L2_MSG_BASE_IMPLClans_GetPosts2774 	__L2_MSG_BASE_IMPL(Clans_GetPosts)
2775 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionClans_GetPosts2776 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectClans_GetPosts2777 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginClans_GetPosts2778 	virtual bool RequiresLogin(void) const {return true;}
2779 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2780 
2781 	virtual bool PrevalidateInput(void);
2782 
2783 	// Input parameters
2784 	unsigned int postId;
2785 };
2786 
2787 // \brief Call the function to get the list of servers available.
2788 // \note Does nothing on the PC.
2789 struct Console_GetServerStatus : public Lobby2Message
2790 {
__L2_MSG_BASE_IMPLConsole_GetServerStatus2791 	__L2_MSG_BASE_IMPL(Console_GetServerStatus)
2792 	virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionConsole_GetServerStatus2793 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectConsole_GetServerStatus2794 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginConsole_GetServerStatus2795 	virtual bool RequiresLogin(void) const {return true;}
2796 };
2797 
2798 // \brief Given a server, get the list of worlds
2799 // \note Does nothing on the PC.
2800 struct Console_GetWorldListFromServer : public Lobby2Message
2801 {
__L2_MSG_BASE_IMPLConsole_GetWorldListFromServer2802 	__L2_MSG_BASE_IMPL(Console_GetWorldListFromServer)
2803 	virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionConsole_GetWorldListFromServer2804 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectConsole_GetWorldListFromServer2805 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginConsole_GetWorldListFromServer2806 	virtual bool RequiresLogin(void) const {return true;}
2807 };
2808 
2809 // Given a world, get the list of lobbies
2810 // Does nothing on the PC.
2811 struct Console_GetLobbyListFromWorld : public Lobby2Message
2812 {
__L2_MSG_BASE_IMPLConsole_GetLobbyListFromWorld2813 	__L2_MSG_BASE_IMPL(Console_GetLobbyListFromWorld)
2814 	virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionConsole_GetLobbyListFromWorld2815 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectConsole_GetLobbyListFromWorld2816 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginConsole_GetLobbyListFromWorld2817 	virtual bool RequiresLogin(void) const {return true;}
2818 };
2819 
2820 // Given a lobby, join that lobby
2821 // Does nothing on the PC.
2822 struct Console_JoinLobby : public Lobby2Message
2823 {
__L2_MSG_BASE_IMPLConsole_JoinLobby2824 	__L2_MSG_BASE_IMPL(Console_JoinLobby)
2825 	virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionConsole_JoinLobby2826 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectConsole_JoinLobby2827 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginConsole_JoinLobby2828 	virtual bool RequiresLogin(void) const {return true;}
2829 };
2830 
2831 // Given a lobby, leave that lobby.
2832 // Does nothing on the PC.
2833 struct Console_LeaveLobby : public Lobby2Message
2834 {
__L2_MSG_BASE_IMPLConsole_LeaveLobby2835 	__L2_MSG_BASE_IMPL(Console_LeaveLobby)
2836 	virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionConsole_LeaveLobby2837 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectConsole_LeaveLobby2838 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginConsole_LeaveLobby2839 	virtual bool RequiresLogin(void) const {return true;}
2840 };
2841 
2842 // Send a message to a lobby that you have joined
2843 // Does nothing on the PC.
2844 struct Console_SendLobbyChatMessage : public Lobby2Message
2845 {
__L2_MSG_BASE_IMPLConsole_SendLobbyChatMessage2846 	__L2_MSG_BASE_IMPL(Console_SendLobbyChatMessage)
2847 	virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionConsole_SendLobbyChatMessage2848 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectConsole_SendLobbyChatMessage2849 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginConsole_SendLobbyChatMessage2850 	virtual bool RequiresLogin(void) const {return true;}
2851 
2852 	// Input
2853 	RakNet::RakString message;
2854 };
2855 
2856 // Search rooms in the lobby
2857 // Does nothing on the PC.
2858 struct Console_SearchRooms : public Lobby2Message
2859 {
__L2_MSG_BASE_IMPLConsole_SearchRooms2860 	__L2_MSG_BASE_IMPL(Console_SearchRooms)
2861 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionConsole_SearchRooms2862 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectConsole_SearchRooms2863 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginConsole_SearchRooms2864 	virtual bool RequiresLogin(void) const {return true;}
2865 };
2866 
2867 
2868 // Get information about a room
2869 // Does nothing on the PC.
2870 struct Console_GetRoomDetails : public Lobby2Message
2871 {
__L2_MSG_BASE_IMPLConsole_GetRoomDetails2872 	__L2_MSG_BASE_IMPL(Console_GetRoomDetails)
2873 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionConsole_GetRoomDetails2874 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectConsole_GetRoomDetails2875 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginConsole_GetRoomDetails2876 	virtual bool RequiresLogin(void) const {return true;}
2877 };
2878 
2879 
2880 // Send a chat message to the lobby
2881 // Does nothing on the PC.
2882 struct Console_GetLobbyMemberData : public Lobby2Message
2883 {
__L2_MSG_BASE_IMPLConsole_GetLobbyMemberData2884 	__L2_MSG_BASE_IMPL(Console_GetLobbyMemberData)
2885 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionConsole_GetLobbyMemberData2886 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectConsole_GetLobbyMemberData2887 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginConsole_GetLobbyMemberData2888 	virtual bool RequiresLogin(void) const {return true;}
2889 };
2890 
2891 struct Console_CreateRoom : public Lobby2Message
2892 {
__L2_MSG_BASE_IMPLConsole_CreateRoom2893 	__L2_MSG_BASE_IMPL(Console_CreateRoom)
2894 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionConsole_CreateRoom2895 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectConsole_CreateRoom2896 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginConsole_CreateRoom2897 	virtual bool RequiresLogin(void) const {return true;}
2898 
2899 	int publicSlots;
2900 	int privateSlots;
2901 };
2902 
2903 struct Console_SetRoomSearchProperties : public Lobby2Message
2904 {
__L2_MSG_BASE_IMPLConsole_SetRoomSearchProperties2905 	__L2_MSG_BASE_IMPL(Console_SetRoomSearchProperties)
2906 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionConsole_SetRoomSearchProperties2907 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectConsole_SetRoomSearchProperties2908 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginConsole_SetRoomSearchProperties2909 	virtual bool RequiresLogin(void) const {return true;}
2910 };
2911 struct Console_UpdateRoomParameters : public Lobby2Message
2912 {
__L2_MSG_BASE_IMPLConsole_UpdateRoomParameters2913 	__L2_MSG_BASE_IMPL(Console_UpdateRoomParameters)
2914 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionConsole_UpdateRoomParameters2915 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectConsole_UpdateRoomParameters2916 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginConsole_UpdateRoomParameters2917 	virtual bool RequiresLogin(void) const {return true;}
2918 
2919 
2920 };
2921 struct Console_JoinRoom : public Lobby2Message
2922 {
__L2_MSG_BASE_IMPLConsole_JoinRoom2923 	__L2_MSG_BASE_IMPL(Console_JoinRoom)
2924 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionConsole_JoinRoom2925 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectConsole_JoinRoom2926 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginConsole_JoinRoom2927 	virtual bool RequiresLogin(void) const {return true;}
2928 };
2929 
2930 struct Console_LeaveRoom : public Lobby2Message
2931 {
__L2_MSG_BASE_IMPLConsole_LeaveRoom2932 	__L2_MSG_BASE_IMPL(Console_LeaveRoom)
2933 	virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionConsole_LeaveRoom2934 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectConsole_LeaveRoom2935 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginConsole_LeaveRoom2936 	virtual bool RequiresLogin(void) const {return true;}
2937 };
2938 
2939 struct Console_SendLobbyInvitationToRoom : public Lobby2Message
2940 {
__L2_MSG_BASE_IMPLConsole_SendLobbyInvitationToRoom2941 	__L2_MSG_BASE_IMPL(Console_SendLobbyInvitationToRoom)
2942 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionConsole_SendLobbyInvitationToRoom2943 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectConsole_SendLobbyInvitationToRoom2944 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginConsole_SendLobbyInvitationToRoom2945 	virtual bool RequiresLogin(void) const {return true;}
2946 };
2947 
2948 struct Console_SendGUIInvitationToRoom : public Lobby2Message
2949 {
__L2_MSG_BASE_IMPLConsole_SendGUIInvitationToRoom2950 	__L2_MSG_BASE_IMPL(Console_SendGUIInvitationToRoom)
2951 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionConsole_SendGUIInvitationToRoom2952 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectConsole_SendGUIInvitationToRoom2953 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginConsole_SendGUIInvitationToRoom2954 	virtual bool RequiresLogin(void) const {return true;}
2955 };
2956 
2957 struct Console_SendDataMessageToUser : public Lobby2Message
2958 {
__L2_MSG_BASE_IMPLConsole_SendDataMessageToUser2959 	__L2_MSG_BASE_IMPL(Console_SendDataMessageToUser)
2960 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionConsole_SendDataMessageToUser2961 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectConsole_SendDataMessageToUser2962 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginConsole_SendDataMessageToUser2963 	virtual bool RequiresLogin(void) const {return true;}
2964 };
2965 
2966 struct Console_SendRoomChatMessage : public Lobby2Message
2967 {
__L2_MSG_BASE_IMPLConsole_SendRoomChatMessage2968 	__L2_MSG_BASE_IMPL(Console_SendRoomChatMessage)
2969 		virtual bool RequiresAdmin(void) const {return false;}
RequiresRankingPermissionConsole_SendRoomChatMessage2970 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectConsole_SendRoomChatMessage2971 	virtual bool CancelOnDisconnect(void) const {return true;}
RequiresLoginConsole_SendRoomChatMessage2972 	virtual bool RequiresLogin(void) const {return true;}
2973 
2974 	RakNet::RakString message;
2975 };
2976 /// \ingroup LOBBY_2_NOTIFICATIONS
2977 struct Notification_Client_RemoteLogin : public Lobby2Message
2978 {
__L2_MSG_BASE_IMPLNotification_Client_RemoteLogin2979 	__L2_MSG_BASE_IMPL(Notification_Client_RemoteLogin)
2980 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Client_RemoteLogin2981 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Client_RemoteLogin2982 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Client_RemoteLogin2983 	virtual bool RequiresLogin(void) const {return false;}
2984 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2985 
2986 	RakNet::RakString handle;
2987 };
2988 /// \ingroup LOBBY_2_NOTIFICATIONS
2989 struct Notification_Client_IgnoreStatus : public Lobby2Message
2990 {
__L2_MSG_BASE_IMPLNotification_Client_IgnoreStatus2991 	__L2_MSG_BASE_IMPL(Notification_Client_IgnoreStatus)
2992 	virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Client_IgnoreStatus2993 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Client_IgnoreStatus2994 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Client_IgnoreStatus2995 	virtual bool RequiresLogin(void) const {return false;}
2996 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
2997 
2998 	bool nowIgnored;
2999 	RakNet::RakString otherHandle;
3000 };
3001 /// \ingroup LOBBY_2_NOTIFICATIONS
3002 struct Notification_Friends_StatusChange : public Lobby2Message
3003 {
__L2_MSG_BASE_IMPLNotification_Friends_StatusChange3004 	__L2_MSG_BASE_IMPL(Notification_Friends_StatusChange)
3005 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Friends_StatusChange3006 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Friends_StatusChange3007 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Friends_StatusChange3008 	virtual bool RequiresLogin(void) const {return false;}
3009 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
3010 	enum Status
3011 	{
3012 		FRIEND_LOGGED_IN,
3013 		FRIEND_LOGGED_IN_DIFFERENT_CONTEXT, // Used for consoles, different game
3014 		FRIEND_LOGGED_OFF,
3015 		FRIEND_ACCOUNT_WAS_DELETED,
3016 		YOU_WERE_REMOVED_AS_A_FRIEND,
3017 		GOT_INVITATION_TO_BE_FRIENDS,
3018 		THEY_ACCEPTED_OUR_INVITATION_TO_BE_FRIENDS,
3019 		THEY_REJECTED_OUR_INVITATION_TO_BE_FRIENDS,
3020 	} op;
OpToStringNotification_Friends_StatusChange3021 	const char *OpToString(void) const {
3022 		switch (op)
3023 		{
3024 		case FRIEND_LOGGED_IN:
3025 			return "FRIEND_LOGGED_IN";
3026 		case FRIEND_LOGGED_IN_DIFFERENT_CONTEXT:
3027 			return "FRIEND_LOGGED_IN_DIFFERENT_CONTEXT";
3028 		case FRIEND_LOGGED_OFF:
3029 			return "FRIEND_LOGGED_OFF";
3030 		case FRIEND_ACCOUNT_WAS_DELETED:
3031 			return "FRIEND_ACCOUNT_WAS_DELETED";
3032 		case YOU_WERE_REMOVED_AS_A_FRIEND:
3033 			return "YOU_WERE_REMOVED_AS_A_FRIEND";
3034 		case GOT_INVITATION_TO_BE_FRIENDS:
3035 			return "GOT_INVITATION_TO_BE_FRIENDS";
3036 		case THEY_ACCEPTED_OUR_INVITATION_TO_BE_FRIENDS:
3037 			return "THEY_ACCEPTED_OUR_INVITATION_TO_BE_FRIENDS";
3038 		case THEY_REJECTED_OUR_INVITATION_TO_BE_FRIENDS:
3039 			return "THEY_REJECTED_OUR_INVITATION_TO_BE_FRIENDS";
3040 		}
3041 		return "Error in OpToString::Notification_Friends_StatusChange";
3042 	}
3043 	RakNet::RakString otherHandle;
3044 	RakNet::Lobby2Presence presence;
3045 	// If \a op was generated due to YOU_WERE_REMOVED_AS_A_FRIEND,GOT_INVITATION_TO_BE_FRIENDS,THEY_ACCEPTED_OUR_INVITATION_TO_BE_FRIENDS, or THEY_REJECTED_OUR_INVITATION_TO_BE_FRIENDS
3046 	// Then a copy of the subject and body of the corresponding email is here for convenience
3047 	RakNet::RakString subject;
3048 	RakNet::RakString body;
3049 };
3050 /// \ingroup LOBBY_2_NOTIFICATIONS
3051 struct Notification_Friends_PresenceUpdate : public Lobby2Message
3052 {
__L2_MSG_BASE_IMPLNotification_Friends_PresenceUpdate3053 	__L2_MSG_BASE_IMPL(Notification_Friends_PresenceUpdate)
3054 	virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Friends_PresenceUpdate3055 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Friends_PresenceUpdate3056 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Friends_PresenceUpdate3057 	virtual bool RequiresLogin(void) const {return false;}
3058 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
3059 
3060 	Lobby2Presence newPresence;
3061 	RakNet::RakString otherHandle;
3062 };
3063 /// \ingroup LOBBY_2_NOTIFICATIONS
3064 struct Notification_User_ChangedHandle : public Lobby2Message
3065 {
__L2_MSG_BASE_IMPLNotification_User_ChangedHandle3066 	__L2_MSG_BASE_IMPL(Notification_User_ChangedHandle)
3067 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_User_ChangedHandle3068 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_User_ChangedHandle3069 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_User_ChangedHandle3070 	virtual bool RequiresLogin(void) const {return false;}
3071 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
3072 
3073 	RakNet::RakString oldHandle, newHandle;
3074 };
3075 /// \ingroup LOBBY_2_NOTIFICATIONS
3076 struct Notification_Friends_CreatedClan : public Lobby2Message
3077 {
__L2_MSG_BASE_IMPLNotification_Friends_CreatedClan3078 	__L2_MSG_BASE_IMPL(Notification_Friends_CreatedClan)
3079 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Friends_CreatedClan3080 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Friends_CreatedClan3081 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Friends_CreatedClan3082 	virtual bool RequiresLogin(void) const {return false;}
3083 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
3084 
3085 	RakNet::RakString otherHandle;
3086 	RakNet::RakString clanName;
3087 };
3088 /// \ingroup LOBBY_2_NOTIFICATIONS
3089 struct Notification_Emails_Received : public Lobby2Message
3090 {
__L2_MSG_BASE_IMPLNotification_Emails_Received3091 	__L2_MSG_BASE_IMPL(Notification_Emails_Received)
3092 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Emails_Received3093 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Emails_Received3094 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Emails_Received3095 	virtual bool RequiresLogin(void) const {return false;}
3096 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
3097 
3098 	RakNet::RakString sender;
3099 	RakNet::RakString subject;
3100 	unsigned int emailId;
3101 };
3102 /// \ingroup LOBBY_2_NOTIFICATIONS
3103 struct Notification_Clans_GrantLeader : public Lobby2Message
3104 {
__L2_MSG_BASE_IMPLNotification_Clans_GrantLeader3105 	__L2_MSG_BASE_IMPL(Notification_Clans_GrantLeader)
3106 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Clans_GrantLeader3107 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Clans_GrantLeader3108 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Clans_GrantLeader3109 	virtual bool RequiresLogin(void) const {return false;}
3110 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
3111 
3112 	RakNet::RakString clanHandle;
3113 	RakNet::RakString newLeader;
3114 	RakNet::RakString oldLeader;
3115 };
3116 /// \ingroup LOBBY_2_NOTIFICATIONS
3117 struct Notification_Clans_SetSubleaderStatus : public Lobby2Message
3118 {
__L2_MSG_BASE_IMPLNotification_Clans_SetSubleaderStatus3119 	__L2_MSG_BASE_IMPL(Notification_Clans_SetSubleaderStatus)
3120 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Clans_SetSubleaderStatus3121 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Clans_SetSubleaderStatus3122 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Clans_SetSubleaderStatus3123 	virtual bool RequiresLogin(void) const {return false;}
3124 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
3125 
3126 	RakNet::RakString clanHandle;
3127 	RakNet::RakString targetHandle;
3128 	RakNet::RakString leaderHandle;
3129 	bool setToSubleader;
3130 };
3131 /// \ingroup LOBBY_2_NOTIFICATIONS
3132 struct Notification_Clans_SetMemberRank : public Lobby2Message
3133 {
__L2_MSG_BASE_IMPLNotification_Clans_SetMemberRank3134 	__L2_MSG_BASE_IMPL(Notification_Clans_SetMemberRank)
3135 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Clans_SetMemberRank3136 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Clans_SetMemberRank3137 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Clans_SetMemberRank3138 	virtual bool RequiresLogin(void) const {return false;}
3139 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
3140 
3141 	RakNet::RakString clanHandle;
3142 	RakNet::RakString targetHandle;
3143 	RakNet::RakString leaderHandle;
3144 	unsigned int newRank;
3145 };
3146 /// \ingroup LOBBY_2_NOTIFICATIONS
3147 struct Notification_Clans_ChangeHandle : public Lobby2Message
3148 {
__L2_MSG_BASE_IMPLNotification_Clans_ChangeHandle3149 	__L2_MSG_BASE_IMPL(Notification_Clans_ChangeHandle)
3150 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Clans_ChangeHandle3151 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Clans_ChangeHandle3152 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Clans_ChangeHandle3153 	virtual bool RequiresLogin(void) const {return false;}
3154 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
3155 
3156 	RakNet::RakString oldClanHandle;
3157 	RakNet::RakString newClanHandle;
3158 	RakNet::RakString leaderHandle;
3159 };
3160 /// \ingroup LOBBY_2_NOTIFICATIONS
3161 struct Notification_Clans_Leave : public Lobby2Message
3162 {
__L2_MSG_BASE_IMPLNotification_Clans_Leave3163 	__L2_MSG_BASE_IMPL(Notification_Clans_Leave)
3164 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Clans_Leave3165 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Clans_Leave3166 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Clans_Leave3167 	virtual bool RequiresLogin(void) const {return false;}
3168 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
3169 
3170 	RakNet::RakString clanHandle;
3171 	RakNet::RakString targetHandle;
3172 };
3173 /// \ingroup LOBBY_2_NOTIFICATIONS
3174 struct Notification_Clans_PendingJoinStatus : public Lobby2Message
3175 {
__L2_MSG_BASE_IMPLNotification_Clans_PendingJoinStatus3176 	__L2_MSG_BASE_IMPL(Notification_Clans_PendingJoinStatus)
3177 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Clans_PendingJoinStatus3178 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Clans_PendingJoinStatus3179 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Clans_PendingJoinStatus3180 	virtual bool RequiresLogin(void) const {return false;}
3181 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
3182 
3183 	RakNet::RakString clanHandle;
3184 	RakNet::RakString sourceHandle;
3185 	RakNet::RakString targetHandle;
3186 	// clanMemberHandle is is the clan member that is withdrawing an invitation, or rejecting a request
3187 	RakNet::RakString clanMemberHandle;
3188 
3189 	// The combination of major and minor op describe this notification
3190 	// For example, JOIN_CLAN_INVITATION + JOIN_WITHDRAWN means that an invitation to join the clan was withdrawn by targetHandle
3191 	// JOIN_CLAN_REQUEST + JOIN_REJECTED means that our request to join this clan was rejected by targetHandle
3192 	enum MajorOp
3193 	{
3194 		JOIN_CLAN_INVITATION,
3195 		JOIN_CLAN_REQUEST,
3196 	} majorOp;
3197 	enum MinorOp
3198 	{
3199 		JOIN_SENT,
3200 		JOIN_WITHDRAWN,
3201 		JOIN_REJECTED,
3202 	} minorOp;
3203 };
3204 /// \ingroup LOBBY_2_NOTIFICATIONS
3205 struct Notification_Clans_NewClanMember : public Lobby2Message
3206 {
__L2_MSG_BASE_IMPLNotification_Clans_NewClanMember3207 	__L2_MSG_BASE_IMPL(Notification_Clans_NewClanMember)
3208 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Clans_NewClanMember3209 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Clans_NewClanMember3210 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Clans_NewClanMember3211 	virtual bool RequiresLogin(void) const {return false;}
3212 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
3213 
3214 	RakNet::RakString clanHandle;
3215 	RakNet::RakString targetHandle;
3216 };
3217 /// \ingroup LOBBY_2_NOTIFICATIONS
3218 struct Notification_Clans_KickAndBlacklistUser : public Lobby2Message
3219 {
__L2_MSG_BASE_IMPLNotification_Clans_KickAndBlacklistUser3220 	__L2_MSG_BASE_IMPL(Notification_Clans_KickAndBlacklistUser)
3221 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Clans_KickAndBlacklistUser3222 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Clans_KickAndBlacklistUser3223 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Clans_KickAndBlacklistUser3224 	virtual bool RequiresLogin(void) const {return false;}
3225 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
3226 
3227 	RakNet::RakString clanHandle;
3228 	RakNet::RakString targetHandle;
3229 	RakNet::RakString blacklistingUserHandle;
3230 	// If true, they were both kicked and blacklisted. If false, they were only blacklisted (not currently in the clan)
3231 	bool targetHandleWasKicked;
3232 	RakNet::RakString reason;
3233 };
3234 /// \ingroup LOBBY_2_NOTIFICATIONS
3235 struct Notification_Clans_UnblacklistUser : public Lobby2Message
3236 {
__L2_MSG_BASE_IMPLNotification_Clans_UnblacklistUser3237 	__L2_MSG_BASE_IMPL(Notification_Clans_UnblacklistUser)
3238 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Clans_UnblacklistUser3239 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Clans_UnblacklistUser3240 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Clans_UnblacklistUser3241 	virtual bool RequiresLogin(void) const {return false;}
3242 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
3243 
3244 	RakNet::RakString clanHandle;
3245 	RakNet::RakString targetHandle;
3246 	// Currently this is always the clan leader, since subleaders cannot unblacklist
3247 	RakNet::RakString unblacklistingUserHandle;
3248 };
3249 /// \ingroup LOBBY_2_NOTIFICATIONS
3250 struct Notification_Clans_Destroyed : public Lobby2Message
3251 {
__L2_MSG_BASE_IMPLNotification_Clans_Destroyed3252 	__L2_MSG_BASE_IMPL(Notification_Clans_Destroyed)
3253 	virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Clans_Destroyed3254 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Clans_Destroyed3255 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Clans_Destroyed3256 	virtual bool RequiresLogin(void) const {return false;}
3257 	virtual void Serialize( bool writeToBitstream, bool serializeOutput, RakNet::BitStream *bitStream );
3258 
3259 	RakNet::RakString clanHandle;
3260 	RakNet::RakString oldClanLeader;
3261 };
3262 /// \ingroup LOBBY_2_NOTIFICATIONS
3263 struct Notification_Console_CableDisconnected : public Lobby2Message
3264 {
__L2_MSG_BASE_IMPLNotification_Console_CableDisconnected3265 	__L2_MSG_BASE_IMPL(Notification_Console_CableDisconnected)
3266 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Console_CableDisconnected3267 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Console_CableDisconnected3268 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Console_CableDisconnected3269 	virtual bool RequiresLogin(void) const {return false;}
3270 };
3271 /// \ingroup LOBBY_2_NOTIFICATIONS
3272 struct Notification_Console_ContextError : public Lobby2Message
3273 {
__L2_MSG_BASE_IMPLNotification_Console_ContextError3274 	__L2_MSG_BASE_IMPL(Notification_Console_ContextError)
3275 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Console_ContextError3276 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Console_ContextError3277 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Console_ContextError3278 	virtual bool RequiresLogin(void) const {return false;}
3279 };
3280 /// \ingroup LOBBY_2_NOTIFICATIONS
3281 struct Notification_Console_MemberJoinedLobby : public Lobby2Message
3282 {
__L2_MSG_BASE_IMPLNotification_Console_MemberJoinedLobby3283 	__L2_MSG_BASE_IMPL(Notification_Console_MemberJoinedLobby)
3284 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Console_MemberJoinedLobby3285 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Console_MemberJoinedLobby3286 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Console_MemberJoinedLobby3287 	virtual bool RequiresLogin(void) const {return false;}
3288 
3289 	RakNet::RakString targetHandle;
3290 };
3291 /// \ingroup LOBBY_2_NOTIFICATIONS
3292 struct Notification_Console_MemberLeftLobby : public Lobby2Message
3293 {
__L2_MSG_BASE_IMPLNotification_Console_MemberLeftLobby3294 	__L2_MSG_BASE_IMPL(Notification_Console_MemberLeftLobby)
3295 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Console_MemberLeftLobby3296 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Console_MemberLeftLobby3297 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Console_MemberLeftLobby3298 	virtual bool RequiresLogin(void) const {return false;}
3299 
3300 	RakNet::RakString targetHandle;
3301 };
3302 /// \ingroup LOBBY_2_NOTIFICATIONS
3303 struct Notification_Console_LobbyDestroyed : public Lobby2Message
3304 {
__L2_MSG_BASE_IMPLNotification_Console_LobbyDestroyed3305 	__L2_MSG_BASE_IMPL(Notification_Console_LobbyDestroyed)
3306 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Console_LobbyDestroyed3307 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Console_LobbyDestroyed3308 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Console_LobbyDestroyed3309 	virtual bool RequiresLogin(void) const {return false;}
3310 };
3311 /// \ingroup LOBBY_2_NOTIFICATIONS
3312 struct Notification_Console_LobbyMemberDataUpdated : public Lobby2Message
3313 {
__L2_MSG_BASE_IMPLNotification_Console_LobbyMemberDataUpdated3314 	__L2_MSG_BASE_IMPL(Notification_Console_LobbyMemberDataUpdated)
3315 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Console_LobbyMemberDataUpdated3316 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Console_LobbyMemberDataUpdated3317 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Console_LobbyMemberDataUpdated3318 	virtual bool RequiresLogin(void) const {return false;}
3319 };
3320 /// \ingroup LOBBY_2_NOTIFICATIONS
3321 struct Notification_Console_LobbyGotChatMessage : public Lobby2Message
3322 {
__L2_MSG_BASE_IMPLNotification_Console_LobbyGotChatMessage3323 	__L2_MSG_BASE_IMPL(Notification_Console_LobbyGotChatMessage)
3324 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Console_LobbyGotChatMessage3325 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Console_LobbyGotChatMessage3326 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Console_LobbyGotChatMessage3327 	virtual bool RequiresLogin(void) const {return false;}
3328 
3329 	RakNet::RakString sender;
3330 	RakNet::RakString message;
3331 };
3332 /// \ingroup LOBBY_2_NOTIFICATIONS
3333 struct Notification_Console_LobbyGotRoomInvitation : public Lobby2Message
3334 {
__L2_MSG_BASE_IMPLNotification_Console_LobbyGotRoomInvitation3335 	__L2_MSG_BASE_IMPL(Notification_Console_LobbyGotRoomInvitation)
3336 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Console_LobbyGotRoomInvitation3337 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Console_LobbyGotRoomInvitation3338 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Console_LobbyGotRoomInvitation3339 	virtual bool RequiresLogin(void) const {return false;}
3340 
3341 	RakNet::RakString sender;
3342 };
3343 /// \ingroup LOBBY_2_NOTIFICATIONS
3344 struct Notification_Console_MemberJoinedRoom : public Lobby2Message
3345 {
__L2_MSG_BASE_IMPLNotification_Console_MemberJoinedRoom3346 	__L2_MSG_BASE_IMPL(Notification_Console_MemberJoinedRoom)
3347 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Console_MemberJoinedRoom3348 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Console_MemberJoinedRoom3349 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Console_MemberJoinedRoom3350 	virtual bool RequiresLogin(void) const {return false;}
3351 
3352 	RakNet::RakString memberName;
3353 };
3354 /// \ingroup LOBBY_2_NOTIFICATIONS
3355 struct Notification_Console_MemberLeftRoom : public Lobby2Message
3356 {
__L2_MSG_BASE_IMPLNotification_Console_MemberLeftRoom3357 	__L2_MSG_BASE_IMPL(Notification_Console_MemberLeftRoom)
3358 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Console_MemberLeftRoom3359 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Console_MemberLeftRoom3360 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Console_MemberLeftRoom3361 	virtual bool RequiresLogin(void) const {return false;}
3362 
3363 	RakNet::RakString memberName;
3364 };
3365 /// \ingroup LOBBY_2_NOTIFICATIONS
3366 struct Notification_Console_KickedOutOfRoom : public Lobby2Message
3367 {
__L2_MSG_BASE_IMPLNotification_Console_KickedOutOfRoom3368 	__L2_MSG_BASE_IMPL(Notification_Console_KickedOutOfRoom)
3369 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Console_KickedOutOfRoom3370 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Console_KickedOutOfRoom3371 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Console_KickedOutOfRoom3372 	virtual bool RequiresLogin(void) const {return false;}
3373 };
3374 /// \ingroup LOBBY_2_NOTIFICATIONS
3375 struct Notification_Console_RoomWasDestroyed : public Lobby2Message
3376 {
__L2_MSG_BASE_IMPLNotification_Console_RoomWasDestroyed3377 	__L2_MSG_BASE_IMPL(Notification_Console_RoomWasDestroyed)
3378 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Console_RoomWasDestroyed3379 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Console_RoomWasDestroyed3380 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Console_RoomWasDestroyed3381 	virtual bool RequiresLogin(void) const {return false;}
3382 };
3383 /// \ingroup LOBBY_2_NOTIFICATIONS
3384 struct Notification_Console_UpdateRoomParameters : public Lobby2Message
3385 {
__L2_MSG_BASE_IMPLNotification_Console_UpdateRoomParameters3386 	__L2_MSG_BASE_IMPL(Notification_Console_UpdateRoomParameters)
3387 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Console_UpdateRoomParameters3388 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Console_UpdateRoomParameters3389 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Console_UpdateRoomParameters3390 	virtual bool RequiresLogin(void) const {return false;}
3391 };
3392 /// \ingroup LOBBY_2_NOTIFICATIONS
3393 struct Notification_Console_RoomOwnerChanged : public Lobby2Message
3394 {
__L2_MSG_BASE_IMPLNotification_Console_RoomOwnerChanged3395 	__L2_MSG_BASE_IMPL(Notification_Console_RoomOwnerChanged)
3396 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Console_RoomOwnerChanged3397 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Console_RoomOwnerChanged3398 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Console_RoomOwnerChanged3399 	virtual bool RequiresLogin(void) const {return false;}
3400 };
3401 /// \ingroup LOBBY_2_NOTIFICATIONS
3402 struct Notification_Console_RoomChatMessage : public Lobby2Message
3403 {
__L2_MSG_BASE_IMPLNotification_Console_RoomChatMessage3404 	__L2_MSG_BASE_IMPL(Notification_Console_RoomChatMessage)
3405 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Console_RoomChatMessage3406 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Console_RoomChatMessage3407 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Console_RoomChatMessage3408 	virtual bool RequiresLogin(void) const {return false;}
3409 
3410 	RakNet::RakString sender;
3411 	RakNet::RakString message;
3412 };
3413 /// \ingroup LOBBY_2_NOTIFICATIONS
3414 struct Notification_Console_RoomMessage : public Lobby2Message
3415 {
__L2_MSG_BASE_IMPLNotification_Console_RoomMessage3416 	__L2_MSG_BASE_IMPL(Notification_Console_RoomMessage)
3417 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Console_RoomMessage3418 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Console_RoomMessage3419 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Console_RoomMessage3420 	virtual bool RequiresLogin(void) const {return false;}
3421 
3422 
3423 	RakNet::RakString sender;
3424 	RakNet::RakString message;
3425 };
3426 /// \ingroup LOBBY_2_NOTIFICATIONS
3427 struct Notification_Console_RoomMemberConnectivityUpdate : public Lobby2Message
3428 {
__L2_MSG_BASE_IMPLNotification_Console_RoomMemberConnectivityUpdate3429 	__L2_MSG_BASE_IMPL(Notification_Console_RoomMemberConnectivityUpdate)
3430 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Console_RoomMemberConnectivityUpdate3431 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Console_RoomMemberConnectivityUpdate3432 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Console_RoomMemberConnectivityUpdate3433 	virtual bool RequiresLogin(void) const {return false;}
3434 
3435 	// Out
3436 	SystemAddress systemAddress;
3437 };
3438 /// \ingroup LOBBY_2_NOTIFICATIONS
3439 struct Notification_Console_ChatEvent : public Lobby2Message
3440 {
__L2_MSG_BASE_IMPLNotification_Console_ChatEvent3441 	__L2_MSG_BASE_IMPL(Notification_Console_ChatEvent)
3442 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Console_ChatEvent3443 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Console_ChatEvent3444 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Console_ChatEvent3445 	virtual bool RequiresLogin(void) const {return false;}
3446 };
3447 /// \ingroup LOBBY_2_NOTIFICATIONS
3448 struct Notification_Console_MuteListChanged : public Lobby2Message
3449 {
__L2_MSG_BASE_IMPLNotification_Console_MuteListChanged3450 	__L2_MSG_BASE_IMPL(Notification_Console_MuteListChanged)
3451 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Console_MuteListChanged3452 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Console_MuteListChanged3453 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Console_MuteListChanged3454 	virtual bool RequiresLogin(void) const {return false;}
3455 };
3456 /// \ingroup LOBBY_2_NOTIFICATIONS
3457 struct Notification_Console_Local_Users_Changed : public Lobby2Message
3458 {
__L2_MSG_BASE_IMPLNotification_Console_Local_Users_Changed3459 	__L2_MSG_BASE_IMPL(Notification_Console_Local_Users_Changed)
3460 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_Console_Local_Users_Changed3461 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_Console_Local_Users_Changed3462 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_Console_Local_Users_Changed3463 	virtual bool RequiresLogin(void) const {return false;}
3464 };
3465 /// \ingroup LOBBY_2_NOTIFICATIONS
3466 struct Notification_ReceivedDataMessageFromUser : public Lobby2Message
3467 {
__L2_MSG_BASE_IMPLNotification_ReceivedDataMessageFromUser3468 	__L2_MSG_BASE_IMPL(Notification_ReceivedDataMessageFromUser)
3469 		virtual bool RequiresAdmin(void) const {return true;}
RequiresRankingPermissionNotification_ReceivedDataMessageFromUser3470 	virtual bool RequiresRankingPermission(void) const {return false;}
CancelOnDisconnectNotification_ReceivedDataMessageFromUser3471 	virtual bool CancelOnDisconnect(void) const {return false;}
RequiresLoginNotification_ReceivedDataMessageFromUser3472 	virtual bool RequiresLogin(void) const {return false;}
3473 };
3474 
3475 // --------------------------------------------- Base interface of factory class for all messages --------------------------------------------
3476 #define __L2_ALLOCATE_AND_DEFINE(FACTORY, __TYPE__,VAR_NAME) RakNet::__TYPE__ *VAR_NAME = (RakNet::__TYPE__ *) FACTORY->Alloc(L2MID_##__TYPE__); RakAssert(VAR_NAME);
3477 #define __L2_MSG_FACTORY_BASE(__NAME__) {case L2MID_##__NAME__ : Lobby2Message *m = RakNet::OP_NEW< __NAME__ >( __FILE__, __LINE__ ) ; RakAssert(m->GetID()==L2MID_##__NAME__ ); m->requestId=nextRequestId++; return m;}
3478 /// \ingroup LOBBY_2_GROUP
3479 struct Lobby2MessageFactory
3480 {
Lobby2MessageFactoryLobby2MessageFactory3481 	Lobby2MessageFactory() {nextRequestId=0;}
~Lobby2MessageFactoryLobby2MessageFactory3482 	virtual ~Lobby2MessageFactory() {}
AllocLobby2MessageFactory3483 	virtual Lobby2Message *Alloc(Lobby2MessageID id)
3484 	{
3485 		switch (id)
3486 		{
3487 			__L2_MSG_FACTORY_BASE(Platform_Startup);
3488 			__L2_MSG_FACTORY_BASE(Platform_Shutdown);
3489 			__L2_MSG_FACTORY_BASE(System_CreateDatabase);
3490 			__L2_MSG_FACTORY_BASE(System_DestroyDatabase);
3491 			__L2_MSG_FACTORY_BASE(System_CreateTitle);
3492 			__L2_MSG_FACTORY_BASE(System_DestroyTitle);
3493 			__L2_MSG_FACTORY_BASE(System_GetTitleRequiredAge);
3494 			__L2_MSG_FACTORY_BASE(System_GetTitleBinaryData);
3495 			__L2_MSG_FACTORY_BASE(System_RegisterProfanity);
3496 			__L2_MSG_FACTORY_BASE(System_BanUser);
3497 			__L2_MSG_FACTORY_BASE(System_UnbanUser);
3498 			__L2_MSG_FACTORY_BASE(CDKey_Add);
3499 			__L2_MSG_FACTORY_BASE(CDKey_GetStatus);
3500 			__L2_MSG_FACTORY_BASE(CDKey_Use);
3501 			__L2_MSG_FACTORY_BASE(CDKey_FlagStolen);
3502 			__L2_MSG_FACTORY_BASE(Client_Login);
3503 			__L2_MSG_FACTORY_BASE(Client_Logoff);
3504 			__L2_MSG_FACTORY_BASE(Client_RegisterAccount);
3505 			__L2_MSG_FACTORY_BASE(System_SetEmailAddressValidated);
3506 			__L2_MSG_FACTORY_BASE(Client_ValidateHandle);
3507 			__L2_MSG_FACTORY_BASE(System_DeleteAccount);
3508 			__L2_MSG_FACTORY_BASE(System_PruneAccounts);
3509 			__L2_MSG_FACTORY_BASE(Client_GetEmailAddress);
3510 			__L2_MSG_FACTORY_BASE(Client_GetPasswordRecoveryQuestionByHandle);
3511 			__L2_MSG_FACTORY_BASE(Client_GetPasswordByPasswordRecoveryAnswer);
3512 			__L2_MSG_FACTORY_BASE(Client_ChangeHandle);
3513 			__L2_MSG_FACTORY_BASE(Client_UpdateAccount);
3514 			__L2_MSG_FACTORY_BASE(Client_GetAccountDetails);
3515 			__L2_MSG_FACTORY_BASE(Client_StartIgnore);
3516 			__L2_MSG_FACTORY_BASE(Client_StopIgnore);
3517 			__L2_MSG_FACTORY_BASE(Client_GetIgnoreList);
3518 			__L2_MSG_FACTORY_BASE(Client_PerTitleIntegerStorage);
3519 			__L2_MSG_FACTORY_BASE(Client_PerTitleBinaryStorage);
3520 			__L2_MSG_FACTORY_BASE(Client_SetPresence);
3521 			__L2_MSG_FACTORY_BASE(Client_GetPresence);
3522 			__L2_MSG_FACTORY_BASE(Friends_SendInvite);
3523 			__L2_MSG_FACTORY_BASE(Friends_AcceptInvite);
3524 			__L2_MSG_FACTORY_BASE(Friends_RejectInvite);
3525 			__L2_MSG_FACTORY_BASE(Friends_GetInvites);
3526 			__L2_MSG_FACTORY_BASE(Friends_GetFriends);
3527 			__L2_MSG_FACTORY_BASE(Friends_Remove);
3528 			__L2_MSG_FACTORY_BASE(BookmarkedUsers_Add);
3529 			__L2_MSG_FACTORY_BASE(BookmarkedUsers_Remove);
3530 			__L2_MSG_FACTORY_BASE(BookmarkedUsers_Get);
3531 			__L2_MSG_FACTORY_BASE(Emails_Send);
3532 			__L2_MSG_FACTORY_BASE(Emails_Get);
3533 			__L2_MSG_FACTORY_BASE(Emails_Delete);
3534 			__L2_MSG_FACTORY_BASE(Emails_SetStatus);
3535 			__L2_MSG_FACTORY_BASE(Ranking_SubmitMatch);
3536 			__L2_MSG_FACTORY_BASE(Ranking_GetMatches);
3537 			__L2_MSG_FACTORY_BASE(Ranking_GetMatchBinaryData);
3538 			__L2_MSG_FACTORY_BASE(Ranking_GetTotalScore);
3539 			__L2_MSG_FACTORY_BASE(Ranking_WipeScoresForPlayer);
3540 			__L2_MSG_FACTORY_BASE(Ranking_WipeMatches);
3541 			__L2_MSG_FACTORY_BASE(Ranking_PruneMatches);
3542 			__L2_MSG_FACTORY_BASE(Ranking_UpdateRating);
3543 			__L2_MSG_FACTORY_BASE(Ranking_WipeRatings);
3544 			__L2_MSG_FACTORY_BASE(Ranking_GetRating);
3545 			__L2_MSG_FACTORY_BASE(Clans_Create);
3546 			__L2_MSG_FACTORY_BASE(Clans_SetProperties);
3547 			__L2_MSG_FACTORY_BASE(Clans_GetProperties);
3548 			__L2_MSG_FACTORY_BASE(Clans_SetMyMemberProperties);
3549 			__L2_MSG_FACTORY_BASE(Clans_GrantLeader);
3550 			__L2_MSG_FACTORY_BASE(Clans_SetSubleaderStatus);
3551 			__L2_MSG_FACTORY_BASE(Clans_SetMemberRank);
3552 			__L2_MSG_FACTORY_BASE(Clans_GetMemberProperties);
3553 			__L2_MSG_FACTORY_BASE(Clans_ChangeHandle);
3554 			__L2_MSG_FACTORY_BASE(Clans_Leave);
3555 			__L2_MSG_FACTORY_BASE(Clans_Get);
3556 			__L2_MSG_FACTORY_BASE(Clans_SendJoinInvitation);
3557 			__L2_MSG_FACTORY_BASE(Clans_WithdrawJoinInvitation);
3558 			__L2_MSG_FACTORY_BASE(Clans_AcceptJoinInvitation);
3559 			__L2_MSG_FACTORY_BASE(Clans_RejectJoinInvitation);
3560 			__L2_MSG_FACTORY_BASE(Clans_DownloadInvitationList);
3561 			__L2_MSG_FACTORY_BASE(Clans_SendJoinRequest);
3562 			__L2_MSG_FACTORY_BASE(Clans_WithdrawJoinRequest);
3563 			__L2_MSG_FACTORY_BASE(Clans_AcceptJoinRequest);
3564 			__L2_MSG_FACTORY_BASE(Clans_RejectJoinRequest);
3565 			__L2_MSG_FACTORY_BASE(Clans_DownloadRequestList);
3566 			__L2_MSG_FACTORY_BASE(Clans_KickAndBlacklistUser);
3567 			__L2_MSG_FACTORY_BASE(Clans_UnblacklistUser);
3568 			__L2_MSG_FACTORY_BASE(Clans_GetBlacklist);
3569 			__L2_MSG_FACTORY_BASE(Clans_GetMembers);
3570 			__L2_MSG_FACTORY_BASE(Clans_GetList);
3571 			__L2_MSG_FACTORY_BASE(Clans_CreateBoard);
3572 			__L2_MSG_FACTORY_BASE(Clans_DestroyBoard);
3573 			__L2_MSG_FACTORY_BASE(Clans_CreateNewTopic);
3574 			__L2_MSG_FACTORY_BASE(Clans_ReplyToTopic);
3575 			__L2_MSG_FACTORY_BASE(Clans_RemovePost);
3576 			__L2_MSG_FACTORY_BASE(Clans_GetBoards);
3577 			__L2_MSG_FACTORY_BASE(Clans_GetTopics);
3578 			__L2_MSG_FACTORY_BASE(Clans_GetPosts);
3579 			__L2_MSG_FACTORY_BASE(Console_GetServerStatus);
3580 			__L2_MSG_FACTORY_BASE(Console_GetWorldListFromServer);
3581 			__L2_MSG_FACTORY_BASE(Console_GetLobbyListFromWorld);
3582 			__L2_MSG_FACTORY_BASE(Console_JoinLobby);
3583 			__L2_MSG_FACTORY_BASE(Console_LeaveLobby);
3584 			__L2_MSG_FACTORY_BASE(Console_SendLobbyChatMessage);
3585 			__L2_MSG_FACTORY_BASE(Console_SearchRooms);
3586 			__L2_MSG_FACTORY_BASE(Console_GetRoomDetails);
3587 			__L2_MSG_FACTORY_BASE(Console_GetLobbyMemberData);
3588 			__L2_MSG_FACTORY_BASE(Console_CreateRoom);
3589 			__L2_MSG_FACTORY_BASE(Console_SetRoomSearchProperties);
3590 			__L2_MSG_FACTORY_BASE(Console_UpdateRoomParameters);
3591 			__L2_MSG_FACTORY_BASE(Console_JoinRoom);
3592 			__L2_MSG_FACTORY_BASE(Console_LeaveRoom);
3593 			__L2_MSG_FACTORY_BASE(Console_SendLobbyInvitationToRoom);
3594 			__L2_MSG_FACTORY_BASE(Console_SendGUIInvitationToRoom);
3595 			__L2_MSG_FACTORY_BASE(Console_SendDataMessageToUser);
3596 			__L2_MSG_FACTORY_BASE(Console_SendRoomChatMessage);
3597 			__L2_MSG_FACTORY_BASE(Notification_Client_RemoteLogin);
3598 			__L2_MSG_FACTORY_BASE(Notification_Client_IgnoreStatus);
3599 			__L2_MSG_FACTORY_BASE(Notification_Friends_StatusChange);
3600 			__L2_MSG_FACTORY_BASE(Notification_Friends_PresenceUpdate);
3601 			__L2_MSG_FACTORY_BASE(Notification_User_ChangedHandle);
3602 			__L2_MSG_FACTORY_BASE(Notification_Friends_CreatedClan);
3603 			__L2_MSG_FACTORY_BASE(Notification_Emails_Received);
3604 			__L2_MSG_FACTORY_BASE(Notification_Clans_GrantLeader);
3605 			__L2_MSG_FACTORY_BASE(Notification_Clans_SetSubleaderStatus);
3606 			__L2_MSG_FACTORY_BASE(Notification_Clans_SetMemberRank);
3607 			__L2_MSG_FACTORY_BASE(Notification_Clans_ChangeHandle);
3608 			__L2_MSG_FACTORY_BASE(Notification_Clans_Leave);
3609 			__L2_MSG_FACTORY_BASE(Notification_Clans_PendingJoinStatus);
3610 			__L2_MSG_FACTORY_BASE(Notification_Clans_NewClanMember);
3611 			__L2_MSG_FACTORY_BASE(Notification_Clans_KickAndBlacklistUser);
3612 			__L2_MSG_FACTORY_BASE(Notification_Clans_UnblacklistUser);
3613 			__L2_MSG_FACTORY_BASE(Notification_Clans_Destroyed);
3614 			__L2_MSG_FACTORY_BASE(Notification_Console_MemberJoinedLobby);
3615 			__L2_MSG_FACTORY_BASE(Notification_Console_MemberLeftLobby);
3616 			__L2_MSG_FACTORY_BASE(Notification_Console_LobbyDestroyed);
3617 			__L2_MSG_FACTORY_BASE(Notification_Console_LobbyMemberDataUpdated);
3618 			__L2_MSG_FACTORY_BASE(Notification_Console_LobbyGotChatMessage);
3619 			__L2_MSG_FACTORY_BASE(Notification_Console_LobbyGotRoomInvitation);
3620 			__L2_MSG_FACTORY_BASE(Notification_Console_MemberJoinedRoom);
3621 			__L2_MSG_FACTORY_BASE(Notification_Console_MemberLeftRoom);
3622 			__L2_MSG_FACTORY_BASE(Notification_Console_KickedOutOfRoom);
3623 			__L2_MSG_FACTORY_BASE(Notification_Console_RoomWasDestroyed);
3624 			__L2_MSG_FACTORY_BASE(Notification_Console_UpdateRoomParameters);
3625 			__L2_MSG_FACTORY_BASE(Notification_Console_RoomOwnerChanged);
3626 			__L2_MSG_FACTORY_BASE(Notification_Console_RoomChatMessage);
3627 			__L2_MSG_FACTORY_BASE(Notification_Console_RoomMessage);
3628 			__L2_MSG_FACTORY_BASE(Notification_Console_RoomMemberConnectivityUpdate);
3629 			__L2_MSG_FACTORY_BASE(Notification_Console_ChatEvent);
3630 			__L2_MSG_FACTORY_BASE(Notification_Console_MuteListChanged);
3631 			__L2_MSG_FACTORY_BASE(Notification_Console_Local_Users_Changed);
3632 			__L2_MSG_FACTORY_BASE(Notification_ReceivedDataMessageFromUser);
3633 
3634 		default:
3635 			return 0;
3636 		};
3637 	}
DeallocLobby2MessageFactory3638 	void Dealloc(Lobby2Message *msg) {
3639 		msg->Deref();
3640 		if (msg->GetRefCount()<=0)
3641 		{
3642 			// Only delete one message at a time or else GetRefCount may be called on the same message in two threads at the same time and not be accurate
3643 			deallocateLockMutex.Lock();
3644 			if (msg->GetRefCount()<=0)
3645 				RakNet::OP_DELETE<Lobby2Message>(msg, __FILE__, __LINE__ );
3646 			deallocateLockMutex.Unlock();
3647 		}
3648 	}
3649 
3650 	unsigned int nextRequestId;
3651 	SimpleMutex deallocateLockMutex;
3652 };
3653 
3654 } // namespace RakNet
3655 
3656 #endif
3657