[gmpi] Metadata interface

On querying metadata:

Do you pass a pointer to a struct which gets "filled in" by the DLL?

Do you pass a pointer pointer and let the DLL allcoate a struct?

Do you have a COM interface, which has methods for returning data?

I'm thinking the first, but I guess it isn't very COM-ish.



struct GMPI_Descriptor {
        /*
         * The Guid field uniquely identifies a plugin.  When saving
         * state, the host should identify plugins by their Guid and
         * VerCode.  This allows project data to be moved between GMPI
         * installations without losing track of plugins.
         */
        GMPI_Guid Guid;

        /*
         * The ApiVersions field is a pointer to an array of
         * GMPI_API_VERSION codes that this plugin supports.  Hosts must
         * select one of the api_versions to communicate with the plugin.
         * This array is terminated by a zero entry.
         */
        uint32_t* ApiVersions;

        /*
         * The VerCode field is an encoded 'major.minor.micro' tuple, like
         * GMPI_API_VERSION.  Hosts should use this only to compare
         * versions of a given plugin.
         */
        uint32_t VerCode;               /* eg: GMPI_MKVERSION(3,14,15) */

        /*
         * These are display-friendly fields, which hosts can display to
         * users.  If a plugin is localized, these strings should be
         * translated.
         */
        const char* Name;               /* eg: "Foo Bar Plugin" */
        const char* Version;            /* eg: "version 3.14.15" */
        const char* Author;             /* eg: "Foo Corporation" */
        const char* Copyright;          /* eg: "copyright 2005, Foo Corp." */
        const char* Notes;              /* eg: about box info */

        /*
         * These fields contain universal resource indicators (URIs) for
         * accessing more data.
         */
        const char* Home;               /* eg: "http://foo.example.com"; */
        const char* Docs;               /* eg: "http://foo.example.com/docs"; */

        //license?
        //category? (compressor, EQ, etc)  as an enum?
        //icons? these can just be label-small/med/large.png
        //channels/params,etc
};

// In the factory interface..
/*
 * This is how hosts learn about plugins. The host calls this function with
 * a series of index values starting at 0.  The function will return a
 * GMPI_descriptor for each plugin in the file.
 */
GMPI_Result GMPI_GetDescriptor(IGMPI_Factory* factory, int index,
                GMPI_Descriptor** desc);

----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules:  Please stay on topic.  You are responsible for your own
words.  Please respect your fellow subscribers.  Please do not
redistribute anyone else's words without their permission.

Archive: http://www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: