Mercurial > pidgin
comparison libpurple/plugins/ssl/ssl.c @ 15822:32c366eeeb99
sed -ie 's/gaim/purple/g'
| author | Sean Egan <seanegan@gmail.com> |
|---|---|
| date | Mon, 19 Mar 2007 07:01:17 +0000 |
| parents | 5fe8042783c1 |
| children | 6531f1a2e1d7 |
comparison
equal
deleted
inserted
replaced
| 15821:84b0f9b23ede | 15822:32c366eeeb99 |
|---|---|
| 1 /** | 1 /** |
| 2 * @file ssl.c Main SSL plugin | 2 * @file ssl.c Main SSL plugin |
| 3 * | 3 * |
| 4 * gaim | 4 * purple |
| 5 * | 5 * |
| 6 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org> | 6 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org> |
| 7 * | 7 * |
| 8 * This program is free software; you can redistribute it and/or modify | 8 * This program is free software; you can redistribute it and/or modify |
| 9 * it under the terms of the GNU General Public License as published by | 9 * it under the terms of the GNU General Public License as published by |
| 25 #include "sslconn.h" | 25 #include "sslconn.h" |
| 26 #include "version.h" | 26 #include "version.h" |
| 27 | 27 |
| 28 #define SSL_PLUGIN_ID "core-ssl" | 28 #define SSL_PLUGIN_ID "core-ssl" |
| 29 | 29 |
| 30 static GaimPlugin *ssl_plugin = NULL; | 30 static PurplePlugin *ssl_plugin = NULL; |
| 31 | 31 |
| 32 static gboolean | 32 static gboolean |
| 33 probe_ssl_plugins(GaimPlugin *my_plugin) | 33 probe_ssl_plugins(PurplePlugin *my_plugin) |
| 34 { | 34 { |
| 35 GaimPlugin *plugin; | 35 PurplePlugin *plugin; |
| 36 GList *l; | 36 GList *l; |
| 37 | 37 |
| 38 ssl_plugin = NULL; | 38 ssl_plugin = NULL; |
| 39 | 39 |
| 40 for (l = gaim_plugins_get_all(); l != NULL; l = l->next) | 40 for (l = purple_plugins_get_all(); l != NULL; l = l->next) |
| 41 { | 41 { |
| 42 plugin = (GaimPlugin *)l->data; | 42 plugin = (PurplePlugin *)l->data; |
| 43 | 43 |
| 44 if (plugin == my_plugin) | 44 if (plugin == my_plugin) |
| 45 continue; | 45 continue; |
| 46 | 46 |
| 47 if (plugin->info != NULL && plugin->info->id != NULL && | 47 if (plugin->info != NULL && plugin->info->id != NULL && |
| 48 strncmp(plugin->info->id, "ssl-", 4) == 0) | 48 strncmp(plugin->info->id, "ssl-", 4) == 0) |
| 49 { | 49 { |
| 50 if (gaim_plugin_is_loaded(plugin) || gaim_plugin_load(plugin)) | 50 if (purple_plugin_is_loaded(plugin) || purple_plugin_load(plugin)) |
| 51 { | 51 { |
| 52 ssl_plugin = plugin; | 52 ssl_plugin = plugin; |
| 53 | 53 |
| 54 break; | 54 break; |
| 55 } | 55 } |
| 58 | 58 |
| 59 return (ssl_plugin != NULL); | 59 return (ssl_plugin != NULL); |
| 60 } | 60 } |
| 61 | 61 |
| 62 static gboolean | 62 static gboolean |
| 63 plugin_load(GaimPlugin *plugin) | 63 plugin_load(PurplePlugin *plugin) |
| 64 { | 64 { |
| 65 return probe_ssl_plugins(plugin); | 65 return probe_ssl_plugins(plugin); |
| 66 } | 66 } |
| 67 | 67 |
| 68 static gboolean | 68 static gboolean |
| 69 plugin_unload(GaimPlugin *plugin) | 69 plugin_unload(PurplePlugin *plugin) |
| 70 { | 70 { |
| 71 if (ssl_plugin != NULL && | 71 if (ssl_plugin != NULL && |
| 72 g_list_find(gaim_plugins_get_loaded(), ssl_plugin) != NULL) | 72 g_list_find(purple_plugins_get_loaded(), ssl_plugin) != NULL) |
| 73 { | 73 { |
| 74 gaim_plugin_unload(ssl_plugin); | 74 purple_plugin_unload(ssl_plugin); |
| 75 } | 75 } |
| 76 | 76 |
| 77 ssl_plugin = NULL; | 77 ssl_plugin = NULL; |
| 78 | 78 |
| 79 return TRUE; | 79 return TRUE; |
| 80 } | 80 } |
| 81 | 81 |
| 82 static GaimPluginInfo info = | 82 static PurplePluginInfo info = |
| 83 { | 83 { |
| 84 GAIM_PLUGIN_MAGIC, | 84 PURPLE_PLUGIN_MAGIC, |
| 85 GAIM_MAJOR_VERSION, | 85 PURPLE_MAJOR_VERSION, |
| 86 GAIM_MINOR_VERSION, | 86 PURPLE_MINOR_VERSION, |
| 87 GAIM_PLUGIN_STANDARD, /**< type */ | 87 PURPLE_PLUGIN_STANDARD, /**< type */ |
| 88 NULL, /**< ui_requirement */ | 88 NULL, /**< ui_requirement */ |
| 89 GAIM_PLUGIN_FLAG_INVISIBLE, /**< flags */ | 89 PURPLE_PLUGIN_FLAG_INVISIBLE, /**< flags */ |
| 90 NULL, /**< dependencies */ | 90 NULL, /**< dependencies */ |
| 91 GAIM_PRIORITY_DEFAULT, /**< priority */ | 91 PURPLE_PRIORITY_DEFAULT, /**< priority */ |
| 92 | 92 |
| 93 SSL_PLUGIN_ID, /**< id */ | 93 SSL_PLUGIN_ID, /**< id */ |
| 94 N_("SSL"), /**< name */ | 94 N_("SSL"), /**< name */ |
| 95 VERSION, /**< version */ | 95 VERSION, /**< version */ |
| 96 /** summary */ | 96 /** summary */ |
| 97 N_("Provides a wrapper around SSL support libraries."), | 97 N_("Provides a wrapper around SSL support libraries."), |
| 98 /** description */ | 98 /** description */ |
| 99 N_("Provides a wrapper around SSL support libraries."), | 99 N_("Provides a wrapper around SSL support libraries."), |
| 100 "Christian Hammond <chipx86@gnupdate.org>", | 100 "Christian Hammond <chipx86@gnupdate.org>", |
| 101 GAIM_WEBSITE, /**< homepage */ | 101 PURPLE_WEBSITE, /**< homepage */ |
| 102 | 102 |
| 103 plugin_load, /**< load */ | 103 plugin_load, /**< load */ |
| 104 plugin_unload, /**< unload */ | 104 plugin_unload, /**< unload */ |
| 105 NULL, /**< destroy */ | 105 NULL, /**< destroy */ |
| 106 | 106 |
| 109 NULL, | 109 NULL, |
| 110 NULL | 110 NULL |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 static void | 113 static void |
| 114 init_plugin(GaimPlugin *plugin) | 114 init_plugin(PurplePlugin *plugin) |
| 115 { | 115 { |
| 116 } | 116 } |
| 117 | 117 |
| 118 GAIM_INIT_PLUGIN(ssl, init_plugin, info) | 118 PURPLE_INIT_PLUGIN(ssl, init_plugin, info) |
