52 static const FUID iid;
55DECLARE_CLASS_IID (
IPluginBase, 0x22888DDB, 0x156E45AE, 0x8358B348, 0x08190625)
73 kClassesDiscardable = 1 << 0,
77 kLicenseCheck = 1 << 1,
80 kComponentNonDiscardable = 1 << 3,
94 char8 vendor[kNameSize];
96 char8 email[kEmailSize];
99 SMTG_CONSTEXPR14
PFactoryInfo (
const char8* _vendor,
const char8* _url,
const char8* _email,
102 : vendor (), url (), email (), flags ()
105 strncpy8 (vendor, _vendor, kNameSize);
106 strncpy8 (url, _url, kURLSize);
107 strncpy8 (email, _email, kEmailSize);
114 constexpr PFactoryInfo () : vendor (), url (), email (), flags () {}
116 PFactoryInfo () {
memset (
this, 0,
sizeof (PFactoryInfo)); }
127 enum ClassCardinality
129 kManyInstances = 0x7FFFFFFF
152 SMTG_CONSTEXPR14
PClassInfo (
const TUID _cid, int32 _cardinality,
const char8* _category,
159 copyTUID (
cid, _cid);
165 strncpy8 (
category, _category, kCategorySize);
167 strncpy8 (
name, _name, kNameSize);
173 PClassInfo () {
memset (
this, 0,
sizeof (PClassInfo)); }
208 virtual tresult PLUGIN_API
createInstance (FIDString cid, FIDString _iid,
void** obj) = 0;
211 static const FUID iid;
214DECLARE_CLASS_IID (
IPluginFactory, 0x7A4D811C, 0x52114A1F, 0xAED9D2EE, 0x0B43BF9F)
231 char8 category[PClassInfo::kCategorySize];
234 char8 name[PClassInfo::kNameSize];
239 kSubCategoriesSize = 128
246 char8 subCategories[kSubCategoriesSize];
249 char8 vendor[kVendorSize];
252 char8 version[kVersionSize];
255 char8 sdkVersion[kVersionSize];
258 SMTG_CONSTEXPR14
PClassInfo2 (
const TUID _cid, int32 _cardinality,
const char8* _category,
259 const char8* _name, int32 _classFlags,
260 const char8* _subCategories,
const char8* _vendor,
261 const char8* _version,
const char8* _sdkVersion)
275 copyTUID (cid, _cid);
280 cardinality = _cardinality;
282 strncpy8 (category, _category, PClassInfo::kCategorySize);
284 strncpy8 (name, _name, PClassInfo::kNameSize);
285 classFlags =
static_cast<uint32
> (_classFlags);
287 strncpy8 (subCategories, _subCategories, kSubCategoriesSize);
289 strncpy8 (vendor, _vendor, kVendorSize);
291 strncpy8 (version, _version, kVersionSize);
293 strncpy8 (sdkVersion, _sdkVersion, kVersionSize);
309 PClassInfo2 () {
memset (
this, 0,
sizeof (PClassInfo2)); }
328 static const FUID iid;
330DECLARE_CLASS_IID (
IPluginFactory2, 0x0007B650, 0xF24B4C0B, 0xA464EDB9, 0xF00B2ABB)
341 char8 category[PClassInfo::kCategorySize];
342 char16 name[PClassInfo::kNameSize];
347 kSubCategoriesSize = 128
354 char8 subCategories[kSubCategoriesSize];
357 char16 vendor[kVendorSize];
360 char16 version[kVersionSize];
363 char16 sdkVersion[kVersionSize];
366 SMTG_CONSTEXPR14
PClassInfoW (
const TUID _cid, int32 _cardinality,
const char8* _category,
367 const char16* _name, int32 _classFlags,
368 const char8* _subCategories,
const char16* _vendor,
369 const char16* _version,
const char16* _sdkVersion)
383 copyTUID (cid, _cid);
388 cardinality = _cardinality;
390 strncpy8 (category, _category, PClassInfo::kCategorySize);
392 strncpy16 (name, _name, PClassInfo::kNameSize);
393 classFlags =
static_cast<uint32
> (_classFlags);
395 strncpy8 (subCategories, _subCategories, kSubCategoriesSize);
397 strncpy16 (vendor, _vendor, kVendorSize);
399 strncpy16 (version, _version, kVersionSize);
401 strncpy16 (sdkVersion, _sdkVersion, kVersionSize);
417 PClassInfoW () {
memset (
this, 0,
sizeof (PClassInfoW)); }
420 SMTG_CONSTEXPR14
void fromAscii (
const PClassInfo2& ci2)
423 copyTUID (cid, ci2.cid);
425 memcpy (cid, ci2.cid, sizeof (TUID));
427 cardinality = ci2.cardinality;
428 strncpy8 (category, ci2.category, PClassInfo::kCategorySize);
429 str8ToStr16 (name, ci2.name, PClassInfo::kNameSize);
430 classFlags = ci2.classFlags;
431 strncpy8 (subCategories, ci2.subCategories, kSubCategoriesSize);
433 str8ToStr16 (vendor, ci2.vendor, kVendorSize);
434 str8ToStr16 (version, ci2.version, kVersionSize);
435 str8ToStr16 (sdkVersion, ci2.sdkVersion, kVersionSize);
457 static const FUID iid;
459DECLARE_CLASS_IID (
IPluginFactory3, 0x4555A2AB, 0xC1234E57, 0x9B122910, 0x36878931)
464#define LICENCE_UID(l1, l2, l3, l4) \
466 (int8)((l1 & 0xFF000000) >> 24), (int8)((l1 & 0x00FF0000) >> 16), \
467 (int8)((l1 & 0x0000FF00) >> 8), (int8)((l1 & 0x000000FF) ), \
468 (int8)((l2 & 0xFF000000) >> 24), (int8)((l2 & 0x00FF0000) >> 16), \
469 (int8)((l2 & 0x0000FF00) >> 8), (int8)((l2 & 0x000000FF) ), \
470 (int8)((l3 & 0xFF000000) >> 24), (int8)((l3 & 0x00FF0000) >> 16), \
471 (int8)((l3 & 0x0000FF00) >> 8), (int8)((l3 & 0x000000FF) ), \
472 (int8)((l4 & 0xFF000000) >> 24), (int8)((l4 & 0x00FF0000) >> 16), \
473 (int8)((l4 & 0x0000FF00) >> 8), (int8)((l4 & 0x000000FF) ) \
Handling 16 Byte Globally Unique Identifiers.
The basic interface of all interfaces.
Basic interface to a plug-in component: IPluginBase.
virtual tresult PLUGIN_API terminate()=0
This function is called before the plug-in is unloaded and can be used for cleanups.
virtual tresult PLUGIN_API initialize(FUnknown *context)=0
The host passes a number of interfaces as context to initialize the plug-in class.
Version 2 of class factory supporting PClassInfo2: IPluginFactory2.
virtual tresult PLUGIN_API getClassInfo2(int32 index, PClassInfo2 *info)=0
Returns the class info (version 2) for a given index.
Version 3 of class factory supporting PClassInfoW: IPluginFactory3.
virtual tresult PLUGIN_API getClassInfoUnicode(int32 index, PClassInfoW *info)=0
Returns the unicode class info for a given index.
virtual tresult PLUGIN_API setHostContext(FUnknown *context)=0
Receives information about host.
Class factory that any plug-in defines for creating class instances: IPluginFactory.
virtual tresult PLUGIN_API getClassInfo(int32 index, PClassInfo *info)=0
Fill a PClassInfo structure with information about the class at the specified index.
virtual int32 PLUGIN_API countClasses()=0
Returns the number of exported classes by this factory.
virtual tresult PLUGIN_API getFactoryInfo(PFactoryInfo *info)=0
Fill a PFactoryInfo structure with information about the plug-in vendor.
virtual tresult PLUGIN_API createInstance(FIDString cid, FIDString _iid, void **obj)=0
Create a new class instance.
char TUID[16]
plain UID type
SMTG_EXPORT_SYMBOL Steinberg::IPluginFactory *PLUGIN_API GetPluginFactory()
Plug-in entry point.
Version 2 of Basic Information about a class provided by the plug-in.
TUID cid
Class ID 16 Byte class GUID.
uint32 classFlags
flags used for a specific category, must be defined where category is defined
int32 cardinality
Cardinality of the class, set to kManyInstances (see PClassInfo::ClassCardinality)
Unicode Version of Basic Information about a class provided by the plug-in.
uint32 classFlags
flags used for a specific category, must be defined where category is defined
int32 cardinality
see PClassInfo
Basic Information about a class provided by the plug-in.
int32 cardinality
Cardinality of the class, set to kManyInstances (see PClassInfo::ClassCardinality)
TUID cid
Class ID 16 Byte class GUID.
char8 category[kCategorySize]
Class category, host uses this to categorize interfaces.
char8 name[kNameSize]
Class name, visible to the user.
Basic Information about the class factory of the plug-in.
int32 flags
(see FactoryFlags above)