[gmpi] another convention opinion
- From: Tim Hockin <thockin@xxxxxxxxxx>
- To: GMPI list <gmpi@xxxxxxxxxxxxx>
- Date: Sun, 6 Mar 2005 19:43:57 -0800
There are really 2 SDKs being cleaned up - the host SDK and the plugin
SDK.
The host and plugin have slightly different views of everything.
Examples:
In the plugin code, a plugin-specific object is created. That object
inherits from the GMPI standard "IGMPI_Plugin". The plugin code can use
it as it's own structure, and then pass it to the host. The host,
however, can only use the API-specified parts of it.
So what I have been playing with is this:
In the plugin's point-of-view:
We have a native Plugin class which I can subclass. I write real C++
methods. The host will call the C interface. The base class provides
the C interface, which is a bunch of stub routines to redirect to the
real C++ methods. As a Plugin developer, I never have to worry about
that. I write C++.
class GMPI_Plugin : public IGMPI_Plugin
{
/* my plugin stuff here */
}
In the host's point-of-view:
We have a native Plugin class which I can subclass. I write real C++
methods and call real C++ methods. The plugin expects us to call the
C interface. The base class provides real C++ methods which call the C
interface. As a Host developer, I never have to worry about that. I
write C++.
class GMPI_Plugin
{
IGMPI_Plugin *m_interface;
/* my host stuff here */
}
Get the model? This allows the C/C++ boundary to be clean and clear.
Does this sound right?
So here's the question I have. I am immediately uncomfortable having a
GMPI_Plugin object defined in the host and defined in the plugin, but
different. It might lead to confusion.
Is this a justifiable concern?
As a temporary solution, I've renamed the host's view to
GMPI_PluginInterface. But I hate it. I'd rather have it be GMPI_Plugin.
I just want opinions.
The headers can be split so that it's clear:
<gmpi/host/plugin.h>
vs
<gmpi/plugin/plugin.h>
Or should I stick to PluginInterface or PluginIntf or PluginWrap?
Tim
----------------------------------------------------------------------
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:
- » [gmpi] another convention opinion