Main Page Modules Class Hierarchy Data Structures File List Data Fields Globals Related Pages

# oscl_registry_serv_impl_global.h

Go to the documentation of this file.

    00001 // -*- c++ -*-
    00002 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
    00003
    00004 //               Oscl Registry Serv Impl
    00005
    00006 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
    00007
    00019 #ifndef OSCL_REGISTRY_SERV_IMPL_GLOBAL_H_INCLUDED
    00020 #define OSCL_REGISTRY_SERV_IMPL_GLOBAL_H_INCLUDED
    00021
    00022 #include "osclconfig_proc.h"
    00023 #include "oscl_base.h"
    00024 #if (OSCL_HAS_SINGLETON_SUPPORT)
    00025
    00026 #include "oscl_registry_serv_impl.h"
    00027 #include "oscl_registry_types.h"
    00028 #include "oscl_vector.h"
    00029 #include "oscl_mem.h"
    00030
    00031 //global-variable-based implementation.
    00032 //this handles both the registration client and the access client
    00033 //interfaces.
    00034 class OsclRegistryServImpl
    00035 {
    00036     protected:
    00037         OsclRegistryServImpl();
    00038         virtual ~OsclRegistryServImpl();
    00039
    00040         int32 Connect();
    00041         void Close();
    00042
    00043         //for registration client
    00044         int32 Register(OSCL_String& aComponentID, OsclComponentFactory aFactory);
    00045         int32 UnRegister(OSCL_String& aComponentID);
    00046
    00047         //for access client.
    00048         OsclComponentFactory GetFactory(OSCL_String& aComponent);
    00049         void GetFactories(OSCL_String& aRegistry, Oscl_Vector<OsclRegistryAccessElement, OsclMemAllocator>& aVec);
    00050
    00051         friend class OsclRegistryClient;
    00052         friend class OsclRegistryAccessClient;
    00053     private:
    00054         bool IsOpen() const
    00055         {
    00056             return iIsOpen;
    00057         }
    00058         bool iIsOpen;
    00059         //server data.
    00060         OsclComponentRegistry* GetOsclComponentRegistry();
    00061         //session data.
    00062         Oscl_Vector<uint32, OsclMemAllocator> iIdVec;
    00063
    00064 };
    00065
    00066 #endif //oscl config
    00067
    00068 #endif //OSCL_REGISTRY_IMPL_GLOBAL_H_INCLUDED
    00069