ivsthostapplication.h

Go to the documentation of this file.
00001 //------------------------------------------------------------------------
00002 // Project     : VST SDK
00003 // Version     : 3.0
00004 //
00005 // Category    : Interfaces
00006 // Filename    : ivsthostapplication.h
00007 // Created by  : Steinberg, 04/2006
00008 // Modified    : $Date: 2008/01/09 12:51:44 $
00009 // Description : VST Host Interface
00010 //
00011 //-----------------------------------------------------------------------------
00012 // LICENSE
00013 // © 2008, Steinberg Media Technologies GmbH, All Rights Reserved
00014 //-----------------------------------------------------------------------------
00015 // This Software Development Kit may not be distributed in parts or its entirety  
00016 // without prior written agreement by Steinberg Media Technologies GmbH. 
00017 // This SDK must not be used to re-engineer or manipulate any technology used  
00018 // in any Steinberg or Third-party application or software module, 
00019 // unless permitted by law.
00020 // Neither the name of the Steinberg Media Technologies nor the names of its
00021 // contributors may be used to endorse or promote products derived from this 
00022 // software without specific prior written permission.
00023 // 
00024 // THIS SDK IS PROVIDED BY STEINBERG MEDIA TECHNOLOGIES GMBH "AS IS" AND
00025 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
00026 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00027 // IN NO EVENT SHALL STEINBERG MEDIA TECHNOLOGIES GMBH BE LIABLE FOR ANY DIRECT, 
00028 // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
00029 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
00030 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
00031 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
00032 // OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
00033 // OF THE POSSIBILITY OF SUCH DAMAGE.
00034 //----------------------------------------------------------------------------------
00035 
00036 #ifndef __ivsthostapplication__
00037 #define __ivsthostapplication__
00038 
00039 #include "pluginterfaces/vst/ivstmessage.h"
00040 
00041 //------------------------------------------------------------------------
00042 namespace Steinberg {
00043 namespace Vst {
00044 
00045 //------------------------------------------------------------------------
00046 // IHostApplication Interface
00047 //------------------------------------------------------------------------
00052 class IHostApplication: public FUnknown
00053 {
00054 public:
00055 //------------------------------------------------------------------------      
00057         virtual tresult PLUGIN_API getName (String128 name) = 0;
00058 
00060         virtual tresult PLUGIN_API createInstance (TUID cid, TUID iid, void** obj) = 0;
00061 
00062         //...
00063 //------------------------------------------------------------------------      
00064         static const FUID iid;
00065 };
00066 
00067 DECLARE_CLASS_IID (IHostApplication, 0x58E595CC, 0xDB2D4969, 0x8B6AAF8C, 0x36A664E5)
00068 
00069 //------------------------------------------------------------------------
00070 inline IMessage* allocateMessage (IHostApplication* host)
00071 {
00072         TUID iid;
00073         IMessage::iid.toTUID (iid);
00074         IMessage* m = 0;
00075         if (host->createInstance (iid, iid, (void**)&m) == kResultOk)
00076                 return m;
00077         return 0;
00078 }
00079 
00080 //------------------------------------------------------------------------
00081 } // namespace Vst
00082 } // namespace Steinberg
00083 
00084 #endif // __ivsthostapplication__
Empty

Copyright ©2008 Steinberg Media Technologies. All Rights Reserved.