diff options
| author | oy <Tom_Adams@web.de> | 2011-03-23 13:06:35 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-03-23 13:06:35 +0100 |
| commit | ae325c873f64603f3957b3ded623a67088752ba8 (patch) | |
| tree | 47f5abde2090975fc491503d0ecd5386da53830c /src/engine/friends.h | |
| parent | b64db75a6b5e6a08c356278ab73d29707579844c (diff) | |
| download | zcatch-ae325c873f64603f3957b3ded623a67088752ba8.tar.gz zcatch-ae325c873f64603f3957b3ded623a67088752ba8.zip | |
added friends feature. Closes #24
Diffstat (limited to 'src/engine/friends.h')
| -rw-r--r-- | src/engine/friends.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/engine/friends.h b/src/engine/friends.h new file mode 100644 index 00000000..d0b9e97b --- /dev/null +++ b/src/engine/friends.h @@ -0,0 +1,36 @@ +/* (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_FRIENDS_H +#define ENGINE_FRIENDS_H + +#include <engine/shared/protocol.h> + +#include "kernel.h" + +struct CFriendInfo +{ + char m_aName[MAX_NAME_LENGTH]; + char m_aClan[MAX_CLAN_LENGTH]; +}; + +class IFriends : public IInterface +{ + MACRO_INTERFACE("friends", 0) +public: + enum + { + MAX_FRIENDS=128, + }; + + virtual void Init() = 0; + + virtual int NumFriends() const = 0; + virtual const CFriendInfo *GetFriend(int Index) const = 0; + virtual bool IsFriend(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; + virtual void RemoveFriend(int Index) = 0; +}; + +#endif |