AmSipDispatcher.h
00001 #ifndef __AMSIPDISPATCHER_H__
00002 #define __AMSIPDISPATCHER_H__
00003
00004 #include <vector>
00005
00006 #include "AmSipMsg.h"
00007 #include "AmApi.h"
00008
00009 using std::vector;
00010
00011 class AmInterfaceHandler
00012 {
00013 public:
00014 virtual void handleSipMsg(AmSipRequest &) = 0;
00015 virtual void handleSipMsg(AmSipReply &) = 0;
00016
00017 virtual ~AmInterfaceHandler(){};
00018 };
00019
00020 class AmSipDispatcher : public AmInterfaceHandler
00021 {
00022 private:
00023 static AmSipDispatcher *_instance;
00024 vector<AmSIPEventHandler*> reply_handlers;
00025
00026 public:
00027 void handleSipMsg(AmSipRequest &);
00028 void handleSipMsg(AmSipReply &);
00029
00032 void registerReplyHandler(AmSIPEventHandler* eh)
00033 {
00034 reply_handlers.push_back(eh);
00035 }
00036
00037 static AmSipDispatcher* instance();
00038 };
00039
00040 #endif
Generated on Fri May 16 12:02:05 2008 for SEMS by
1.5.1