fix for windows plugin system

uses call back to expose the retroshare interface to plugins



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4633 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2011-10-08 17:47:36 +00:00
parent 2173ee0d2e
commit c1af9b13ad
14 changed files with 179 additions and 52 deletions

View file

@ -29,6 +29,8 @@
#include <stdint.h>
#include <string>
#include <vector>
#include "retroshare/rspeers.h"
#include "retroshare/rsfiles.h"
class RsPluginHandler ;
extern RsPluginHandler *rsPlugins ;
@ -52,6 +54,23 @@ class pqiService ;
#define PLUGIN_STATUS_NULL_PLUGIN 0x0004
#define PLUGIN_STATUS_LOADED 0x0005
class RsPluginHandler;
/*!
*
* convenience class to store gui interfaces
*
*/
class RsPlugInInterfaces {
public:
RsPlugInInterfaces() { mPeers = NULL; mFiles = NULL; }
RsPeers* mPeers;
RsFiles* mFiles;
};
class RsPlugin
{
public:
@ -67,6 +86,8 @@ class RsPlugin
virtual std::string getShortPluginDescription() const = 0 ;
virtual std::string getPluginName() const = 0 ;
virtual void getPluginVersion(int& major,int& minor,int& svn_rev) const = 0 ;
virtual void setPlugInHandler(RsPluginHandler* pgHandler) = 0;
virtual void setInterfaces(RsPlugInInterfaces& interfaces) = 0;
};
class RsPluginHandler