00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00035 #ifndef OW_PROVIDERIFC_HPP_
00036 #define OW_PROVIDERIFC_HPP_
00037 #include "OW_config.h"
00038 #include "OW_SharedLibraryReference.hpp"
00039 #include "OW_String.hpp"
00040 #include "OW_MethodProviderIFC.hpp"
00041 #include "OW_InstanceProviderIFC.hpp"
00042 #include "OW_SecondaryInstanceProviderIFC.hpp"
00043 #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00044 #include "OW_AssociatorProviderIFC.hpp"
00045 #endif
00046 #include "OW_IndicationExportProviderIFC.hpp"
00047 #include "OW_PolledProviderIFC.hpp"
00048 #include "OW_IndicationProviderIFC.hpp"
00049 #include "OW_ProviderEnvironmentIFC.hpp"
00050 #include "OW_InstanceProviderInfo.hpp"
00051 #include "OW_SecondaryInstanceProviderInfo.hpp"
00052 #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00053 #include "OW_AssociatorProviderInfo.hpp"
00054 #endif
00055 #include "OW_MethodProviderInfo.hpp"
00056 #include "OW_IndicationProviderInfo.hpp"
00057 #include "OW_IntrusiveReference.hpp"
00058 #include "OW_IntrusiveCountableBase.hpp"
00059
00060 namespace OW_NAMESPACE
00061 {
00062
00080 class OW_PROVIDER_API ProviderIFCBaseIFC : public IntrusiveCountableBase
00081 {
00082 public:
00083 ProviderIFCBaseIFC();
00084 virtual ~ProviderIFCBaseIFC();
00091 virtual const char* getName() const = 0;
00097 const UInt32 signature;
00101 void init(const ProviderEnvironmentIFCRef& env,
00102 InstanceProviderInfoArray& i,
00103 SecondaryInstanceProviderInfoArray& si,
00104 #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00105 AssociatorProviderInfoArray& a,
00106 #endif
00107 MethodProviderInfoArray& m,
00108 IndicationProviderInfoArray& ind);
00119 InstanceProviderIFCRef getInstanceProvider(const ProviderEnvironmentIFCRef& env,
00120 const char* provIdString);
00131 SecondaryInstanceProviderIFCRef getSecondaryInstanceProvider(const ProviderEnvironmentIFCRef& env,
00132 const char* provIdString);
00143 MethodProviderIFCRef getMethodProvider(const ProviderEnvironmentIFCRef& env,
00144 const char* provIdString);
00145 #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00146
00156 AssociatorProviderIFCRef getAssociatorProvider(const ProviderEnvironmentIFCRef& env,
00157 const char* provIdString);
00158 #endif
00159
00163 IndicationExportProviderIFCRefArray getIndicationExportProviders(
00164 const ProviderEnvironmentIFCRef& env);
00169 PolledProviderIFCRefArray getPolledProviders(const ProviderEnvironmentIFCRef& env);
00173 void unloadProviders(const ProviderEnvironmentIFCRef& env);
00184 IndicationProviderIFCRef getIndicationProvider(const ProviderEnvironmentIFCRef& env,
00185 const char* provIdString);
00186
00187
00188
00189
00190
00191
00192 void shuttingDown(const ProviderEnvironmentIFCRef& env);
00193
00194 protected:
00199 virtual void doInit(const ProviderEnvironmentIFCRef& env,
00200 InstanceProviderInfoArray& i,
00201 SecondaryInstanceProviderInfoArray& si,
00202 #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00203 AssociatorProviderInfoArray& a,
00204 #endif
00205 MethodProviderInfoArray& m,
00206 IndicationProviderInfoArray& ind) = 0;
00207 virtual InstanceProviderIFCRef doGetInstanceProvider(const ProviderEnvironmentIFCRef& env,
00208 const char* provIdString);
00209 virtual SecondaryInstanceProviderIFCRef doGetSecondaryInstanceProvider(const ProviderEnvironmentIFCRef& env,
00210 const char* provIdString);
00211 virtual MethodProviderIFCRef doGetMethodProvider(const ProviderEnvironmentIFCRef& env,
00212 const char* provIdString);
00213 #ifndef OW_DISABLE_ASSOCIATION_TRAVERSAL
00214 virtual AssociatorProviderIFCRef doGetAssociatorProvider(
00215 const ProviderEnvironmentIFCRef& env,
00216 const char* provIdString);
00217 #endif
00218 virtual IndicationExportProviderIFCRefArray doGetIndicationExportProviders(
00219 const ProviderEnvironmentIFCRef& env
00220 );
00221 virtual PolledProviderIFCRefArray doGetPolledProviders(
00222 const ProviderEnvironmentIFCRef& env
00223 );
00224 virtual IndicationProviderIFCRef doGetIndicationProvider(
00225 const ProviderEnvironmentIFCRef& env,
00226 const char* provIdString);
00227 virtual void doUnloadProviders(const ProviderEnvironmentIFCRef& env);
00228 virtual void doShuttingDown(const ProviderEnvironmentIFCRef& env);
00229 };
00230
00231 typedef SharedLibraryReference< IntrusiveReference<ProviderIFCBaseIFC> > ProviderIFCBaseIFCRef;
00232
00233 }
00234
00235 #if !defined(OW_STATIC_SERVICES)
00236 #define OW_PROVIDERIFCFACTORY(prov, name) \
00237 extern "C" OW_EXPORT OW_NAMESPACE::ProviderIFCBaseIFC* \
00238 createProviderIFC() \
00239 { \
00240 return new prov; \
00241 } \
00242 extern "C" OW_EXPORT const char* \
00243 getOWVersion() \
00244 { \
00245 return OW_VERSION; \
00246 }
00247 #else
00248 #define OW_PROVIDERIFCFACTORY(prov, name) \
00249 extern "C" OW_NAMESPACE::ProviderIFCBaseIFC* \
00250 createProviderIFC_##name() \
00251 { \
00252 return new prov; \
00253 }
00254 #endif
00255
00256 #endif