71 lines
2.1 KiB
C++
71 lines
2.1 KiB
C++
#pragma once
|
|
|
|
namespace cs
|
|
{
|
|
class CMGuildInfo;
|
|
class CMGuildCreate;
|
|
class CMGuildJoin;
|
|
class CMGuildAgree;
|
|
class CMGuildKick;
|
|
class CMGuildQuit;
|
|
class CMGuildDismiss;
|
|
class CMGuildRename;
|
|
class CMGuildSearch;
|
|
class CMGuildRank;
|
|
class CMGuildMemberList;
|
|
class CMGuildLog;
|
|
}
|
|
|
|
namespace ss
|
|
{
|
|
class MFIMMsgConext;
|
|
class SS_IM_ForwardGuildCMMsg;
|
|
}
|
|
|
|
namespace google
|
|
{
|
|
namespace protobuf
|
|
{
|
|
class Message;
|
|
}
|
|
}
|
|
|
|
class Guild;
|
|
class GuildMgr : public a8::Singleton<GuildMgr>
|
|
{
|
|
public:
|
|
enum { HID = HID_GuildMgr };
|
|
|
|
private:
|
|
GuildMgr() {};
|
|
friend class a8::Singleton<GuildMgr>;
|
|
|
|
public:
|
|
void Init();
|
|
void UnInit();
|
|
|
|
void _SS_IM_ForwardGuildCMMsg(f8::MsgHdr& hdr, const ss::SS_IM_ForwardGuildCMMsg& msg);
|
|
|
|
private:
|
|
void _CMGuildInfo(const ss::MFIMMsgConext& context, const cs::CMGuildInfo& msg);
|
|
void _CMGuildCreate(const ss::MFIMMsgConext& context, const cs::CMGuildCreate& msg);
|
|
void _CMGuildJoin(const ss::MFIMMsgConext& context, const cs::CMGuildJoin& msg);
|
|
void _CMGuildAgree(const ss::MFIMMsgConext& context, const cs::CMGuildAgree& msg);
|
|
void _CMGuildKick(const ss::MFIMMsgConext& context, const cs::CMGuildKick& msg);
|
|
void _CMGuildQuit(const ss::MFIMMsgConext& context, const cs::CMGuildQuit& msg);
|
|
void _CMGuildDismiss(const ss::MFIMMsgConext& context, const cs::CMGuildDismiss& msg);
|
|
void _CMGuildRename(const ss::MFIMMsgConext& context, const cs::CMGuildRename& msg);
|
|
void _CMGuildSearch(const ss::MFIMMsgConext& context, const cs::CMGuildSearch& msg);
|
|
void _CMGuildRank(const ss::MFIMMsgConext& context, const cs::CMGuildRank& msg);
|
|
void _CMGuildMemberList(const ss::MFIMMsgConext& context, const cs::CMGuildMemberList& msg);
|
|
void _CMGuildLog(const ss::MFIMMsgConext& context, const cs::CMGuildLog& msg);
|
|
|
|
bool IsValidGuildId(long long guild_id);
|
|
Guild* GetGuild(long long group_id);
|
|
void ForwardGuildSMMsg(const ss::MFIMMsgConext& context,
|
|
const ::google::protobuf::Message& smmsg);
|
|
|
|
private:
|
|
std::map<long long, Guild*> id_hash_;
|
|
};
|