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

# oscl_registry_serv_impl_tls.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_TLS_H_INCLUDED
    00020 #define OSCL_REGISTRY_SERV_IMPL_TLS_H_INCLUDED
    00021
    00022 #include "osclconfig_proc.h"
    00023
    00024 #include "oscl_registry_serv_impl.h"
    00025 #include "oscl_registry_types.h"
    00026 #include "oscl_vector.h"
    00027 #include "oscl_mem.h"
    00028
    00029 //TLS-based implementation.
    00030 //this handles both the registration client and the access client
    00031 //interfaces.
    00032 class OsclRegistryServTlsImpl
    00033 {
    00034     protected:
    00035         OsclRegistryServTlsImpl();
    00036         virtual ~OsclRegistryServTlsImpl();
    00037
    00038         int32 Connect();
    00039         void Close();
    00040
    00041         //for registration client
    00042         int32 Register(OSCL_String& aComponentID, OsclComponentFactory aFactory);
    00043         int32 UnRegister(OSCL_String& aComponentID);
    00044
    00045         //for access client.
    00046         OsclComponentFactory GetFactory(OSCL_String& aComponent);
    00047         void GetFactories(OSCL_String& aRegistry, Oscl_Vector<OsclRegistryAccessElement, OsclMemAllocator>& aVec);
    00048
    00049         friend class OsclRegistryClient;
    00050         friend class OsclRegistryAccessClient;
    00051     private:
    00052         bool IsOpen() const
    00053         {
    00054             return iIsOpen;
    00055         }
    00056         bool iIsOpen;
    00057         //server data.
    00058         OsclComponentRegistry* GetOsclComponentRegistry();
    00059         //session data.
    00060         Oscl_Vector<uint32, OsclMemAllocator> iIdVec;
    00061 };
    00062
    00063
    00064 #endif //OSCL_REGISTRY_IMPL_TLS_H_INCLUDED
    00065