LogService
libdadi: utility tools for distributed applications
ORBTools.hh
00001 /****************************************************************************/
00002 /* A class for putting some ORB functions together - HEADER                 */
00003 /*                                                                          */
00004 /*  Author(s):                                                              */
00005 /*    - Georg Hoesch (hoesch@in.tum.de)                                     */
00006 /*    - Cyrille Pontvieux (cyrille.pontvieux@edu.univ-fcomte.fr)            */
00007 /*                                                                          */
00008 /*  This file is part of DIET .                                             */
00009 /*                                                                          */
00010 /*  Copyright (C) 2000-2003 ENS Lyon, LIFC, INSA, INRIA and SysFera (2000)  */
00011 /*                                                                          */
00012 /*  - Frederic.Desprez@ens-lyon.fr (Project Manager)                        */
00013 /*  - Eddy.Caron@ens-lyon.fr (Technical Manager)                            */
00014 /*  - Tech@sysfera.com (Maintainer and Technical Support)                   */
00015 /*                                                                          */
00016 /*  This software is a computer program whose purpose is to provide an      */
00017 /*  distributed logging services.                                           */
00018 /*                                                                          */
00019 /*                                                                          */
00020 /*  This software is governed by the CeCILL license under French law and    */
00021 /*  abiding by the rules of distribution of free software.  You can  use,   */
00022 /*  modify and/ or redistribute the software under the terms of the CeCILL  */
00023 /*  license as circulated by CEA, CNRS and INRIA at the following URL       */
00024 /*  "http://www.cecill.info".                                               */
00025 /*                                                                          */
00026 /*  As a counterpart to the access to the source code and  rights to copy,  */
00027 /*  modify and redistribute granted by the license, users are provided      */
00028 /*  only with a limited warranty  and the software's author,  the holder    */
00029 /*  of the economic rights,  and the successive licensors  have only        */
00030 /*  limited liability.                                                      */
00031 /*                                                                          */
00032 /*  In this respect, the user's attention is drawn to the risks             */
00033 /*  associated with loading,  using,  modifying and/or developing or        */
00034 /*  reproducing the software by the user in light of its specific status    */
00035 /*  of free software, that may mean  that it is complicated to              */
00036 /*  manipulate, and  that  also therefore means  that it is reserved for    */
00037 /*  developers and experienced professionals having in-depth computer       */
00038 /*  knowledge. Users are therefore encouraged to load and test the          */
00039 /*  software's suitability as regards their requirements in conditions      */
00040 /*  enabling the security of their systems and/or data to be ensured and,   */
00041 /*  more generally, to use and operate it in the same conditions as         */
00042 /*  regards security.                                                       */
00043 /*                                                                          */
00044 /*  The fact that you are presently reading this means that you have had    */
00045 /*  knowledge of the CeCILL license and that you accept its terms.          */
00046 /*                                                                          */
00047 /****************************************************************************/
00048 /* $Id$
00049  * $Log$
00050  * Revision 1.1  2004/01/09 11:07:12  ghoesch
00051  * Restructured the whole LogService source tree.
00052  * Added autotools make process. Cleaned up code.
00053  * Removed some testers. Ready to release.
00054  *
00055  ****************************************************************************/
00056 
00057 #ifndef _ORBTOOLS_HH_
00058 #define _ORBTOOLS_HH_
00059 
00060 #include "LogTypes.hh"
00061 
00062 class ORBTools {
00063 public:
00071   static
00072   bool
00073   init(int argc, char** argv);
00074 
00083   static
00084   bool
00085   init(int argc, char** argv, unsigned int tracelevel, unsigned int port = 0);
00086 
00092   static
00093   bool
00094   init();
00095 
00107   static
00108   bool
00109   registerServant(const char* contextName, const char* contextKind,
00110                   const char* name, const char* kind,
00111                   CORBA::Object* objref);
00112 
00122   static
00123   bool
00124   registerServant(const char* name, const char* kind,
00125                   CORBA::Object* objref);
00126 
00133   static
00134   bool
00135   activateServant(PortableServer::ServantBase* object);
00136 
00142   static
00143   bool
00144   activatePOA();
00145 
00155   static
00156   bool
00157   unregisterServant(const char* contextName, const char* contextKind,
00158                     const char* name, const char* kind);
00159 
00167   static
00168   bool
00169   unregisterServant(const char* name, const char* kind);
00170 
00182   static
00183   bool
00184   findServant(const char* contextName, const char* contextKind,
00185               const char* name, const char* kind,
00186               CORBA::Object*& objref);
00187 
00197   static
00198   bool
00199   findServant(const char* name, const char* kind,
00200               CORBA::Object*& objref);
00201 
00209   static
00210   bool
00211   listen(char stopLowercase, char stopUppercase);
00212 
00217   static
00218   bool
00219   kill();
00220 
00221   static CORBA::ORB_var orb;
00222   static PortableServer::POA_var poa;
00223 };
00224 #endif
00225 
 All Classes Functions Variables