1 //------------------------------------------------------------------------
2 // Project : Steinberg Module Architecture SDK
4 // Category : Basic Host Service Interfaces
5 // Filename : pluginterfaces/base/iupdatehandler.h
6 // Created by : Steinberg, 01/2004
7 // Description : Update handling
9 //-----------------------------------------------------------------------------
10 // This file is part of a Steinberg SDK. It is subject to the license terms
11 // in the LICENSE file found in the top-level directory of this distribution
12 // and at www.steinberg.net/sdklicenses.
13 // No part of the SDK, including this file, may be copied, modified, propagated,
14 // or distributed except according to the terms contained in the LICENSE file.
15 //-----------------------------------------------------------------------------
19 #include "pluginterfaces/base/funknown.h"
25 //------------------------------------------------------------------------
26 /** Host implements dependency handling for plugins.
28 - [get this interface from IHostClasses]
31 - Install/Remove change notifications
32 - Trigger updates when an object has changed
34 Can be used between host-objects and the Plug-In or
35 inside the Plug-In to handle internal updates!
38 \ingroup frameworkHostClasses
40 class IUpdateHandler
: public FUnknown
43 //------------------------------------------------------------------------
44 /** Install update notification for given object. It is essential to
45 remove all dependencies again using 'removeDependent'! Dependencies
46 are not removed automatically when the 'object' is released!
47 \param object : interface to object that sends change notifications
48 \param dependent : interface through which the update is passed */
49 virtual tresult PLUGIN_API
addDependent (FUnknown
* object
, IDependent
* dependent
) = 0;
51 /** Remove a previously installed dependency.*/
52 virtual tresult PLUGIN_API
removeDependent (FUnknown
* object
, IDependent
* dependent
) = 0;
54 /** Inform all dependents, that object has changed.
55 \param object is the object that has changed
56 \param message is a value of enum IDependent::ChangeMessage, usually IDependent::kChanged - can be
57 a private message as well (only known to sender and dependent)*/
58 virtual tresult PLUGIN_API
triggerUpdates (FUnknown
* object
, int32 message
) = 0;
60 /** Same as triggerUpdates, but delivered in idle (usefull to collect updates).*/
61 virtual tresult PLUGIN_API
deferUpdates (FUnknown
* object
, int32 message
) = 0;
62 static const FUID iid
;
65 DECLARE_CLASS_IID (IUpdateHandler
, 0xF5246D56, 0x86544d60, 0xB026AFB5, 0x7B697B37)
67 //------------------------------------------------------------------------
68 /** A dependent will get notified about changes of a model.
70 - notify changes of a model
73 \ingroup frameworkHostClasses
75 class IDependent
: public FUnknown
78 //------------------------------------------------------------------------
79 /** Inform the dependent, that the passed FUnknown has changed. */
80 virtual void PLUGIN_API
update (FUnknown
* changedUnknown
, int32 message
) = 0;
89 kStdChangeMessageLast
= kWillDestroy
91 //------------------------------------------------------------------------
92 static const FUID iid
;
95 DECLARE_CLASS_IID (IDependent
, 0xF52B7AAE, 0xDE72416d, 0x8AF18ACE, 0x9DD7BD5E)
97 //------------------------------------------------------------------------
98 } // namespace Steinberg