osbconst.h

Go to the documentation of this file.
00001 // OSB library ************************************************ -*- C++ -*-
00006 /*
00007   AUTHOR(S): Stephan Broennimann (vb)
00008 
00009   RCS information
00010    $Name: OSB_060808 $
00011    $Revision: 1.14 $
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 _OSBCONST_H_
00031 #define _OSBCONST_H_
00032 
00033 // ************************************************************************
00034 // included header files
00035 // + standard includes
00036 
00037 // + libraries
00038 
00039 // + local headers
00040 
00041 // + class declarations
00042 
00043 // ************************************************************************
00044 // namespace extensions
00045 namespace OSB_LIB {
00046 
00047 // ************************************************************************
00048 // constants
00049     // Also change in otl.h if you change the values!
00051     const unsigned int MAX_NAME =  63;
00053     const unsigned int MAX_DES  = 255;
00054 
00056     const long ID_NOT_SET = 0;
00057 
00058 // ************************************************************************
00059 // type definitions
00066     enum ModuleId {
00068         mdUnknown       =    ID_NOT_SET,
00069 
00070         mdCollection    =    1, 
00071         mdConversion    =    2, 
00072         mdAggregation   =    3, 
00073         mdCorrelation   =    4, 
00074         mdRating        =    5, 
00075         mdBilling       =    6, 
00076         mdStorage       =    7, 
00077         mdNamingService =   11, 
00078         mdCaServer      =   12, 
00079         mdOaServer      =   13, 
00080         mdNaServer      =   14, 
00081         mdPaServer      =   15, 
00082         mdTariffAdmin   =   21, 
00083         mdOsbAdmin      =   22, 
00084         mdContractAdmin =   31, 
00085         mdNetworkAdmin  =   32, 
00086         mdProductAdmin  =   33, 
00087         mdUserAdmin     =   34, 
00088         mdReports       =   35, 
00089         mdArAdmin       =   36, 
00090         mdAll           = 0xff  
00091     };
00092 
00094 
00095 
00102     enum ObjectStatus {
00104         objUnchanged = 0,
00106         objModified  = 1,
00108         objDeleted   = 2,
00110         objBusy      = 3
00111     };
00113 
00115 
00116 
00120     enum CfgStatus {
00122         cfgEditable  = 'e',
00124         cfgStandby   = 's',
00126         cfgTesting   = 't',
00128         cfgReleased  = 'r',
00130         cfgUnknown   = '\0'
00131     };
00132 
00133     // ToDo: move this function into osb_dbutil.h/cc:
00134     //       conversion should be used only when reading/writing
00135     //       to/from database.
00147     char toChar(CfgStatus cs);
00148     // ToDo: move this function into osb_dbutil.h/cc:
00149     //       conversion should be used only when reading/writing
00150     //       to/from database.
00159     CfgStatus cfgStatus(char s);
00161 
00163 
00164 
00165     enum ChargeType {
00166         ct_gross   = 'g',               // database: 'g'
00167         ct_net     = 'n',               // database: 'n'
00168         ct_unknown = '\0'               // unknown charge type
00169     };
00170 
00177     char toChar(ChargeType ct);
00178 
00190     ChargeType toChargeType(char c);
00192 }                                       // namespace OSB_LIB
00193 
00194 // ************************************************************************
00195 // inline definitions
00196 namespace OSB_LIB {
00197 }                                       // namespace OSB_LIB
00198 #endif                                  // #ifndef _OSBCONST_H_

Generated on Sat Sep 2 14:06:33 2006 for OSB Library by  doxygen 1.4.7