38 lines
809 B
C++
38 lines
809 B
C++
#pragma once
|
|
|
|
#include <a8/basehttpsession.h>
|
|
|
|
#include "framework/cpp/netmsghandler.h"
|
|
|
|
namespace a8
|
|
{
|
|
class MutableXObject;
|
|
}
|
|
|
|
class HandlerMgr : public a8::Singleton<HandlerMgr>
|
|
{
|
|
|
|
private:
|
|
HandlerMgr() {};
|
|
friend class a8::Singleton<HandlerMgr>;
|
|
|
|
public:
|
|
|
|
void Init();
|
|
void UnInit();
|
|
|
|
f8::NetMsgHandlerObject gcmsghandler;
|
|
f8::NetMsgHandlerObject rsmsghandler;
|
|
f8::NetMsgHandlerObject gsmsghandler;
|
|
|
|
void ProcGMMsg(unsigned long saddr, int sockhandle,
|
|
const std::string& url, const std::string& querystr);
|
|
|
|
private:
|
|
void RegisterNetMsgHandlers();
|
|
void RegisterGMMsgHandler(const std::string& msgname,
|
|
void (*)(f8::JsonHttpRequest*));
|
|
|
|
std::map<std::string, void (*)(f8::JsonHttpRequest*)> gmhandlers_;
|
|
};
|