~ubuntu-branches/ubuntu/raring/voxbo/raring

« back to all changes in this revision

Viewing changes to server/server.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Hanke
  • Date: 2010-06-06 11:33:11 UTC
  • Revision ID: james.westby@ubuntu.com-20100606113311-v3c13imdkkd5n7ae
Tags: upstream-1.8.5~svn1172
ImportĀ upstreamĀ versionĀ 1.8.5~svn1172

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef SERVER_H
 
2
#define SERVER_H
 
3
 
 
4
#include <gnutls/gnutls.h>
 
5
#include <gnutls/extra.h>
 
6
#include <vector>
 
7
#include "bdb_tab.h"
 
8
#include "dbdata.h"
 
9
#include "db_util.h"
 
10
#include "tokenlist.h"
 
11
 
 
12
// Server session class
 
13
class srvSession {
 
14
  friend int startServer(const string&, int);
 
15
  friend void handleSIG(int);
 
16
  friend int srp_credfunction(gnutls_session, const char*, gnutls_datum*, 
 
17
                              gnutls_datum*, gnutls_datum*, gnutls_datum*);
 
18
 public:
 
19
  void init();
 
20
  void exit();
 
21
  void serve(const char*);
 
22
  int sendGlobalMaps();
 
23
  int sendPatientList();
 
24
  int sendUsrInfo();
 
25
  int sendID();
 
26
  int sendTime();
 
27
  int sendPatientMatches();
 
28
  int sendPatientScores();
 
29
 
 
30
  gnutls_session_t g_session;
 
31
  int sd;
 
32
  int32 clientID;
 
33
  map<string, string> permissions;
 
34
 
 
35
 private:
 
36
  bool parsePatientSearch(patientSearchTags&);  
 
37
  int recvNewUsr();
 
38
  int recvScoreNames();
 
39
  int recvNewPatient();
 
40
  bool chkPatientDatSize(int32&, int32&, int32&);
 
41
  int recvScoreValues();
 
42
  int recvSessions();
 
43
  int recvPatientList(bool);
 
44
 
 
45
  int sendData(int32, char*);
 
46
  int sendStatMsg();
 
47
  int sendTypes();
 
48
  int sendScoreNames();
 
49
  int sendRegionNames();
 
50
  int sendSynonyms();
 
51
  int sendRegionRelations();
 
52
 
 
53
  tokenlist c_tokens;
 
54
  string statMsg;
 
55
  static DBdata dbs;  
 
56
};
 
57
 
 
58
void usage();
 
59
void handleSIG(int);
 
60
int startServer(const string&, int32);
 
61
int srp_credfunction(gnutls_session, const char*, gnutls_datum*, 
 
62
                     gnutls_datum*, gnutls_datum*, gnutls_datum*);
 
63
 
 
64
#endif