forked from andresusanto/BintangMessenger
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHelper.h
More file actions
46 lines (34 loc) · 1.55 KB
/
Helper.h
File metadata and controls
46 lines (34 loc) · 1.55 KB
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
#pragma once
#include "Pesan.h"
#include <vector>
#include <iostream>
#include <fstream>
using namespace std;
class Helper{
public:
static bool login(string username,string password);
static bool signup(string username,string password);
static bool userExist(string username);
static vector<Pesan> pesanUser(string username);
static void storePesan(string username,Pesan &pesan);
static vector<string> &split(const string &s, char delim, vector<string> &elems);
static vector<string> split(const string &s, char delim);
static vector<Pesan> loadChat(string username);
static vector<Pesan> loadpesanUser(string username, string filter, char tipe);
static void simpanpesanUser(string username, Pesan &pesan);
static bool readACK(string username, string dari, char tipe, long time);
static void savereadACK(string username, string dari, char tipe, long time);
static bool viewACK(string username, string dari, char tipe, long time);
static void saveviewACK(string username, string dari, char tipe, long time);
static vector<string> loadRaw(string username);
static void saveRaw(string username, string rawData);
static bool createGroup(string name);
static bool isGroup(string name);
static bool isMemberGroup(string name, string username);
static void deleteGroup(string name);
static bool joinGroup(string name, string user);
static bool leaveGroup(string name, string user);
static vector<string> memberGroup(string name);
static int ukuranFile(string namafile);
static void serverLog(string log);
};