I. What you can and can't do?
Those of you who know how ApexDC source code is laid out know that it has two basic parts core and gui and out of these two plugins work mostly in the core part... so no you can't create that sidebar you always wanted in apex as a plugin. However, you can do a lot on the core side as well. Here are some simple ideas that could be created as a plugin:
- More of those lovely client side chat commands, such as /winamp or /define (even to the extent of user editable list)
- Answering machine (for PM's)
- Chat/PM filtering
- Primitive hub link
- Cross hub announcer (useful for hub networks)
Plugins should be created as C++ dll files which implement a class derived from PluginStructure and export the following functions:
Code: Select all
double __cdecl getVer(); // Must return API version, which is defined as API_VER in the PluginStructure.h char* __cdecl getGuid(); // Must return unique GUID/UUID for plugin (project specific, use guidgen.exe or guidgen.com) PluginStructure* __cdecl getObject(); // Creates plugin interface void __cdecl freeObject(); // Frees the instance created by getObject()
III. PluginStructure.h what, where, how?
PluginStructure.h (located in client folder of the source distribution) is the file which defines all of the classes that are passed back and forth plugins and ApexDC... or to be more specific their interfaces, which are like skeletons that usually consists purely virtual function declarations. To put it short and simple, you do not edit this file at all even though it is the one file which makes your dll file ApexDC plugin.
Although this file is strictly read-only for plugin developers they should read it through to get a good picture about what tools the have to interact with ApexDC and what functions ApexDC calls and when. The file is well commented so it should be relatively easy to understand what everything does.
Here is a quick overview of the classes defined in this file, and their purpose:
PluginCallBackInterface: Functions that plugins can call to interact with ApexDC++, see PluginStructure::getCallBack()
UserInterface: Provides functions to get information and interact with a user.
ClientInterface: Provides functions to get information and interact with a hub.
ConnectionInterface: Provides functions to get information and interact with a client<->client connection
PluginStructure: Plugin base class, provides functions which are called by ApexDC when certain event occurs.
IV. Important Notes
Setup used to compile plugin has same requirements as compiling ApexDC++ itself.
Plugins are automatically licensed under GNU General Public License (or GPL). Why? Because to successfully create a plugin you need a file which is part of ApexDC, and which thus is under GNU GPL and as long as your project uses GPL'ed code it is automatically required to be licensed under GPL or you have violated the licensing terms which apply to the part of code which is under GPL license.