Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//
// sls.hh for sls
//
// Made by Seblu
// Login <seblu@epita.fr>
//
// Started on Mon Jun 4 14:32:04 2007 Seblu
// Last update Sat Dec 22 23:21:48 2007 Sebastien Luttringer
//
#ifndef SLS_HH
# define SLS_HH
# define _REENTRANT
# include <cassert>
# include <ios>
# include <iostream>
# include <fstream>
# include <sstream>
# include <map>
typedef std::string string;
typedef std::stringstream sstream;
typedef std::ostream ostream;
typedef std::ifstream ifstream;
typedef std::ofstream ofstream;
enum {
ERR_NO = 0,
ERR_USAGE = 1,
ERR_BADPARAM = 2,
ERR_FILE = 3,
ERR_NET = 4,
ERR_PROTO = 5,
ERR_AUTH = 6,
ERR_SCREENSZ = 7,
ERR_NOMEM = 41,
ERR_UNKNOWN = 42
};
// -----------------------------------------------------------------------------
// Gonstant
// -----------------------------------------------------------------------------
static const string VERSION = "1";
static const int MAX_LINE_SIZE = 512;
// -----------------------------------------------------------------------------
// SLSERVER CLASS
// -----------------------------------------------------------------------------
// class Server
// {
// static const int backlog;
// struct AccessData
// {
// string client_pw;
// string server_pw;
// int privilege;
// };
// typedef std::map<string, AccessData *> AccessMap;
// public:
// SLServer(int port);
// int run();
// void add_access(const char *login, const char *pw_server,
// const char *pw_client, int priv);
// void del_access(const string &login);
// void print_access() const;
// protected:
// int port_;
// AccessMap accessDB_;
// void connect();
// };
#endif