List Info

Thread: Plugin API Changes - SVN Commit 5041




Plugin API Changes - SVN Commit 5041
country flaguser name
Germany
2007-03-06 15:45:55
Hi,

if I understand correctly, the logic with SVN commit 5041 is
that the
MirandaPluginInfoEx function will only be used if the plugin
has a valid
MirandaPluginInterfaces function _and_ returns at least one
interface
not equal to MIID_LAST.

I don't think that's reasonable because there are plugins
that offer
only end-user functionality but no interfaces that can be
used by other
plugins. They probably register services only to be able to
handle menu
items (and even this might be optional).

So I think the module loading code should still look at
InfoEx even if
there are no interfaces. I know, this is still optional, but
we might
stumble later on and maybe fall.

The particular line of code I'm talking about (in
newplugins.c) is:

if ( pi &&
((bpi->Info&&pi->cbSize==sizeof(PLUGININFO))||
(bpi->InfoEx&&pi->cbSize==sizeof(PLUGININFOEX)
&&validInterfaceList(bpi->Interfaces)))

Maybe I'm only confused...

Regards,
Martin (aka SloMo)

------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Miranda-Develop mailing list
Miranda-Developlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/miranda
-develop

Re: Plugin API Changes - SVN Commit 5041
country flaguser name
United States
2007-03-06 16:33:30
Hi,

I should be more clear about the intention of the latest
changes. 
MirandaPluginInterfaces and MirandaPluginInfoEx will always
be required 
in 0.8.  In the current trunk, if you use the new
MirandaPluginInfoEx 
you *must* use the MirandaPluginInterfaces function.

It may sound unreasonable at first glance, but requiring a
plugin define 
at least 1 interface is very important.  There is no
requirement that a 
plugin use a predefined interface id.  However, without
requiring a 
interface id, it causes several issues:
1) There's no way to create a mod of the plugin should the
original 
author stop developing the plugin.  Sure you can create a
mod, but it 
will not play nice in the options (it will not disable the
original 
plugin when enabling the new one).
2) There's no way to disable a class of plugins in the core
without 
disabling it by plugin id if plugins don't provide a valid
interface id. 
  While both methods of disabling plugins (by plugin id and
by interface 
id) will be available, there may be situations where we
change some apis 
and need to disable a whole class of plugins.  If we didn't
require a 
interface id, this wouldn't be possible.

So, the short of it is that a plugin should generate a new
interface id 
if there is no official one.  We will use newpluginapi.h to
maintain a 
list of common interfaces (even ones outside of the core).

Rob

Martin Afanasjew wrote:
> Hi,
> 
> if I understand correctly, the logic with SVN commit
5041 is that the
> MirandaPluginInfoEx function will only be used if the
plugin has a valid
> MirandaPluginInterfaces function _and_ returns at least
one interface
> not equal to MIID_LAST.
> 
> I don't think that's reasonable because there are
plugins that offer
> only end-user functionality but no interfaces that can
be used by other
> plugins. They probably register services only to be
able to handle menu
> items (and even this might be optional).
> 
> So I think the module loading code should still look at
InfoEx even if
> there are no interfaces. I know, this is still
optional, but we might
> stumble later on and maybe fall.
> 
> The particular line of code I'm talking about (in
newplugins.c) is:
> 
> if ( pi &&
>
((bpi->Info&&pi->cbSize==sizeof(PLUGININFO))||
(bpi->InfoEx&&pi->cbSize==sizeof(PLUGININFOEX)
&&validInterfaceList(bpi->Interfaces)))
> 
> Maybe I'm only confused...
> 
> Regards,
> Martin (aka SloMo)
> 
>
------------------------------------------------------------
-------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the
chance to share your
> opinions on IT & business topics through brief
surveys-and earn cash
> http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Miranda-Develop mailing list
> Miranda-Developlists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/miranda
-develop
> 


------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Miranda-Develop mailing list
Miranda-Developlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/miranda
-develop

Re: Plugin API Changes - SVN Commit 5041
country flaguser name
Germany
2007-03-06 18:36:35
Hi Robert,

it make sense now that you explained it. Thank you.

Regards,
Martin (aka SloMo)


On 06.03.2007 23:33, Robert Rainwater wrote:
> Hi,
> 
> I should be more clear about the intention of the
latest changes. 
> MirandaPluginInterfaces and MirandaPluginInfoEx will
always be required 
> in 0.8.  In the current trunk, if you use the new
MirandaPluginInfoEx 
> you *must* use the MirandaPluginInterfaces function.
> 
> It may sound unreasonable at first glance, but
requiring a plugin define 
> at least 1 interface is very important.  There is no
requirement that a 
> plugin use a predefined interface id.  However, without
requiring a 
> interface id, it causes several issues:
> 1) There's no way to create a mod of the plugin should
the original 
> author stop developing the plugin.  Sure you can create
a mod, but it 
> will not play nice in the options (it will not disable
the original 
> plugin when enabling the new one).
> 2) There's no way to disable a class of plugins in the
core without 
> disabling it by plugin id if plugins don't provide a
valid interface id. 
>   While both methods of disabling plugins (by plugin id
and by interface 
> id) will be available, there may be situations where we
change some apis 
> and need to disable a whole class of plugins.  If we
didn't require a 
> interface id, this wouldn't be possible.
> 
> So, the short of it is that a plugin should generate a
new interface id 
> if there is no official one.  We will use
newpluginapi.h to maintain a 
> list of common interfaces (even ones outside of the
core).
> 
> Rob
> 
> Martin Afanasjew wrote:
>> Hi,
>>
>> if I understand correctly, the logic with SVN
commit 5041 is that the
>> MirandaPluginInfoEx function will only be used if
the plugin has a valid
>> MirandaPluginInterfaces function _and_ returns at
least one interface
>> not equal to MIID_LAST.
>>
>> I don't think that's reasonable because there are
plugins that offer
>> only end-user functionality but no interfaces that
can be used by other
>> plugins. They probably register services only to be
able to handle menu
>> items (and even this might be optional).
>>
>> So I think the module loading code should still
look at InfoEx even if
>> there are no interfaces. I know, this is still
optional, but we might
>> stumble later on and maybe fall.
>>
>> The particular line of code I'm talking about (in
newplugins.c) is:
>>
>> if ( pi &&
>>
((bpi->Info&&pi->cbSize==sizeof(PLUGININFO))||
(bpi->InfoEx&&pi->cbSize==sizeof(PLUGININFOEX)
&&validInterfaceList(bpi->Interfaces)))
>>
>> Maybe I'm only confused...
>>
>> Regards,
>> Martin (aka SloMo)


------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Miranda-Develop mailing list
Miranda-Developlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/miranda
-develop

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )