view libpurple/plugins/perl/perl-handlers.h @ 16583:ce049678a67b

soname versioning of libpurple. Should help resolve debian bug 421282 All version control is within configure.ac now Adjust the define for purple_version_suffix as appropriate: [devel] - normal development periods [betaN] - for beta releases [] - for releases Follow the instructions in configure.ac to set the version number depending on how the API has changed (ie. following our normal version numbering!) version.h is auto-generated now Added purple_version_check(), purple_major_version, purple_minor_version, & purple_micro_version for run-time version comparisons in addition to the existing compile time macros. libpurple Plugins moved again, this time to: $(libdir)/purple-$PURPLE_MAJOR_VERSION This will allow parallel installations of different major libpurple versions in the future should someone wish to.
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 28 Apr 2007 16:55:31 +0000
parents 32c366eeeb99
children 870a580e8fde
line wrap: on
line source

#ifndef _PURPLE_PERL_HANDLERS_H_
#define _PURPLE_PERL_HANDLERS_H_

#include "cmds.h"
#include "plugin.h"
#include "prefs.h"
#include "pluginpref.h"
#ifdef PURPLE_GTKPERL
#include "gtkplugin.h"
#include "gtkutils.h"
#endif

typedef struct
{
	PurpleCmdId id;
	SV *callback;
	SV *data;
	char *prpl_id;
	char *cmd;
	PurplePlugin *plugin;
} PurplePerlCmdHandler;

typedef struct
{
	SV *callback;
	SV *data;
	PurplePlugin *plugin;
	int iotag;

} PurplePerlTimeoutHandler;

typedef struct
{
	char *signal;
	SV *callback;
	SV *data;
	void *instance;
	PurplePlugin *plugin;

} PurplePerlSignalHandler;

void purple_perl_plugin_action_cb(PurplePluginAction * gpa);
GList *purple_perl_plugin_actions(PurplePlugin *plugin, gpointer context); 

PurplePluginPrefFrame *purple_perl_get_plugin_frame(PurplePlugin *plugin);

#ifdef PURPLE_GTKPERL
GtkWidget *purple_perl_gtk_get_plugin_frame(PurplePlugin *plugin);
#endif

void purple_perl_timeout_add(PurplePlugin *plugin, int seconds, SV *callback,
                           SV *data);
void purple_perl_timeout_clear_for_plugin(PurplePlugin *plugin);
void purple_perl_timeout_clear(void);

void purple_perl_signal_connect(PurplePlugin *plugin, void *instance,
                              const char *signal, SV *callback,
                              SV *data, int priority);
void purple_perl_signal_disconnect(PurplePlugin *plugin, void *instance,
                                 const char *signal);
void purple_perl_signal_clear_for_plugin(PurplePlugin *plugin);
void purple_perl_signal_clear(void);

PurpleCmdId purple_perl_cmd_register(PurplePlugin *plugin, const gchar *cmd,
                                 const gchar *args, PurpleCmdPriority priority,
                                 PurpleCmdFlag flag, const gchar *prpl_id,
                                 SV *callback, const gchar *helpstr, SV *data);
void purple_perl_cmd_unregister(PurpleCmdId id);
void purple_perl_cmd_clear_for_plugin(PurplePlugin *plugin);

#endif /* _PURPLE_PERL_HANDLERS_H_ */