1 #include "module.h" 2 3 MODULE = Purple::Plugin PACKAGE = Purple::Plugin PREFIX = purple_plugin_ 4 PROTOTYPES: ENABLE 5 6 BOOT: 7 { 8 HV *stash = gv_stashpv("Purple::Plugin::Type", 1); 9 10 static const constiv *civ, const_iv[] = { 11 #define const_iv(name) {#name, (IV)PURPLE_PLUGIN_##name} 12 const_iv(UNKNOWN), 13 const_iv(STANDARD), 14 const_iv(LOADER), 15 const_iv(PROTOCOL), 16 }; 17 18 for (civ = const_iv + sizeof(const_iv) / sizeof(const_iv[0]); civ-- > const_iv; ) 19 newCONSTSUB(stash, (char *)civ->name, newSViv(civ->iv)); 20 } 21 22 Purple::Plugin 23 purple_plugin_new(native, path) 24 gboolean native 25 const char *path 26 27 Purple::Plugin 28 purple_plugin_probe(filename) 29 const char *filename 30 31 gboolean 32 purple_plugin_register(plugin) 33 Purple::Plugin plugin 34 35 gboolean 36 purple_plugin_load(plugin) 37 Purple::Plugin plugin 38 39 gboolean 40 purple_plugin_unload(plugin) 41 Purple::Plugin plugin 42 43 gboolean 44 purple_plugin_reload(plugin) 45 Purple::Plugin plugin 46 47 void 48 purple_plugin_destroy(plugin) 49 Purple::Plugin plugin 50 51 gboolean 52 purple_plugin_is_loaded(plugin) 53 Purple::Plugin plugin 54 55 gboolean 56 purple_plugin_is_unloadable(plugin) 57 Purple::Plugin plugin 58 59 const gchar * 60 purple_plugin_get_id(plugin) 61 Purple::Plugin plugin 62 63 const gchar * 64 purple_plugin_get_name(plugin) 65 Purple::Plugin plugin 66 67 const gchar * 68 purple_plugin_get_version(plugin) 69 Purple::Plugin plugin 70 71 const gchar * 72 purple_plugin_get_summary(plugin) 73 Purple::Plugin plugin 74 75 const gchar * 76 purple_plugin_get_description(plugin) 77 Purple::Plugin plugin 78 79 const gchar * 80 purple_plugin_get_author(plugin) 81 Purple::Plugin plugin 82 83 const gchar * 84 purple_plugin_get_homepage(plugin) 85 Purple::Plugin plugin 86 87 MODULE = Purple::Plugin PACKAGE = Purple::Plugin::IPC PREFIX = purple_plugin_ipc_ 88 89 void 90 purple_plugin_ipc_unregister(plugin, command) 91 Purple::Plugin plugin 92 const char *command 93 94 void 95 purple_plugin_ipc_unregister_all(plugin) 96 Purple::Plugin plugin 97 98 MODULE = Purple::Plugin PACKAGE = Purple::Plugins PREFIX = purple_plugins_ 99 PROTOTYPES: ENABLE 100 101 void 102 purple_plugins_add_search_path(path) 103 const char *path 104 105 void 106 purple_plugins_unload_all() 107 108 void 109 purple_plugins_destroy_all() 110 111 void 112 purple_plugins_load_saved(key) 113 const char *key 114 115 void 116 purple_plugins_probe(ext) 117 const char *ext 118 119 gboolean 120 purple_plugins_enabled() 121 122 Purple::Plugin 123 purple_plugins_find_with_name(name) 124 const char *name 125 126 Purple::Plugin 127 purple_plugins_find_with_filename(filename) 128 const char *filename 129 130 Purple::Plugin 131 purple_plugins_find_with_basename(basename) 132 const char *basename 133 134 Purple::Plugin 135 purple_plugins_find_with_id(id) 136 const char *id 137 138 void 139 purple_plugins_get_loaded() 140 PREINIT: 141 GList *l; 142 PPCODE: 143 for (l = purple_plugins_get_loaded(); l != NULL; l = l->next) { 144 XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::Plugin"))); 145 } 146 147 void 148 purple_plugins_get_protocols() 149 PREINIT: 150 GList *l; 151 PPCODE: 152 for (l = purple_plugins_get_protocols(); l != NULL; l = l->next) { 153 XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::Plugin"))); 154 } 155 156 void 157 purple_plugins_get_all() 158 PREINIT: 159 GList *l; 160 PPCODE: 161 for (l = purple_plugins_get_all(); l != NULL; l = l->next) { 162 XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::Plugin"))); 163 } 164 165 Purple::Handle 166 purple_plugins_get_handle() 167