List Info

Thread: Plugin API Changes - Phase 1




Plugin API Changes - Phase 1
country flaguser name
United States
2007-03-05 13:01:20
Hi,

Phase 1 of the plugin api changes are now in svn.

 From a plugin's perspective, the changes required to
implement the new 
api are as follows:

1) pluginInfo should now use the PLUGININFOEX struct.  This
struct adds 
an extra field for the UUID.  You can generate this uuid
using 
uuidgen.exe (its easiest to set it to the const ... output
format).

Note: If your plugin has a unicode and non-unicode version,
please 
#ifdef 2 separate uuids.  This is extremely important if you
want your 
plugin to work correctly with the next gen file listing.

2) Change your exported function MirandaPluginInfo to 
MirandaPluginInfoEx and make sure it returns a PLUGININFOEX
*.

These are essentially the only changes you need to make in
your plugin. 
  In 0.7, both old style and new style plugins will load
correctly.  The 
uuid changes will not even be used by the core.  However, we
are adding 
these changes now so you can go ahead and transition to the
new system.

Phase 2 will include adding interface support to deprecate
defmod.  I 
plan to add interface support in 0.7 that again will not be
used until 
0.8 is live.  So for plugins written for 0.7 final, a plugin
can support 
defmod and the future interface support.  So if a user
upgrades to 0.8, 
the interface support will automatically kick in without any
changes to 
your plugin.

0.7 will mainly contain support for the external changes
while 0.8 will 
actually implement the new changes.  0.8 will also have a
totally 
rewritten plugin manager that will make use of these changes
as well.

Robert

------------------------------------------------------------
-------------
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 - Phase 1
country flaguser name
Germany
2007-03-06 14:49:56
Hi Robert,

nice step forward. However, a bug slipped through: In
"newpluginapi.h"
you define:

#define DEFINE_MPID(id, a, b, c, d, e, f, g, h, i, j, k) 
const MUUID id##_MPID = {a, b, c, {e, f, g, h, i, j, k}}

#define DEFINE_MIID(iface, a, b, c, d, e, f, g, h, i, j, k)

const MUUID iface##_MIID = {a, b, c, {e, f, g, h, i, j, k}}

but the parameter "d" that gets passed to the
macros isn't included in
the arrays used to initialize the structs. The arrays have
only 7
elements but should have 8. I think the correct version
would be:

#define DEFINE_MPID(id, a, b, c, d, e, f, g, h, i, j, k) 
const MUUID id##_MPID = {a, b, c, {d, e, f, g, h, i, j, k}}

#define DEFINE_MIID(iface, a, b, c, d, e, f, g, h, i, j, k)

const MUUID iface##_MIID = {a, b, c, {d, e, f, g, h, i, j,
k}}

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 - Phase 1
country flaguser name
United States
2007-03-06 15:19:14
Hi,

Yeah, I noticed that as well.  However, I removed those
macros and just 
switched to defines so it shouldn't be an issue anymore.

Martin Afanasjew wrote:
> Hi Robert,
> 
> nice step forward. However, a bug slipped through: In
"newpluginapi.h"
> you define:
> 
> #define DEFINE_MPID(id, a, b, c, d, e, f, g, h, i, j,
k) 
> const MUUID id##_MPID = {a, b, c, {e, f, g, h, i, j,
k}}
> 
> #define DEFINE_MIID(iface, a, b, c, d, e, f, g, h, i,
j, k) 
> const MUUID iface##_MIID = {a, b, c, {e, f, g, h, i, j,
k}}
> 
> but the parameter "d" that gets passed to the
macros isn't included in
> the arrays used to initialize the structs. The arrays
have only 7
> elements but should have 8. I think the correct version
would be:
> 
> #define DEFINE_MPID(id, a, b, c, d, e, f, g, h, i, j,
k) 
> const MUUID id##_MPID = {a, b, c, {d, e, f, g, h, i, j,
k}}
> 
> #define DEFINE_MIID(iface, a, b, c, d, e, f, g, h, i,
j, k) 
> const MUUID iface##_MIID = {a, b, c, {d, e, f, g, h, i,
j, k}}
> 
> 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 - Phase 1
country flaguser name
Germany
2007-03-06 15:23:25
Hi Robert,

another error seems to be in tabSRMM where the choice of a
particular
MUUID is done via "#ifdef __GNUWIN32__" while I
believe it should be
done via "#ifdef _UNICODE" (like in all other
plugins). The attached
patch contains the proposed fix.

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-4]

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