xorp

finder_event_observer_xif.hh

00001 /*
00002  * obj/i686-pc-linux-gnu/xrl/interfaces/finder_event_observer_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_FINDER_EVENT_OBSERVER_XIF_HH__
00015 #define __XRL_INTERFACES_FINDER_EVENT_OBSERVER_XIF_HH__
00016 
00017 #undef XORP_LIBRARY_NAME
00018 #define XORP_LIBRARY_NAME "XifFinderEventObserver"
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 XrlFinderEventObserverV0p1Client {
00030 public:
00031     XrlFinderEventObserverV0p1Client(XrlSender* s) : _sender(s) {}
00032     virtual ~XrlFinderEventObserverV0p1Client() {}
00033 
00034     typedef XorpCallback1<void, const XrlError&>::RefPtr XrlTargetBirthCB;
00046     bool send_xrl_target_birth(
00047     const char* dst_xrl_target_name,
00048     const string&   target_class,
00049     const string&   target_instance,
00050     const XrlTargetBirthCB& cb
00051     );
00052 
00053     typedef XorpCallback1<void, const XrlError&>::RefPtr XrlTargetDeathCB;
00065     bool send_xrl_target_death(
00066     const char* dst_xrl_target_name,
00067     const string&   target_class,
00068     const string&   target_instance,
00069     const XrlTargetDeathCB& cb
00070     );
00071 
00072 protected:
00073     XrlSender* _sender;
00074 
00075 private:
00076     static void unmarshall_xrl_target_birth(
00077     const XrlError& e,
00078     XrlArgs*    a,
00079     XrlTargetBirthCB        cb
00080     );
00081 
00082     static void unmarshall_xrl_target_death(
00083     const XrlError& e,
00084     XrlArgs*    a,
00085     XrlTargetDeathCB        cb
00086     );
00087 
00088 private:
00089     /* Declare cached Xrl pointers */
00090     auto_ptr<Xrl> ap_xrl_xrl_target_birth;
00091     auto_ptr<Xrl> ap_xrl_xrl_target_death;
00092 };
00093 
00094 #endif /* __XRL_INTERFACES_FINDER_EVENT_OBSERVER_XIF_HH__ */
 All Classes Namespaces Functions Variables Typedefs Enumerations