-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhelper.hpp
44 lines (30 loc) · 1.12 KB
/
helper.hpp
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
/**
* helper.hpp
*
* By Ryan Wise
* March 11, 2015
*
* The header file for the helper. Defines constants that represent response
* codes from the server that tell the client to perform a specific action.
*/
#ifndef HELPER_HPP_
#define HELPER_HPP_
#include <cstring>
#include <vector>
#include <iostream>
// Response codes sent back to the client from the server
#define ERROR_ACCOUNT_DOES_NOT_EXIST 1
#define ERROR_INCORRECT_PASSWORD 2
#define ERROR_USER_DOES_NOT_EXIST 3
#define PASSWORD_CORRECT 4
#define CREATE_ACCOUNT_SUCCESS 5
#define USER_EXISTS 6
#define CONVERSATION_ENDED 7
std::string convertToString(std::vector<std::string> data);
std::vector<std::string> parseString(std::string data);
std::string client_createAccount(std::string userName, std::string password, std::string firstName, std::string lastName);
std::string client_login(std::string userName, std::string password);
std::string client_sendMessage(std::string from, std::string to, std::string message);
std::string client_confirmUser(std::string confirm, std::string from);
std::string client_quitConversation(std::string from, std::string to);
#endif