[evolution-data-server] Fix compiler warnings in calendar.
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Subject: [evolution-data-server] Fix compiler warnings in calendar.
- Date: Mon, 1 Jun 2009 18:47:36 -0400 (EDT)
commit 84cfedfc953a86997909b67020e4c0bd48fda64b
Author: Matthew Barnes <mbarnes redhat com>
Date: Sun May 31 23:11:46 2009 -0400
Fix compiler warnings in calendar.
---
calendar/backends/google/e-cal-backend-google.c | 7 +-
calendar/backends/google/e-cal-backend-google.h | 1 -
.../groupwise/e-cal-backend-groupwise-utils.c | 17 +-
.../groupwise/e-cal-backend-groupwise-utils.h | 1 -
.../backends/groupwise/e-cal-backend-groupwise.c | 10 +-
calendar/libecal/e-cal-component.c | 8 +-
calendar/libecal/e-cal-system-timezone.c | 2 +-
calendar/libecal/e-cal-util.c | 6 +-
calendar/libecal/e-cal-util.h | 2 +-
calendar/libecal/e-cal.c | 5 +-
calendar/libedata-cal/e-cal-backend-cache.c | 4 +-
calendar/libedata-cal/e-cal-backend-sexp.c | 2 +-
servers/groupwise/e-gw-item.c | 186 ++++++++++----------
servers/groupwise/e-gw-item.h | 2 +-
servers/groupwise/e-gw-recur-utils.h | 2 +-
15 files changed, 127 insertions(+), 128 deletions(-)
diff --git a/calendar/backends/google/e-cal-backend-google.c b/calendar/backends/google/e-cal-backend-google.c
index f07f3cb..845d6d3 100644
--- a/calendar/backends/google/e-cal-backend-google.c
+++ b/calendar/backends/google/e-cal-backend-google.c
@@ -534,8 +534,8 @@ fetch_attachments (ECalBackendGoogle *cbgo, ECalComponent *comp)
e_cal_component_set_attachment_list (comp, new_attach_list);
}
-ECalBackendSyncStatus
-static receive_object (ECalBackendGoogle *cbgo, EDataCal *cal, icalcomponent *icalcomp)
+static ECalBackendSyncStatus
+receive_object (ECalBackendGoogle *cbgo, EDataCal *cal, icalcomponent *icalcomp)
{
ECalBackendGooglePrivate *priv;
EGoItem *item = NULL;
@@ -1145,7 +1145,8 @@ e_cal_backend_google_open (ECalBackendSync *backend, EDataCal *cal, gboolean onl
ECalBackendGooglePrivate *priv;
ECalBackendSyncStatus status;
ECalSourceType source_type;
- gchar *source = NULL, *mangled_uri = NULL, *filename = NULL;
+ const gchar *source = NULL;
+ gchar *mangled_uri = NULL, *filename = NULL;
gint i;
cbgo = E_CAL_BACKEND_GOOGLE(backend);
diff --git a/calendar/backends/google/e-cal-backend-google.h b/calendar/backends/google/e-cal-backend-google.h
index e6f697d..c3de6af 100644
--- a/calendar/backends/google/e-cal-backend-google.h
+++ b/calendar/backends/google/e-cal-backend-google.h
@@ -80,7 +80,6 @@ void e_cal_backend_google_set_cache (ECalBackendGoogle *cbgo, ECalBackendCache *
void e_cal_backend_google_set_item (ECalBackendGoogle *cbgo, EGoItem *item);
void e_cal_backend_google_set_service (ECalBackendGoogle *cbgo, GDataGoogleService *service);
void e_cal_backend_google_set_uri (ECalBackendGoogle *cbgo, gchar *uri);
-void e_cal_backend_google_set_item (ECalBackendGoogle *cbgo, EGoItem *item);
void e_cal_backend_google_set_mode_changed (ECalBackendGoogle *cbgo, gboolean mode_changed);
void e_cal_backend_google_set_username (ECalBackendGoogle *cbgo, gchar *username);
void e_cal_backend_google_set_password (ECalBackendGoogle *cbgo, gchar *password);
diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
index 0559a88..34fcdb3 100644
--- a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
+++ b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
@@ -308,7 +308,7 @@ e_cal_backend_groupwise_set_attachments_from_comp (ECalComponent *comp,
e_cal_component_get_attachment_list (comp, &attach_file_list);
- for (l = attach_file_list; l ; l = l->next) {
+ for (l = attach_file_list; l; l = l->next) {
EGwItemAttachment *attach_item;
gchar *file_contents, *encoded_data;
@@ -344,7 +344,7 @@ e_cal_backend_groupwise_set_attachments_from_comp (ECalComponent *comp,
attach_item->name = g_strdup (filename + strlen(uid) + 1);
/* do a base64 encoding so it can be embedded in a soap
* message */
- encoded_data = g_base64_encode (file_contents, file_len);
+ encoded_data = g_base64_encode ((guchar *) file_contents, file_len);
attach_item->data = encoded_data;
attach_item->size = strlen (encoded_data);
@@ -568,7 +568,7 @@ set_rrule_from_comp (ECalComponent *comp, EGwItem *item, ECalBackendGroupwise *c
e_cal_component_get_exdate_list (comp, &exdate_list);
default_zone = e_cal_backend_groupwise_get_default_zone (cbgw);
utc = icaltimezone_get_utc_timezone ();
- for (l = exdate_list; l ; l = l->next) {
+ for (l = exdate_list; l; l = l->next) {
ECalComponentDateTime *dt = (ECalComponentDateTime *) l->data;
if (dt->value) {
if (!icaltime_get_timezone (*(dt->value)))
@@ -895,7 +895,7 @@ set_attachments_to_cal_component (EGwItem *item, ECalComponent *comp, ECalBacken
return; /* No attachments exist */
e_cal_component_get_uid (comp, &uid);
- for (l = fetch_list; l ; l = l->next) {
+ for (l = fetch_list; l; l = l->next) {
gint fd;
EGwItemAttachment *attach_item;
gchar *attach_data = NULL;
@@ -1026,7 +1026,8 @@ e_gw_item_to_cal_component (EGwItem *item, ECalBackendGroupwise *cbgw)
ECalComponentText text;
ECalComponentDateTime dt;
const gchar *description, *uid;
- gchar *t, *name;
+ const gchar *t;
+ gchar *name;
GList *category_ids;
GSList *categories;
GHashTable *categories_by_id;
@@ -1501,7 +1502,7 @@ e_gw_connection_send_appointment (ECalBackendGroupwise *cbgw, const gchar *conta
e_cal_component_get_attendee_list (comp, &attendee_list);
- for (l = attendee_list; l ; l = g_slist_next (l)) {
+ for (l = attendee_list; l; l = g_slist_next (l)) {
tmp = (ECalComponentAttendee *) (l->data);
email_id = tmp->value;
@@ -1980,7 +1981,7 @@ set_categories_changes (EGwItem *new_item, EGwItem *old_item)
new_category_list = e_gw_item_get_categories (new_item);
if (old_category_list && new_category_list) {
old_categories_copy = g_list_copy (old_category_list);
- for ( ; new_category_list != NULL; new_category_list = g_list_next (new_category_list)) {
+ for (; new_category_list != NULL; new_category_list = g_list_next (new_category_list)) {
category1 = new_category_list->data;
temp = old_category_list;
@@ -2064,7 +2065,7 @@ e_gw_item_set_changes (EGwItem *item, EGwItem *cache_item)
static void
-add_return_value (EGwSendOptionsReturnNotify track, ESource *source, gchar *notify)
+add_return_value (EGwSendOptionsReturnNotify track, ESource *source, const gchar *notify)
{
gchar *value;
diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.h b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.h
index 809494d..bfd307f 100644
--- a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.h
+++ b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.h
@@ -55,7 +55,6 @@ EGwConnectionStatus e_gw_connection_create_appointment (EGwConnection *cnc, cons
EGwConnectionStatus e_gw_connection_send_appointment (ECalBackendGroupwise *cbgw, const gchar *container, ECalComponent *comp, icalproperty_method method, gboolean all_instances, ECalComponent **created_comp, icalparameter_partstat *pstatus);
EGwConnectionStatus e_gw_connection_get_freebusy_info (EGwConnection *cnc, GList *users, time_t start, time_t end, GList **freebusy, icaltimezone *default_zone);
gboolean e_cal_backend_groupwise_store_settings (GwSettings *hold);
-EGwItem * e_gw_item_new_for_delegate_from_cal (ECalBackendGroupwise *cbgw, ECalComponent *comp);
gboolean e_cal_backend_groupwise_utils_check_delegate (ECalComponent *comp, const gchar *email);
diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise.c b/calendar/backends/groupwise/e-cal-backend-groupwise.c
index 26d4a4d..834ba04 100644
--- a/calendar/backends/groupwise/e-cal-backend-groupwise.c
+++ b/calendar/backends/groupwise/e-cal-backend-groupwise.c
@@ -329,7 +329,7 @@ get_deltas (gpointer handle)
static GStaticMutex connecting = G_STATIC_MUTEX_INIT;
const gchar *key = "attempts";
const gchar *attempts;
- const gchar *position ;
+ const gchar *position;
EGwFilter *filter;
@@ -594,7 +594,7 @@ get_deltas (gpointer handle)
g_free (real_key);
}
- for (ls = cache_keys; ls ; ls = g_slist_next (ls)) {
+ for (ls = cache_keys; ls; ls = g_slist_next (ls)) {
ECalComponent *comp = NULL;
icalcomponent *icalcomp = NULL;
@@ -1321,7 +1321,7 @@ e_cal_backend_groupwise_open (ECalBackendSync *backend, EDataCal *cal, gboolean
ECalBackendGroupwisePrivate *priv;
ECalBackendSyncStatus status;
ECalSourceType source_type;
- gchar *source = NULL;
+ const gchar *source = NULL;
gchar *filename;
gchar *mangled_uri;
gint i;
@@ -1985,7 +1985,7 @@ update_from_server (ECalBackendGroupwise *cbgw, GSList *uid_list, gchar **calobj
comp = g_object_ref ( (ECalComponent *) list->data );
/* convert items into components and add them to the cache */
- for (i=0, tmp = list; tmp ; tmp = g_list_next (tmp), i++) {
+ for (i=0, tmp = list; tmp; tmp = g_list_next (tmp), i++) {
ECalComponent *e_cal_comp;
EGwItem *item;
@@ -2420,7 +2420,7 @@ fetch_attachments (ECalBackendGroupwise *cbgw, ECalComponent *comp)
/*FIXME get the uri rather than computing the path */
attach_store = g_strdup (e_cal_backend_groupwise_get_local_attachments_store (cbgw));
- for (l = attach_list; l ; l = l->next) {
+ for (l = attach_list; l; l = l->next) {
gchar *sfname = (gchar *)l->data;
gchar *filename, *new_filename;
GMappedFile *mapped_file;
diff --git a/calendar/libecal/e-cal-component.c b/calendar/libecal/e-cal-component.c
index e62a5b8..d3c7e7d 100644
--- a/calendar/libecal/e-cal-component.c
+++ b/calendar/libecal/e-cal-component.c
@@ -417,7 +417,7 @@ gchar *
e_cal_component_gen_uid (void)
{
gchar *iso, *ret;
- static gchar *hostname;
+ static const gchar *hostname;
time_t t = time (NULL);
static gint serial;
@@ -1509,7 +1509,7 @@ get_attachment_list (GSList *attachment_list, GSList **al)
for (l = attachment_list; l; l = l->next) {
struct attachment *attachment;
const gchar *data;
- size_t buf_size;
+ gsize buf_size;
gchar *buf = NULL;
attachment = l->data;
@@ -1564,7 +1564,7 @@ set_attachment_list (icalcomponent *icalcomp,
for (l = al; l; l = l->next) {
struct attachment *attachment;
- size_t buf_size;
+ gsize buf_size;
gchar *buf;
attachment = g_new0 (struct attachment, 1);
@@ -5364,7 +5364,7 @@ ECalComponentAlarm *
e_cal_component_alarm_new (void)
{
ECalComponentAlarm *alarm;
- gchar *new_auid ;
+ gchar *new_auid;
alarm = g_new (ECalComponentAlarm, 1);
diff --git a/calendar/libecal/e-cal-system-timezone.c b/calendar/libecal/e-cal-system-timezone.c
index c0eb2e2..5104248 100644
--- a/calendar/libecal/e-cal-system-timezone.c
+++ b/calendar/libecal/e-cal-system-timezone.c
@@ -216,7 +216,7 @@ static gchar *
recursive_compare (struct stat *localtime_stat,
const gchar *localtime_content,
gsize localtime_content_len,
- char *file,
+ const gchar *file,
CompareFiles compare_func)
{
struct stat file_stat;
diff --git a/calendar/libecal/e-cal-util.c b/calendar/libecal/e-cal-util.c
index 271a0a5..6451176 100644
--- a/calendar/libecal/e-cal-util.c
+++ b/calendar/libecal/e-cal-util.c
@@ -213,7 +213,7 @@ e_cal_util_parse_ics_string (const gchar *string)
}
static gchar *
-get_line_fn (gchar *buf, size_t size, gpointer file)
+get_line_fn (gchar *buf, gsize size, gpointer file)
{
return fgets (buf, size, file);
}
@@ -675,10 +675,10 @@ e_cal_util_generate_alarms_for_list (GList *comps,
* Return value: a string representing the PRIORITY value. This value is a
* constant, so it should never be freed.
*/
-gchar *
+const gchar *
e_cal_util_priority_to_string (gint priority)
{
- gchar *retval;
+ const gchar *retval;
if (priority <= 0)
retval = "";
diff --git a/calendar/libecal/e-cal-util.h b/calendar/libecal/e-cal-util.h
index ce05993..9af0cfb 100644
--- a/calendar/libecal/e-cal-util.h
+++ b/calendar/libecal/e-cal-util.h
@@ -87,7 +87,7 @@ gint e_cal_util_generate_alarms_for_list (GList *comps,
gpointer user_data,
icaltimezone *default_timezone);
-gchar *e_cal_util_priority_to_string (gint priority);
+const gchar *e_cal_util_priority_to_string (gint priority);
gint e_cal_util_priority_from_string (const gchar *string);
void e_cal_util_add_timezones_from_component (icalcomponent *vcal_comp,
diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index 6e1c24d..c514aa4 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -1011,10 +1011,9 @@ get_factories (const gchar *str_uri, GList **factories)
GNOME_Evolution_Calendar_CalFactory factory;
Bonobo_ServerInfoList *servers;
EUri *uri;
- gchar *query;
+ const gchar *query;
gint i;
-
/* Determine the protocol and query for factory supporting that */
uri = e_uri_new (str_uri);
if (!uri) {
@@ -4828,7 +4827,7 @@ e_cal_get_timezone (ECal *ecal, const gchar *tzid, icaltimezone **zone, GError *
}
/* Now add it to the cache, to avoid the server call in future. */
- g_hash_table_insert (priv->timezones, icaltimezone_get_tzid (*zone), *zone);
+ g_hash_table_insert (priv->timezones, (gpointer) icaltimezone_get_tzid (*zone), *zone);
e_calendar_remove_op (ecal, our_op);
e_calendar_free_op (our_op);
diff --git a/calendar/libedata-cal/e-cal-backend-cache.c b/calendar/libedata-cal/e-cal-backend-cache.c
index aa7fed9..e5ac4c8 100644
--- a/calendar/libedata-cal/e-cal-backend-cache.c
+++ b/calendar/libedata-cal/e-cal-backend-cache.c
@@ -467,7 +467,7 @@ e_cal_backend_cache_get_components (ECalBackendCache *cache)
l = e_file_cache_get_objects (E_FILE_CACHE (cache));
if (!l)
return NULL;
- for ( ; l != NULL; l = g_slist_next (l)) {
+ for (; l != NULL; l = g_slist_next (l)) {
comp_str = l->data;
if (comp_str) {
icalcomp = icalparser_parse_string (comp_str);
@@ -516,7 +516,7 @@ e_cal_backend_cache_get_components_by_uid (ECalBackendCache *cache, const gchar
l = e_file_cache_get_objects (E_FILE_CACHE (cache));
if (!l)
return NULL;
- for ( ; l != NULL; l = g_slist_next (l)) {
+ for (; l != NULL; l = g_slist_next (l)) {
comp_str = l->data;
if (comp_str) {
icalcomp = icalparser_parse_string (comp_str);
diff --git a/calendar/libedata-cal/e-cal-backend-sexp.c b/calendar/libedata-cal/e-cal-backend-sexp.c
index fef2356..09624b0 100644
--- a/calendar/libedata-cal/e-cal-backend-sexp.c
+++ b/calendar/libedata-cal/e-cal-backend-sexp.c
@@ -1244,7 +1244,7 @@ entry_compare(SearchContext *ctx, struct _ESExp *f,
/* 'builtin' functions */
static struct {
- gchar *name;
+ const gchar *name;
ESExpFunc *func;
gint type; /* set to 1 if a function can perform shortcut evaluation, or
doesn't execute everything, 0 otherwise */
diff --git a/servers/groupwise/e-gw-item.c b/servers/groupwise/e-gw-item.c
index 68ef0a2..83faeb6 100644
--- a/servers/groupwise/e-gw-item.c
+++ b/servers/groupwise/e-gw-item.c
@@ -55,7 +55,7 @@ struct _EGwItemPrivate {
gchar *priority;
gchar *task_priority;
gchar *place;
- gchar *source ;
+ gchar *source;
gchar *security;
GSList *recipient_list;
GSList *recurrence_dates;
@@ -68,14 +68,14 @@ struct _EGwItemPrivate {
EGwItemOrganizer *organizer;
/*properties for mail*/
- gchar *from ;
- gchar *to ;
- gchar *content_type ;
+ gchar *from;
+ gchar *to;
+ gchar *content_type;
gchar *msg_body_id;
gint item_status;
/*Attachments*/
gboolean has_attachment;
- GSList *attach_list ;
+ GSList *attach_list;
/*linkInfo for replies*/
EGwItemLinkInfo *link_info;
@@ -188,22 +188,22 @@ free_string (gpointer s, gpointer data)
static void
free_attach (gpointer s, gpointer data)
{
- EGwItemAttachment *attach = (EGwItemAttachment *) s ;
+ EGwItemAttachment *attach = (EGwItemAttachment *) s;
if (attach) {
if (attach->id)
- g_free (attach->id), attach->id = NULL ;
+ g_free (attach->id), attach->id = NULL;
if (attach->name)
- g_free (attach->name), attach->name = NULL ;
+ g_free (attach->name), attach->name = NULL;
if (attach->contentid)
- g_free (attach->contentid), attach->contentid= NULL ;
+ g_free (attach->contentid), attach->contentid= NULL;
if (attach->contentType)
- g_free (attach->contentType), attach->contentType = NULL ;
+ g_free (attach->contentType), attach->contentType = NULL;
if (attach->date)
- g_free (attach->date), attach->date = NULL ;
+ g_free (attach->date), attach->date = NULL;
if (attach->data)
- g_free (attach->data), attach->data = NULL ;
+ g_free (attach->data), attach->data = NULL;
- g_free(attach) ;
+ g_free(attach);
}
}
@@ -334,18 +334,18 @@ e_gw_item_dispose (GObject *object)
}
if (priv->from) {
- g_free (priv->from) ;
- priv->from = NULL ;
+ g_free (priv->from);
+ priv->from = NULL;
}
if (priv->to) {
- g_free (priv->to) ;
- priv->to = NULL ;
+ g_free (priv->to);
+ priv->to = NULL;
}
if (priv->content_type) {
- g_free (priv->content_type) ;
- priv->content_type = NULL ;
+ g_free (priv->content_type);
+ priv->content_type = NULL;
}
if (priv->msg_body_id) {
g_free (priv->msg_body_id);
@@ -439,8 +439,8 @@ e_gw_item_dispose (GObject *object)
if(priv->attach_list) {
g_slist_foreach (priv->attach_list, free_attach, NULL);
- g_slist_free (priv->attach_list) ;
- priv->attach_list = NULL ;
+ g_slist_free (priv->attach_list);
+ priv->attach_list = NULL;
}
if (priv->category_name) {
@@ -553,7 +553,7 @@ e_gw_item_init (EGwItem *item, EGwItemClass *klass)
priv->set_sendoptions = FALSE;
priv->expires = NULL;
priv->delay_until = NULL;
- priv->attach_list = NULL ;
+ priv->attach_list = NULL;
priv->simple_fields = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_free);
priv->full_name = g_new0(FullName, 1);
priv->addresses = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, free_postal_address);
@@ -671,7 +671,7 @@ set_recipient_list_from_soap_parameter (EGwItem *item, SoupSoapParameter *param)
subparam = soup_soap_parameter_get_first_child_by_name (param_recipient, "recipientStatus");
if (subparam) {
gchar *formatted_date, *value;
- SoupSoapParameter *temp_param ;
+ SoupSoapParameter *temp_param;
recipient->status_enabled = TRUE;
if ( (temp_param = soup_soap_parameter_get_first_child_by_name (subparam, "deleted")) ) {
@@ -825,7 +825,7 @@ set_sendoptions_from_soap_parameter (EGwItem *item, SoupSoapParameter *param)
}
}
-char*
+gchar *
e_gw_item_get_field_value (EGwItem *item, const gchar *field_name)
{
gpointer value;
@@ -844,7 +844,7 @@ e_gw_item_get_field_value (EGwItem *item, const gchar *field_name)
}
void
-e_gw_item_set_field_value (EGwItem *item, const gchar *field_name, char* field_value)
+e_gw_item_set_field_value (EGwItem *item, const gchar *field_name, gchar * field_value)
{
g_return_if_fail (field_name != NULL);
g_return_if_fail (field_name != NULL);
@@ -1101,7 +1101,7 @@ set_contact_fields_from_soap_parameter (EGwItem *item, SoupSoapParameter *param)
SoupSoapParameter *temp;
SoupSoapParameter *second_level_child;
GHashTable *simple_fields;
- FullName *full_name ;
+ FullName *full_name;
PostalAddress *address;
value = NULL;
@@ -1497,7 +1497,7 @@ append_full_name_to_soap_message (FullName *full_name, gchar *display_name, Soup
if (full_name->middle_name)
e_gw_message_write_string_parameter (msg, "middleName", NULL, full_name->middle_name);
if (full_name->last_name)
- e_gw_message_write_string_parameter (msg, "lastName", NULL, full_name->last_name) ;
+ e_gw_message_write_string_parameter (msg, "lastName", NULL, full_name->last_name);
if (full_name->name_suffix)
e_gw_message_write_string_parameter (msg, "nameSuffix", NULL, full_name->name_suffix);
soup_soap_message_end_element (msg);
@@ -1711,7 +1711,7 @@ e_gw_item_new_from_soap_parameter (const gchar *email, const gchar *container, S
g_free (internet_prop);
if (!g_ascii_strcasecmp (item_type, "Mail"))
- item->priv->item_type = E_GW_ITEM_TYPE_MAIL ;
+ item->priv->item_type = E_GW_ITEM_TYPE_MAIL;
else if (!g_ascii_strcasecmp (item_type, "Appointment"))
item->priv->item_type = E_GW_ITEM_TYPE_APPOINTMENT;
else if (!g_ascii_strcasecmp (item_type, "Task"))
@@ -1725,7 +1725,7 @@ e_gw_item_new_from_soap_parameter (const gchar *email, const gchar *container, S
return item;
}
else if (!g_ascii_strcasecmp (item_type,"SharedNotification"))
- item->priv->item_type = E_GW_ITEM_TYPE_NOTIFICATION ;
+ item->priv->item_type = E_GW_ITEM_TYPE_NOTIFICATION;
else if (!g_ascii_strcasecmp (item_type, "Organization")) {
@@ -1934,8 +1934,8 @@ e_gw_item_new_from_soap_parameter (const gchar *email, const gchar *container, S
g_free (formatted_date);
} else if (!g_ascii_strcasecmp (name, "to")) {
- gchar *to ;
- to = soup_soap_parameter_get_string_value (child) ;
+ gchar *to;
+ to = soup_soap_parameter_get_string_value (child);
e_gw_item_set_to (item, to);
g_free (to);
} else if (!g_ascii_strcasecmp (name, "iCalId"))
@@ -1974,57 +1974,57 @@ e_gw_item_new_from_soap_parameter (const gchar *email, const gchar *container, S
len = atoi (length);
item->priv->message = g_base64_decode (msg, &len);
if (!(item->priv->message)) {
- item->priv->msg_body_id = soup_soap_parameter_get_property (part, "id") ;
+ item->priv->msg_body_id = soup_soap_parameter_get_property (part, "id");
}
- item->priv->content_type = soup_soap_parameter_get_property (part, "contentType") ;
+ item->priv->content_type = soup_soap_parameter_get_property (part, "contentType");
}
g_free (length);
g_free (msg);
} else if (!g_ascii_strcasecmp (name, "attachments")) {
- for (attachment_param = soup_soap_parameter_get_first_child_by_name(child,"attachment") ;
- attachment_param != NULL ;
+ for (attachment_param = soup_soap_parameter_get_first_child_by_name(child,"attachment");
+ attachment_param != NULL;
attachment_param = soup_soap_parameter_get_next_child_by_name (attachment_param, "attachment")) {
- SoupSoapParameter *temp ;
- EGwItemAttachment *attach = g_new0 (EGwItemAttachment, 1) ;
+ SoupSoapParameter *temp;
+ EGwItemAttachment *attach = g_new0 (EGwItemAttachment, 1);
- temp = soup_soap_parameter_get_first_child_by_name (attachment_param, "id") ;
+ temp = soup_soap_parameter_get_first_child_by_name (attachment_param, "id");
if (temp) {
- attach->id = soup_soap_parameter_get_string_value (temp) ;
+ attach->id = soup_soap_parameter_get_string_value (temp);
attach->item_reference = soup_soap_parameter_get_property (temp, "itemReference");
}
- temp = soup_soap_parameter_get_first_child_by_name (attachment_param, "contentId") ;
+ temp = soup_soap_parameter_get_first_child_by_name (attachment_param, "contentId");
if (temp)
- attach->contentid = soup_soap_parameter_get_string_value (temp) ;
+ attach->contentid = soup_soap_parameter_get_string_value (temp);
- temp = soup_soap_parameter_get_first_child_by_name (attachment_param, "name") ;
+ temp = soup_soap_parameter_get_first_child_by_name (attachment_param, "name");
if (temp)
- attach->name = soup_soap_parameter_get_string_value (temp) ;
+ attach->name = soup_soap_parameter_get_string_value (temp);
- temp = soup_soap_parameter_get_first_child_by_name (attachment_param, "contentType") ;
+ temp = soup_soap_parameter_get_first_child_by_name (attachment_param, "contentType");
if (temp)
- attach->contentType = soup_soap_parameter_get_string_value (temp) ;
+ attach->contentType = soup_soap_parameter_get_string_value (temp);
- temp = soup_soap_parameter_get_first_child_by_name (attachment_param, "size") ;
+ temp = soup_soap_parameter_get_first_child_by_name (attachment_param, "size");
if (temp) {
value = soup_soap_parameter_get_string_value (temp);
attach->size = atoi (value);
g_free (value);
}
- temp = soup_soap_parameter_get_first_child_by_name (attachment_param, "date") ;
+ temp = soup_soap_parameter_get_first_child_by_name (attachment_param, "date");
if (temp)
- attach->date = soup_soap_parameter_get_string_value (temp) ;
+ attach->date = soup_soap_parameter_get_string_value (temp);
- temp = soup_soap_parameter_get_first_child_by_name (attachment_param, "hidden") ;
+ temp = soup_soap_parameter_get_first_child_by_name (attachment_param, "hidden");
if (temp)
if (soup_soap_parameter_get_int_value (temp) == 1)
attach->hidden = TRUE;
- item->priv->attach_list = g_slist_append (item->priv->attach_list, attach) ;
+ item->priv->attach_list = g_slist_append (item->priv->attach_list, attach);
}
} else if (!g_ascii_strcasecmp (name, "place"))
@@ -2060,15 +2060,15 @@ e_gw_item_new_from_soap_parameter (const gchar *email, const gchar *container, S
SoupSoapParameter *subparam;
EGwItemLinkInfo *info = g_new0 (EGwItemLinkInfo, 1);
- subparam = soup_soap_parameter_get_first_child_by_name (child, "id") ;
+ subparam = soup_soap_parameter_get_first_child_by_name (child, "id");
if (subparam)
info->id = soup_soap_parameter_get_string_value (subparam);
- subparam = soup_soap_parameter_get_first_child_by_name (child, "type") ;
+ subparam = soup_soap_parameter_get_first_child_by_name (child, "type");
if (subparam)
info->type =soup_soap_parameter_get_string_value (subparam);
- subparam = soup_soap_parameter_get_first_child_by_name (child, "thread") ;
+ subparam = soup_soap_parameter_get_first_child_by_name (child, "thread");
if (subparam)
info->thread =soup_soap_parameter_get_string_value (subparam);
@@ -2511,19 +2511,19 @@ e_gw_item_get_organizer (EGwItem *item)
void
e_gw_item_set_attach_id_list (EGwItem *item, GSList *attach_list)
{
- g_return_if_fail (E_IS_GW_ITEM (item)) ;
+ g_return_if_fail (E_IS_GW_ITEM (item));
if (attach_list) {
- g_slist_foreach (item->priv->attach_list, (GFunc)free_attach, NULL) ;
- g_slist_free (item->priv->attach_list) ;
+ g_slist_foreach (item->priv->attach_list, (GFunc)free_attach, NULL);
+ g_slist_free (item->priv->attach_list);
}
- item->priv->attach_list = attach_list ;
+ item->priv->attach_list = attach_list;
}
GSList *
e_gw_item_get_attach_id_list (EGwItem *item)
{
- g_return_val_if_fail (E_IS_GW_ITEM (item), NULL) ;
- return item->priv->attach_list ;
+ g_return_val_if_fail (E_IS_GW_ITEM (item), NULL);
+ return item->priv->attach_list;
}
void
@@ -2622,21 +2622,21 @@ void
e_gw_item_set_to (EGwItem *item, const gchar *to)
{
g_return_if_fail (E_IS_GW_ITEM (item));
- item->priv->to = g_strdup (to) ;
+ item->priv->to = g_strdup (to);
}
const gchar *
e_gw_item_get_to (EGwItem *item)
{
- g_return_val_if_fail (E_IS_GW_ITEM(item), NULL) ;
- return item->priv->to ;
+ g_return_val_if_fail (E_IS_GW_ITEM(item), NULL);
+ return item->priv->to;
}
const gchar *
e_gw_item_get_msg_content_type (EGwItem *item)
{
- g_return_val_if_fail (E_IS_GW_ITEM (item), NULL) ;
- return item->priv->content_type ;
+ g_return_val_if_fail (E_IS_GW_ITEM (item), NULL);
+ return item->priv->content_type;
}
const gchar *
@@ -2833,7 +2833,7 @@ e_gw_item_get_delay_until (EGwItem *item)
}
void
-e_gw_item_set_source (EGwItem *item, gchar *source)
+e_gw_item_set_source (EGwItem *item, const gchar *source)
{
g_return_if_fail (E_IS_GW_ITEM (item));
item->priv->source = g_strdup (source);
@@ -2854,7 +2854,7 @@ e_gw_item_get_content_type (EGwItem *item)
{
g_return_val_if_fail (E_IS_GW_ITEM (item), NULL);
- return item->priv->content_type ;
+ return item->priv->content_type;
}
void
@@ -3027,7 +3027,7 @@ add_attachment_to_soap_message(EGwItemAttachment *attachment, SoupSoapMessage *m
{
gchar *size = NULL;
- soup_soap_message_start_element (msg, "attachment", NULL, NULL) ;
+ soup_soap_message_start_element (msg, "attachment", NULL, NULL);
/*id*/
if (attachment->id && attachment->item_reference)
@@ -3037,32 +3037,32 @@ add_attachment_to_soap_message(EGwItemAttachment *attachment, SoupSoapMessage *m
else
e_gw_message_write_string_parameter (msg, "id", NULL, "");
/*name*/
- e_gw_message_write_string_parameter (msg, "name", NULL, attachment->name) ;
+ e_gw_message_write_string_parameter (msg, "name", NULL, attachment->name);
/*content id*/
e_gw_message_write_string_parameter (msg, "contentId", NULL, attachment->contentid);
/*content type*/
- e_gw_message_write_string_parameter (msg, "contentType", NULL, attachment->contentType) ;
+ e_gw_message_write_string_parameter (msg, "contentType", NULL, attachment->contentType);
/*size*/
if (attachment->size > 0) {
- size = g_strdup_printf ("%d", attachment->size) ;
- e_gw_message_write_string_parameter (msg, "size", NULL, size) ;
+ size = g_strdup_printf ("%d", attachment->size);
+ e_gw_message_write_string_parameter (msg, "size", NULL, size);
}
/*date*/
if (attachment->date)
- e_gw_message_write_string_parameter (msg, "date", NULL, attachment->date) ;
+ e_gw_message_write_string_parameter (msg, "date", NULL, attachment->date);
/*data*/
if (attachment->size > 0) {
- soup_soap_message_start_element (msg, "data", NULL, NULL) ;
+ soup_soap_message_start_element (msg, "data", NULL, NULL);
soup_soap_message_add_attribute (msg, "contentId", attachment->id, NULL, NULL);
- soup_soap_message_add_attribute (msg, "contentType", attachment->contentType, NULL, NULL) ;
- soup_soap_message_add_attribute (msg, "length", size, NULL, NULL) ;
- soup_soap_message_write_string (msg, attachment->data) ;
- soup_soap_message_end_element (msg) ;
+ soup_soap_message_add_attribute (msg, "contentType", attachment->contentType, NULL, NULL);
+ soup_soap_message_add_attribute (msg, "length", size, NULL, NULL);
+ soup_soap_message_write_string (msg, attachment->data);
+ soup_soap_message_end_element (msg);
}
- soup_soap_message_end_element (msg) ;
- g_free (size) ;
+ soup_soap_message_end_element (msg);
+ g_free (size);
}
static void
@@ -3234,14 +3234,14 @@ e_gw_item_set_calendar_item_elements (EGwItem *item, SoupSoapMessage *msg)
/*attachments*/
if (priv->attach_list) {
- GSList *al ;
- soup_soap_message_start_element (msg, "attachments", NULL, NULL) ;
- for (al = priv->attach_list ; al != NULL ; al = al->next) {
- EGwItemAttachment *attachment = (EGwItemAttachment *)al->data ;
- add_attachment_to_soap_message (attachment, msg) ;
+ GSList *al;
+ soup_soap_message_start_element (msg, "attachments", NULL, NULL);
+ for (al = priv->attach_list; al != NULL; al = al->next) {
+ EGwItemAttachment *attachment = (EGwItemAttachment *)al->data;
+ add_attachment_to_soap_message (attachment, msg);
}
- soup_soap_message_end_element (msg) ;
+ soup_soap_message_end_element (msg);
}
}
@@ -3267,9 +3267,9 @@ e_gw_item_append_to_soap_message (EGwItem *item, SoupSoapMessage *msg)
/*The subject*/
if (priv->subject)
- e_gw_message_write_string_parameter (msg, "subject", NULL, priv->subject) ;
+ e_gw_message_write_string_parameter (msg, "subject", NULL, priv->subject);
/*distribution*/
- e_gw_item_add_distribution_to_soap_message(item, msg) ;
+ e_gw_item_add_distribution_to_soap_message(item, msg);
if (priv->set_sendoptions) {
/* item options */
@@ -3284,8 +3284,8 @@ e_gw_item_append_to_soap_message (EGwItem *item, SoupSoapMessage *msg)
/*message*/
soup_soap_message_start_element (msg, "message", NULL, NULL);
if (priv->message) {
- gchar *str ;
- gchar *str_len ;
+ gchar *str;
+ gchar *str_len;
str = g_base64_encode (priv->message, strlen (priv->message));
/*str = g_strdup (priv->message);*/
@@ -3308,7 +3308,7 @@ e_gw_item_append_to_soap_message (EGwItem *item, SoupSoapMessage *msg)
if (priv->attach_list) {
GSList *al;
soup_soap_message_start_element (msg, "attachments", NULL, NULL);
- for (al = priv->attach_list ; al != NULL ; al = al->next) {
+ for (al = priv->attach_list; al != NULL; al = al->next) {
EGwItemAttachment *attachment = (EGwItemAttachment *)al->data;
add_attachment_to_soap_message (attachment, msg);
}
@@ -3318,9 +3318,9 @@ e_gw_item_append_to_soap_message (EGwItem *item, SoupSoapMessage *msg)
/*Link info - used when a mail is being replied to or forwarded*/
if (priv->link_info) {
soup_soap_message_start_element (msg, "link", NULL, NULL);
- e_gw_message_write_string_parameter (msg, "id", NULL, priv->link_info->id) ;
- e_gw_message_write_string_parameter (msg, "type", NULL, priv->link_info->type) ;
- e_gw_message_write_string_parameter (msg, "thread", NULL, priv->link_info->thread) ;
+ e_gw_message_write_string_parameter (msg, "id", NULL, priv->link_info->id);
+ e_gw_message_write_string_parameter (msg, "type", NULL, priv->link_info->type);
+ e_gw_message_write_string_parameter (msg, "thread", NULL, priv->link_info->thread);
soup_soap_message_end_element (msg);
}
diff --git a/servers/groupwise/e-gw-item.h b/servers/groupwise/e-gw-item.h
index a7f10e6..927d245 100644
--- a/servers/groupwise/e-gw-item.h
+++ b/servers/groupwise/e-gw-item.h
@@ -295,7 +295,7 @@ EGwItemRecurrenceRule *e_gw_item_get_rrule (EGwItem *item);
gint e_gw_item_get_recurrence_key (EGwItem *item);
void e_gw_item_set_recurrence_key (EGwItem *item, gint recurrence_key);
-void e_gw_item_set_source (EGwItem *item, gchar *source) ;
+void e_gw_item_set_source (EGwItem *item, const gchar *source);
gint e_gw_item_get_trigger (EGwItem *item);
void e_gw_item_set_trigger (EGwItem *item, gint trigger);
diff --git a/servers/groupwise/e-gw-recur-utils.h b/servers/groupwise/e-gw-recur-utils.h
index d7acedb..c6043cc 100644
--- a/servers/groupwise/e-gw-recur-utils.h
+++ b/servers/groupwise/e-gw-recur-utils.h
@@ -54,7 +54,7 @@
#define E_GW_ITEM_BY_SETPOS_SIZE 367
typedef struct {
- gchar *frequency;
+ const gchar *frequency;
gchar *until;
gint count;
gint interval;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]