xorp

policy_xif.hh

00001 /*
00002  * obj/i386-pc-mingw32/xrl/interfaces/policy_xif.hh
00003  * vim:set sts=4 ts=8 ft=cpp:
00004  *
00005  * Copyright (c) 2001-2010 XORP, Inc and Others
00006  * See the XORP LICENSE.lgpl file for licensing, conditions, and warranties
00007  * on use.
00008  *
00009  * DO NOT EDIT THIS FILE - IT IS PROGRAMMATICALLY GENERATED
00010  *
00011  * Generated by 'clnt-gen'.
00012  */
00013 
00014 #ifndef __XRL_INTERFACES_POLICY_XIF_HH__
00015 #define __XRL_INTERFACES_POLICY_XIF_HH__
00016 
00017 #undef XORP_LIBRARY_NAME
00018 #define XORP_LIBRARY_NAME "XifPolicy"
00019 
00020 #include "libxorp/xlog.h"
00021 #include "libxorp/callback.hh"
00022 
00023 #include "libxipc/xrl.hh"
00024 #include "libxipc/xrl_error.hh"
00025 #include "libxipc/xrl_sender.hh"
00026 
00027 //#include <memory>
00028 
00029 class XrlPolicyV0p1Client {
00030 public:
00031     XrlPolicyV0p1Client(XrlSender* s) : _sender(s) {}
00032     virtual ~XrlPolicyV0p1Client() {}
00033 
00034     typedef XorpCallback1<void, const XrlError&>::RefPtr CreateTermCB;
00049     bool send_create_term(
00050     const char* dst_xrl_target_name,
00051     const string&   policy,
00052     const string&   order,
00053     const string&   term,
00054     const CreateTermCB& cb
00055     );
00056 
00057     typedef XorpCallback1<void, const XrlError&>::RefPtr DeleteTermCB;
00069     bool send_delete_term(
00070     const char* dst_xrl_target_name,
00071     const string&   policy,
00072     const string&   term,
00073     const DeleteTermCB& cb
00074     );
00075 
00076     typedef XorpCallback1<void, const XrlError&>::RefPtr UpdateTermBlockCB;
00095     bool send_update_term_block(
00096     const char* dst_xrl_target_name,
00097     const string&   policy,
00098     const string&   term,
00099     const uint32_t& block,
00100     const string&   order,
00101     const string&   statement,
00102     const UpdateTermBlockCB&    cb
00103     );
00104 
00105     typedef XorpCallback1<void, const XrlError&>::RefPtr CreatePolicyCB;
00115     bool send_create_policy(
00116     const char* dst_xrl_target_name,
00117     const string&   policy,
00118     const CreatePolicyCB&   cb
00119     );
00120 
00121     typedef XorpCallback1<void, const XrlError&>::RefPtr DeletePolicyCB;
00131     bool send_delete_policy(
00132     const char* dst_xrl_target_name,
00133     const string&   policy,
00134     const DeletePolicyCB&   cb
00135     );
00136 
00137     typedef XorpCallback1<void, const XrlError&>::RefPtr CreateSetCB;
00147     bool send_create_set(
00148     const char* dst_xrl_target_name,
00149     const string&   set,
00150     const CreateSetCB&  cb
00151     );
00152 
00153     typedef XorpCallback1<void, const XrlError&>::RefPtr UpdateSetCB;
00167     bool send_update_set(
00168     const char* dst_xrl_target_name,
00169     const string&   type,
00170     const string&   set,
00171     const string&   elements,
00172     const UpdateSetCB&  cb
00173     );
00174 
00175     typedef XorpCallback1<void, const XrlError&>::RefPtr DeleteSetCB;
00185     bool send_delete_set(
00186     const char* dst_xrl_target_name,
00187     const string&   set,
00188     const DeleteSetCB&  cb
00189     );
00190 
00191     typedef XorpCallback1<void, const XrlError&>::RefPtr AddToSetCB;
00205     bool send_add_to_set(
00206     const char* dst_xrl_target_name,
00207     const string&   type,
00208     const string&   set,
00209     const string&   element,
00210     const AddToSetCB&   cb
00211     );
00212 
00213     typedef XorpCallback1<void, const XrlError&>::RefPtr DeleteFromSetCB;
00227     bool send_delete_from_set(
00228     const char* dst_xrl_target_name,
00229     const string&   type,
00230     const string&   set,
00231     const string&   element,
00232     const DeleteFromSetCB&  cb
00233     );
00234 
00235     typedef XorpCallback1<void, const XrlError&>::RefPtr DoneGlobalPolicyConfCB;
00243     bool send_done_global_policy_conf(
00244     const char* dst_xrl_target_name,
00245     const DoneGlobalPolicyConfCB&   cb
00246     );
00247 
00248     typedef XorpCallback1<void, const XrlError&>::RefPtr ImportCB;
00263     bool send_import(
00264     const char* dst_xrl_target_name,
00265     const string&   protocol,
00266     const string&   policies,
00267     const string&   modifier,
00268     const ImportCB& cb
00269     );
00270 
00271     typedef XorpCallback1<void, const XrlError&>::RefPtr ExportCB;
00272 
00273     bool send_export(
00274     const char* dst_xrl_target_name,
00275     const string&   protocol,
00276     const string&   policies,
00277     const string&   modifier,
00278     const ExportCB& cb
00279     );
00280 
00281     typedef XorpCallback1<void, const XrlError&>::RefPtr AddVarmapCB;
00299     bool send_add_varmap(
00300     const char* dst_xrl_target_name,
00301     const string&   protocol,
00302     const string&   variable,
00303     const string&   type,
00304     const string&   access,
00305     const uint32_t& id,
00306     const AddVarmapCB&  cb
00307     );
00308 
00309     typedef XorpCallback2<void, const XrlError&, const string*>::RefPtr DumpStateCB;
00319     bool send_dump_state(
00320     const char* dst_xrl_target_name,
00321     const uint32_t& id,
00322     const DumpStateCB&  cb
00323     );
00324 
00325     typedef XorpCallback1<void, const XrlError&>::RefPtr SetProtoTargetCB;
00337     bool send_set_proto_target(
00338     const char* dst_xrl_target_name,
00339     const string&   protocol,
00340     const string&   target,
00341     const SetProtoTargetCB& cb
00342     );
00343 
00344 protected:
00345     XrlSender* _sender;
00346 
00347 private:
00348     static void unmarshall_create_term(
00349     const XrlError& e,
00350     XrlArgs*    a,
00351     CreateTermCB        cb
00352     );
00353 
00354     static void unmarshall_delete_term(
00355     const XrlError& e,
00356     XrlArgs*    a,
00357     DeleteTermCB        cb
00358     );
00359 
00360     static void unmarshall_update_term_block(
00361     const XrlError& e,
00362     XrlArgs*    a,
00363     UpdateTermBlockCB       cb
00364     );
00365 
00366     static void unmarshall_create_policy(
00367     const XrlError& e,
00368     XrlArgs*    a,
00369     CreatePolicyCB      cb
00370     );
00371 
00372     static void unmarshall_delete_policy(
00373     const XrlError& e,
00374     XrlArgs*    a,
00375     DeletePolicyCB      cb
00376     );
00377 
00378     static void unmarshall_create_set(
00379     const XrlError& e,
00380     XrlArgs*    a,
00381     CreateSetCB     cb
00382     );
00383 
00384     static void unmarshall_update_set(
00385     const XrlError& e,
00386     XrlArgs*    a,
00387     UpdateSetCB     cb
00388     );
00389 
00390     static void unmarshall_delete_set(
00391     const XrlError& e,
00392     XrlArgs*    a,
00393     DeleteSetCB     cb
00394     );
00395 
00396     static void unmarshall_add_to_set(
00397     const XrlError& e,
00398     XrlArgs*    a,
00399     AddToSetCB      cb
00400     );
00401 
00402     static void unmarshall_delete_from_set(
00403     const XrlError& e,
00404     XrlArgs*    a,
00405     DeleteFromSetCB     cb
00406     );
00407 
00408     static void unmarshall_done_global_policy_conf(
00409     const XrlError& e,
00410     XrlArgs*    a,
00411     DoneGlobalPolicyConfCB      cb
00412     );
00413 
00414     static void unmarshall_import(
00415     const XrlError& e,
00416     XrlArgs*    a,
00417     ImportCB        cb
00418     );
00419 
00420     static void unmarshall_export(
00421     const XrlError& e,
00422     XrlArgs*    a,
00423     ExportCB        cb
00424     );
00425 
00426     static void unmarshall_add_varmap(
00427     const XrlError& e,
00428     XrlArgs*    a,
00429     AddVarmapCB     cb
00430     );
00431 
00432     static void unmarshall_dump_state(
00433     const XrlError& e,
00434     XrlArgs*    a,
00435     DumpStateCB     cb
00436     );
00437 
00438     static void unmarshall_set_proto_target(
00439     const XrlError& e,
00440     XrlArgs*    a,
00441     SetProtoTargetCB        cb
00442     );
00443 
00444 private:
00445     /* Declare cached Xrl pointers */
00446     auto_ptr<Xrl> ap_xrl_create_term;
00447     auto_ptr<Xrl> ap_xrl_delete_term;
00448     auto_ptr<Xrl> ap_xrl_update_term_block;
00449     auto_ptr<Xrl> ap_xrl_create_policy;
00450     auto_ptr<Xrl> ap_xrl_delete_policy;
00451     auto_ptr<Xrl> ap_xrl_create_set;
00452     auto_ptr<Xrl> ap_xrl_update_set;
00453     auto_ptr<Xrl> ap_xrl_delete_set;
00454     auto_ptr<Xrl> ap_xrl_add_to_set;
00455     auto_ptr<Xrl> ap_xrl_delete_from_set;
00456     auto_ptr<Xrl> ap_xrl_done_global_policy_conf;
00457     auto_ptr<Xrl> ap_xrl_import;
00458     auto_ptr<Xrl> ap_xrl_export;
00459     auto_ptr<Xrl> ap_xrl_add_varmap;
00460     auto_ptr<Xrl> ap_xrl_dump_state;
00461     auto_ptr<Xrl> ap_xrl_set_proto_target;
00462 };
00463 
00464 #endif /* __XRL_INTERFACES_POLICY_XIF_HH__ */
 All Classes Namespaces Functions Variables Typedefs Enumerations