Fix last commit
[carla.git] / source / includes / vst3sdk / pluginterfaces / base / iupdatehandler.h
blob08f38dd27432ef3d2133e86618318f61832aff6c
1 //------------------------------------------------------------------------
2 // Project : Steinberg Module Architecture SDK
3 //
4 // Category : Basic Host Service Interfaces
5 // Filename : pluginterfaces/base/iupdatehandler.h
6 // Created by : Steinberg, 01/2004
7 // Description : Update handling
8 //
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 //-----------------------------------------------------------------------------
17 #pragma once
19 #include "pluginterfaces/base/funknown.h"
21 namespace Steinberg {
23 class IDependent;
25 //------------------------------------------------------------------------
26 /** Host implements dependency handling for plugins.
27 - [host imp]
28 - [get this interface from IHostClasses]
29 - [released N3.1]
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!
37 \see IDependent
38 \ingroup frameworkHostClasses
40 class IUpdateHandler: public FUnknown
42 public:
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.
69 [plug imp]
70 - notify changes of a model
72 \see IUpdateHandler
73 \ingroup frameworkHostClasses
75 class IDependent: public FUnknown
77 public:
78 //------------------------------------------------------------------------
79 /** Inform the dependent, that the passed FUnknown has changed. */
80 virtual void PLUGIN_API update (FUnknown* changedUnknown, int32 message) = 0;
82 enum ChangeMessage
84 kWillChange,
85 kChanged,
86 kDestroyed,
87 kWillDestroy,
89 kStdChangeMessageLast = kWillDestroy
91 //------------------------------------------------------------------------
92 static const FUID iid;
95 DECLARE_CLASS_IID (IDependent, 0xF52B7AAE, 0xDE72416d, 0x8AF18ACE, 0x9DD7BD5E)
97 //------------------------------------------------------------------------
98 } // namespace Steinberg