-
Notifications
You must be signed in to change notification settings - Fork 0
/
command_lib.h
65 lines (58 loc) · 2.13 KB
/
command_lib.h
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
#include <iostream> // cout
#include <sstream> // cout
#include <stdlib.h> // exit
#include <string.h> // bzero
#include <fstream> //help_c
#include <vector> // std::vector
#include <algorithm> // random_shuffle
#include <list> // list
#include <postgresql/libpq-fe.h>
#include <time.h>
#include "database.h"
#include <ctype.h>
using namespace std;
#define TIME_BETWEEN_QUESTIONS 5
//funcoes.............
extern int mainsocket;
void * jogo(void * args);
void writeline(int socketid, string line);
void help_c(int socketid);
void register_c(int socketid, string args);
void identify_c(int socketid, string args);
void login_c(int socketid, string args);
void logout_c(int socketid);
void resetpassword_c(int socketid, string args);
void changepassword_c(int socketid, string args);
void changeusername_c(int socketid, string args);
void question_c(int socketid, string args);
void showallquestions_c(int socketid);
void editquestion_c(int socketid, string args);
void deletequestion_c(int socketid, string args);
void changepermissions_c(int socketid, string args);
void create_c(int socketid, string args);
void challenge_c(int socketid, string args);
void start_c(int socketid, string args);
void accept_c(int socketid, string args);
void usersready_c(int socketid, string args);
void answer_c(int socketid, string args);
void ask_c(int socketid, string args);
void showaskusers_c(int socketid, string args);
void addaskuser_c(int socketid, string args);
void removeaskuser_c(int socketid, string args);
void fiftyfifty_c(int socketid, string args);
void ranking_c(int socketid, string args);
void banidoporadmin_c(int socketid);
void deleteaccount_c(int socketid, string args);
void say_c(int socketid, string args);
void listusers(int socketid);
bool islogged(int socketid);
int isadmin(int socketid);
bool userexists(string user);
void decline_c(int socketid, string args);
void shutdown_c(int sockfd);
void listusers_admin(int socketid);
int alphanumeric(string str);
string insensitivestring(string original);
string intToString(int i);
int stringToInt(string str);
string numToResp(int i);