Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
NetAuth.h
Go to the documentation of this file.
1 /* Project Starshatter 4.5
2  Destroyer Studios LLC
3  Copyright © 1997-2004. All Rights Reserved.
4 
5  SUBSYSTEM: Stars.exe
6  FILE: NetAuth.h
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  This class authenticates a user connecting to the multiplayer lobby
13 */
14 
15 
16 #ifndef NetAuth_h
17 #define NetAuth_h
18 
19 #include "Types.h"
20 #include "NetAddr.h"
21 #include "NetLobby.h"
22 #include "Text.h"
23 
24 // +-------------------------------------------------------------------+
25 
26 class NetAuth
27 {
28 public:
29  enum AUTH_STATE {
33  };
34 
35  enum AUTH_LEVEL {
39  };
40 
41  static int AuthLevel();
42  static void SetAuthLevel(int n);
43 
44  static Text CreateAuthRequest(NetUser* u);
45  static Text CreateAuthResponse(int level, const char* salt);
46  static bool AuthUser(NetUser* u, Text response);
47 };
48 
49 // +-------------------------------------------------------------------+
50 
51 #endif NetAuth_h