这篇教程C++ CFPlugInAddInstanceForFactory函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CFPlugInAddInstanceForFactory函数的典型用法代码示例。如果您正苦于以下问题:C++ CFPlugInAddInstanceForFactory函数的具体用法?C++ CFPlugInAddInstanceForFactory怎么用?C++ CFPlugInAddInstanceForFactory使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CFPlugInAddInstanceForFactory函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: HP_ObjectHP_HardwarePlugIn::HP_HardwarePlugIn(CFUUIDRef inFactoryUUID): HP_Object(kAudioObjectUnknown, kAudioPlugInClassID, this), mInterface(&sInterface), mFactoryUUID((CFUUIDRef)CFRetain(inFactoryUUID)), mRefCount(0){ CFPlugInAddInstanceForFactory(inFactoryUUID);}
开发者ID:abscura,项目名称:audiounitjs,代码行数:9,
示例2: CFRetainvoid IOHIDIUnknown::factoryAddRef(){ if (0 == factoryRefCount++) { CFUUIDRef factoryId = kIOHIDDeviceFactoryID; CFRetain(factoryId); CFPlugInAddInstanceForFactory(factoryId); }}
开发者ID:MomandDad,项目名称:netbook-installer,代码行数:9,
示例3: CFRetainvoidSATSMARTClient::sFactoryAddRef ( void ){ if ( sFactoryRefCount++ == 0 ) { CFUUIDRef factoryID = kIOATASMARTLibFactoryID; CFRetain ( factoryID ); CFPlugInAddInstanceForFactory ( factoryID ); }}
开发者ID:eitschpi,项目名称:OS-X-SAT-SMART-Driver,代码行数:15,
示例4: AllocMetadataImporterPluginTypeMetadataImporterPluginType *AllocMetadataImporterPluginType (CFUUIDRef inFactoryID){ MetadataImporterPluginType *newInstance = (MetadataImporterPluginType *) malloc (sizeof (MetadataImporterPluginType)); memset (newInstance, 0, sizeof (MetadataImporterPluginType)); newInstance->conduitInterface = &testInterfaceFunctionTable; // Retain and keep an open instance refcount for each factory. newInstance->factoryID = CFRetain (inFactoryID); CFPlugInAddInstanceForFactory (inFactoryID); // This function returns the IUnknown interface so set the refCount to one. newInstance->refCount = 1; return newInstance;}
开发者ID:stesla,项目名称:koan,代码行数:16,
示例5: memset// -----------------------------------------------------------------------------// AllocMetadataImporterPluginType// -----------------------------------------------------------------------------// Utility function that allocates a new instance.// You can do some initial setup for the importer here if you wish// like allocating globals etc...//MetadataImporterPluginType *AllocMetadataImporterPluginType(CFUUIDRef inFactoryID){ MetadataImporterPluginType *theNewInstance; theNewInstance = (MetadataImporterPluginType *)malloc(sizeof(MetadataImporterPluginType)); memset(theNewInstance,0,sizeof(MetadataImporterPluginType)); /* Point to the function table */ theNewInstance->conduitInterface = &testInterfaceFtbl; /* Retain and keep an open instance refcount for each factory. */ theNewInstance->factoryID = CFRetain(inFactoryID); CFPlugInAddInstanceForFactory(inFactoryID); /* This function returns the IUnknown interface so set the refCount to one. */ theNewInstance->refCount = 1; return theNewInstance;}
开发者ID:JackieXie168,项目名称:xar,代码行数:25,
示例6: CFPlugInAddInstanceForFactorystatic CFPlugType *_allocCFPlugType(CFUUIDRef factoryID){ // Allocate memory for the new instance. CFPlugType *newOne = (CFPlugType *)malloc(sizeof(CFPlugType)); // Point to the function table newOne->_PPROCFPlugFormat = &CFPlugFormat; // Retain and keep an open instance refcount for each factory. if (factoryID) { newOne->_factoryID = (CFUUIDRef)CFRetain(factoryID); CFPlugInAddInstanceForFactory(factoryID); } // This function returns the IUnknown interface so set the refCount to one. newOne->_refCount = 1; return newOne;}
开发者ID:iSound,项目名称:PlayerPRO,代码行数:19,
示例7: _sessionInterface//------------------------------------------------------------------------------// IOHIDEventSystemStatistics::IOHIDEventSystemStatistics//------------------------------------------------------------------------------IOHIDEventSystemStatistics::IOHIDEventSystemStatistics(CFUUIDRef factoryID):_sessionInterface(&sIOHIDEventSystemStatisticsFtbl),_factoryID( static_cast<CFUUIDRef>( CFRetain(factoryID) ) ),_refCount(1),_displayState(1),_displayToken(0),_pending_source(0),_dispatch_queue(0),_last_motionstat_ts(0),_logButtonFiltering(false),_logStrings(NULL),_logfd(-1),_asl(NULL){ bzero(&_pending_buttons, sizeof(_pending_buttons)); bzero(&_pending_motionstats, sizeof(_pending_motionstats)); CFPlugInAddInstanceForFactory( factoryID );}
开发者ID:wzw19890321,项目名称:IOHIDFamily,代码行数:22,
示例8: printf // Utility function that allocates a new instance. static MyType *_allocMyType(CFUUIDRef factoryID) {#if PRINTDEBUG printf("JAS: _allocMyType/n");#endif // Allocate memory for the new instance. MyType *newOne = (MyType *)malloc( sizeof(MyType) ); // Point to the function table newOne->_testInterface = &testInterfaceFtbl; // Retain and keep an open instance refcount // for each factory. newOne->_factoryID = (CFUUIDRef)CFRetain( factoryID ); CFPlugInAddInstanceForFactory( factoryID ); // This function returns the IUnknown interface // so set the refCount to one. newOne->_refCount = 1; return newOne; }
开发者ID:briancline,项目名称:jackosx,代码行数:22,
示例9: Alloc/****************************************************************************** Alloc* -* Functionas as both +[alloc] and -[init] for the plugin. Add any* initalization of member variables here.*****************************************************************************/static BonjourUserEventsPlugin* Alloc(CFUUIDRef factoryID){ BonjourUserEventsPlugin* plugin = malloc(sizeof(BonjourUserEventsPlugin)); plugin->_UserEventAgentInterface = &UserEventAgentInterfaceFtbl; plugin->_pluginContext = NULL; if (factoryID) { plugin->_factoryID = (CFUUIDRef)CFRetain(factoryID); CFPlugInAddInstanceForFactory(factoryID); } plugin->_refCount = 1; plugin->_tokenToBrowserMap = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kNetBrowserInfoDictionaryValueCallbacks); plugin->_browsers = CFDictionaryCreateMutable(NULL, 0, &kNetBrowserInfoDictionaryKeyCallbacks, &kCFTypeDictionaryValueCallBacks); plugin->_onAddEvents = CFDictionaryCreateMutable(NULL, 0, &kNetBrowserInfoDictionaryKeyCallbacks, &kCFTypeDictionaryValueCallBacks); plugin->_onRemoveEvents = CFDictionaryCreateMutable(NULL, 0, &kNetBrowserInfoDictionaryKeyCallbacks, &kCFTypeDictionaryValueCallBacks); return plugin;}
开发者ID:thenewwazoo,项目名称:Community-mdnsResponder,代码行数:27,
示例10: AllocSampleCMPluginType// -----------------------------------------------------------------------------// AllocSampleCMPluginType// -----------------------------------------------------------------------------// Utility function that allocates a new instance.//static SampleCMPluginType* AllocSampleCMPluginType( CFUUIDRef inFactoryID ){ // Allocate memory for the new instance. SampleCMPluginType *theNewInstance; theNewInstance = ( SampleCMPluginType* ) malloc( sizeof( SampleCMPluginType ) ); // Point to the function table theNewInstance->cmInterface = &testInterfaceFtbl; // Retain and keep an open instance refcount< // for each factory. theNewInstance->factoryID = CFRetain( inFactoryID ); CFPlugInAddInstanceForFactory( inFactoryID ); // This function returns the IUnknown interface // so set the refCount to one. theNewInstance->refCount = 1; return theNewInstance;}
开发者ID:arnelh,项目名称:Examples,代码行数:27,
示例11: PrintDialogPDEPluginFactory/* ============================================================================= Name: PrintDialogPDEPluginFactory() Description: This is the factory function which should be the only entry point of this plugin. This factory function creates the "base class" for the system. The factory functions name (ie "PrintDialogPDEPluginFactory") needs to be listed in the Info.plist to associate the factory function name with the factory function UUID. For example, this is how this function is associated with the UUID in the Info.plist file. CFPlugInFactories = { "DFC01D58-0C4A-11D5-BB77-003065500EB8" = "PrintDialogPDEPluginFactory"; }; Input Parameters: allocator - the allocator function used by CoreFoundation reqTypeID - requested instance type. Output Parameters: None. Return Value: * ========================================================================== */void* PrintDialogPDEPluginFactory( CFAllocatorRef allocator, CFUUIDRef reqTypeID ){ CFUUIDRef myInstID; IUnknownInstance* instance = NULL; // There is not much we can do with errors - just return NULL. myInstID = CFUUIDCreateFromString(kCFAllocatorDefault, kAppPrintDialogTypeIDStr); // If the requested type matches our plugin type (it should!) // have a plugin instance created which will query us for // interfaces: if (myInstID && CFEqual(reqTypeID, myInstID)) { CFUUIDRef myFactoryID = CFUUIDCreateFromString(kCFAllocatorDefault, kPrintDialogPDEIntfFactoryIDStr); if(myFactoryID) { // allocate and clear our instance structure instance = (IUnknownInstance*) calloc(1, sizeof(IUnknownInstance)); if (instance != NULL) { // Assign all members: instance->vtable = &instance->vtableStorage; instance->vtableStorage.QueryInterface = IUnknownQueryInterface; instance->vtableStorage.AddRef = IUnknownAddRef; instance->vtableStorage.Release = IUnknownRelease; instance->factoryID = myFactoryID; instance->refCount = 1; // Register the newly created instance CFPlugInAddInstanceForFactory(myFactoryID); } } } if(myInstID) CFRelease(myInstID); return ((void*) instance);}
开发者ID:fruitsamples,项目名称:App,代码行数:66,
注:本文中的CFPlugInAddInstanceForFactory函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CFPlugInRemoveInstanceForFactory函数代码示例 C++ CFNumberGetValue函数代码示例 |