-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFriendRequest.h
29 lines (25 loc) · 1 KB
/
FriendRequest.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
#ifndef FRIENDREQUEST_H
#define FRIENDREQUEST_H
#include "User.h"
#include "Date.h"
#include <string>
using namespace std;
class User;
class FriendRequest
{
public:
FriendRequest(User*, User*); /*The constructor for FriendRequests uses 2 User objects as parameters,
the user who sent the friend request and the user that recieved it*/
User* getUserTo(); //A get function that returns the private User object userto
User* getUserFrom(); //A get function that returns the private User object userfroim
Date getTimestamp();
void setState(string); //A function to set the state of a friend request (accepted, declined or pending)
string toString(); //A toString function for printing the format of a friend request
void setTimestamp(string);
private:
User *userto; //The user that recieved the friend request
User *userfrom; //The User that send the friend request
Date timestamp; //Friend requests have a timestamp to see when they were sent
string state;
};
#endif