xorp

xrl_target.hh

00001 // -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*-
00002 // vim:set sts=4 ts=8:
00003 
00004 // Copyright (c) 2001-2011 XORP, Inc and Others
00005 //
00006 // This program is free software; you can redistribute it and/or modify
00007 // it under the terms of the GNU General Public License, Version 2, June
00008 // 1991 as published by the Free Software Foundation. Redistribution
00009 // and/or modification of this program under the terms of any other
00010 // version of the GNU General Public License is not permitted.
00011 // 
00012 // This program is distributed in the hope that it will be useful, but
00013 // WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details,
00015 // see the GNU General Public License, Version 2, a copy of which can be
00016 // found in the XORP LICENSE.gpl file.
00017 // 
00018 // XORP Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
00019 // http://xorp.net
00020 
00021 // $XORP: xorp/policy/xrl_target.hh,v 1.16 2008/10/02 21:58:02 bms Exp $
00022 
00023 #ifndef __POLICY_XRL_TARGET_HH__
00024 #define __POLICY_XRL_TARGET_HH__
00025 
00026 #include "libxipc/xrl_std_router.hh"
00027 #include "xrl/targets/policy_base.hh"
00028 #include "policy_target.hh"
00029 
00035 class XrlPolicyTarget : public XrlPolicyTargetBase {
00036 public:
00041     XrlPolicyTarget(XrlStdRouter* r, PolicyTarget& ptarget);
00042     
00043     XrlCmdError common_0_1_get_target_name(
00044         // Output values,
00045         string& name);
00046 
00047     XrlCmdError common_0_1_get_version(
00048         // Output values,
00049         string& version);
00050 
00051     XrlCmdError common_0_1_get_status(
00052         // Output values,
00053         uint32_t&       status,
00054         string& reason);
00055 
00056     XrlCmdError common_0_1_shutdown();
00057 
00058     virtual XrlCmdError common_0_1_startup() {
00059     return XrlCmdError::OKAY();
00060     }
00061 
00062     XrlCmdError policy_0_1_create_term(
00063         // Input values,
00064         const string&   policy,
00065     const string&   order,
00066         const string&   term);
00067 
00068     XrlCmdError policy_0_1_delete_term(
00069         // Input values,
00070         const string&   policy,
00071         const string&   term);
00072    
00073     XrlCmdError policy_0_1_update_term_block(
00074         // Input values,
00075         const string&   policy,
00076         const string&   term,
00077     const uint32_t& block,
00078         const string&   order,
00079         const string&   statement);
00080     
00081     XrlCmdError policy_0_1_create_policy(
00082         // Input values,
00083         const string&   policy);
00084 
00085     XrlCmdError policy_0_1_delete_policy(
00086         // Input values,
00087         const string&   policy);
00088 
00089     XrlCmdError policy_0_1_create_set(
00090         // Input values,
00091         const string&   set); 
00092 
00093     XrlCmdError policy_0_1_update_set(
00094         // Input values,
00095     const string&   type,
00096         const string&   set,
00097         const string&   elements);
00098     
00099     XrlCmdError policy_0_1_delete_set(
00100         // Input values,
00101         const string&   set);
00102 
00103     XrlCmdError policy_0_1_add_to_set(
00104     // Input values,
00105     const string&   type,
00106     const string&   set,
00107     const string&   element);
00108 
00109     XrlCmdError policy_0_1_delete_from_set(
00110     // Input values,
00111     const string&   type,
00112     const string&   set,
00113     const string&   element);
00114     
00115     XrlCmdError policy_0_1_done_global_policy_conf();
00116 
00117     XrlCmdError policy_0_1_import(
00118         // Input values,
00119         const string&   protocol,
00120         const string&   policies,
00121     const string&   modifier);
00122     
00123     XrlCmdError policy_0_1_export(
00124         // Input values,
00125         const string&   protocol,
00126         const string&   policies,
00127     const string&   modifier);
00128    
00129     XrlCmdError policy_0_1_add_varmap(
00130         // Input values,
00131         const string&   protocol,
00132         const string&   variable,
00133         const string&   type,
00134         const string&   access,
00135     const uint32_t& id);
00136    
00137     XrlCmdError policy_0_1_dump_state(
00138         // Input values,
00139         const uint32_t& id,
00140         // Output values,
00141         string& state);
00142    
00143     XrlCmdError policy_0_1_set_proto_target(
00144         // Input values,
00145         const string&   protocol,
00146         const string&   target);
00147    
00148     XrlCmdError finder_event_observer_0_1_xrl_target_birth(
00149         // Input values,
00150         const string&   target_class,
00151         const string&   target_instance);
00152 
00153     XrlCmdError finder_event_observer_0_1_xrl_target_death(
00154         // Input values,
00155         const string&   target_class,
00156         const string&   target_instance);
00157 
00158     XrlCmdError cli_processor_0_1_process_command(
00159         // Input values,
00160         const string&   processor_name,
00161         const string&   cli_term_name,
00162         const uint32_t& cli_session_id,
00163         const string&   command_name,
00164         const string&   command_args,
00165         // Output values,
00166         string&     ret_processor_name,
00167         string&     ret_cli_term_name,
00168         uint32_t&       ret_cli_session_id,
00169         string& ret_command_output);
00170 
00171 private:
00172     PolicyTarget&   _policy_target;
00173 };
00174 
00175 #endif // __POLICY_XRL_TARGET_HH__
 All Classes Namespaces Functions Variables Typedefs Enumerations