00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 class TRelTransMgr;
00022 #ifndef RELTRANSMGR_H
00023 #define RELTRANSMGR_H
00024
00025 #include <iostream>
00026 #include "RelCommon.h"
00027 #include "SmartPtr.h"
00028 #include "RelCfgIface.h"
00029 #include "RelMsg.h"
00030
00031 using namespace std;
00032
00033 class TRelTransMgr
00034 {
00035 friend ostream & operator<<(ostream &strum, TRelTransMgr &x);
00036 public:
00037 TRelTransMgr(TCtx * ctx, string xmlFile);
00038 ~TRelTransMgr();
00039
00040 bool openSocket(SmartPtr<TRelCfgIface> confIface);
00041
00042 bool doDuties();
00043
00044 void relayMsg(SmartPtr<TRelMsg> msg);
00045 void relayMsgRepl(SmartPtr<TRelMsg> msg);
00046 void dump();
00047
00048 bool isDone();
00049 void shutdown();
00050
00051 char * getCtrlAddr();
00052 int getCtrlIface();
00053
00054 private:
00055 TCtx * Ctx;
00056 string XmlFile;
00057 bool IsDone;
00058
00059 int ctrlIface;
00060 char ctrlAddr[48];
00061 };
00062
00063
00064
00065 #endif
00066
00067
00068