CSCommon: MMatchFriendInfo.h 소스 파일

MAIET

MMatchFriendInfo.h

00001 #ifndef _MMATCHFRIENDINFO_H
00002 #define _MMATCHFRIENDINFO_H
00003 
00004 //#pragma once
00005 
00006 
00007 #include <list>
00008 using namespace std;
00009 #include "MMatchGlobal.h"
00010 
00011 
00012 #define MAX_FRIEND_COUNT    20
00013 
00014 
00015 // 친구관련
00016 struct MMatchFriendNode {
00017     unsigned long   nFriendCID;
00018     unsigned short  nFavorite;
00019     char            szName[MATCHOBJECT_NAME_LENGTH];
00020 
00021     unsigned char   nState;                                     // 위치상태(로비, 게임중 등등)
00022     char            szDescription[MATCH_SIMPLE_DESC_LENGTH];    // 위치설명(로비이름 등등)
00023 };
00024 class MMatchFriendList : public list<MMatchFriendNode*> {};
00025 
00026 
00027 class MMatchFriendInfo {
00028 private:
00029     MCriticalSection    m_csFriendListLock;
00030 public:
00031     MMatchFriendList    m_FriendList;
00032 public:
00033     MMatchFriendInfo();
00034     virtual ~MMatchFriendInfo();
00035     bool Add(unsigned long nFriendCID, unsigned short nFavorite, const char* pszName);
00036     void Remove(const char* pszName);
00037     MMatchFriendNode* Find(unsigned long nFriendCID);
00038     MMatchFriendNode* Find(const char* pszName);
00039     void UpdateDesc();
00040 };
00041 
00042 #pragma pack(1)
00043 struct MFRIENDLISTNODE {
00044     unsigned char   nState;
00045     char            szName[MATCHOBJECT_NAME_LENGTH];
00046     char            szDescription[MATCH_SIMPLE_DESC_LENGTH];
00047 };
00048 #pragma pack()
00049 
00050 
00051 #endif


MAIET entertainment