~ubuntu-branches/ubuntu/precise/evolution/precise

« back to all changes in this revision

Viewing changes to plugins/publish-calendar/publish-location.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2011-06-24 00:27:53 UTC
  • mfrom: (1.1.80 upstream)
  • Revision ID: james.westby@ubuntu.com-20110624002753-2vh1vjavlya7r103
Tags: 3.1.2-0ubuntu1
* New upstream release 3.1.2.
* debian/control: adjust Build-Depends to match new upstream requirements for
  the new release.
* debian/control: update evolution and evolution-dev Depends to require the
  right versions of e-d-s (>= 3.1, << 3.2), and drop libunique-3.0-dev.
* debian/control,
  debian/evolution.install: remove groupwise-features from the plugin list,
  it's now split out into a separate module.
* debian/patches/03_lpi.patch: refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 *
22
22
 */
23
23
 
 
24
#ifdef HAVE_CONFIG_H
 
25
#include <config.h>
 
26
#endif
 
27
 
24
28
#include "publish-location.h"
25
29
#include <libxml/tree.h>
26
30
#include <gconf/gconf-client.h>
61
65
        frequency = xmlGetProp (root, (const guchar *)"frequency");
62
66
        username = xmlGetProp (root, (const guchar *)"username");
63
67
 
64
 
        euri = e_uri_new ((const gchar *)location);
 
68
        euri = e_uri_new ((const gchar *) location);
65
69
 
66
70
        if (!euri) {
67
71
                g_warning ("Could not form the uri for %s \n", location);
71
75
        if (euri->user)
72
76
                g_free (euri->user);
73
77
 
74
 
        euri->user = g_strdup ((const gchar *)username);
 
78
        euri->user = g_strdup ((const gchar *) username);
75
79
 
76
80
        temp = e_uri_to_string (euri, FALSE);
77
81
        uri->location = g_strdup_printf ("dav://%s", strstr (temp, "//") + 2);
79
83
        e_uri_free (euri);
80
84
 
81
85
        if (enabled != NULL)
82
 
                uri->enabled = atoi ((gchar *)enabled);
 
86
                uri->enabled = atoi ((gchar *) enabled);
83
87
        if (frequency != NULL)
84
 
                uri->publish_frequency = atoi ((gchar *)frequency);
 
88
                uri->publish_frequency = atoi ((gchar *) frequency);
85
89
        uri->publish_format = URI_PUBLISH_AS_FB;
86
90
 
87
91
        password = e_passwords_get_password ("Calendar", (gchar *)location);
129
133
        GSList *events = NULL;
130
134
        EPublishUri *uri;
131
135
 
132
 
        doc = xmlParseDoc ((const guchar *)xml);
 
136
        doc = xmlParseDoc ((const guchar *) xml);
133
137
        if (doc == NULL)
134
138
                return NULL;
135
139
 
154
158
        fb_duration_type = xmlGetProp (root, (xmlChar *)"fb_duration_type");
155
159
 
156
160
        if (location != NULL)
157
 
                uri->location = (gchar *)location;
 
161
                uri->location = (gchar *) location;
158
162
        if (enabled != NULL)
159
 
                uri->enabled = atoi ((gchar *)enabled);
 
163
                uri->enabled = atoi ((gchar *) enabled);
160
164
        if (frequency != NULL)
161
 
                uri->publish_frequency = atoi ((gchar *)frequency);
 
165
                uri->publish_frequency = atoi ((gchar *) frequency);
162
166
        if (format != NULL)
163
 
                uri->publish_format = atoi ((gchar *)format);
 
167
                uri->publish_format = atoi ((gchar *) format);
164
168
        if (publish_time != NULL)
165
 
                uri->last_pub_time = (gchar *)publish_time;
 
169
                uri->last_pub_time = (gchar *) publish_time;
166
170
 
167
171
        if (fb_duration_value)
168
 
                uri->fb_duration_value = atoi ((gchar *)fb_duration_value);
 
172
                uri->fb_duration_value = atoi ((gchar *) fb_duration_value);
169
173
        else
170
174
                uri->fb_duration_value = -1;
171
175