Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
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
{
30
NET_AUTH_INITIAL
= 0,
31
NET_AUTH_FAILED
= 1,
32
NET_AUTH_OK
= 2
33
};
34
35
enum
AUTH_LEVEL
{
36
NET_AUTH_MINIMAL
= 0,
37
NET_AUTH_STANDARD
= 1,
38
NET_AUTH_SECURE
= 2
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
Stars45
NetAuth.h
Generated on Thu May 31 2012 16:31:12 for Starshatter_Open by
1.8.1