| XMP Toolkit SDK 6.0.0

IConfigurationManager.h
Go to the documentation of this file.
1
3 #ifndef IConfigurationManager_h__
4 #define IConfigurationManager_h__ 1
5
6 //
7 // =================================================================================================
8 // Copyright Adobe
9 // Copyright 2014 Adobe
10 // All Rights Reserved
11 //
12 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
13 // of the Adobe license agreement accompanying it. If you have received this file from a source other
14 // than Adobe, then your use, modification, or distribution of it requires the prior written permission
15 // of Adobe.
16 // =================================================================================================
17 //
18
19 #include "XMPCommon/Interfaces/BaseInterfaces/ISharedObject.h"
20 #include "XMPCommon/Interfaces/BaseInterfaces/IVersionable.h"
21
22 #include "XMPCommon/XMPCommonFwdDeclarations.h"
23
24 namespace AdobeXMPCommon {
25
32 class XMP_PUBLIC IConfigurationManager_v1
33 : public virtual ISharedObject
34 , public virtual IVersionable
35 {
36 public:
37
45 virtual bool APICALL RegisterMemoryAllocator( pIMemoryAllocator memoryAllocator ) = 0;
46
54 virtual bool APICALL RegisterErrorNotifier( pIErrorNotifier_base clientErrorNotifier ) = 0;
55
61 virtual bool APICALL DisableMultiThreading() = 0;
62
67 virtual bool APICALL IsMultiThreaded() const = 0;
68
75 virtual pIConfigurationManager APICALL GetActualIConfigurationManager() __NOTHROW__ = 0;
76 XMP_PRIVATE pcIConfigurationManager GetActualIConfigurationManager() const __NOTHROW__ {
77 return const_cast< IConfigurationManager_v1 * >( this )->GetActualIConfigurationManager();
78 }
81
89 XMP_PRIVATE static spIConfigurationManager MakeShared( pIConfigurationManager_base ptr );
90 XMP_PRIVATE static spcIConfigurationManager MakeShared( pcIConfigurationManager_base ptr ) {
91 return MakeShared( const_cast< pIConfigurationManager_base >( ptr ) );
92 }
95
100 XMP_PRIVATE static uint64 GetInterfaceID() { return kIConfigurationManagerID; }
101
106 XMP_PRIVATE static uint32 GetInterfaceVersion() { return 1; }
108
109 virtual ~IConfigurationManager_v1() __NOTHROW__ {}
110
111 protected:
112
114 virtual uint32 APICALL registerMemoryAllocator( pIMemoryAllocator_base memoryAllocator, pcIError_base & error ) __NOTHROW__ = 0;
115 virtual uint32 APICALL registerErrorNotifier( pIErrorNotifier_base clientErrorNotifier, pcIError_base & error ) __NOTHROW__ = 0;
116 virtual uint32 APICALL disableMultiThreading( pcIError_base & error ) __NOTHROW__ = 0;
117 virtual uint32 APICALL isMultiThreaded( pcIError_base & error ) const __NOTHROW__ = 0;
119
120 #ifdef FRIEND_CLASS_DECLARATION
121 FRIEND_CLASS_DECLARATION();
122 #endif
123 REQ_FRIEND_CLASS_DECLARATION();
125 };
126 }
127
128
129 #if !BUILDING_XMPCOMMON_LIB && !SOURCE_COMPILING_XMP_ALL
130
131 namespace AdobeXMPCommon {
132 class IConfigurationManagerProxy
133 : public virtual IConfigurationManager
134 {
135 private:
136 pIConfigurationManager mRawPtr;
137
138 public:
139 IConfigurationManagerProxy( pIConfigurationManager ptr )
140 : mRawPtr( ptr )
141 {
142 mRawPtr->Acquire();
143 }
144
145 ~IConfigurationManagerProxy() __NOTHROW__ { mRawPtr->Release(); }
146 pIConfigurationManager APICALL GetActualIConfigurationManager() __NOTHROW__ { return mRawPtr; }
147 AdobeXMPCommon_Int::pISharedObject_I APICALL GetISharedObject_I() __NOTHROW__ { return mRawPtr->GetISharedObject_I(); }
148
149 void APICALL Acquire() const __NOTHROW__;
150 void APICALL Release() const __NOTHROW__;
151 pvoid APICALL GetInterfacePointer( uint64 interfaceID, uint32 interfaceVersion );
152 virtual bool APICALL RegisterMemoryAllocator( pIMemoryAllocator memoryAllocator );
153 virtual bool APICALL RegisterErrorNotifier( pIErrorNotifier_base clientErrorNotifier );
154 virtual bool APICALL DisableMultiThreading();
155 virtual bool APICALL IsMultiThreaded() const;
156
157 protected:
158 virtual uint32 APICALL registerMemoryAllocator( pIMemoryAllocator_base memoryAllocator, pcIError_base & error ) __NOTHROW__;
159 virtual uint32 APICALL registerErrorNotifier( pIErrorNotifier_base clientErrorNotifier, pcIError_base & error ) __NOTHROW__;
160 virtual uint32 APICALL disableMultiThreading( pcIError_base & error ) __NOTHROW__;
161 virtual uint32 APICALL isMultiThreaded( pcIError_base & error ) const __NOTHROW__;
162 pvoid APICALL getInterfacePointer( uint64 interfaceID, uint32 interfaceVersion, pcIError_base & error ) __NOTHROW__;
163 };
164
165 }
166
167 #endif // BUILDING_XMPCOMMON_LIB && !SOURCE_COMPILING_XMP_LIB
168
169 #endif // IConfigurationManager_h__
AdobeXMPCommon::IMemoryAllocator_v1
Version1 of the interface that represents an interface to be implemented by client in case he is inte...
Definition: IMemoryAllocator.h:29
AdobeXMPCommon::IConfigurationManagerProxy::IsMultiThreaded
virtual bool APICALL IsMultiThreaded() const
AdobeXMPCommon::IConfigurationManagerProxy::disableMultiThreading
virtual uint32 APICALL disableMultiThreading(pcIError_base &error) __NOTHROW__
AdobeXMPCommon::IConfigurationManager_v1::~IConfigurationManager_v1
virtual ~IConfigurationManager_v1() __NOTHROW__
Definition: IConfigurationManager.h:109
AdobeXMPCommon_Int::pISharedObject_I
ISharedObject_I * pISharedObject_I
Definition: XMPCommonFwdDeclarations.h:149
XMP_PRIVATE
#define XMP_PRIVATE
Definition: XMP_Environment.h:222
AdobeXMPCommon::IConfigurationManagerProxy::Acquire
void APICALL Acquire() const __NOTHROW__
AdobeXMPCommon::pIConfigurationManager
IConfigurationManager * pIConfigurationManager
Definition: XMPCommonFwdDeclarations.h:110
__NOTHROW__
#define __NOTHROW__
Definition: XMPCommonDefines.h:147
AdobeXMPCommon::pcIConfigurationManager
const typedef IConfigurationManager * pcIConfigurationManager
Definition: XMPCommonFwdDeclarations.h:111
AdobeXMPCommon::IConfigurationManagerProxy::RegisterMemoryAllocator
virtual bool APICALL RegisterMemoryAllocator(pIMemoryAllocator memoryAllocator)
XMP_PUBLIC
#define XMP_PUBLIC
Definition: XMP_Environment.h:221
AdobeXMPCommon::IConfigurationManagerProxy::GetActualIConfigurationManager
pIConfigurationManager APICALL GetActualIConfigurationManager() __NOTHROW__
Definition: IConfigurationManager.h:146
AdobeXMPCommon::kIConfigurationManagerID
static const uint64 kIConfigurationManagerID(0x6e436f6e664d6772)
AdobeXMPCommon::spcIConfigurationManager
shared_ptr< const IConfigurationManager > spcIConfigurationManager
Definition: XMPCommonFwdDeclarations.h:113
ISharedObject.h
AdobeXMPCommon
Definition: IConfigurable.h:21
AdobeXMPCommon::IConfigurationManagerProxy
Definition: IConfigurationManager.h:132
XMPCommonFwdDeclarations.h
AdobeXMPCommon::pvoid
void * pvoid
Definition: XMPCommonFwdDeclarations.h:46
AdobeXMPCommon::IConfigurationManagerProxy::~IConfigurationManagerProxy
~IConfigurationManagerProxy() __NOTHROW__
Definition: IConfigurationManager.h:145
AdobeXMPCommon::uint32
XMP_Uns32 uint32
Definition: XMPCommonDefines.h:174
AdobeXMPCommon::IConfigurationManagerProxy::GetInterfacePointer
pvoid APICALL GetInterfacePointer(uint64 interfaceID, uint32 interfaceVersion)
AdobeXMPCommon::IConfigurationManagerProxy::registerMemoryAllocator
virtual uint32 APICALL registerMemoryAllocator(pIMemoryAllocator_base memoryAllocator, pcIError_base &error) __NOTHROW__
AdobeXMPCommon::pcIConfigurationManager_base
const typedef IConfigurationManager_v1 * pcIConfigurationManager_base
Definition: XMPCommonFwdDeclarations.h:108
AdobeXMPCommon::IConfigurationManagerProxy::getInterfacePointer
pvoid APICALL getInterfacePointer(uint64 interfaceID, uint32 interfaceVersion, pcIError_base &error) __NOTHROW__
AdobeXMPCommon::IVersionable
Interface that serves as the base interface for all the externally exposed interfaces which needs to ...
Definition: IVersionable.h:30
AdobeXMPCommon::IConfigurationManagerProxy::DisableMultiThreading
virtual bool APICALL DisableMultiThreading()
AdobeXMPCommon::IConfigurationManagerProxy::GetISharedObject_I
AdobeXMPCommon_Int::pISharedObject_I APICALL GetISharedObject_I() __NOTHROW__
Definition: IConfigurationManager.h:147
AdobeXMPCommon::IConfigurationManagerProxy::registerErrorNotifier
virtual uint32 APICALL registerErrorNotifier(pIErrorNotifier_base clientErrorNotifier, pcIError_base &error) __NOTHROW__
AdobeXMPCommon::spIConfigurationManager
shared_ptr< IConfigurationManager > spIConfigurationManager
Definition: XMPCommonFwdDeclarations.h:112
AdobeXMPCommon::IConfigurationManagerProxy::RegisterErrorNotifier
virtual bool APICALL RegisterErrorNotifier(pIErrorNotifier_base clientErrorNotifier)
AdobeXMPCommon::IConfigurationManager_v1
Version1 of the interface that represents configuration settings controllable by the client.
Definition: IConfigurationManager.h:32
AdobeXMPCommon::IConfigurationManagerProxy::isMultiThreaded
virtual uint32 APICALL isMultiThreaded(pcIError_base &error) const __NOTHROW__
AdobeXMPCommon::IConfigurationManagerProxy::Release
void APICALL Release() const __NOTHROW__
REQ_FRIEND_CLASS_DECLARATION
#define REQ_FRIEND_CLASS_DECLARATION()
Definition: XMPCommonDefines.h:137
IVersionable.h
AdobeXMPCommon::IErrorNotifier_v1
Version1 of the interface that represents an interface to be implemented by client in case he is inte...
Definition: IErrorNotifier.h:29
AdobeXMPCommon::pIMemoryAllocator
IMemoryAllocator * pIMemoryAllocator
Definition: XMPCommonFwdDeclarations.h:88
AdobeXMPCommon::IConfigurationManagerProxy::mRawPtr
pIConfigurationManager mRawPtr
Definition: IConfigurationManager.h:136
AdobeXMPCommon::IConfigurationManagerProxy::IConfigurationManagerProxy
IConfigurationManagerProxy(pIConfigurationManager ptr)
Definition: IConfigurationManager.h:139
AdobeXMPCommon::pcIError_base
const typedef IError_v1 * pcIError_base
Definition: XMPCommonFwdDeclarations.h:64
AdobeXMPCommon::uint64
XMP_Uns64 uint64
Definition: XMPCommonDefines.h:172
AdobeXMPCommon::ISharedObject
Interface that serves as the base interface of all the externally exposed interfaces.
Definition: ISharedObject.h:29