comparison libpurple/protocols/myspace/myspace.c @ 16726:fc80e7b2540d

Check for RC4 in libpurple on plugin initialization.
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Wed, 09 May 2007 04:43:24 +0000
parents 58cd11fcd84f
children cd4a6bd9f69e
comparison
equal deleted inserted replaced
16725:58cd11fcd84f 16726:fc80e7b2540d
57 57
58 #include "myspace.h" 58 #include "myspace.h"
59 59
60 static void init_plugin(PurplePlugin *plugin) 60 static void init_plugin(PurplePlugin *plugin)
61 { 61 {
62 purple_notify_message(plugin, PURPLE_NOTIFY_MSG_INFO, "Hello World!", 62 }
63 "This is the Hello World! plugin :)", NULL, NULL, NULL); 63
64 /**
65 * Load the plugin.
66 */
67 static gboolean msim_load(PurplePlugin *plugin)
68 {
69 #ifdef MSIM_USE_PURPLE_RC4
70 /* If compiled to use RC4 from libpurple, check if it is really there. */
71 if (!purple_ciphers_find_cipher("rc4"))
72 {
73 purple_debug_error("msim", "compiled with MSIM_USE_PURPLE_RC4 but rc4 not in libpurple - not loading MySpaceIM plugin!\n");
74 purple_notify_error(plugin, "Missing Cipher", "The RC4 cipher could not be found",
75 "Recompile without MSIM_USE_PURPLE_RC4, or upgrade to a libpurple with RC4 support. MySpaceIM plugin will not be loaded.");
76 return FALSE;
77 }
78 #endif
79 return TRUE;
64 } 80 }
65 81
66 /** 82 /**
67 * Get possible user status types. Based on mockprpl. 83 * Get possible user status types. Based on mockprpl.
68 * 84 *
1773 /** description */ 1789 /** description */
1774 "MySpaceIM Protocol Plugin", 1790 "MySpaceIM Protocol Plugin",
1775 "Jeff Connelly <myspaceim@xyzzy.cjb.net>", /**< author */ 1791 "Jeff Connelly <myspaceim@xyzzy.cjb.net>", /**< author */
1776 "http://developer.pidgin.im/wiki/MySpaceIM/", /**< homepage */ 1792 "http://developer.pidgin.im/wiki/MySpaceIM/", /**< homepage */
1777 1793
1778 NULL, /**< load */ 1794 msim_load, /**< load */
1779 NULL, /**< unload */ 1795 NULL, /**< unload */
1780 NULL, /**< destroy */ 1796 NULL, /**< destroy */
1781 NULL, /**< ui_info */ 1797 NULL, /**< ui_info */
1782 &prpl_info, /**< extra_info */ 1798 &prpl_info, /**< extra_info */
1783 NULL, /**< prefs_info */ 1799 NULL, /**< prefs_info */