CFPlugIn

Overview

CFPlugIn provides a standard architecture for application extensions. With CFPlugIn, you can design your application as a host framework that uses a set of executable code modules called plug-ins to provide certain well-defined areas of functionality. This approach allows third-party developers to add features to your application without requiring access to your source code. You can also bundle together plug-ins for multiple platforms and let CFPlugIn transparently load the appropriate plug-in at runtime. You can use CFPlugIn to add plug-in capability to, or write a plug-in for, your application.

Topics

Creating Plug-ins

CFPlugInCreate

Creates a CFPlugIn given its URL.

CFPlugInInstanceCreate

Creates a CFPlugIn instance of a given type using a given factory.

Registration

CFPlugInRegisterFactoryFunction

Registers a factory function and its UUID with a CFPlugIn object.

CFPlugInRegisterFactoryFunctionByName

Registers a factory function with a CFPlugIn object using the function's name instead of its UUID.

CFPlugInRegisterPlugInType

Registers a type and its corresponding factory function with a CFPlugIn object.

CFPlugInUnregisterFactory

Removes the given function from a plug-in’s list of registered factory functions.

CFPlugInUnregisterPlugInType

Removes the given type from a plug-in’s list of registered types.

CFPlugIn Miscellaneous Functions

CFPlugInAddInstanceForFactory

Registers a new instance of a type with CFPlugIn.

CFPlugInFindFactoriesForPlugInType

Searches all registered plug-ins for factory functions capable of creating an instance of the given type.

CFPlugInFindFactoriesForPlugInTypeInPlugIn

Searches the given plug-in for factory functions capable of creating an instance of the given type.

CFPlugInGetBundle

Returns a plug-in's bundle.

CFPlugInGetTypeID

Returns the type identifier for the CFPlugIn opaque type.

CFPlugInIsLoadOnDemand

Determines whether or not a plug-in is loaded on demand.

CFPlugInRemoveInstanceForFactory

Unregisters an instance of a type with CFPlugIn.

CFPlugInSetLoadOnDemand

Enables or disables load on demand for plug-ins that do dynamic registration (only when a client requests an instance of a supported type).

Callbacks

CFPlugInDynamicRegisterFunction

A callback which provides a plug-in the opportunity to dynamically register its types with a host.

CFPlugInFactoryFunction

Callback function that a plug-in author must implement to create a plug-in instance.

CFPlugInUnloadFunction

Callback function that is called, if present, just before a plug-in's code is unloaded.

Data Types

CFPlugInRef

A reference to a CFPlugin object.

Constants

Information Property List Keys

A plug-in’s information property list can contain these keys used for registering types, factories, and interfaces.

See Also

Opaque Types

CFFileDescriptor

The CFFileDescriptor provides an opaque type to monitor file descriptors for read and write activity via CFRunLoop.

CFStringTokenizer

CFStringTokenizer allows you to tokenize strings into words, sentences or paragraphs in a language-neutral way. It supports languages such as Japanese and Chinese that do not delimit words by spaces, as well as de-compounding German compounds. You can obtain Latin transcription for tokens. It also provides language identification API.