• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 Client Impl
22 
23 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
24 
25 /*! \addtogroup osclutil OSCL Util
26  *
27  * @{
28  */
29 
30 /*!
31  * \file oscl_registry_client_impl.h
32  * \brief Client-side implementation of OsclRegistryInterface
33  *
34  */
35 
36 #ifndef OSCL_REGISTRY_CLIENT_IMPL_H_INCLUDED
37 #define OSCL_REGISTRY_CLIENT_IMPL_H_INCLUDED
38 
39 #include "oscl_base.h"
40 #include "osclconfig_proc.h"
41 #if (OSCL_HAS_SINGLETON_SUPPORT)
42 //1st choice implementation-- uses Oscl singleton
43 
44 #include "oscl_registry_serv_impl_global.h"
45 
46 //client is the same as server
47 class OsclRegistryClientImpl: public OsclRegistryServImpl
48 {
49 };
50 
51 //access client is also the same as server
52 class OsclRegistryAccessClientImpl: public OsclRegistryServImpl
53 {
54 };
55 
56 #else //OSCL_HAS_ ...
57 //3rd choice implementation -- Non-functional stubs.
58 
59 #include "oscl_vector.h"
60 #include "oscl_string.h"
61 #include "oscl_registry_types.h"
62 
63 class OsclRegistryClientImpl
64 {
65     protected:
66 
Connect()67         int32 Connect()
68         {
69             return OsclErrNotSupported;
70         }
Close()71         void Close() {}
72 
Register(OSCL_String &,OsclComponentFactory)73         int32 Register(OSCL_String& , OsclComponentFactory)
74         {
75             return OsclErrNotSupported;
76         }
UnRegister(OSCL_String &)77         int32 UnRegister(OSCL_String&)
78         {
79             return OsclErrNotSupported;
80         }
81 
82         //for access client.
GetFactory(OSCL_String &)83         OsclComponentFactory GetFactory(OSCL_String&)
84         {
85             return NULL;
86         }
GetFactories(OSCL_String &,Oscl_Vector<OsclRegistryAccessElement,OsclMemAllocator> &)87         void GetFactories(OSCL_String& , Oscl_Vector<OsclRegistryAccessElement, OsclMemAllocator>&) {}
88 
89         friend class OsclRegistryClient;
90         friend class OsclRegistryAccessClient;
91 };
92 
93 class OsclRegistryAccessClientImpl: public OsclRegistryClientImpl
94 {
95 };
96 
97 #endif //OSCL_HAS_ ...
98 
99 
100 //TLS-based registry
101 #include "oscl_registry_serv_impl_tls.h"
102 
103 //client is the same as server
104 class OsclRegistryClientTlsImpl: public OsclRegistryServTlsImpl
105 {
106 };
107 
108 //access client is also the same as server
109 class OsclRegistryAccessClientTlsImpl: public OsclRegistryServTlsImpl
110 {
111 };
112 
113 #endif //OSCL_REGISTRY_IMPL_H_INCLUDED
114 /*! @} */
115 
116 
117