00001 #ifndef __IPNETWORKINFO_H__ 00002 #define __IPNETWORKINFO_H__ 00003 00004 #include "libepp_nicbr.H" 00005 00006 #include "Action.H" 00007 #include "IpNetworkInfoCmd.H" 00008 #include "IpNetworkInfoRsp.H" 00009 00010 using std::auto_ptr; 00011 00012 LIBEPP_NICBR_NS_BEGIN 00013 00015 class IpNetworkInfo : public Action 00016 { 00017 public: 00019 IpNetworkInfo(const ActionType type = IP_NETWORK_INFO) : Action(type) 00020 { 00021 if (type == IP_NETWORK_INFO) { 00022 _command = auto_ptr<IpNetworkInfoCmd>(new IpNetworkInfoCmd()); 00023 _response = auto_ptr<IpNetworkInfoRsp>(new IpNetworkInfoRsp()); 00024 } 00025 } 00026 00028 00031 void set_xml_template(const string &xml_template); 00032 00034 00038 void set_response(const string &xml_payload, DomParser *parser) 00039 { 00040 get_response()->reset(); 00041 parser->parse_ipnetwork_info_rsp(xml_payload, get_response()); 00042 } 00043 00045 00048 IpNetworkInfoCmd* get_command() 00049 { 00050 return (IpNetworkInfoCmd*) _command.get(); 00051 } 00052 00054 00057 IpNetworkInfoRsp* get_response() 00058 { 00059 return (IpNetworkInfoRsp*) _response.get(); 00060 } 00061 }; 00062 00063 LIBEPP_NICBR_NS_END 00064 #endif // __IPNETWORKINFO_H__