1 /* ------------------------------------------------------------------ 2 * Copyright (C) 1998-2009 PacketVideo 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 * express or implied. 14 * See the License for the specific language governing permissions 15 * and limitations under the License. 16 * ------------------------------------------------------------------- 17 */ 18 // -*- c++ -*- 19 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 20 21 // Oscl Registry Access Client 22 23 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 24 25 /*! \addtogroup osclutil OSCL Util 26 * 27 * @{ 28 */ 29 30 31 /*! 32 * \file oscl_registry_access_client.h 33 * \brief Client-side implementation Registry Access implementation. 34 * 35 */ 36 37 38 #ifndef OSCL_REGISTRY_ACCESS_CLIENT_H_INCLUDED 39 #define OSCL_REGISTRY_ACCESS_CLIENT_H_INCLUDED 40 41 42 #ifndef OSCL_REGISTRY_TYPES_H_INCLUDED 43 #include "oscl_registry_types.h" 44 #endif 45 #ifndef OSCL_STRING_CONTAINERS_H_INCLUDED 46 #include "oscl_string_containers.h" 47 #endif 48 #ifndef OSCL_VECTOR_H_INCLUDED 49 #include "oscl_vector.h" 50 #endif 51 #ifndef OSCL_MEM_H_INCLUDED 52 #include "oscl_mem.h" 53 #endif 54 55 class OsclRegistryAccessClientImpl; 56 class OsclRegistryAccessClientTlsImpl; 57 58 class OsclRegistryAccessClient 59 { 60 public: 61 OSCL_IMPORT_REF OsclRegistryAccessClient(); 62 OSCL_IMPORT_REF ~OsclRegistryAccessClient(); 63 64 /*! 65 ** Create a session. 66 ** @return OsclErrNone on success. 67 */ 68 OSCL_IMPORT_REF int32 Connect(); 69 70 /*! 71 ** Lookup a factory by registry and component mime type. 72 ** @param aComponent: registry+component MIME type 73 ** @return Factory. Factory will be NULL if not found. 74 */ 75 OSCL_IMPORT_REF OsclComponentFactory GetFactory(OSCL_String& aComponent); 76 77 78 /*! 79 ** Get all factories for a given registry type. 80 ** @param aRegistry: registry MIME type 81 ** @param aVec: output component factory + mimestring vector. 82 */ 83 OSCL_IMPORT_REF void GetFactories(OSCL_String& aRegistry, Oscl_Vector<OsclRegistryAccessElement, OsclMemAllocator>& aVec); 84 85 /*! 86 ** Close and cleanup session. 87 */ 88 OSCL_IMPORT_REF void Close(); 89 90 private: 91 OsclRegistryAccessClientImpl* iGlobalImpl; 92 OsclRegistryAccessClientTlsImpl* iTlsImpl; 93 }; 94 95 96 #endif // OSCL_STRING_H_INCLUDED 97 98 /*! @} */ 99