I have written a test addon (a non-instancing little hello world app) for Node.JS, and I am now playing around with plugin-able addons. I am currently trying to create a addon that can access the hello world addon's functions, as well as the hello world calling the plugin host addon with a registration of presence.
As of yet, the only way I can determine so far is for a .js file to require both addons, then a call to the Hello World addon for the registration, then the plugin-host call. So, in short the coding would look like:
var host = require('./pluginHost');
host.registerPlugin(require('./helloWorldPlugin').plugin());
host.registerPlugin(require('./fooBarBazPlugin').plugin());
host.registrationComplete();
In actuality, there might be a bit more configuration code, but this is more of a concept at the moment. So, given the code above, withing the pluginHost
addon code, how could I access & download information from that object. Bare in mind, the plugin part of the code that is being parsed to the pluginHost
would be a static collection of functions that would contain information about the other objects and classes available as well as a mainline IPC between the pluginHost
and other plugins
.
Righto, discovered how to do it
C++:
With this example, by calling
host.registerPlugin(require('./pluginObject'))
will allow thepluginHost
library to interface with it, and include it for other systems.