anclist_i.h

Go to the documentation of this file.
00001 // OSB library ********************************************* -*- C++ -*-
00009 /*
00010   AUTHOR(S): Darryl Kang (dk)
00011 
00012   RCS information
00013    $Name: OSB_060808 $
00014    $Revision: 1.35 $
00015 
00016   License
00017    OSB rating and billing library for communication networks
00018    Copyright (C) 2004, 2005, 2006  OSB systems
00019 
00020    This file may be distributed and/or modify under the terms of the
00021    GNU General Public License (GPL) as published by the Free Software
00022    Foundation which is provided in the file LICENSE.GPL included in the
00023    packaging of this file.
00024 
00025    The file is distributed in the hope that it will be useful, but WITHOUT
00026    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00027    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00028    for more details.
00029 
00030    Holders of a OSB Commercial License may use this file under the terms
00031    and conditions of this commercial license.
00032  */
00033 
00034 #ifndef _ANCLIST_I_H_
00035 #define _ANCLIST_I_H_
00036 
00037 // *********************************************************************
00038 // included header files
00039 // + standard includes
00040 
00041 // + libraries
00042 
00043 // + local headers
00044 #include "anclistS.h"
00045 #include "servantlocators.h"
00046 
00047 // + class declarations
00048 namespace OSB_LIB {
00049     class AnCList;
00050     class Contract;
00051     class Associate;
00052 }
00053 
00054 namespace OSB_CORBA {
00055     class AssociateWriter_i;
00056     class ContractAdmin_i;
00057     class ContractWriter_i;
00058     class PersProductWriter_i;
00059 }
00060 
00061 // *********************************************************************
00062 // namespace extensions
00063 namespace OSB_CORBA {
00064     using namespace corba::cadmin::assoc;
00065     using namespace corba::cadmin::contract;
00066 
00067     using corba::cadmin::AnCFilter;
00068     using corba::cadmin::AnCList;
00069     using corba::cadmin::AssociateId;
00070     using corba::cadmin::ContractId;
00071     using corba::common::OsbCorbaException;
00072     using corba::common::Utf8String;
00073 
00074     // *****************************************************************
00075     // class AnCList_i
00076     class AnCList_i : public virtual POA_corba::cadmin::AnCList
00077     {
00078     public:
00079         static const std::string IFC;
00080 
00082         explicit AnCList_i(
00083             ContractAdmin_i& cadmin
00084         );
00085 
00087         virtual ~AnCList_i();
00088 
00089     private:
00091         AnCList_i(const AnCList_i&);
00093         AnCList_i& operator=(const AnCList_i&);
00094 
00095     public:                             // interface general
00097         virtual CORBA::Long numAssoc() throw();
00099         virtual CORBA::Long numContract() throw();
00110         virtual CORBA::Long search(
00111             AnCFilter& filter
00112         ) throw (CORBA::SystemException, OsbCorbaException);
00120         virtual void refresh(
00121             CORBA::Boolean     noWait
00122         ) throw (CORBA::SystemException, OsbCorbaException);
00123 
00124     public:                             // associates
00135         virtual AssociateWriter_ptr getAssociate(
00136             const AssociateId&   id,
00137                   CORBA::Boolean noWait
00138         ) throw (CORBA::SystemException, OsbCorbaException);
00139 
00141         virtual AssociateIdSeq* getAssociateIds()
00142             throw (CORBA::SystemException);
00144         virtual AssociateSeq* getAssociates()
00145             throw (CORBA::SystemException, OsbCorbaException);
00146 
00147     public:                             // add, delete associate
00163         virtual AssociateWriter_ptr newAssociate(
00164             AssociateType     type
00165         ) throw (CORBA::SystemException, OsbCorbaException);
00166 
00177         virtual CORBA::Boolean delAssociate(
00178             const AssociateId& id,
00179             CORBA::Boolean     noWait
00180         ) throw (CORBA::SystemException, OsbCorbaException);
00181 
00182     public:                             // contracts
00192         virtual ContractWriter_ptr getContract(
00193             const ContractId& id
00194         ) throw (CORBA::SystemException, OsbCorbaException);
00195 
00203         virtual ContractSeq* getContracts(
00204           const ContractIdSeq& idList
00205         ) throw (CORBA::SystemException, OsbCorbaException);
00206 
00208         virtual ContractIdSeq* getContractIds()
00209             throw (CORBA::SystemException);
00210 
00212         virtual ContractSeq* getAllContracts()
00213             throw (CORBA::SystemException, OsbCorbaException);
00214 
00215     public:                             // add, delete contract
00230         ContractWriter_ptr newContract(
00231             AccountingType acctType
00232         ) throw (CORBA::SystemException, OsbCorbaException);
00233 
00246         virtual CORBA::Boolean delContract(
00247             const ContractId& cId,
00248             CORBA::Boolean    noWait
00249         ) throw (CORBA::SystemException, OsbCorbaException);
00250 
00252         const Locators::Key& key() const
00253         {
00254             return key_;
00255         }
00256 
00257     private:
00258         friend class AssociateWriter_i;
00259         friend class ContractWriter_i;
00260         friend class PersProductWriter_i;
00261 
00263         ContractAdmin_i& cadmin() const
00264         {
00265             return cadmin_;
00266         }
00267 
00269         OSB_LIB::AnCList& ancList()
00270         {
00271             return *ancList_;
00272         }
00273 
00274     private:
00283         AssociateWriter_ptr makeAssociate(
00284             const OSB_LIB::Associate* assoc
00285         ) throw (CORBA::SystemException, OsbCorbaException);
00286 
00292         ContractWriter_ptr makeContract(
00293             const OSB_LIB::Contract& co
00294         ) throw (CORBA::SystemException, OsbCorbaException);
00295 
00296     private:
00298         ContractAdmin_i& cadmin_;
00299 
00301         OSB_LIB::AnCList* ancList_;
00302 
00304         Locators::Key key_;
00305 
00306     private:                            // on hold
00319 /*
00320  *      virtual AssociateWriter_ptr refreshAssociate(
00321  *          const AssociateId& id,
00322  *          CORBA::Boolean     noWait
00323  *      ) throw (CORBA::SystemException, OsbCorbaException);
00324  */
00325 
00336 /*
00337  *     virtual ContractWriter_ptr refreshContract(
00338  *          const ContractId& id,
00339  *          CORBA::Boolean noWait
00340  *      ) throw (CORBA::SystemException, OsbCorbaException);
00341  */
00342     };                                  // class AnCList_i
00343 
00344     // *****************************************************************
00345 }                                       // namespace OSB_CORBA
00346 #endif                                  // #ifndef _ANCLIST_I_H_

Generated on Sat Sep 2 14:25:51 2006 for OSB Library by  doxygen 1.4.7