DDraceNetwork Docs
friends.h
Go to the documentation of this file.
1/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
2/* If you are missing that file, acquire a complete release at teeworlds.com. */
3#ifndef ENGINE_FRIENDS_H
4#define ENGINE_FRIENDS_H
5
7
8#include "kernel.h"
9
11{
14 unsigned m_NameHash;
15 unsigned m_ClanHash;
16};
17
18class IFriends : public IInterface
19{
20 MACRO_INTERFACE("friends")
21public:
22 enum
23 {
27
29 };
30
31 virtual void Init(bool Foes = false) = 0;
32
33 virtual int NumFriends() const = 0;
34 virtual const CFriendInfo *GetFriend(int Index) const = 0;
35 virtual int GetFriendState(const char *pName, const char *pClan) const = 0;
36 virtual bool IsFriend(const char *pName, const char *pClan, bool PlayersOnly) const = 0;
37
38 virtual void AddFriend(const char *pName, const char *pClan) = 0;
39 virtual void RemoveFriend(const char *pName, const char *pClan) = 0;
40};
41
42#endif
Definition: friends.h:19
virtual const CFriendInfo * GetFriend(int Index) const =0
virtual bool IsFriend(const char *pName, const char *pClan, bool PlayersOnly) const =0
virtual int GetFriendState(const char *pName, const char *pClan) const =0
virtual void AddFriend(const char *pName, const char *pClan)=0
virtual void RemoveFriend(const char *pName, const char *pClan)=0
@ FRIEND_NO
Definition: friends.h:24
@ FRIEND_CLAN
Definition: friends.h:25
@ MAX_FRIENDS
Definition: friends.h:28
@ FRIEND_PLAYER
Definition: friends.h:26
virtual int NumFriends() const =0
virtual void Init(bool Foes=false)=0
Definition: kernel.h:10
@ MAX_CLAN_LENGTH
Definition: protocol.h:98
@ MAX_NAME_LENGTH
Definition: protocol.h:97
#define MACRO_INTERFACE(Name)
Definition: kernel.h:25
Definition: friends.h:11
unsigned m_ClanHash
Definition: friends.h:15
unsigned m_NameHash
Definition: friends.h:14
char m_aClan[MAX_CLAN_LENGTH]
Definition: friends.h:13
char m_aName[MAX_NAME_LENGTH]
Definition: friends.h:12