00001 // OSB library ************************************************ -*- C++ -*- 00006 /* 00007 AUTHOR(S): Stephan Broennimann (vb) 00008 00009 RCS information 00010 $Name: OSB_060808 $ 00011 $Revision: 1.7 $ 00012 00013 License 00014 OSB rating and billing library for communication networks 00015 Copyright (C) 2004, 2005, 2006 OSB systems 00016 00017 This file may be distributed and/or modify under the terms of the 00018 GNU General Public License (GPL) as published by the Free Software 00019 Foundation which is provided in the file LICENSE.GPL included in the 00020 packaging of this file. 00021 00022 The file is distributed in the hope that it will be useful, but WITHOUT 00023 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00024 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00025 for more details. 00026 00027 Holders of a OSB Commercial License may use this file under the terms 00028 and conditions of this commercial license. 00029 */ 00030 #ifndef _CAGLOBAL_H_ 00031 #define _CAGLOBAL_H_ 00032 00033 // ************************************************************************ 00034 // included header files 00035 // + standard includes 00036 00037 // + libraries 00038 #include <apperror.h> 00039 00040 // + local headers 00041 #include "reqserverC.h" 00042 00043 // + class declarations 00044 00045 // ************************************************************************ 00046 // forward declarations 00047 class CaGlobal; 00053 extern CaGlobal& caGlobal; 00054 00055 // ************************************************************************ 00056 // type definitions 00057 00058 // ************************************************************************ 00059 // class definitions 00068 class CaGlobal { 00069 public: 00071 typedef corba::rqserver::RequestServer RequestServer; 00072 00074 class NoRqsAvail : public OSB_APP::AppException { 00075 public: 00077 NoRqsAvail(); 00078 private: 00080 static const ErrorNo errNo_ = 401; 00081 }; // NoRqsAvail 00082 00083 public: 00085 CaGlobal(); 00087 virtual ~CaGlobal(); 00088 00089 public: 00097 virtual RequestServer* requestServer() = 0; 00098 private: 00100 CaGlobal(const CaGlobal&); 00102 CaGlobal& operator=(const CaGlobal&); 00103 }; // class CaGlobal 00104 00105 // ************************************************************************ 00106 // inline definitions 00107 inline CaGlobal::CaGlobal() 00108 { 00109 // empty 00110 } 00111 00112 inline CaGlobal::~CaGlobal() 00113 { 00114 // empty 00115 } 00116 00117 inline CaGlobal::NoRqsAvail::NoRqsAvail() 00118 : OSB_APP::AppException(errNo_) 00119 { 00120 // empty 00121 } 00122 #endif // #ifndef _CAGLOBAL_H_