• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

MockManager.h

Go to the documentation of this file.
00001 #ifndef mockManager_h
00002 #define mockManager_h
00003 
00004 /*******************************************************************************
00005  * ALMA - Atacama Large Millimeter Array
00006  * Copyright (c) ESO - European Southern Observatory, 2011
00007  * (in the framework of the ALMA collaboration).
00008  * All rights reserved.
00009  * 
00010  * This library is free software; you can redistribute it and/or
00011  * modify it under the terms of the GNU Lesser General Public
00012  * License as published by the Free Software Foundation; either
00013  * version 2.1 of the License, or (at your option) any later version.
00014  * 
00015  * This library is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00018  * Lesser General Public License for more details.
00019  * 
00020  * You should have received a copy of the GNU Lesser General Public
00021  * License along with this library; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00023  *******************************************************************************/
00024 #include <acsutil.h>
00025 #include <maciS.h>
00026 #include <cdb.h>
00027 #include <logging.h>
00028 
00029 namespace maci 
00030 {
00031         class MockManager: public virtual POA_maci::Manager, public virtual maci::Manager
00032         {
00033                 public:
00034 
00035                 MockManager(void) { }
00036 
00037                 /* ----------------------------------------------------------------*/
00038                 /* --------------------- [ CORBA interface ] ----------------------*/
00039                 /* ----------------------------------------------------------------*/
00040 
00041                 //virtual void refresh_logging_config() throw (CORBA::SystemException);
00042 
00062                 virtual maci::ClientInfo * login (maci::Client_ptr reference)  { return NULL; }
00063 
00067                 virtual void logout (maci::Handle id) {}
00068 
00078                 virtual ::maci::Handle register_component (maci::Handle id, const char * component_url, const char * type, CORBA::Object_ptr c)
00079          { return 0; }
00080 
00085                 virtual void unregister_component (maci::Handle id, maci::Handle h) {}
00086 
00103                 virtual CORBA::Object_ptr get_service (maci::Handle id, const char * service_url, CORBA::Boolean activate);
00104 
00119                 virtual ::CORBA::Object_ptr get_component (maci::Handle id, const char * service_url, CORBA::Boolean activate)
00120             { return CORBA::Object::_nil(); }
00121 
00150                 virtual ::CORBA::Object_ptr get_component_non_sticky (maci::Handle id, const char * component_url)
00151         { return CORBA::Object::_nil(); }
00152 
00162                 virtual ::maci::ObjectSeq * get_services (maci::Handle id, const ::maci::CURLSeq & service_urls, CORBA::Boolean activate, 
00163                         maci::ulongSeq_out status)
00164         { return NULL; }
00165 
00176                 virtual ::maci::ObjectSeq * get_components (maci::Handle id, const maci::CURLSeq & component_urls, CORBA::Boolean activate, 
00177                         maci::ulongSeq_out status)
00178         { return NULL; }
00179 
00187                 virtual void make_component_immortal (maci::Handle id, const char * component_url, CORBA::Boolean immortal_state)
00188         {}
00189     
00205                 virtual ::CORBA::Long release_component (maci::Handle id, const char * component_url)
00206         { return 0; }
00207 
00208                 virtual void release_component_async (maci::Handle id, const char * component_url, ACS::CBlong_ptr cb, const ACS::CBDescIn& desc)
00209                 {}
00210 
00216                 virtual ::CORBA::Long force_release_component (maci::Handle id, const char * component_url)
00217         {  return 0; }
00218     
00221                 virtual void release_components (maci::Handle id, const ::maci::CURLSeq & component_urls)
00222         {}
00223 
00231                 virtual void shutdown (maci::Handle id, CORBA::ULong containers)
00232         {}
00233 
00247                 virtual ::maci::ContainerInfoSeq * get_container_info (maci::Handle id, const maci::HandleSeq & h, const char * name_wc)
00248         { return NULL; }
00249 
00263                 virtual maci::ClientInfoSeq * get_client_info (maci::Handle id, const maci::HandleSeq & h, const char * name_wc)
00264         { return NULL; }
00265     
00288                 virtual maci::ComponentInfoSeq * get_component_info (maci::Handle id, const maci::HandleSeq & h, const char * name_wc,
00289                         const char * type_wc, CORBA::Boolean active_only)
00290         { return NULL; }
00291 
00296                 virtual ::CORBA::Object_ptr restart_component (maci::Handle client, const char * component_url)
00297         { return CORBA::Object::_nil(); }
00298 
00306                 virtual maci::ComponentInfo * get_dynamic_component (maci::Handle client, const maci::ComponentSpec & c, CORBA::Boolean mark_as_default)
00307                 { return NULL; }
00308 
00316                 virtual maci::ComponentInfoSeq * get_dynamic_components (maci::Handle client, const maci::ComponentSpecSeq & components)
00317                 { return NULL; }
00318 
00327                 virtual maci::ComponentInfo * get_collocated_component (maci::Handle client, const maci::ComponentSpec & c, CORBA::Boolean mark_as_default,
00328                         const char * target_component)
00329                 { return NULL; }
00330 
00336                 virtual maci::ComponentInfo * get_default_component (maci::Handle client, const char * component_type)
00337         { return NULL; }
00338 
00342                 virtual void shutdown_container (maci::Handle id, const char * container_name, CORBA::ULong action)
00343         {}
00344 
00345 
00346                 virtual Logging::LoggingConfigurable::LogLevels get_default_logLevels() { Logging::LoggingConfigurable::LogLevels ll; return ll; }
00347                 virtual Logging::LoggingConfigurable::LogLevels get_logLevels(const char*) { Logging::LoggingConfigurable::LogLevels ll; return ll; }
00348                 virtual void set_logLevels(const char*, const Logging::LoggingConfigurable::LogLevels&) {}
00349                 virtual void set_default_logLevels(const Logging::LoggingConfigurable::LogLevels&) {}
00350                 virtual void refresh_logging_config() {}
00351                 virtual Logging::stringSeq* get_logger_names() { return NULL; }
00352 
00353                 virtual char* domain_name() { return NULL; }
00354                 virtual CORBA::Boolean ping() { return false; }
00355                 virtual void set_state_persistence(maci::Handle, CORBA::Boolean){}
00356 
00357         };
00358 }
00359 
00360 #endif // mockManager_h

Generated on Mon May 4 2015 08:27:43 for ACS-2015.4 C++ API by  doxygen 1.7.0