xorp

xrl_fea_io.hh

00001 // -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*-
00002 
00003 // Copyright (c) 2007-2011 XORP, Inc and Others
00004 //
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License, Version 2, June
00007 // 1991 as published by the Free Software Foundation. Redistribution
00008 // and/or modification of this program under the terms of any other
00009 // version of the GNU General Public License is not permitted.
00010 // 
00011 // This program is distributed in the hope that it will be useful, but
00012 // WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details,
00014 // see the GNU General Public License, Version 2, a copy of which can be
00015 // found in the XORP LICENSE.gpl file.
00016 // 
00017 // XORP Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
00018 // http://xorp.net
00019 
00020 
00021 
00022 #ifndef __FEA_XRL_FEA_IO_HH__
00023 #define __FEA_XRL_FEA_IO_HH__
00024 
00025 
00026 //
00027 // FEA (Forwarding Engine Abstraction) XRL-based I/O implementation.
00028 //
00029 
00030 #include "fea_io.hh"
00031 
00032 class EventLoop;
00033 class XrlFeaNode;
00034 class XrlRouter;
00035 
00039 class XrlFeaIo : public FeaIo {
00040 public:
00048     XrlFeaIo(EventLoop& eventloop, XrlRouter& xrl_router,
00049          const string& xrl_finder_targetname);
00050 
00054     virtual ~XrlFeaIo();
00055 
00061     int     startup();
00062 
00068     int     shutdown();
00069 
00075     bool    is_running() const;
00076 
00085     int register_instance_event_interest(const string& instance_name,
00086                      string& error_msg);
00087 
00096     int deregister_instance_event_interest(const string& instance_name,
00097                        string& error_msg);
00098 
00099 private:
00100     void register_instance_event_interest_cb(const XrlError& xrl_error,
00101                          string instance_name);
00102     void deregister_instance_event_interest_cb(const XrlError& xrl_error,
00103                            string instance_name);
00104 
00105     XrlRouter&      _xrl_router;    // The standard XRL send/recv point
00106     const string    _xrl_finder_targetname; // The Finder target name
00107 };
00108 
00109 #endif // __FEA_XRL_FEA_IO_HH__
 All Classes Namespaces Functions Variables Typedefs Enumerations