pidgin/purple-plugin-pack
Shoehorn the omegle plugin into the plugin pack build system.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omegle/Makefile.am Sat Jul 09 01:38:08 2011 -0400
@@ -0,0 +1,55 @@
+# $(PIXMAPS) #add \ to the line above and uncomment this line if we get pixmaps +omegledir = $(PURPLE_LIBDIR) +omegle_la_LDFLAGS = -module -avoid-version +omegle_LTLIBRARIES = omegle.la +# uncomment the lines below if we get pixmaps +#omeglepix16dir=$(PIDGIN_PIXMAPSDIR)/protocols/16 +#omeglepix16_DATA=16/omegle.png +#omeglepix22dir=$(PIDGIN_PIXMAPSDIR)/protocols/22 +#omeglepix22_DATA=22/omegle.png +#omeglepix48dir=$(PIDGIN_PIXMAPSDIR)/protocols/48 +#omeglepix48_DATA=48/omegle.png + -DLIBDIR=\"$(PURPLE_LIBDIR)\" \ + -DDATADIR=\"$(PURPLE_DATADIR)\" \ --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omegle/Makefile.mingw Sat Jul 09 01:38:08 2011 -0400
@@ -0,0 +1,15 @@
+# Description: Makefile for omegle plugin. +include $(PP_TOP)/win_pp.mak --- a/omegle/libomegle.c Wed Jul 06 10:16:05 2011 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,428 +0,0 @@
- * libfacebook is the property of its developers. See the COPYRIGHT file
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
-#include "om_connection.h"
-#include <json-glib/json-glib.h>
-static void om_got_events(OmegleAccount *oma, gchar *response, gsize len,
-/******************************************************************************/
-/******************************************************************************/
-static const char *om_list_icon(PurpleAccount *account, PurpleBuddy *buddy)
-static GList *om_statuses(PurpleAccount *account)
- PurpleStatusType *status;
- status = purple_status_type_new_full(PURPLE_STATUS_AVAILABLE, NULL, NULL, FALSE, FALSE, FALSE);
- types = g_list_append(types, status);
-static void om_login(PurpleAccount *account)
- //make sure there's an Omegle buddy on the buddy list
- bud = purple_find_buddy(account, "omegle");
- bud = purple_buddy_new(account, "omegle", "Omegle");
- purple_blist_add_buddy(bud, NULL, NULL, NULL);
- purple_prpl_got_user_status(account, "omegle", purple_primitive_get_id_from_type(PURPLE_STATUS_AVAILABLE), NULL);
- oma = g_new0(OmegleAccount, 1);
- oma->account = account;
- oma->pc = purple_account_get_connection(account);
- oma->cookie_table = g_hash_table_new_full(g_str_hash, g_str_equal,
- oma->hostname_ip_cache = g_hash_table_new_full(g_str_hash, g_str_equal,
- account->gc->proto_data = oma;
- //No such thing as a login
- purple_connection_set_state(purple_account_get_connection(account), PURPLE_CONNECTED);
-static void om_close(PurpleConnection *pc)
- g_return_if_fail(pc != NULL);
- g_return_if_fail(pc->proto_data != NULL);
- ims = purple_get_ims();
- //TODO: Loop through all im's and disconnect them all
- while (oma->conns != NULL)
- om_connection_destroy(oma->conns->data);
- while (oma->dns_queries != NULL) {
- PurpleDnsQueryData *dns_query = oma->dns_queries->data;
- oma->dns_queries = g_slist_remove(oma->dns_queries, dns_query);
- purple_dnsquery_destroy(dns_query);
- g_hash_table_destroy(oma->cookie_table);
- g_hash_table_destroy(oma->hostname_ip_cache);
-static void om_convo_closed(PurpleConnection *pc, const char *who)
- postdata = g_strdup_printf("id=%s", purple_url_encode(who));
- om_post_or_get(oma, OM_METHOD_POST, NULL, "/disconnect",
- postdata, NULL, NULL, FALSE);
-static void om_fetch_events(OmegleAccount *oma, gchar *who)
- postdata = g_strdup_printf("id=%s", purple_url_encode(who));
- om_post_or_get(oma, OM_METHOD_POST, NULL, "/events",
- postdata, om_got_events, who, FALSE);
-static void om_got_events(OmegleAccount *oma, gchar *response, gsize len,
- //[["waiting"], ["connected"]]
- const gchar *event_type;
- JsonNode *rootnode, *currentnode;
- JsonArray *array, *current;
- purple_debug_info("omegle", "got events: %s\n", response?response:"(null)");
- if (!response || g_str_equal(response, "null"))
- parser = json_parser_new();
- json_parser_load_from_data(parser, response, len, NULL);
- rootnode = json_parser_get_root(parser);
- g_object_unref(parser);
- array = json_node_get_array(rootnode);
- for(i=0; i<json_array_get_length(array); i++)
- currentnode = json_array_get_element(array, i);
- current = json_node_get_array(currentnode);
- event_type = json_node_get_string(json_array_get_element(current, 0));
- } else if (g_str_equal(event_type, "waiting")) {
- serv_got_im(oma->pc, who, "Looking for someone you can chat with. Hang on.", PURPLE_MESSAGE_SYSTEM, time(NULL));
- } else if (g_str_equal(event_type, "connected")) {
- serv_got_im(oma->pc, who, "You're now chatting with a random stranger. Say hi!", PURPLE_MESSAGE_SYSTEM, time(NULL));
- } else if (g_str_equal(event_type, "gotMessage")) {
- //[["gotMessage","message goes here"]]
- message = json_node_get_string(json_array_get_element(current, 1));
- serv_got_im(oma->pc, who, message, PURPLE_MESSAGE_RECV, time(NULL));
- } else if (g_str_equal(event_type, "typing")) {
- serv_got_typing(oma->pc, who, 10, PURPLE_TYPING);
- } else if (g_str_equal(event_type, "stoppedTyping")) {
- serv_got_typing(oma->pc, who, 10, PURPLE_TYPED);
- } else if (g_str_equal(event_type, "strangerDisconnected")) {
- serv_got_im(oma->pc, who, "Your conversational partner has disconnected", PURPLE_MESSAGE_SYSTEM, time(NULL));
- om_fetch_events(oma, g_strdup(who));
- g_object_unref(parser);
-static void om_start_im_cb(OmegleAccount *oma, gchar *response, gsize len,
- //This should come back with an ID that we pass around
- id = g_strdup(response);
- purple_str_strip_char(id, '"');
- om_fetch_events(oma, g_strdup(id));
-static void om_start_im(PurpleBlistNode *node, gpointer data)
- if(!PURPLE_BLIST_NODE_IS_BUDDY(node))
- buddy = (PurpleBuddy *) node;
- pc = purple_account_get_connection(buddy->account);
- om_post_or_get(oma, OM_METHOD_POST, NULL, "/start",
- NULL, om_start_im_cb, NULL, FALSE);
-static GList *om_node_menu(PurpleBlistNode *node)
- if(PURPLE_BLIST_NODE_IS_BUDDY(node))
- buddy = (PurpleBuddy *)node;
- act = purple_menu_action_new(_("_Start random IM"),
- PURPLE_CALLBACK(om_start_im),
- m = g_list_append(m, act);
-static unsigned int om_send_typing(PurpleConnection *pc, const gchar *name,
- PurpleTypingState state)
- OmegleAccount *oma = pc->proto_data;
- g_return_val_if_fail(oma != NULL, 0);
- if (state == PURPLE_TYPING)
- } else if (state == PURPLE_TYPED)
- url = "/stoppedtyping";
- postdata = g_strdup_printf("id=%s", purple_url_encode(name));
- om_post_or_get(oma, OM_METHOD_POST, NULL, url, postdata, NULL, NULL, FALSE);
-static int om_send_im(PurpleConnection *pc, const gchar *who, const gchar *message, PurpleMessageFlags flags)
- gchar *encoded_message;
- encoded_name = g_strdup(purple_url_encode(who));
- encoded_message = g_strdup(purple_url_encode(message));
- postdata = g_strdup_printf("id=%s&msg=%s", encoded_name, encoded_message);
- om_post_or_get(oma, OM_METHOD_POST, NULL, "/send", postdata, NULL, NULL, FALSE);
- g_free(encoded_message);
- return strlen(message);
-/******************************************************************************/
-/******************************************************************************/
-static gboolean plugin_load(PurplePlugin *plugin)
- PurpleAccountOption *option;
- PurplePluginInfo *info = plugin->info;
- PurplePluginProtocolInfo *prpl_info = info->extra_info;
- option = purple_account_option_string_new("Server", "host", "bajor.omegle.com");
- prpl_info->protocol_options = g_list_append(
- prpl_info->protocol_options, option);
-static gboolean plugin_unload(PurplePlugin *plugin)
-static void plugin_init(PurplePlugin *plugin)
-static PurplePluginProtocolInfo prpl_info = {
- NULL, /* user_splits */
- NULL, /* protocol_options */
- NO_BUDDY_ICONS, /* icon_spec */
- om_list_icon, /* list_icon */
- NULL, /* list_emblems */
- NULL, /* status_text */
- NULL, /* tooltip_text */
- om_statuses, /* status_types */
- om_node_menu, /* blist_node_menu */
- NULL, /* chat_info_defaults */
- om_send_im, /* send_im */
- om_send_typing, /* send_typing */
- NULL, /* change_passwd */
- NULL, /* add_buddies */
- NULL, /* remove_buddy */
- NULL, /* remove_buddies */
- NULL, /* set_permit_deny */
- NULL, /* reject chat invite */
- NULL, /* get_chat_name */
- NULL, /* chat_invite */
- NULL, /* chat_whisper */
- NULL, /* register_user */
- NULL, /* get_cb_info */
- NULL, /* get_cb_away */
- NULL, /* alias_buddy */
- NULL, /* group_buddy */
- NULL, /* rename_group */
- om_convo_closed, /* convo_closed */
- purple_normalize_nocase,/* normalize */
- NULL, /* set_buddy_icon */
- NULL, /* remove_group */
- NULL, /* get_cb_real_name */
- NULL, /* set_chat_topic */
- NULL, /* find_blist_chat */
- NULL, /* roomlist_get_list */
- NULL, /* roomlist_cancel */
- NULL, /* roomlist_expand_category */
- NULL, /* can_receive_file */
- NULL, /* offline_message */
- NULL, /* whiteboard_prpl_ops */
- NULL, /* roomlist_room_serialize */
- NULL, /* unregister_user */
- NULL, /* send_attention */
- NULL, /* attention_types */
-#if PURPLE_MAJOR_VERSION >= 2 && PURPLE_MINOR_VERSION >= 5
- sizeof(PurplePluginProtocolInfo), /* struct_size */
- NULL, /* get_account_text_table */
- (gpointer) sizeof(PurplePluginProtocolInfo)
-static PurplePluginInfo info = {
- PURPLE_PLUGIN_PROTOCOL, /* type */
- NULL, /* ui_requirement */
- NULL, /* dependencies */
- PURPLE_PRIORITY_DEFAULT, /* priority */
- OMEGLE_PLUGIN_ID, /* id */
- OMEGLE_PLUGIN_VERSION, /* version */
- N_("Omegle Protocol Plugin"), /* summary */
- N_("Omegle Protocol Plugin"), /* description */
- "Eion Robb <eionrobb@gmail.com>", /* author */
- "http://pidgin-omegle.googlecode.com/", /* homepage */
- plugin_load, /* load */
- plugin_unload, /* unload */
- &prpl_info, /* extra_info */
-PURPLE_INIT_PLUGIN(facebook, plugin_init, info);
--- a/omegle/libomegle.h Wed Jul 06 10:16:05 2011 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
- * libomegle is the property of its developers. See the COPYRIGHT file
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
-#define OMEGLE_PLUGIN_VERSION "0"
-#define OMEGLE_PLUGIN_ID "prpl-bigbrownchunx-omegle"
-#ifndef G_GNUC_NULL_TERMINATED
-# define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__))
-# define G_GNUC_NULL_TERMINATED
-# endif /* __GNUC__ >= 4 */
-#endif /* G_GNUC_NULL_TERMINATED */
-# define dlopen(a,b) LoadLibrary(a)
-# define dlsym(a,b) GetProcAddress(a,b)
-# define dlclose(a) FreeLibrary(a)
-# include <netinet/in.h>
-# include <sys/socket.h>
-#if GLIB_MAJOR_VERSION >= 2 && GLIB_MINOR_VERSION >= 12
-# define atoll(a) g_ascii_strtoll(a, NULL, 0)
-#define OM_MAX_MSG_RETRY 2
-typedef struct _OmegleAccount OmegleAccount;
-typedef struct _OmegleBuddy OmegleBuddy;
-typedef void (*OmegleProxyCallbackFunc)(OmegleAccount *oma, gchar *data, gsize data_len, gpointer user_data);
- PurpleAccount *account;
- GSList *conns; /**< A list of all active OmegleConnections */
- GHashTable *cookie_table;
- GHashTable *hostname_ip_cache;
-#endif /* LIBOMEGLE_H */
--- a/omegle/om_connection.h Wed Jul 06 10:16:05 2011 -0400
+++ b/omegle/om_connection.h Sat Jul 09 01:38:08 2011 -0400
@@ -21,7 +21,7 @@
#ifndef OMEGLE_CONNECTION_H
#define OMEGLE_CONNECTION_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omegle/omegle.c Sat Jul 09 01:38:08 2011 -0400
@@ -0,0 +1,428 @@
+ * libfacebook is the property of its developers. See the COPYRIGHT file + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. +#include "om_connection.h" +#include <json-glib/json-glib.h> +static void om_got_events(OmegleAccount *oma, gchar *response, gsize len, +/******************************************************************************/ +/******************************************************************************/ +static const char *om_list_icon(PurpleAccount *account, PurpleBuddy *buddy) +static GList *om_statuses(PurpleAccount *account) + PurpleStatusType *status; + status = purple_status_type_new_full(PURPLE_STATUS_AVAILABLE, NULL, NULL, FALSE, FALSE, FALSE); + types = g_list_append(types, status); +static void om_login(PurpleAccount *account) + //make sure there's an Omegle buddy on the buddy list + bud = purple_find_buddy(account, "omegle"); + bud = purple_buddy_new(account, "omegle", "Omegle"); + purple_blist_add_buddy(bud, NULL, NULL, NULL); + purple_prpl_got_user_status(account, "omegle", purple_primitive_get_id_from_type(PURPLE_STATUS_AVAILABLE), NULL); + oma = g_new0(OmegleAccount, 1); + oma->account = account; + oma->pc = purple_account_get_connection(account); + oma->cookie_table = g_hash_table_new_full(g_str_hash, g_str_equal, + oma->hostname_ip_cache = g_hash_table_new_full(g_str_hash, g_str_equal, + account->gc->proto_data = oma; + //No such thing as a login + purple_connection_set_state(purple_account_get_connection(account), PURPLE_CONNECTED); +static void om_close(PurpleConnection *pc) + g_return_if_fail(pc != NULL); + g_return_if_fail(pc->proto_data != NULL); + ims = purple_get_ims(); + //TODO: Loop through all im's and disconnect them all + while (oma->conns != NULL) + om_connection_destroy(oma->conns->data); + while (oma->dns_queries != NULL) { + PurpleDnsQueryData *dns_query = oma->dns_queries->data; + oma->dns_queries = g_slist_remove(oma->dns_queries, dns_query); + purple_dnsquery_destroy(dns_query); + g_hash_table_destroy(oma->cookie_table); + g_hash_table_destroy(oma->hostname_ip_cache); +static void om_convo_closed(PurpleConnection *pc, const char *who) + postdata = g_strdup_printf("id=%s", purple_url_encode(who)); + om_post_or_get(oma, OM_METHOD_POST, NULL, "/disconnect", + postdata, NULL, NULL, FALSE); +static void om_fetch_events(OmegleAccount *oma, gchar *who) + postdata = g_strdup_printf("id=%s", purple_url_encode(who)); + om_post_or_get(oma, OM_METHOD_POST, NULL, "/events", + postdata, om_got_events, who, FALSE); +static void om_got_events(OmegleAccount *oma, gchar *response, gsize len, + //[["waiting"], ["connected"]] + const gchar *event_type; + JsonNode *rootnode, *currentnode; + JsonArray *array, *current; + purple_debug_info("omegle", "got events: %s\n", response?response:"(null)"); + if (!response || g_str_equal(response, "null")) + parser = json_parser_new(); + json_parser_load_from_data(parser, response, len, NULL); + rootnode = json_parser_get_root(parser); + g_object_unref(parser); + array = json_node_get_array(rootnode); + for(i=0; i<json_array_get_length(array); i++) + currentnode = json_array_get_element(array, i); + current = json_node_get_array(currentnode); + event_type = json_node_get_string(json_array_get_element(current, 0)); + } else if (g_str_equal(event_type, "waiting")) { + serv_got_im(oma->pc, who, "Looking for someone you can chat with. Hang on.", PURPLE_MESSAGE_SYSTEM, time(NULL)); + } else if (g_str_equal(event_type, "connected")) { + serv_got_im(oma->pc, who, "You're now chatting with a random stranger. Say hi!", PURPLE_MESSAGE_SYSTEM, time(NULL)); + } else if (g_str_equal(event_type, "gotMessage")) { + //[["gotMessage","message goes here"]] + message = json_node_get_string(json_array_get_element(current, 1)); + serv_got_im(oma->pc, who, message, PURPLE_MESSAGE_RECV, time(NULL)); + } else if (g_str_equal(event_type, "typing")) { + serv_got_typing(oma->pc, who, 10, PURPLE_TYPING); + } else if (g_str_equal(event_type, "stoppedTyping")) { + serv_got_typing(oma->pc, who, 10, PURPLE_TYPED); + } else if (g_str_equal(event_type, "strangerDisconnected")) { + serv_got_im(oma->pc, who, "Your conversational partner has disconnected", PURPLE_MESSAGE_SYSTEM, time(NULL)); + om_fetch_events(oma, g_strdup(who)); + g_object_unref(parser); +static void om_start_im_cb(OmegleAccount *oma, gchar *response, gsize len, + //This should come back with an ID that we pass around + id = g_strdup(response); + purple_str_strip_char(id, '"'); + om_fetch_events(oma, g_strdup(id)); +static void om_start_im(PurpleBlistNode *node, gpointer data) + if(!PURPLE_BLIST_NODE_IS_BUDDY(node)) + buddy = (PurpleBuddy *) node; + pc = purple_account_get_connection(buddy->account); + om_post_or_get(oma, OM_METHOD_POST, NULL, "/start", + NULL, om_start_im_cb, NULL, FALSE); +static GList *om_node_menu(PurpleBlistNode *node) + if(PURPLE_BLIST_NODE_IS_BUDDY(node)) + buddy = (PurpleBuddy *)node; + act = purple_menu_action_new(_("_Start random IM"), + PURPLE_CALLBACK(om_start_im), + m = g_list_append(m, act); +static unsigned int om_send_typing(PurpleConnection *pc, const gchar *name, + PurpleTypingState state) + OmegleAccount *oma = pc->proto_data; + g_return_val_if_fail(oma != NULL, 0); + if (state == PURPLE_TYPING) + } else if (state == PURPLE_TYPED) + url = "/stoppedtyping"; + postdata = g_strdup_printf("id=%s", purple_url_encode(name)); + om_post_or_get(oma, OM_METHOD_POST, NULL, url, postdata, NULL, NULL, FALSE); +static int om_send_im(PurpleConnection *pc, const gchar *who, const gchar *message, PurpleMessageFlags flags) + gchar *encoded_message; + encoded_name = g_strdup(purple_url_encode(who)); + encoded_message = g_strdup(purple_url_encode(message)); + postdata = g_strdup_printf("id=%s&msg=%s", encoded_name, encoded_message); + om_post_or_get(oma, OM_METHOD_POST, NULL, "/send", postdata, NULL, NULL, FALSE); + g_free(encoded_message); + return strlen(message); +/******************************************************************************/ +/******************************************************************************/ +static gboolean plugin_load(PurplePlugin *plugin) + PurpleAccountOption *option; + PurplePluginInfo *info = plugin->info; + PurplePluginProtocolInfo *prpl_info = info->extra_info; + option = purple_account_option_string_new("Server", "host", "bajor.omegle.com"); + prpl_info->protocol_options = g_list_append( + prpl_info->protocol_options, option); +static gboolean plugin_unload(PurplePlugin *plugin) +static void plugin_init(PurplePlugin *plugin) +static PurplePluginProtocolInfo prpl_info = { + NULL, /* user_splits */ + NULL, /* protocol_options */ + NO_BUDDY_ICONS, /* icon_spec */ + om_list_icon, /* list_icon */ + NULL, /* list_emblems */ + NULL, /* status_text */ + NULL, /* tooltip_text */ + om_statuses, /* status_types */ + om_node_menu, /* blist_node_menu */ + NULL, /* chat_info_defaults */ + om_send_im, /* send_im */ + om_send_typing, /* send_typing */ + NULL, /* change_passwd */ + NULL, /* add_buddies */ + NULL, /* remove_buddy */ + NULL, /* remove_buddies */ + NULL, /* set_permit_deny */ + NULL, /* reject chat invite */ + NULL, /* get_chat_name */ + NULL, /* chat_invite */ + NULL, /* chat_whisper */ + NULL, /* register_user */ + NULL, /* get_cb_info */ + NULL, /* get_cb_away */ + NULL, /* alias_buddy */ + NULL, /* group_buddy */ + NULL, /* rename_group */ + om_convo_closed, /* convo_closed */ + purple_normalize_nocase,/* normalize */ + NULL, /* set_buddy_icon */ + NULL, /* remove_group */ + NULL, /* get_cb_real_name */ + NULL, /* set_chat_topic */ + NULL, /* find_blist_chat */ + NULL, /* roomlist_get_list */ + NULL, /* roomlist_cancel */ + NULL, /* roomlist_expand_category */ + NULL, /* can_receive_file */ + NULL, /* offline_message */ + NULL, /* whiteboard_prpl_ops */ + NULL, /* roomlist_room_serialize */ + NULL, /* unregister_user */ + NULL, /* send_attention */ + NULL, /* attention_types */ +#if PURPLE_MAJOR_VERSION >= 2 && PURPLE_MINOR_VERSION >= 5 + sizeof(PurplePluginProtocolInfo), /* struct_size */ + NULL, /* get_account_text_table */ + (gpointer) sizeof(PurplePluginProtocolInfo) +static PurplePluginInfo info = { + PURPLE_PLUGIN_PROTOCOL, /* type */ + NULL, /* ui_requirement */ + NULL, /* dependencies */ + PURPLE_PRIORITY_DEFAULT, /* priority */ + OMEGLE_PLUGIN_ID, /* id */ + OMEGLE_PLUGIN_VERSION, /* version */ + N_("Omegle Protocol Plugin"), /* summary */ + N_("Omegle Protocol Plugin"), /* description */ + "Eion Robb <eionrobb@gmail.com>", /* author */ + "http://pidgin-omegle.googlecode.com/", /* homepage */ + plugin_load, /* load */ + plugin_unload, /* unload */ + &prpl_info, /* extra_info */ +PURPLE_INIT_PLUGIN(facebook, plugin_init, info); --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omegle/omegle.h Sat Jul 09 01:38:08 2011 -0400
@@ -0,0 +1,90 @@
+ * libomegle is the property of its developers. See the COPYRIGHT file + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. +#define OMEGLE_PLUGIN_VERSION "0" +#define OMEGLE_PLUGIN_ID "prpl-bigbrownchunx-omegle" +#ifndef G_GNUC_NULL_TERMINATED +# define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__)) +# define G_GNUC_NULL_TERMINATED +# endif /* __GNUC__ >= 4 */ +#endif /* G_GNUC_NULL_TERMINATED */ +# define dlopen(a,b) LoadLibrary(a) +# define dlsym(a,b) GetProcAddress(a,b) +# define dlclose(a) FreeLibrary(a) +# include <netinet/in.h> +# include <sys/socket.h> +#if GLIB_MAJOR_VERSION >= 2 && GLIB_MINOR_VERSION >= 12 +# define atoll(a) g_ascii_strtoll(a, NULL, 0) +#define OM_MAX_MSG_RETRY 2 +typedef struct _OmegleAccount OmegleAccount; +typedef struct _OmegleBuddy OmegleBuddy; +typedef void (*OmegleProxyCallbackFunc)(OmegleAccount *oma, gchar *data, gsize data_len, gpointer user_data); + PurpleAccount *account; + GSList *conns; /**< A list of all active OmegleConnections */ + GHashTable *cookie_table; + GHashTable *hostname_ip_cache; +#endif /* LIBOMEGLE_H */ --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omegle/plugins.cfg Sat Jul 09 01:38:08 2011 -0400
@@ -0,0 +1,9 @@
+[Omegle Protocol Plugin] +depends=purple json-glib +summary=Protocol plugin for the Omegle social network +description=Protocol plugin for the Omegle social network