include/IpNetworkCheckRsp.H

Go to the documentation of this file.
00001 /* ${copyright}$ */
00002 /* $Id: IpNetworkCheckRsp.H 983 2008-12-29 13:52:01Z rafael $ */
00007 #ifndef __IPNETWORKCHECKRSP_H__
00008 #define __IPNETWORKCHECKRSP_H__
00009 
00010 #include <vector>
00011 #include <string>
00012 
00013 #include "libepp_nicbr.H"
00014 
00015 #include "Response.H"
00016 
00017 using std::vector;
00018 using std::string;
00019 
00020 LIBEPP_NICBR_NS_BEGIN
00021 
00022 class IpNetworkCheckRsp : public Response
00023 {
00024 public:
00025   struct CheckData {
00026     IpRange ipRange;
00027     string reason;
00028     string reason_lang;
00029   };
00030 
00032   IpNetworkCheckRsp(bool reset = true) : Response(false)
00033   {
00034     if (reset) {
00035       this->reset();
00036     }
00037   }
00038 
00040 
00045   void insert_availability(const IpRange &ipRange, 
00046                            const string &reason, 
00047                            const string &reason_lang = "")
00048   {
00049     CheckData cd;
00050     cd.ipRange = ipRange;
00051     cd.reason = reason;
00052     cd.reason_lang = reason_lang;
00053     _availability_list.push_back(cd);
00054   }
00055 
00057 
00060   vector<CheckData> get_availability_list()
00061   {
00062     return _availability_list;
00063   }
00064   
00065   void reset()
00066   {
00067     Response::reset();
00068     _availability_list.clear();
00069   }
00070 
00071 private:
00073   vector<CheckData> _availability_list;
00074 };
00075 
00076 LIBEPP_NICBR_NS_END
00077 #endif // __IPNETWORKCHECKRSP_H__

Generated on Tue Mar 17 16:03:07 2009 for libepp_nicbr by  doxygen 1.4.7