~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to camel/camel-mime-message.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1161
1161
static gboolean
1162
1162
find_attachment (CamelMimeMessage *msg, CamelMimePart *part, gpointer data)
1163
1163
{
1164
 
        const gchar *disp;
 
1164
        const CamelContentDisposition *cd;
1165
1165
        gboolean *found = (gboolean *)data;
1166
1166
 
1167
1167
        g_return_val_if_fail (part != NULL, FALSE);
1168
1168
 
1169
 
        disp = camel_mime_part_get_disposition (part);
1170
 
 
1171
 
        if (disp) {
1172
 
                CamelContentDisposition *cd = camel_content_disposition_decode (disp);
1173
 
 
1174
 
                if (cd) {
1175
 
                        *found = (cd->disposition && g_ascii_strcasecmp (cd->disposition, "attachment") == 0);
1176
 
 
1177
 
                        camel_content_disposition_unref (cd);
 
1169
        cd = camel_mime_part_get_content_disposition (part);
 
1170
 
 
1171
        if (cd) {
 
1172
                const struct _camel_header_param *param;
 
1173
 
 
1174
                *found = (cd->disposition && g_ascii_strcasecmp (cd->disposition, "attachment") == 0);
 
1175
 
 
1176
                for (param = cd->params; param && !(*found); param = param->next) {
 
1177
                        if (param->name && param->value && *param->value && g_ascii_strcasecmp (param->name, "filename") == 0)
 
1178
                                *found = TRUE;
1178
1179
                }
1179
1180
        }
1180
1181
 
1181
 
        return ! (*found);
 
1182
        return !(*found);
1182
1183
}
1183
1184
 
1184
1185
/**
1186
1187
 * @message: a #CamelMimeMessage object
1187
1188
 *
1188
1189
 * Returns whether message contains at least one attachment part.
 
1190
 *
 
1191
 * Since: 2.28
1189
1192
 **/
1190
1193
gboolean
1191
1194
camel_mime_message_has_attachment (CamelMimeMessage *message)