forked from ddnet/ddnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfriends.h
More file actions
40 lines (30 loc) · 1.33 KB
/
friends.h
File metadata and controls
40 lines (30 loc) · 1.33 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
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
/* If you are missing that file, acquire a complete release at teeworlds.com. */
#ifndef ENGINE_CLIENT_FRIENDS_H
#define ENGINE_CLIENT_FRIENDS_H
#include <engine/console.h>
#include <engine/friends.h>
class IConfigManager;
class CFriends : public IFriends
{
CFriendInfo m_aFriends[MAX_FRIENDS];
int m_Foes;
int m_NumFriends;
static void ConAddFriend(IConsole::IResult *pResult, void *pUserData);
static void ConRemoveFriend(IConsole::IResult *pResult, void *pUserData);
static void ConFriends(IConsole::IResult *pResult, void *pUserData);
static void ConfigSaveCallback(IConfigManager *pConfigManager, void *pUserData);
public:
CFriends();
void Init(bool Foes = false) override;
int NumFriends() const override { return m_NumFriends; }
const CFriendInfo *GetFriend(int Index) const override;
int GetFriendState(const char *pName, const char *pClan) const override;
bool IsFriend(const char *pName, const char *pClan, bool PlayersOnly) const override;
void AddFriend(const char *pName, const char *pClan) override;
void RemoveFriend(const char *pName, const char *pClan) override;
void RemoveFriend(int Index);
void Friends();
void SetFriendStarred(const char *pName, const char *pClan, bool Starred) override;
};
#endif