diff options
author | Stu Tomlinson <nosnilmot@pidgin.im> | 2007-06-10 02:05:05 +0000 |
---|---|---|
committer | Stu Tomlinson <nosnilmot@pidgin.im> | 2007-06-10 02:05:05 +0000 |
commit | 033d0b5db904fcb35995b9bf07fd314e71b967ee (patch) | |
tree | 7dabf62ae9eb1e24c9a5c5efbd5c4c12defbc1fd | |
parent | 7979ba349bd97520dcb1c141074e81d79a931625 (diff) | |
parent | 8617edbd8e2f6ef710936dcf23d7aafdc0d978cc (diff) | |
download | pidgin-033d0b5db904fcb35995b9bf07fd314e71b967ee.tar.gz |
propagate from branch 'im.pidgin.pidgin' (head 28241b48536ee0d6ca4a37c86c596d0aa461ea57)
to branch 'im.pidgin.pidgin.2.1.0' (head 4079b7c5ef7b4d05628ef40e9e99b9ae8a9259ce)
-rw-r--r-- | libpurple/protocols/silc/buddy.c | 10 | ||||
-rw-r--r-- | libpurple/protocols/silc/chat.c | 4 | ||||
-rw-r--r-- | libpurple/protocols/silc/ops.c | 42 | ||||
-rw-r--r-- | libpurple/protocols/silc/silc.c | 27 | ||||
-rw-r--r-- | libpurple/protocols/silc/silcpurple.h | 6 | ||||
-rw-r--r-- | libpurple/protocols/silc/util.c | 3 |
6 files changed, 0 insertions, 92 deletions
diff --git a/libpurple/protocols/silc/buddy.c b/libpurple/protocols/silc/buddy.c index 548ad1c746..b375c84aad 100644 --- a/libpurple/protocols/silc/buddy.c +++ b/libpurple/protocols/silc/buddy.c @@ -739,9 +739,7 @@ silcpurple_add_buddy_save(SilcBool success, void *context) SilcAttribute attribute; SilcVCardStruct vcard; SilcMime message = NULL, extension = NULL; -#ifdef SILC_ATTRIBUTE_USER_ICON SilcMime usericon = NULL; -#endif SilcAttributeObjPk serverpk, usersign, serversign; gboolean usign_success = TRUE, ssign_success = TRUE; char filename[512], filename2[512], *fingerprint = NULL, *tmp; @@ -827,14 +825,12 @@ silcpurple_add_buddy_save(SilcBool success, void *context) continue; break; -#ifdef SILC_ATTRIBUTE_USER_ICON case SILC_ATTRIBUTE_USER_ICON: usericon = silc_mime_alloc(); if (!silc_attribute_get_object(attr, (void *)usericon, sizeof(*usericon))) continue; break; -#endif case SILC_ATTRIBUTE_SERVER_PUBLIC_KEY: if (serverpk.type) @@ -974,7 +970,6 @@ silcpurple_add_buddy_save(SilcBool success, void *context) silc_mime_free(extension); } -#ifdef SILC_ATTRIBUTE_USER_ICON /* Save user icon */ if (usericon) { const char *type = silc_mime_get_field(usericon, "Content-Type"); @@ -993,7 +988,6 @@ silcpurple_add_buddy_save(SilcBool success, void *context) } silc_mime_free(usericon); } -#endif } /* Save the public key path to buddy properties, as it is used @@ -1369,9 +1363,7 @@ silcpurple_add_buddy_i(PurpleConnection *gc, PurpleBuddy *b, gboolean init) SILC_ATTRIBUTE_PREFERRED_CONTACT, SILC_ATTRIBUTE_TIMEZONE, SILC_ATTRIBUTE_GEOLOCATION, -#ifdef SILC_ATTRIBUTE_USER_ICON SILC_ATTRIBUTE_USER_ICON, -#endif SILC_ATTRIBUTE_DEVICE_INFO, 0); userpk.type = "silc-rsa"; userpk.data = silc_pkcs_public_key_encode(public_key, &userpk.data_len); @@ -1691,7 +1683,6 @@ GList *silcpurple_buddy_menu(PurpleBuddy *buddy) return m; } -#ifdef SILC_ATTRIBUTE_USER_ICON void silcpurple_buddy_set_icon(PurpleConnection *gc, PurpleStoredImage *img) { SilcPurple sg = gc->proto_data; @@ -1729,4 +1720,3 @@ void silcpurple_buddy_set_icon(PurpleConnection *gc, PurpleStoredImage *img) silc_mime_free(mime); } -#endif diff --git a/libpurple/protocols/silc/chat.c b/libpurple/protocols/silc/chat.c index a95bc9d2a5..48f3731553 100644 --- a/libpurple/protocols/silc/chat.c +++ b/libpurple/protocols/silc/chat.c @@ -1238,9 +1238,7 @@ int silcpurple_chat_send(PurpleConnection *gc, int id, const char *msg, char *msg2, *tmp; gboolean found = FALSE; gboolean sign = purple_account_get_bool(sg->account, "sign-verify", FALSE); -#ifdef HAVE_SILCMIME_H SilcDList list; -#endif if (!msg || !conn) return 0; @@ -1309,7 +1307,6 @@ int silcpurple_chat_send(PurpleConnection *gc, int id, const char *msg, channel = chu->channel; } -#ifdef HAVE_SILCMIME_H /* Check for images */ if (msgflags & PURPLE_MESSAGE_IMAGES) { list = silcpurple_image_message(msg, &flags); @@ -1334,7 +1331,6 @@ int silcpurple_chat_send(PurpleConnection *gc, int id, const char *msg, return ret; } } -#endif /* Send channel message */ ret = silc_client_send_channel_message(client, conn, channel, key, diff --git a/libpurple/protocols/silc/ops.c b/libpurple/protocols/silc/ops.c index 6b61e5d11f..ce6ede65dd 100644 --- a/libpurple/protocols/silc/ops.c +++ b/libpurple/protocols/silc/ops.c @@ -61,7 +61,6 @@ void silc_say(SilcClient client, SilcClientConnection conn, } } -#ifdef HAVE_SILCMIME_H /* Processes incoming MIME message. Can be private message or channel message. Returns TRUE if the message `mime' was displayed. */ @@ -233,7 +232,6 @@ silcpurple_mime_message(SilcClient client, SilcClientConnection conn, silc_mime_free(mime); return ret; } -#endif /* HAVE_SILCMIME_H */ /* Message for a channel. The `sender' is the sender of the message The `channel' is the channel. The `message' is the message. Note @@ -282,30 +280,10 @@ silc_channel_message(SilcClient client, SilcClientConnection conn, if (flags & SILC_MESSAGE_FLAG_DATA) { /* Process MIME message */ -#ifdef HAVE_SILCMIME_H SilcMime mime; mime = silc_mime_decode(NULL, message, message_len); silcpurple_mime_message(client, conn, sender, channel, payload, key, flags, mime, FALSE); -#else - char type[128], enc[128]; - unsigned char *data; - SilcUInt32 data_len; - - memset(type, 0, sizeof(type)); - memset(enc, 0, sizeof(enc)); - - if (!silc_mime_parse(message, message_len, NULL, 0, - type, sizeof(type) - 1, enc, sizeof(enc) - 1, &data, - &data_len)) - return; - - if (!strcmp(type, "application/x-wb") && - !strcmp(enc, "binary") && - !purple_account_get_bool(sg->account, "block-wb", FALSE)) - silcpurple_wb_receive_ch(client, conn, sender, channel, - payload, flags, data, data_len); -#endif return; } @@ -378,31 +356,11 @@ silc_private_message(SilcClient client, SilcClientConnection conn, } if (flags & SILC_MESSAGE_FLAG_DATA) { -#ifdef HAVE_SILCMIME_H /* Process MIME message */ SilcMime mime; mime = silc_mime_decode(NULL, message, message_len); silcpurple_mime_message(client, conn, sender, NULL, payload, NULL, flags, mime, FALSE); -#else - char type[128], enc[128]; - unsigned char *data; - SilcUInt32 data_len; - - memset(type, 0, sizeof(type)); - memset(enc, 0, sizeof(enc)); - - if (!silc_mime_parse(message, message_len, NULL, 0, - type, sizeof(type) - 1, enc, sizeof(enc) - 1, &data, - &data_len)) - return; - - if (!strcmp(type, "application/x-wb") && - !strcmp(enc, "binary") && - !purple_account_get_bool(sg->account, "block-wb", FALSE)) - silcpurple_wb_receive(client, conn, sender, payload, - flags, data, data_len); -#endif return; } diff --git a/libpurple/protocols/silc/silc.c b/libpurple/protocols/silc/silc.c index cea91d893b..70374d6714 100644 --- a/libpurple/protocols/silc/silc.c +++ b/libpurple/protocols/silc/silc.c @@ -145,9 +145,7 @@ silcpurple_connect_cb(SilcClient client, SilcClientConnection conn, SilcPurple sg; SilcUInt32 mask; char tz[16]; -#ifdef SILC_ATTRIBUTE_USER_ICON PurpleStoredImage *img; -#endif #ifdef HAVE_SYS_UTSNAME_H struct utsname u; #endif @@ -201,12 +199,10 @@ silcpurple_connect_cb(SilcClient client, SilcClientConnection conn, SILC_ATTRIBUTE_TIMEZONE, (void *)tz, strlen(tz)); -#ifdef SILC_ATTRIBUTE_USER_ICON /* Set our buddy icon */ img = purple_buddy_icons_find_account_icon(sg->account); silcpurple_buddy_set_icon(gc, img); purple_imgstore_unref(img); -#endif return; break; @@ -461,10 +457,8 @@ silcpurple_close_final(gpointer *context) SilcPurple sg = (SilcPurple)context; silc_client_stop(sg->client, NULL, NULL); silc_client_free(sg->client); -#ifdef HAVE_SILCMIME_H if (sg->mimeass) silc_mime_assembler_free(sg->mimeass); -#endif silc_free(sg); return 0; } @@ -1127,9 +1121,7 @@ silcpurple_send_im_resolved(SilcClient client, PurpleConversation *convo; char tmp[256]; SilcClientEntry client_entry; -#ifdef HAVE_SILCMIME_H SilcDList list; -#endif convo = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, im->nick, sg->account); @@ -1151,7 +1143,6 @@ silcpurple_send_im_resolved(SilcClient client, silc_dlist_start(clients); client_entry = silc_dlist_get(clients); -#ifdef HAVE_SILCMIME_H /* Check for images */ if (im->gflags & PURPLE_MESSAGE_IMAGES) { list = silcpurple_image_message(im->message, @@ -1173,7 +1164,6 @@ silcpurple_send_im_resolved(SilcClient client, goto out; } } -#endif /* Send the message */ silc_client_send_private_message(client, conn, client_entry, im->flags, @@ -1206,9 +1196,7 @@ silcpurple_send_im(PurpleConnection *gc, const char *who, const char *message, char *msg, *tmp; int ret = 0; gboolean sign = purple_account_get_bool(sg->account, "sign-verify", FALSE); -#ifdef HAVE_SILCMIME_H SilcDList list; -#endif if (!who || !message) return 0; @@ -1259,7 +1247,6 @@ silcpurple_send_im(PurpleConnection *gc, const char *who, const char *message, silc_dlist_start(clients); client_entry = silc_dlist_get(clients); -#ifdef HAVE_SILCMIME_H /* Check for images */ if (flags & PURPLE_MESSAGE_IMAGES) { list = silcpurple_image_message(message, &mflags); @@ -1281,7 +1268,6 @@ silcpurple_send_im(PurpleConnection *gc, const char *who, const char *message, return ret; } } -#endif /* Send private message directly */ ret = silc_client_send_private_message(client, conn, client_entry, @@ -1800,21 +1786,12 @@ static PurpleWhiteboardPrplOps silcpurple_wb_ops = static PurplePluginProtocolInfo prpl_info = { -#ifdef HAVE_SILCMIME_H OPT_PROTO_CHAT_TOPIC | OPT_PROTO_UNIQUE_CHATNAME | OPT_PROTO_PASSWORD_OPTIONAL | OPT_PROTO_IM_IMAGE | OPT_PROTO_SLASH_COMMANDS_NATIVE, -#else - OPT_PROTO_CHAT_TOPIC | OPT_PROTO_UNIQUE_CHATNAME | - OPT_PROTO_PASSWORD_OPTIONAL | OPT_PROTO_SLASH_COMMANDS_NATIVE, -#endif NULL, /* user_splits */ NULL, /* protocol_options */ -#ifdef SILC_ATTRIBUTE_USER_ICON {"jpeg,gif,png,bmp", 0, 0, 96, 96, 0, PURPLE_ICON_SCALE_DISPLAY}, /* icon_spec */ -#else - NO_BUDDY_ICONS, -#endif silcpurple_list_icon, /* list_icon */ NULL, /* list_emblems */ silcpurple_status_text, /* status_text */ @@ -1858,11 +1835,7 @@ static PurplePluginProtocolInfo prpl_info = NULL, /* buddy_free */ NULL, /* convo_closed */ NULL, /* normalize */ -#ifdef SILC_ATTRIBUTE_USER_ICON silcpurple_buddy_set_icon, /* set_buddy_icon */ -#else - NULL, -#endif NULL, /* remove_group */ NULL, /* get_cb_real_name */ silcpurple_chat_set_topic, /* set_chat_topic */ diff --git a/libpurple/protocols/silc/silcpurple.h b/libpurple/protocols/silc/silcpurple.h index c19c6d6223..0412d5ba47 100644 --- a/libpurple/protocols/silc/silcpurple.h +++ b/libpurple/protocols/silc/silcpurple.h @@ -77,9 +77,7 @@ typedef struct SilcPurpleStruct { char *motd; PurpleRoomlist *roomlist; -#ifdef HAVE_SILCMIME_H SilcMimeAssembler mimeass; -#endif unsigned int detaching : 1; unsigned int resuming : 1; unsigned int roomlist_canceled : 1; @@ -148,13 +146,9 @@ void silcpurple_chat_chauth_show(SilcPurple sg, SilcChannelEntry channel, void silcpurple_parse_attrs(SilcDList attrs, char **moodstr, char **statusstr, char **contactstr, char **langstr, char **devicestr, char **tzstr, char **geostr); -#ifdef SILC_ATTRIBUTE_USER_ICON void silcpurple_buddy_set_icon(PurpleConnection *gc, PurpleStoredImage *img); -#endif -#ifdef HAVE_SILCMIME_H char *silcpurple_file2mime(const char *filename); SilcDList silcpurple_image_message(const char *msg, SilcUInt32 *mflags); -#endif #ifdef _WIN32 typedef int uid_t; diff --git a/libpurple/protocols/silc/util.c b/libpurple/protocols/silc/util.c index 84f905188e..e20d09aa1b 100644 --- a/libpurple/protocols/silc/util.c +++ b/libpurple/protocols/silc/util.c @@ -614,7 +614,6 @@ silcpurple_parse_attrs(SilcDList attrs, char **moodstr, char **statusstr, geo.accuracy ? geo.accuracy : ""); } -#ifdef HAVE_SILCMIME_H /* Returns MIME type of filetype */ char *silcpurple_file2mime(const char *filename) @@ -772,5 +771,3 @@ SilcDList silcpurple_image_message(const char *msg, SilcUInt32 *mflags) return list; } - -#endif /* HAVE_SILCMIME_H */ |