Profile Negotiation

A profile is a set of data that describe the capabilities of the host and plugin. A profile is negotiated during initialization of the plugin. Either the host or the plugin can call off the loading/running of the plugin when the resulting profile is not to their liking.

A profile contains information about:
- what services are required from the host by the plugin.
- what services are required from the plugin by the host.

Negotiation on the profile information is a two phase process.
At first the host queries the plugin capabilities and can supply preferred alternatives.
Then the plugin queries the host capabilities and services.
Negotiation ends with a final vote on the profile from both the host and plugin.

Once a profile is settled on, it does not change for the lifetime of the plugin.

// each property on the profile has meta data for the supported value range.
public interface IProfile
{
    // profile properties
    // vender / product / version / id information
    // - sample rate
    // Required and optional Services
}

public interface INegotiateProfile
{
    IProfile Negotiate(IProfile proposedProfile);
    bool Vote(IProfile proposedProfile);
}

// implemented by components that need profile information to initialize
public interface IInitializeByProfile
{
    void Initialize(IProfile profile);
}

Last edited Oct 26, 2013 at 6:33 AM by obiwanjacobi, version 11