[evolution-exchange] Prefer GLib basic types over C types.
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Subject: [evolution-exchange] Prefer GLib basic types over C types.
- Date: Thu, 28 May 2009 13:44:28 -0400 (EDT)
commit b9949b58b8296d057eed6bd3847766e2b5da1101
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu May 28 13:44:04 2009 -0400
Prefer GLib basic types over C types.
---
addressbook/e-book-backend-db-cache.c | 66 +++---
addressbook/e-book-backend-db-cache.h | 22 +-
addressbook/e-book-backend-exchange-factory.c | 2 +-
addressbook/e-book-backend-exchange.c | 276 ++++++++++----------
addressbook/e-book-backend-gal-factory.c | 2 +-
addressbook/e-book-backend-gal.c | 306 +++++++++++-----------
calendar/e-cal-backend-exchange-calendar.c | 190 +++++++-------
calendar/e-cal-backend-exchange-factory.c | 2 +-
calendar/e-cal-backend-exchange-tasks.c | 144 ++++++------
calendar/e-cal-backend-exchange-tasks.h | 4 +-
calendar/e-cal-backend-exchange.c | 212 ++++++++--------
calendar/e-cal-backend-exchange.h | 42 ++--
calendar/e2k-cal-query.c | 56 ++--
calendar/e2k-cal-query.h | 2 +-
calendar/e2k-cal-utils.c | 4 +-
calendar/e2k-cal-utils.h | 4 +-
camel/camel-exchange-folder.c | 92 ++++----
camel/camel-exchange-folder.h | 28 +-
camel/camel-exchange-journal.c | 42 ++--
camel/camel-exchange-journal.h | 16 +-
camel/camel-exchange-provider.c | 14 +-
camel/camel-exchange-search.c | 14 +-
camel/camel-exchange-store.c | 104 ++++----
camel/camel-exchange-store.h | 4 +-
camel/camel-exchange-summary.c | 32 ++--
camel/camel-exchange-summary.h | 10 +-
camel/camel-exchange-transport.c | 8 +-
camel/camel-stub-marshal.c | 64 +++---
camel/camel-stub-marshal.h | 26 +-
camel/camel-stub.c | 36 ++--
camel/camel-stub.h | 6 +-
mail/mail-stub-exchange.c | 338 ++++++++++++------------
mail/mail-stub-exchange.h | 6 +-
mail/mail-stub-listener.c | 12 +-
mail/mail-stub-listener.h | 8 +-
mail/mail-stub.c | 74 +++---
mail/mail-stub.h | 70 +++---
mail/mail-utils.c | 48 ++--
mail/mail-utils.h | 12 +-
storage/exchange-autoconfig-wizard.c | 24 +-
storage/exchange-change-password.c | 10 +-
storage/exchange-change-password.h | 2 +-
storage/exchange-component.c | 12 +-
storage/exchange-component.h | 4 +-
storage/exchange-config-listener.c | 52 ++--
storage/exchange-config-listener.h | 4 +-
storage/exchange-migrate.c | 30 +-
storage/exchange-migrate.h | 2 +-
storage/exchange-storage.c | 46 ++--
storage/exchange-storage.h | 6 +-
storage/main.c | 22 +-
storage/migr-test.c | 10 +-
storage/ximian-connector-setup.c | 12 +-
53 files changed, 1317 insertions(+), 1317 deletions(-)
diff --git a/addressbook/e-book-backend-db-cache.c b/addressbook/e-book-backend-db-cache.c
index cf9f505..2e00415 100644
--- a/addressbook/e-book-backend-db-cache.c
+++ b/addressbook/e-book-backend-db-cache.c
@@ -29,19 +29,19 @@
#include <libedata-book/e-book-backend-sexp.h>
void
-string_to_dbt(const char *str, DBT *dbt)
+string_to_dbt(const gchar *str, DBT *dbt)
{
memset(dbt, 0, sizeof(dbt));
- dbt->data = (void *)str;
+ dbt->data = (gpointer)str;
dbt->size = strlen(str) + 1;
dbt->flags = DB_DBT_USERMEM;
}
-static char *
-get_filename_from_uri (const char *uri)
+static gchar *
+get_filename_from_uri (const gchar *uri)
{
- char *mangled_uri, *filename;
- int i;
+ gchar *mangled_uri, *filename;
+ gint i;
/* mangle the URI to not contain invalid characters */
mangled_uri = g_strdup (uri);
@@ -72,10 +72,10 @@ get_filename_from_uri (const char *uri)
**/
void
-e_book_backend_db_cache_set_filename(DB *db, const char *filename)
+e_book_backend_db_cache_set_filename(DB *db, const gchar *filename)
{
DBT uid_dbt, vcard_dbt;
- int db_error;
+ gint db_error;
string_to_dbt ("filename", &uid_dbt);
string_to_dbt (filename, &vcard_dbt);
@@ -94,12 +94,12 @@ e_book_backend_db_cache_set_filename(DB *db, const char *filename)
* Get the filename for db cacahe file.
**/
-char *
+gchar *
e_book_backend_db_cache_get_filename(DB *db)
{
DBT uid_dbt, vcard_dbt;
- int db_error;
- char *filename;
+ gint db_error;
+ gchar *filename;
string_to_dbt ("filename", &uid_dbt);
memset (&vcard_dbt, 0 , sizeof(vcard_dbt));
@@ -118,10 +118,10 @@ e_book_backend_db_cache_get_filename(DB *db)
}
void
-e_book_backend_db_cache_set_time(DB *db, const char *t)
+e_book_backend_db_cache_set_time(DB *db, const gchar *t)
{
DBT uid_dbt, vcard_dbt ;
- int db_error ;
+ gint db_error ;
string_to_dbt ("last_update_time", &uid_dbt);
string_to_dbt (t, &vcard_dbt);
@@ -132,12 +132,12 @@ e_book_backend_db_cache_set_time(DB *db, const char *t)
}
}
-char *
+gchar *
e_book_backend_db_cache_get_time (DB *db)
{
DBT uid_dbt, vcard_dbt;
- int db_error;
- char *t;
+ gint db_error;
+ gchar *t;
string_to_dbt ("last_update_time", &uid_dbt);
memset (&vcard_dbt, 0, sizeof(vcard_dbt));
@@ -167,11 +167,11 @@ e_book_backend_db_cache_get_time (DB *db)
* Return value: A cached #EContact, or %NULL if @uid is not cached.
**/
EContact *
-e_book_backend_db_cache_get_contact (DB *db, const char *uid)
+e_book_backend_db_cache_get_contact (DB *db, const gchar *uid)
{
DBT uid_dbt, vcard_dbt;
- int db_error;
- const char *vcard_str;
+ gint db_error;
+ const gchar *vcard_str;
g_return_val_if_fail (uid != NULL, NULL);
@@ -205,9 +205,9 @@ e_book_backend_db_cache_add_contact (DB *db,
EContact *contact)
{
DBT uid_dbt, vcard_dbt;
- int db_error;
- char *vcard_str;
- const char *uid;
+ gint db_error;
+ gchar *vcard_str;
+ const gchar *uid;
uid = e_contact_get_const (contact, E_CONTACT_UID);
if (!uid) {
@@ -249,11 +249,11 @@ e_book_backend_db_cache_add_contact (DB *db,
**/
gboolean
e_book_backend_db_cache_remove_contact (DB *db,
- const char *uid)
+ const gchar *uid)
{
DBT uid_dbt;
- int db_error;
+ gint db_error;
g_return_val_if_fail (uid != NULL, FALSE);
@@ -279,10 +279,10 @@ e_book_backend_db_cache_remove_contact (DB *db,
* Return value: %TRUE if the cache contains the contact, %FALSE otherwise.
**/
gboolean
-e_book_backend_db_cache_check_contact (DB *db, const char *uid)
+e_book_backend_db_cache_check_contact (DB *db, const gchar *uid)
{
DBT uid_dbt, vcard_dbt;
- int db_error;
+ gint db_error;
g_return_val_if_fail (uid != NULL, FALSE);
@@ -311,11 +311,11 @@ e_book_backend_db_cache_check_contact (DB *db, const char *uid)
* Return value: A #GList of pointers to #EContact.
**/
GList *
-e_book_backend_db_cache_get_contacts (DB *db, const char *query)
+e_book_backend_db_cache_get_contacts (DB *db, const gchar *query)
{
DBC *dbc;
DBT uid_dbt, vcard_dbt;
- int db_error;
+ gint db_error;
GList *list = NULL;
EBookBackendSExp *sexp = NULL;
EContact *contact;
@@ -367,7 +367,7 @@ e_book_backend_db_cache_get_contacts (DB *db, const char *query)
* Return value: A #GPtrArray of pointers to contact ID strings.
**/
GPtrArray *
-e_book_backend_db_cache_search (DB *db, const char *query)
+e_book_backend_db_cache_search (DB *db, const gchar *query)
{
GList *matching_contacts, *temp;
GPtrArray *ptr_array;
@@ -394,9 +394,9 @@ e_book_backend_db_cache_search (DB *db, const char *query)
* Return value: %TRUE if cache exists, %FALSE if not.
**/
gboolean
-e_book_backend_db_cache_exists (const char *uri)
+e_book_backend_db_cache_exists (const gchar *uri)
{
- char *file_name;
+ gchar *file_name;
gboolean exists = FALSE;
file_name = get_filename_from_uri (uri);
@@ -419,7 +419,7 @@ void
e_book_backend_db_cache_set_populated (DB *db)
{
DBT uid_dbt, vcard_dbt;
- int db_error;
+ gint db_error;
string_to_dbt ("populated", &uid_dbt);
string_to_dbt ("TRUE", &vcard_dbt);
@@ -442,7 +442,7 @@ gboolean
e_book_backend_db_cache_is_populated (DB *db)
{
DBT uid_dbt, vcard_dbt;
- int db_error;
+ gint db_error;
string_to_dbt ("populated", &uid_dbt);
memset(&vcard_dbt, 0, sizeof(vcard_dbt));
diff --git a/addressbook/e-book-backend-db-cache.h b/addressbook/e-book-backend-db-cache.h
index 25fb9d4..6b98a47 100644
--- a/addressbook/e-book-backend-db-cache.h
+++ b/addressbook/e-book-backend-db-cache.h
@@ -25,22 +25,22 @@
#include <libebook/e-contact.h>
#include "db.h"
-EContact* e_book_backend_db_cache_get_contact (DB *db, const char *uid);
-void string_to_dbt(const char *str, DBT *dbt);
-char *e_book_backend_db_cache_get_filename(DB *db);
-void e_book_backend_db_cache_set_filename(DB *db, const char *filename);
-char *e_book_backend_db_cache_get_time(DB *db);
-void e_book_backend_db_cache_set_time(DB *db, const char *time);
+EContact* e_book_backend_db_cache_get_contact (DB *db, const gchar *uid);
+void string_to_dbt(const gchar *str, DBT *dbt);
+gchar *e_book_backend_db_cache_get_filename(DB *db);
+void e_book_backend_db_cache_set_filename(DB *db, const gchar *filename);
+gchar *e_book_backend_db_cache_get_time(DB *db);
+void e_book_backend_db_cache_set_time(DB *db, const gchar *time);
gboolean e_book_backend_db_cache_add_contact (DB *db,
EContact *contact);
gboolean e_book_backend_db_cache_remove_contact (DB *db,
- const char *uid);
-gboolean e_book_backend_db_cache_check_contact (DB *db, const char *uid);
-GList* e_book_backend_db_cache_get_contacts (DB *db, const char *query);
-gboolean e_book_backend_db_cache_exists (const char *uri);
+ const gchar *uid);
+gboolean e_book_backend_db_cache_check_contact (DB *db, const gchar *uid);
+GList* e_book_backend_db_cache_get_contacts (DB *db, const gchar *query);
+gboolean e_book_backend_db_cache_exists (const gchar *uri);
void e_book_backend_db_cache_set_populated (DB *db);
gboolean e_book_backend_db_cache_is_populated (DB *db);
-GPtrArray* e_book_backend_db_cache_search (DB *db, const char *query);
+GPtrArray* e_book_backend_db_cache_search (DB *db, const gchar *query);
diff --git a/addressbook/e-book-backend-exchange-factory.c b/addressbook/e-book-backend-exchange-factory.c
index 270cb79..3b8716a 100644
--- a/addressbook/e-book-backend-exchange-factory.c
+++ b/addressbook/e-book-backend-exchange-factory.c
@@ -32,7 +32,7 @@ e_book_backend_exchange_factory_instance_init (EBookBackendExchangeFactory *fact
{
}
-static const char *
+static const gchar *
_get_protocol (EBookBackendFactory *factory)
{
return "exchange";
diff --git a/addressbook/e-book-backend-exchange.c b/addressbook/e-book-backend-exchange.c
index ab6389d..6cb4cdb 100644
--- a/addressbook/e-book-backend-exchange.c
+++ b/addressbook/e-book-backend-exchange.c
@@ -70,7 +70,7 @@
static EBookBackendClass *parent_class;
struct EBookBackendExchangePrivate {
- char *exchange_uri;
+ gchar *exchange_uri;
char *original_uri;
EFolder *folder;
@@ -80,7 +80,7 @@ struct EBookBackendExchangePrivate {
E2kContext *ctx;
gboolean connected;
GHashTable *ops;
- int mode;
+ gint mode;
gboolean is_writable;
gboolean is_cache_ready;
gboolean marked_for_offline;
@@ -99,24 +99,24 @@ struct EBookBackendExchangePrivate {
typedef struct PropMapping PropMapping;
-static void subscription_notify (E2kContext *ctx, const char *uri, E2kContextChangeType type, gpointer user_data);
+static void subscription_notify (E2kContext *ctx, const gchar *uri, E2kContextChangeType type, gpointer user_data);
static void proppatch_address(PropMapping *prop_mapping, EContact *new_contact, EContact *cur_contact, E2kProperties *props);
static void proppatch_email(PropMapping *prop_mapping, EContact *new_contact, EContact *cur_contact, E2kProperties *props);
static void proppatch_date(PropMapping *prop_mapping, EContact *new_contact, EContact *cur_contact, E2kProperties *props);
-static void populate_address(EContactField field, EContact *new_contact, void *data);
-static void populate_date(EContactField field, EContact *new_contact, void *data);
+static void populate_address(EContactField field, EContact *new_contact, gpointer data);
+static void populate_date(EContactField field, EContact *new_contact, gpointer data);
static void proppatch_categories (PropMapping *prop_mapping, EContact *new_contact, EContact *cur_contact, E2kProperties *props);
-static void populate_categories (EContactField field, EContact *new_contact, void *data);
-static E2kRestriction *e_book_backend_exchange_build_restriction (const char *sexp,
+static void populate_categories (EContactField field, EContact *new_contact, gpointer data);
+static E2kRestriction *e_book_backend_exchange_build_restriction (const gchar *sexp,
E2kRestriction *base_rn);
-static const char *contact_name (EContact *contact);
+static const gchar *contact_name (EContact *contact);
static void proppatch_im (PropMapping *prop_mapping, EContact *new_contact, EContact *cur_contact, E2kProperties *props);
-static void populate_im (EContactField field, EContact *new_contact, void *data);
+static void populate_im (EContactField field, EContact *new_contact, gpointer data);
static GPtrArray *field_names_array;
-static const char **field_names;
-static int n_field_names;
+static const gchar **field_names;
+static gint n_field_names;
static GNOME_Evolution_Addressbook_CallStatus
http_status_to_pas (E2kHTTPStatus status)
@@ -147,9 +147,9 @@ http_status_to_pas (E2kHTTPStatus status)
struct PropMapping {
EContactField field;
- const char *prop_name;
- const char *e_book_field;
- int flags;
+ const gchar *prop_name;
+ const gchar *e_book_field;
+ gint flags;
#define FLAG_UNLIKEABLE 0x001 /* can't use LIKE with it */
#define FLAG_COMPOSITE 0x002 /* read-only fields that can be written
to only by specifying the values of
@@ -157,7 +157,7 @@ struct PropMapping {
#define FLAG_PUT 0x020 /* requires a PUT request */
#define FLAG_EMAIL 0x100 /* email field, so we know to invoke our magic email address handling */
void (*composite_proppatch_func)(PropMapping *prop_mapping, EContact *new_contact, EContact *cur_contact, E2kProperties *props);
- void (*composite_populate_func)(EContactField e_book_field, EContact *new_contact, void *data);
+ void (*composite_populate_func)(EContactField e_book_field, EContact *new_contact, gpointer data);
};
static PropMapping
@@ -222,19 +222,19 @@ prop_mappings[] = {
EXCHANGE_FIELD (CATEGORIES, KEYWORDS, "categories", proppatch_categories, populate_categories)
};
-static int num_prop_mappings = sizeof(prop_mappings) / sizeof (prop_mappings[0]);
+static gint num_prop_mappings = sizeof(prop_mappings) / sizeof (prop_mappings[0]);
struct ContactListMember
{
- char *memberID;
- char *name;
- char *email;
+ gchar *memberID;
+ gchar *name;
+ gchar *email;
};
-static const char *
-e_book_backend_exchange_prop_to_exchange (const char *propname)
+static const gchar *
+e_book_backend_exchange_prop_to_exchange (const gchar *propname)
{
- int i;
+ gint i;
for (i = 0; i < num_prop_mappings; i ++)
if (prop_mappings[i].e_book_field && !strcmp (prop_mappings[i].e_book_field, propname))
@@ -246,10 +246,10 @@ e_book_backend_exchange_prop_to_exchange (const char *propname)
static void
get_email_field_from_props (ExchangeAccount *account,
PropMapping *prop_mapping, E2kResult *result,
- EContact *contact, char *data)
+ EContact *contact, gchar *data)
{
- char *emailtype;
- const char *typeselector;
+ gchar *emailtype;
+ const gchar *typeselector;
/* here's where we do the super involved
conversion from local email addresses to
@@ -311,11 +311,11 @@ get_email_field_from_props (ExchangeAccount *account,
/* Exchange uses \r in some strings and \r\n in others. EContact always
* wants just \n.
*/
-static char *
-unixify (const char *string)
+static gchar *
+unixify (const gchar *string)
{
- char *out = g_malloc (strlen (string) + 1), *d = out;
- const char *s = string;
+ gchar *out = g_malloc (strlen (string) + 1), *d = out;
+ const gchar *s = string;
do {
if (*s == '\r') {
@@ -335,11 +335,11 @@ unixify (const char *string)
* If there are no members or any other error, the NULL is returned.
**/
static GSList *
-get_contact_list_members (E2kContext *ctx, const char *list_href)
+get_contact_list_members (E2kContext *ctx, const gchar *list_href)
{
GSList *members = NULL;
- char *url;
+ gchar *url;
xmlDoc *doc;
xmlNode *member;
E2kHTTPStatus status;
@@ -372,9 +372,9 @@ get_contact_list_members (E2kContext *ctx, const char *list_href)
m = g_new0 (struct ContactListMember, 1);
- m->memberID = g_strdup ((const char *)memid->children->content);
- m->email = g_strdup ((const char *) (email->children->content));
- m->name = (dn && dn->children && dn->children->content) ? g_strdup ((const char *) dn->children->content) : NULL;
+ m->memberID = g_strdup ((const gchar *)memid->children->content);
+ m->email = g_strdup ((const gchar *) (email->children->content));
+ m->name = (dn && dn->children && dn->children->content) ? g_strdup ((const gchar *) dn->children->content) : NULL;
/* do not pass both name and email if they are same, use only email member instead */
if (m->name && m->email && g_str_equal (m->name, m->email)) {
@@ -415,8 +415,8 @@ static EContact *
e_contact_from_props (EBookBackendExchange *be, E2kResult *result)
{
EContact *contact;
- char *data;
- const char *filename;
+ gchar *data;
+ const gchar *filename;
E2kHTTPStatus status;
SoupBuffer *response;
CamelStream *stream;
@@ -424,7 +424,7 @@ e_contact_from_props (EBookBackendExchange *be, E2kResult *result)
CamelDataWrapper *content;
CamelMultipart *multipart;
CamelMimePart *part;
- int i;
+ gint i;
contact = e_contact_new ();
@@ -444,7 +444,7 @@ e_contact_from_props (EBookBackendExchange *be, E2kResult *result)
prop_mappings[i].composite_populate_func (
prop_mappings[i].field, contact, data);
} else {
- char *unix_data;
+ gchar *unix_data;
unix_data = strchr (data, '\r') ?
unixify (data) : data;
@@ -475,7 +475,7 @@ e_contact_from_props (EBookBackendExchange *be, E2kResult *result)
for (m = members; m; m = m->next) {
struct ContactListMember *member = (struct ContactListMember *) m->data;
EVCardAttribute *attr;
- char *value;
+ gchar *value;
CamelInternetAddress *addr;
if (!member || !member->memberID || !member->email)
@@ -563,11 +563,11 @@ e_contact_from_props (EBookBackendExchange *be, E2kResult *result)
return contact;
}
-static char *
+static gchar *
vcard_from_props (EBookBackendExchange *be, E2kResult *result)
{
EContact *contact;
- char *vcard;
+ gchar *vcard;
contact = e_contact_from_props (be, result);
if (!contact)
@@ -612,11 +612,11 @@ build_summary (EBookBackendExchange *be)
e_book_backend_summary_save (bepriv->summary);
}
-static const char *folder_props[] = {
+static const gchar *folder_props[] = {
PR_ACCESS,
E2K_PR_DAV_LAST_MODIFIED
};
-static const int n_folder_props = sizeof (folder_props) / sizeof (folder_props[0]);
+static const gint n_folder_props = sizeof (folder_props) / sizeof (folder_props[0]);
static gpointer
build_cache (EBookBackendExchange *be)
@@ -683,11 +683,11 @@ e_book_backend_exchange_connect (EBookBackendExchange *be)
{
EBookBackendExchangePrivate *bepriv = be->priv;
ExchangeHierarchy *hier;
- char *summary_path;
- char *date_prop, *access_prop;
- int access;
+ gchar *summary_path;
+ gchar *date_prop, *access_prop;
+ gint access;
E2kResult *results;
- int nresults = 0;
+ gint nresults = 0;
E2kHTTPStatus status;
time_t folder_mtime;
@@ -812,7 +812,7 @@ e_book_backend_exchange_connect (EBookBackendExchange *be)
}
static gboolean
-value_changed (const char *old, const char *new)
+value_changed (const gchar *old, const gchar *new)
{
if (old == NULL)
return new != NULL;
@@ -828,21 +828,21 @@ static const EContactField email_fields[3] = {
E_CONTACT_EMAIL_3
};
-static const char *email1_props[] = {
+static const gchar *email1_props[] = {
E2K_PR_MAPI_EMAIL_1_ENTRYID,
E2K_PR_MAPI_EMAIL_1_ADDRTYPE,
E2K_PR_MAPI_EMAIL_1_ADDRESS,
E2K_PR_MAPI_EMAIL_1_DISPLAY_NAME,
E2K_PR_CONTACTS_EMAIL1,
};
-static const char *email2_props[] = {
+static const gchar *email2_props[] = {
E2K_PR_MAPI_EMAIL_2_ENTRYID,
E2K_PR_MAPI_EMAIL_2_ADDRTYPE,
E2K_PR_MAPI_EMAIL_2_ADDRESS,
E2K_PR_MAPI_EMAIL_2_DISPLAY_NAME,
E2K_PR_CONTACTS_EMAIL2,
};
-static const char *email3_props[] = {
+static const gchar *email3_props[] = {
E2K_PR_MAPI_EMAIL_3_ENTRYID,
E2K_PR_MAPI_EMAIL_3_ADDRTYPE,
E2K_PR_MAPI_EMAIL_3_ADDRESS,
@@ -850,7 +850,7 @@ static const char *email3_props[] = {
E2K_PR_CONTACTS_EMAIL3,
};
-static const char **email_props[] = {
+static const gchar **email_props[] = {
email1_props, email2_props, email3_props
};
@@ -860,8 +860,8 @@ proppatch_email (PropMapping *prop_mapping,
E2kProperties *props)
{
gboolean changed;
- char *new_email, *cur_email;
- int field, prop, emaillisttype = 0;
+ gchar *new_email, *cur_email;
+ gint field, prop, emaillisttype = 0;
/* We do all three email addresses (plus some additional data)
* when invoked for E_CONTACT_EMAIL_1. So skip EMAIL_2
@@ -955,7 +955,7 @@ proppatch_categories (PropMapping *prop_mapping,
}
static void
-populate_categories (EContactField field, EContact *new_contact, void *data)
+populate_categories (EContactField field, EContact *new_contact, gpointer data)
{
GList *updated_list = NULL;
GPtrArray *categories_list = data;
@@ -963,7 +963,7 @@ populate_categories (EContactField field, EContact *new_contact, void *data)
for (i = 0; i < categories_list->len; i++) {
updated_list = g_list_append (updated_list,
- (char *)categories_list->pdata[i]);
+ (gchar *)categories_list->pdata[i]);
}
@@ -1015,9 +1015,9 @@ proppatch_date (PropMapping *prop_mapping,
}
static void
-populate_date(EContactField field, EContact *new_contact, void *data)
+populate_date(EContactField field, EContact *new_contact, gpointer data)
{
- char *date = (char*)data;
+ gchar *date = (gchar *)data;
time_t tt;
struct tm *then;
EContactDate dt;
@@ -1043,7 +1043,7 @@ enum addressprop {
ADDRPROP_LAST
};
-static const char *homeaddrpropnames[] = {
+static const gchar *homeaddrpropnames[] = {
E2K_PR_CONTACTS_HOME_PO_BOX,
E2K_PR_CONTACTS_HOME_STREET,
E2K_PR_CONTACTS_HOME_CITY,
@@ -1052,7 +1052,7 @@ static const char *homeaddrpropnames[] = {
E2K_PR_CONTACTS_HOME_COUNTRY,
};
-static const char *otheraddrpropnames[] = {
+static const gchar *otheraddrpropnames[] = {
E2K_PR_CONTACTS_OTHER_PO_BOX,
E2K_PR_CONTACTS_OTHER_STREET,
E2K_PR_CONTACTS_OTHER_CITY,
@@ -1061,7 +1061,7 @@ static const char *otheraddrpropnames[] = {
E2K_PR_CONTACTS_OTHER_COUNTRY,
};
-static const char *workaddrpropnames[] = {
+static const gchar *workaddrpropnames[] = {
E2K_PR_CONTACTS_WORK_PO_BOX,
E2K_PR_CONTACTS_WORK_STREET,
E2K_PR_CONTACTS_WORK_CITY,
@@ -1076,10 +1076,10 @@ proppatch_address (PropMapping *prop_mapping,
E2kProperties *props)
{
EContactAddress *new_address, *cur_address = NULL;
- char *new_addrprops[ADDRPROP_LAST], *cur_addrprops[ADDRPROP_LAST];
- const char **propnames;
- char *value;
- int i;
+ gchar *new_addrprops[ADDRPROP_LAST], *cur_addrprops[ADDRPROP_LAST];
+ const gchar **propnames;
+ gchar *value;
+ gint i;
new_address = e_contact_get (new_contact, prop_mapping->field);
if (cur_contact)
@@ -1172,7 +1172,7 @@ proppatch_im (PropMapping *prop_mapping,
}
static void
-populate_im (EContactField field, EContact *new_contact, void *data)
+populate_im (EContactField field, EContact *new_contact, gpointer data)
{
GList *im_attr_list = NULL;
EVCardAttribute *attr;
@@ -1182,7 +1182,7 @@ populate_im (EContactField field, EContact *new_contact, void *data)
e_vcard_attribute_add_param_with_value (attr,
e_vcard_attribute_param_new (EVC_TYPE), "WORK");
- e_vcard_attribute_add_value (attr, (const char *)data);
+ e_vcard_attribute_add_value (attr, (const gchar *)data);
im_attr_list = g_list_append (im_attr_list, attr);
}
@@ -1191,12 +1191,12 @@ populate_im (EContactField field, EContact *new_contact, void *data)
}
static void
-populate_address (EContactField field, EContact *new_contact, void *data)
+populate_address (EContactField field, EContact *new_contact, gpointer data)
{
EAddressWestern *waddr;
EContactAddress addr;
- waddr = e_address_western_parse ((const char *)data);
+ waddr = e_address_western_parse ((const gchar *)data);
addr.address_format = "us"; /* FIXME? */
addr.po = waddr->po_box;
addr.ext = waddr->extended;
@@ -1210,10 +1210,10 @@ populate_address (EContactField field, EContact *new_contact, void *data)
e_address_western_free (waddr);
}
-static const char *
+static const gchar *
contact_name (EContact *contact)
{
- const char *contact_name;
+ const gchar *contact_name;
contact_name = e_contact_get_const (contact, E_CONTACT_FULL_NAME);
if (contact_name && *contact_name)
@@ -1246,13 +1246,13 @@ props_from_contact (EBookBackendExchange *be,
EContact *old_contact)
{
E2kProperties *props;
- int i;
+ gint i;
gboolean is_list = GPOINTER_TO_INT (e_contact_get (contact, E_CONTACT_IS_LIST));
props = e2k_properties_new ();
if (!old_contact) {
- const char *subject;
+ const gchar *subject;
subject = contact_name (contact);
@@ -1280,7 +1280,7 @@ props_from_contact (EBookBackendExchange *be,
}
if (is_list) {
- const char *new_value, *current_value;
+ const gchar *new_value, *current_value;
new_value = e_contact_get_const (contact, E_CONTACT_FILE_AS);
if (new_value && !*new_value)
@@ -1309,7 +1309,7 @@ props_from_contact (EBookBackendExchange *be,
} else if (prop_mappings[i].flags & FLAG_PUT) {
continue; /* FIXME */
} else {
- const char *new_value, *current_value;
+ const gchar *new_value, *current_value;
new_value = e_contact_get_const (contact, prop_mappings[i].field);
if (new_value && !*new_value)
@@ -1343,8 +1343,8 @@ props_from_contact (EBookBackendExchange *be,
}
static GByteArray *
-build_message (const char *from_name, const char *from_email,
- const char *subject, const char *note, EContactPhoto *photo)
+build_message (const gchar *from_name, const gchar *from_email,
+ const gchar *subject, const gchar *note, EContactPhoto *photo)
{
CamelDataWrapper *wrapper = NULL;
CamelContentType *type;
@@ -1393,8 +1393,8 @@ build_message (const char *from_name, const char *from_email,
GByteArray *photo_ba;
GdkPixbufLoader *loader;
GdkPixbufFormat *format;
- const char *content_type, *extension;
- char **list, *filename;
+ const gchar *content_type, *extension;
+ gchar **list, *filename;
/* Determine the MIME type of the photo */
loader = gdk_pixbuf_loader_new ();
@@ -1463,8 +1463,8 @@ build_message (const char *from_name, const char *from_email,
static E2kHTTPStatus
do_put (EBookBackendExchange *be, EDataBook *book,
- const char *uri, const char *subject,
- const char *note, EContactPhoto *photo)
+ const gchar *uri, const gchar *subject,
+ const gchar *note, EContactPhoto *photo)
{
ExchangeHierarchy *hier;
E2kHTTPStatus status;
@@ -1474,14 +1474,14 @@ do_put (EBookBackendExchange *be, EDataBook *book,
body = build_message (hier->owner_name, hier->owner_email,
subject, note, photo);
status = e2k_context_put (be->priv->ctx, NULL, uri, "message/rfc822",
- (char *) body->data, body->len, NULL);
+ (gchar *) body->data, body->len, NULL);
g_byte_array_free (body, TRUE);
return status;
}
static gboolean
-test_name (E2kContext *ctx, const char *name, gpointer summary)
+test_name (E2kContext *ctx, const gchar *name, gpointer summary)
{
return !e_book_backend_summary_check_contact (summary, name);
}
@@ -1489,7 +1489,7 @@ test_name (E2kContext *ctx, const char *name, gpointer summary)
/* Posts the command of the contactlist to the backend folder; the backend should be
already connected in time of the call to this function. */
static E2kHTTPStatus
-cl_post_command (EBookBackendExchange *be, GString *cmd, const char *uri, char **location)
+cl_post_command (EBookBackendExchange *be, GString *cmd, const gchar *uri, gchar **location)
{
EBookBackendExchangePrivate *bepriv;
SoupMessage *msg;
@@ -1508,13 +1508,13 @@ cl_post_command (EBookBackendExchange *be, GString *cmd, const char *uri, char *
status = e2k_context_send_message (bepriv->ctx, NULL, msg);
if (location) {
- const char *header;
+ const gchar *header;
header = soup_message_headers_get (msg->response_headers, "Location");
*location = g_strdup (header);
if (*location) {
- char *p = strrchr (*location, '?');
+ gchar *p = strrchr (*location, '?');
/* the location can be in the form of http://server/folder/list.EML?Cmd=Edit ,
thus strip the Cmd param from the location */
@@ -1535,7 +1535,7 @@ cl_post_command (EBookBackendExchange *be, GString *cmd, const char *uri, char *
struct ContactListRemoveInfo
{
EBookBackendExchange *be;
- const char *list_href;
+ const gchar *list_href;
};
static void
@@ -1561,7 +1561,7 @@ remove_member (gpointer key, struct ContactListMember *m, struct ContactListRemo
}
static E2kHTTPStatus
-merge_contact_lists (EBookBackendExchange *be, const char *location, EContact *contact)
+merge_contact_lists (EBookBackendExchange *be, const gchar *location, EContact *contact)
{
E2kHTTPStatus status;
GSList *server, *s;
@@ -1587,7 +1587,7 @@ merge_contact_lists (EBookBackendExchange *be, const char *location, EContact *c
for (l = local; l && status == E2K_HTTP_OK; l = l->next) {
EVCardAttribute *attr = (EVCardAttribute *) l->data;
- char *raw;
+ gchar *raw;
CamelInternetAddress *addr;
if (!attr)
@@ -1599,7 +1599,7 @@ merge_contact_lists (EBookBackendExchange *be, const char *location, EContact *c
addr = camel_internet_address_new ();
if (camel_address_decode (CAMEL_ADDRESS (addr), raw) > 0) {
- const char *nm = NULL, *eml = NULL;
+ const gchar *nm = NULL, *eml = NULL;
camel_internet_address_get (addr, 0, &nm, &eml);
if (eml) {
@@ -1647,15 +1647,15 @@ static EBookBackendSyncStatus
e_book_backend_exchange_create_contact (EBookBackendSync *backend,
EDataBook *book,
guint32 opid,
- const char *vcard,
+ const gchar *vcard,
EContact **contact)
{
EBookBackendExchange *be = E_BOOK_BACKEND_EXCHANGE (backend);
EBookBackendExchangePrivate *bepriv = be->priv;
E2kProperties *props = NULL;
- const char *name;
+ const gchar *name;
E2kHTTPStatus status;
- char *location = NULL;
+ gchar *location = NULL;
d(printf("ebbe_create_contact(%p, %p, %s)\n", backend, book, vcard));
@@ -1698,7 +1698,7 @@ e_book_backend_exchange_create_contact (EBookBackendSync *backend,
e_contact_set (*contact, E_CONTACT_LIST_SHOW_ADDRESSES, GINT_TO_POINTER (TRUE));
status = merge_contact_lists (be, location, *contact);
} else if (E2K_HTTP_STATUS_IS_SUCCESSFUL (status)) {
- char *note;
+ gchar *note;
EContactPhoto *photo;
e_contact_set (*contact, E_CONTACT_UID, location);
@@ -1746,16 +1746,16 @@ static EBookBackendSyncStatus
e_book_backend_exchange_modify_contact (EBookBackendSync *backend,
EDataBook *book,
guint32 opid,
- const char *vcard,
+ const gchar *vcard,
EContact **contact)
{
EBookBackendExchange *be = E_BOOK_BACKEND_EXCHANGE (backend);
EBookBackendExchangePrivate *bepriv = be->priv;
EContact *old_contact;
- const char *uri;
+ const gchar *uri;
E2kHTTPStatus status;
E2kResult *results;
- int nresults = 0;
+ gint nresults = 0;
E2kProperties *props;
d(printf("ebbe_modify_contact(%p, %p, %s)\n", backend, book, vcard));
@@ -1807,7 +1807,7 @@ e_book_backend_exchange_modify_contact (EBookBackendSync *backend,
status = merge_contact_lists (be, uri, *contact);
} else if (E2K_HTTP_STATUS_IS_SUCCESSFUL (status)) {
/* Do the PUT request if we need to. */
- char *old_note, *new_note;
+ gchar *old_note, *new_note;
EContactPhoto *old_photo, *new_photo;
gboolean changed = FALSE;
@@ -1888,13 +1888,13 @@ e_book_backend_exchange_remove_contacts (EBookBackendSync *backend,
{
EBookBackendExchange *be = E_BOOK_BACKEND_EXCHANGE (backend);
EBookBackendExchangePrivate *bepriv = be->priv;
- const char *uri;
+ const gchar *uri;
E2kHTTPStatus status;
GList *l;
EBookBackendSyncStatus ret_status = GNOME_Evolution_Addressbook_Success;
/* Remove one or more contacts */
- d(printf("ebbe_remove_contact(%p, %p, %s)\n", backend, book, (char*)id_list->data));
+ d(printf("ebbe_remove_contact(%p, %p, %s)\n", backend, book, (gchar *)id_list->data));
switch (bepriv->mode) {
@@ -1927,7 +1927,7 @@ e_book_backend_exchange_remove_contacts (EBookBackendSync *backend,
}
static ESExpResult *
-func_not (ESExp *f, int argc, ESExpResult **argv, void *data)
+func_not (ESExp *f, gint argc, ESExpResult **argv, gpointer data)
{
ESExpResult *r;
@@ -1937,19 +1937,19 @@ func_not (ESExp *f, int argc, ESExpResult **argv, void *data)
}
r = e_sexp_result_new (f, ESEXP_RES_UNDEFINED);
- r->value.string = (char *)
+ r->value.string = (gchar *)
e2k_restriction_not ((E2kRestriction *)argv[0]->value.string, TRUE);
return r;
}
static ESExpResult *
-func_and_or (ESExp *f, int argc, ESExpResult **argv, void *and)
+func_and_or (ESExp *f, gint argc, ESExpResult **argv, gpointer and)
{
ESExpResult *r;
E2kRestriction *rn;
GPtrArray *rns;
- int i;
+ gint i;
rns = g_ptr_array_new ();
@@ -1975,17 +1975,17 @@ func_and_or (ESExp *f, int argc, ESExpResult **argv, void *and)
g_ptr_array_free (rns, TRUE);
r = e_sexp_result_new (f, ESEXP_RES_UNDEFINED);
- r->value.string = (char *)rn;
+ r->value.string = (gchar *)rn;
return r;
}
static ESExpResult *
-func_match (struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data)
+func_match (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
{
ESExpResult *r;
E2kRestriction *rn;
- char *propname, *str;
- const char *exchange_prop;
+ gchar *propname, *str;
+ const gchar *exchange_prop;
guint flags = GPOINTER_TO_UINT (data);
if (argc != 2 ||
@@ -2000,7 +2000,7 @@ func_match (struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data)
if (!strcmp (propname, "x-evolution-any-field")) {
GPtrArray *rns;
- int i;
+ gint i;
rns = g_ptr_array_new ();
for (i = 0; i < num_prop_mappings; i ++) {
@@ -2070,12 +2070,12 @@ func_match (struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data)
}
r = e_sexp_result_new (f, ESEXP_RES_UNDEFINED);
- r->value.string = (char *)rn;
+ r->value.string = (gchar *)rn;
return r;
}
static struct {
- const char *name;
+ const gchar *name;
ESExpFunc *func;
guint flags;
} symbols[] = {
@@ -2089,18 +2089,18 @@ static struct {
};
static E2kRestriction *
-e_book_backend_exchange_build_restriction (const char *query,
+e_book_backend_exchange_build_restriction (const gchar *query,
E2kRestriction *base_rn)
{
ESExp *sexp;
ESExpResult *r;
E2kRestriction *rn;
- int i;
+ gint i;
sexp = e_sexp_new ();
for (i = 0; i < sizeof (symbols) / sizeof (symbols[0]); i++) {
- e_sexp_add_function (sexp, 0, (char *) symbols[i].name,
+ e_sexp_add_function (sexp, 0, (gchar *) symbols[i].name,
symbols[i].func,
GUINT_TO_POINTER (symbols[i].flags));
}
@@ -2141,7 +2141,7 @@ notify_remove (gpointer id, gpointer value, gpointer backend)
}
static void
-subscription_notify (E2kContext *ctx, const char *uri,
+subscription_notify (E2kContext *ctx, const gchar *uri,
E2kContextChangeType type, gpointer user_data)
{
EBookBackendExchange *be = user_data;
@@ -2153,8 +2153,8 @@ subscription_notify (E2kContext *ctx, const char *uri,
E2kResult *result;
E2kHTTPStatus status;
EContact *contact;
- const char *uid;
- int i;
+ const gchar *uid;
+ gint i;
g_object_ref (be);
@@ -2198,7 +2198,7 @@ static EBookBackendSyncStatus
e_book_backend_exchange_get_contact_list (EBookBackendSync *backend,
EDataBook *book,
guint32 opid,
- const char *query,
+ const gchar *query,
GList **contacts)
{
EBookBackendExchange *be = E_BOOK_BACKEND_EXCHANGE (backend);
@@ -2207,7 +2207,7 @@ e_book_backend_exchange_get_contact_list (EBookBackendSync *backend,
E2kResultIter *iter;
E2kResult *result;
E2kHTTPStatus status;
- char *vcard;
+ gchar *vcard;
GList *vcard_list = NULL, *temp, *offline_contacts;
@@ -2272,7 +2272,7 @@ e_book_backend_exchange_start_book_view (EBookBackend *backend,
{
EBookBackendExchange *be = E_BOOK_BACKEND_EXCHANGE (backend);
EBookBackendExchangePrivate *bepriv = be->priv;
- const char *query = e_data_book_view_get_card_query (book_view);
+ const gchar *query = e_data_book_view_get_card_query (book_view);
E2kRestriction *rn;
E2kResultIter *iter;
E2kResult *result;
@@ -2400,13 +2400,13 @@ free_change (gpointer change, gpointer user_data)
}
static gboolean
-find_deleted_ids (const char *id, const char *vcard, gpointer user_data)
+find_deleted_ids (const gchar *id, const gchar *vcard, gpointer user_data)
{
EBookBackendExchangeChangeContext *ctx = user_data;
gboolean remove = FALSE;
if (!g_hash_table_lookup (ctx->seen_ids, id)) {
- char *vcard = NULL;
+ gchar *vcard = NULL;
EContact *contact = e_contact_new ();
if (contact) {
e_contact_set (contact, E_CONTACT_UID, (gpointer) id);
@@ -2428,13 +2428,13 @@ static EBookBackendSyncStatus
e_book_backend_exchange_get_changes (EBookBackendSync *backend,
EDataBook *book,
guint32 opid,
- const char *change_id,
+ const gchar *change_id,
GList **changes)
{
EBookBackendExchange *be = E_BOOK_BACKEND_EXCHANGE (backend);
EBookBackendExchangePrivate *bepriv = be->priv;
EBookBackendExchangeChangeContext *ctx;
- char *filename, *path, *vcard;
+ gchar *filename, *path, *vcard;
E2kResultIter *iter;
E2kResult *result;
E2kHTTPStatus status;
@@ -2528,15 +2528,15 @@ static EBookBackendSyncStatus
e_book_backend_exchange_get_contact (EBookBackendSync *backend,
EDataBook *book,
guint32 opid,
- const char *id,
- char **vcard)
+ const gchar *id,
+ gchar **vcard)
{
EBookBackendExchange *be = E_BOOK_BACKEND_EXCHANGE (backend);
EBookBackendExchangePrivate *bepriv = be->priv;
EContact *contact;
E2kResult *results=NULL;
E2kHTTPStatus status;
- int nresults = 0;
+ gint nresults = 0;
d(printf("ebbe_get_contact(%p, %p, %s)\n", backend, book, id));
@@ -2621,9 +2621,9 @@ static void
e_book_backend_exchange_authenticate_user (EBookBackend *backend,
EDataBook *book,
guint32 opid,
- const char *user,
- const char *password,
- const char *auth_method)
+ const gchar *user,
+ const gchar *password,
+ const gchar *auth_method)
{
EBookBackendExchange *be = E_BOOK_BACKEND_EXCHANGE (backend);
EBookBackendExchangePrivate *bepriv = be->priv;
@@ -2678,7 +2678,7 @@ e_book_backend_exchange_get_supported_auth_methods (EBookBackend *backend,
guint32 opid)
{
GList *auth_methods = NULL;
- char *auth_method;
+ gchar *auth_method;
d(printf ("ebbe_get_supported_auth_methods (%p, %p)\n", backend, book));
@@ -2698,7 +2698,7 @@ e_book_backend_exchange_get_supported_fields (EBookBackendSync *backend,
guint32 opid,
GList **methods)
{
- int i;
+ gint i;
d(printf("ebbe_get_supported_fields(%p, %p)\n", backend, book));
@@ -2752,7 +2752,7 @@ e_book_backend_exchange_load_source (EBookBackend *backend,
{
EBookBackendExchange *be = E_BOOK_BACKEND_EXCHANGE (backend);
EBookBackendExchangePrivate *bepriv = be->priv;
- const char *offline;
+ const gchar *offline;
g_return_val_if_fail (bepriv->connected == FALSE, GNOME_Evolution_Addressbook_OtherError);
@@ -2800,7 +2800,7 @@ e_book_backend_exchange_remove (EBookBackendSync *backend, EDataBook *book, guin
EBookBackendExchange *be = E_BOOK_BACKEND_EXCHANGE (backend);
EBookBackendExchangePrivate *bepriv = be->priv;
ExchangeAccountFolderResult result = EXCHANGE_ACCOUNT_FOLDER_GENERIC_ERROR;
- const char *int_uri = NULL;
+ const gchar *int_uri = NULL;
d(printf("ebbe_remove(%p, %p)\n", backend, book));
int_uri = e_folder_exchange_get_internal_uri (bepriv->folder);
@@ -2832,7 +2832,7 @@ e_book_backend_exchange_remove (EBookBackendSync *backend, EDataBook *book, guin
return GNOME_Evolution_Addressbook_OtherError;
}
-static char *
+static gchar *
e_book_backend_exchange_get_static_capabilites (EBookBackend *backend)
{
return g_strdup ("net,bulk-removes,do-initial-query,cache-completions,contact-lists");
@@ -2851,7 +2851,7 @@ e_book_backend_exchange_construct (EBookBackendExchange *backend)
}
static void
-e_book_backend_exchange_set_mode (EBookBackend *backend, int mode)
+e_book_backend_exchange_set_mode (EBookBackend *backend, gint mode)
{
EBookBackendExchange *be = E_BOOK_BACKEND_EXCHANGE (backend);
EBookBackendExchangePrivate *bepriv = be->priv;
@@ -2943,7 +2943,7 @@ e_book_backend_exchange_class_init (EBookBackendExchangeClass *klass)
GObjectClass *object_class = (GObjectClass *) klass;
EBookBackendClass *backend_class = E_BOOK_BACKEND_CLASS (klass);
EBookBackendSyncClass *sync_class = E_BOOK_BACKEND_SYNC_CLASS (klass);
- int i;
+ gint i;
parent_class = g_type_class_ref (e_book_backend_get_type ());
@@ -2959,7 +2959,7 @@ e_book_backend_exchange_class_init (EBookBackendExchangeClass *klass)
g_ptr_array_add (field_names_array, (gpointer) E2K_PR_HTTPMAIL_HAS_ATTACHMENT);
for (i = 0; i < num_prop_mappings; i ++)
g_ptr_array_add (field_names_array, (gpointer) prop_mappings[i].prop_name);
- field_names = (const char **)field_names_array->pdata;
+ field_names = (const gchar **)field_names_array->pdata;
n_field_names = field_names_array->len;
/* Set the virtual methods. */
diff --git a/addressbook/e-book-backend-gal-factory.c b/addressbook/e-book-backend-gal-factory.c
index da55054..e5bc757 100644
--- a/addressbook/e-book-backend-gal-factory.c
+++ b/addressbook/e-book-backend-gal-factory.c
@@ -32,7 +32,7 @@ e_book_backend_gal_factory_instance_init (EBookBackendGalFactory *factory)
{
}
-static const char *
+static const gchar *
_get_protocol (EBookBackendFactory *factory)
{
return "gal";
diff --git a/addressbook/e-book-backend-gal.c b/addressbook/e-book-backend-gal.c
index 888bc35..e5e4a84 100644
--- a/addressbook/e-book-backend-gal.c
+++ b/addressbook/e-book-backend-gal.c
@@ -74,7 +74,7 @@
#define TV_TO_MILLIS(timeval) ((timeval).tv_sec * 1000 + (timeval).tv_usec / 1000)
static gchar *query_prop_to_ldap (const gchar *query_prop);
-static int build_query (EBookBackendGAL *bl, const char *query, const char *ldap_filter, char **ldap_query);
+static gint build_query (EBookBackendGAL *bl, const gchar *query, const gchar *ldap_filter, gchar **ldap_query);
#define PARENT_TYPE E_TYPE_BOOK_BACKEND
static EBookBackendClass *parent_class;
@@ -82,10 +82,10 @@ static EBookBackendClass *parent_class;
typedef struct LDAPOp LDAPOp;
static GList *supported_fields;
-static char **search_attrs;
+static gchar **search_attrs;
struct _EBookBackendGALPrivate {
- char *gal_uri;
+ gchar *gal_uri;
gboolean connected;
E2kGlobalCatalog *gc;
@@ -98,9 +98,9 @@ struct _EBookBackendGALPrivate {
/* our operations */
GStaticRecMutex op_hash_mutex;
GHashTable *id_to_op;
- int active_ops;
- int mode;
- int poll_timeout;
+ gint active_ops;
+ gint mode;
+ gint poll_timeout;
#if ENABLE_CACHE
DB *file_db;
DB_ENV *env;
@@ -108,7 +108,7 @@ struct _EBookBackendGALPrivate {
time_t cache_time;
#endif
/* Summary */
- char *summary_file_name;
+ gchar *summary_file_name;
gboolean is_summary_ready;
EBookBackendSummary *summary;
};
@@ -117,7 +117,7 @@ struct _EBookBackendGALPrivate {
#if ENABLE_CACHE
static GStaticMutex global_env_lock = G_STATIC_MUTEX_INIT;
static struct {
- int ref_count;
+ gint ref_count;
DB_ENV *env;
} global_env;
#endif
@@ -132,35 +132,35 @@ struct LDAPOp {
EDataBook *book;
EDataBookView *view;
guint32 opid; /* the libebook operation id */
- int id; /* the ldap msg id */
+ gint id; /* the ldap msg id */
};
static void ldap_op_add (LDAPOp *op, EBookBackend *backend, EDataBook *book,
- EDataBookView *view, int opid, int msgid, LDAPOpHandler handler, LDAPOpDtor dtor);
+ EDataBookView *view, gint opid, gint msgid, LDAPOpHandler handler, LDAPOpDtor dtor);
static void ldap_op_finished (LDAPOp *op);
static gboolean poll_ldap (EBookBackendGAL *bl);
static EContact *build_contact_from_entry (EBookBackendGAL *bl, LDAPMessage *e, GList **existing_objectclasses);
-static void manager_populate (EContact *contact, char **values, EBookBackendGAL *bl, E2kOperation *op);
+static void manager_populate (EContact *contact, gchar **values, EBookBackendGAL *bl, E2kOperation *op);
-static void member_populate (EContact *contact, char **values, EBookBackendGAL *bl, E2kOperation *op);
+static void member_populate (EContact *contact, gchar **values, EBookBackendGAL *bl, E2kOperation *op);
-static void last_mod_time_populate (EContact *contact, char **values, EBookBackendGAL *bl, E2kOperation *op);
+static void last_mod_time_populate (EContact *contact, gchar **values, EBookBackendGAL *bl, E2kOperation *op);
struct prop_info {
EContactField field_id;
- const char *ldap_attr;
+ const gchar *ldap_attr;
#define PROP_TYPE_STRING 0x01
#define PROP_TYPE_COMPLEX 0x02
#define PROP_TYPE_GROUP 0x04
- int prop_type;
+ gint prop_type;
/* the remaining items are only used for the TYPE_COMPLEX props */
/* used when reading from the ldap server populates EContact with the values in **values. */
- void (*populate_contact_func)(EContact *contact, char **values, EBookBackendGAL *bl, E2kOperation *op);
+ void (*populate_contact_func)(EContact *contact, gchar **values, EBookBackendGAL *bl, E2kOperation *op);
} prop_info[] = {
@@ -217,7 +217,7 @@ struct prop_info {
#undef GROUP_PROP
};
-static int num_prop_infos = sizeof(prop_info) / sizeof(prop_info[0]);
+static gint num_prop_infos = sizeof(prop_info) / sizeof(prop_info[0]);
static gboolean
can_browse (EBookBackend *backend)
@@ -229,7 +229,7 @@ can_browse (EBookBackend *backend)
}
static void
-book_view_notify_status (EDataBookView *view, const char *status)
+book_view_notify_status (EDataBookView *view, const gchar *status)
{
if (!view)
return;
@@ -260,11 +260,11 @@ static GNOME_Evolution_Addressbook_CallStatus
gal_connect (EBookBackendGAL *bl)
{
EBookBackendGALPrivate *blpriv = bl->priv;
- int ldap_error = 0;
+ gint ldap_error = 0;
#ifdef DEBUG
{
- int debug_level = 1;
+ gint debug_level = 1;
ldap_set_option (NULL, LDAP_OPT_DEBUG_LEVEL, &debug_level);
}
#endif
@@ -298,7 +298,7 @@ gal_connect (EBookBackendGAL *bl)
}
static gboolean
-ldap_reconnect (EBookBackendGAL *bl, EDataBookView *book_view, LDAP **ldap, int status){
+ldap_reconnect (EBookBackendGAL *bl, EDataBookView *book_view, LDAP **ldap, gint status){
if (!ldap || !*ldap)
return FALSE;
@@ -321,7 +321,7 @@ ldap_reconnect (EBookBackendGAL *bl, EDataBookView *book_view, LDAP **ldap, int
}
static gboolean
-gal_reconnect (EBookBackendGAL *bl, EDataBookView *book_view, int ldap_status)
+gal_reconnect (EBookBackendGAL *bl, EDataBookView *book_view, gint ldap_status)
{
/* we need to reconnect if we were previously connected */
g_mutex_lock (bl->priv->ldap_lock);
@@ -353,8 +353,8 @@ gal_reconnect (EBookBackendGAL *bl, EDataBookView *book_view, int ldap_status)
static void
ldap_op_add (LDAPOp *op, EBookBackend *backend,
EDataBook *book, EDataBookView *view,
- int opid,
- int msgid,
+ gint opid,
+ gint msgid,
LDAPOpHandler handler, LDAPOpDtor dtor)
{
EBookBackendGAL *bl = E_BOOK_BACKEND_GAL (backend);
@@ -413,7 +413,7 @@ ldap_op_finished (LDAPOp *op)
}
static int
-ldap_error_to_response (int ldap_error)
+ldap_error_to_response (gint ldap_error)
{
if (ldap_error == LDAP_SUCCESS)
return GNOME_Evolution_Addressbook_Success;
@@ -435,7 +435,7 @@ static void
create_contact (EBookBackend *backend,
EDataBook *book,
guint32 opid,
- const char *vcard)
+ const gchar *vcard)
{
e_data_book_respond_create (book, opid,
GNOME_Evolution_Addressbook_PermissionDenied,
@@ -457,7 +457,7 @@ static void
modify_contact (EBookBackend *backend,
EDataBook *book,
guint32 opid,
- const char *vcard)
+ const gchar *vcard)
{
e_data_book_respond_modify (book, opid,
GNOME_Evolution_Addressbook_PermissionDenied,
@@ -472,7 +472,7 @@ static void
get_contact_handler (LDAPOp *op, LDAPMessage *res)
{
EBookBackendGAL *bl = E_BOOK_BACKEND_GAL (op->backend);
- int msg_type;
+ gint msg_type;
g_mutex_lock (bl->priv->ldap_lock);
if (!bl->priv->ldap) {
@@ -491,7 +491,7 @@ get_contact_handler (LDAPOp *op, LDAPMessage *res)
if (msg_type == LDAP_RES_SEARCH_ENTRY) {
LDAPMessage *e;
EContact *contact;
- char *vcard;
+ gchar *vcard;
g_mutex_lock (bl->priv->ldap_lock);
e = ldap_first_entry(bl->priv->ldap, res);
@@ -518,8 +518,8 @@ get_contact_handler (LDAPOp *op, LDAPMessage *res)
ldap_op_finished (op);
}
else if (msg_type == LDAP_RES_SEARCH_RESULT) {
- char *ldap_error_msg;
- int ldap_error;
+ gchar *ldap_error_msg;
+ gint ldap_error;
g_mutex_lock (bl->priv->ldap_lock);
ldap_parse_result (bl->priv->ldap, res, &ldap_error,
@@ -562,13 +562,13 @@ static void
get_contact (EBookBackend *backend,
EDataBook *book,
guint32 opid,
- const char *id)
+ const gchar *id)
{
LDAPGetContactOp *get_contact_op;
EBookBackendGAL *bl = E_BOOK_BACKEND_GAL (backend);
- int get_contact_msgid;
+ gint get_contact_msgid;
EDataBookView *book_view;
- int ldap_error;
+ gint ldap_error;
d(printf("get contact\n"));
switch (bl->priv->mode) {
@@ -672,7 +672,7 @@ contact_list_handler (LDAPOp *op, LDAPMessage *res)
LDAPGetContactListOp *contact_list_op = (LDAPGetContactListOp*)op;
EBookBackendGAL *bl = E_BOOK_BACKEND_GAL (op->backend);
LDAPMessage *e;
- int msg_type;
+ gint msg_type;
g_mutex_lock (bl->priv->ldap_lock);
if (!bl->priv->ldap) {
@@ -691,7 +691,7 @@ contact_list_handler (LDAPOp *op, LDAPMessage *res)
while (NULL != e) {
EContact *contact = build_contact_from_entry (bl, e, NULL);
- char *vcard = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30);
+ gchar *vcard = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30);
d(printf ("vcard = %s\n", vcard));
@@ -705,8 +705,8 @@ contact_list_handler (LDAPOp *op, LDAPMessage *res)
}
}
else if (msg_type == LDAP_RES_SEARCH_RESULT) {
- char *ldap_error_msg;
- int ldap_error;
+ gchar *ldap_error_msg;
+ gint ldap_error;
g_mutex_lock (bl->priv->ldap_lock);
ldap_parse_result (bl->priv->ldap, res, &ldap_error,
@@ -768,15 +768,15 @@ static void
get_contact_list (EBookBackend *backend,
EDataBook *book,
guint32 opid,
- const char *query)
+ const gchar *query)
{
LDAPGetContactListOp *contact_list_op;
EBookBackendGAL *bl = E_BOOK_BACKEND_GAL (backend);
GNOME_Evolution_Addressbook_CallStatus status;
- int contact_list_msgid;
+ gint contact_list_msgid;
EDataBookView *book_view;
- int ldap_error;
- char *ldap_query;
+ gint ldap_error;
+ gchar *ldap_query;
d(printf("get contact list\n"));
switch (bl->priv->mode) {
@@ -880,12 +880,12 @@ get_contact_list (EBookBackend *backend,
#define IS_RFC2254_CHAR(c) ((c) == '*' || (c) =='\\' || (c) == '(' || (c) == ')' || (c) == '\0')
-static char *
-rfc2254_escape(char *str)
+static gchar *
+rfc2254_escape(gchar *str)
{
- int i;
- int len = strlen(str);
- int newlen = 0;
+ gint i;
+ gint len = strlen(str);
+ gint newlen = 0;
for (i = 0; i < len; i ++) {
if (IS_RFC2254_CHAR(str[i]))
@@ -898,8 +898,8 @@ rfc2254_escape(char *str)
return g_strdup (str);
}
else {
- char *newstr = g_malloc0 (newlen + 1);
- int j = 0;
+ gchar *newstr = g_malloc0 (newlen + 1);
+ gint j = 0;
for (i = 0; i < len; i ++) {
if (IS_RFC2254_CHAR(str[i])) {
sprintf (newstr + j, "\\%02x", str[i]);
@@ -914,11 +914,11 @@ rfc2254_escape(char *str)
}
static ESExpResult *
-func_and(ESExp *f, int argc, ESExpResult **argv, void *data)
+func_and(ESExp *f, gint argc, ESExpResult **argv, gpointer data)
{
ESExpResult *r;
GString *string;
- int i;
+ gint i;
/* Check for short circuit */
for (i = 0; i < argc; i++) {
@@ -947,11 +947,11 @@ func_and(ESExp *f, int argc, ESExpResult **argv, void *data)
}
static ESExpResult *
-func_or(ESExp *f, int argc, ESExpResult **argv, void *data)
+func_or(ESExp *f, gint argc, ESExpResult **argv, gpointer data)
{
ESExpResult *r;
GString *string;
- int i;
+ gint i;
/* Check for short circuit */
for (i = 0; i < argc; i++) {
@@ -980,7 +980,7 @@ func_or(ESExp *f, int argc, ESExpResult **argv, void *data)
}
static ESExpResult *
-func_not(ESExp *f, int argc, ESExpResult **argv, void *data)
+func_not(ESExp *f, gint argc, ESExpResult **argv, gpointer data)
{
ESExpResult *r;
@@ -1004,7 +1004,7 @@ func_not(ESExp *f, int argc, ESExpResult **argv, void *data)
static gchar *
query_prop_to_ldap (const gchar *query_prop)
{
- int i;
+ gint i;
if (!strcmp (query_prop, "email"))
query_prop = "email_1";
@@ -1018,10 +1018,10 @@ query_prop_to_ldap (const gchar *query_prop)
static ESExpResult *
-func_contains(ESExp *f, int argc, ESExpResult **argv, void *data)
+func_contains(ESExp *f, gint argc, ESExpResult **argv, gpointer data)
{
ESExpResult *r;
- char *propname, *ldap_attr, *str;
+ gchar *propname, *ldap_attr, *str;
if (argc != 2 ||
argv[0]->type != ESEXP_RES_STRING ||
@@ -1074,11 +1074,11 @@ func_contains(ESExp *f, int argc, ESExpResult **argv, void *data)
}
static ESExpResult *
-func_is_or_begins_with(ESExp *f, int argc, ESExpResult **argv, gboolean exact)
+func_is_or_begins_with(ESExp *f, gint argc, ESExpResult **argv, gboolean exact)
{
ESExpResult *r;
- const char *star;
- char *propname, *str, *ldap_attr, *filter;
+ const gchar *star;
+ gchar *propname, *str, *ldap_attr, *filter;
if (argc != 2
|| argv[0]->type != ESEXP_RES_STRING
@@ -1117,7 +1117,7 @@ func_is_or_begins_with(ESExp *f, int argc, ESExpResult **argv, gboolean exact)
}
if (!strcmp (propname, "full_name")) {
- char *first, *last, *space;
+ gchar *first, *last, *space;
space = strchr (str, ' ');
if (space && space > str) {
@@ -1151,19 +1151,19 @@ func_is_or_begins_with(ESExp *f, int argc, ESExpResult **argv, gboolean exact)
}
static ESExpResult *
-func_is(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data)
+func_is(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
{
return func_is_or_begins_with(f, argc, argv, TRUE);
}
static ESExpResult *
-func_beginswith(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data)
+func_beginswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
{
return func_is_or_begins_with(f, argc, argv, FALSE);
}
static ESExpResult *
-func_endswith(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data)
+func_endswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
{
/* We don't allow endswith searches */
return e_sexp_result_new(f, ESEXP_RES_UNDEFINED);
@@ -1171,7 +1171,7 @@ func_endswith(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data
/* 'builtin' functions */
static struct {
- const char *name;
+ const gchar *name;
ESExpFunc *func;
} symbols[] = {
{ "and", func_and },
@@ -1184,16 +1184,16 @@ static struct {
};
static int
-build_query (EBookBackendGAL *bl, const char *query, const char *ldap_filter, char **ldap_query)
+build_query (EBookBackendGAL *bl, const gchar *query, const gchar *ldap_filter, gchar **ldap_query)
{
ESExp *sexp;
ESExpResult *r;
- int i, retval;
+ gint i, retval;
sexp = e_sexp_new();
for(i=0;i<sizeof(symbols)/sizeof(symbols[0]);i++) {
- e_sexp_add_function(sexp, 0, (char *) symbols[i].name,
+ e_sexp_add_function(sexp, 0, (gchar *) symbols[i].name,
symbols[i].func, NULL);
}
@@ -1217,7 +1217,7 @@ build_query (EBookBackendGAL *bl, const char *query, const char *ldap_filter, ch
retval = GNOME_Evolution_Addressbook_QueryRefused;
}
else {
- char *addfilter = NULL;
+ gchar *addfilter = NULL;
if (ldap_filter)
addfilter = g_strdup_printf ("(%s)", ldap_filter);
@@ -1245,7 +1245,7 @@ build_query (EBookBackendGAL *bl, const char *query, const char *ldap_filter, ch
}
static void
-manager_populate(EContact *contact, char **values, EBookBackendGAL *bl, E2kOperation *op)
+manager_populate(EContact *contact, gchar **values, EBookBackendGAL *bl, E2kOperation *op)
{
E2kGlobalCatalogEntry *entry;
E2kGlobalCatalogStatus status;
@@ -1266,9 +1266,9 @@ manager_populate(EContact *contact, char **values, EBookBackendGAL *bl, E2kOpera
str += len;
static void
-member_populate (EContact *contact, char **values, EBookBackendGAL *bl, E2kOperation *op)
+member_populate (EContact *contact, gchar **values, EBookBackendGAL *bl, E2kOperation *op)
{
- int i;
+ gint i;
gchar **member_info;
e_contact_set (contact, E_CONTACT_IS_LIST, GINT_TO_POINTER (TRUE));
@@ -1282,8 +1282,8 @@ member_populate (EContact *contact, char **values, EBookBackendGAL *bl, E2kOpera
e_vcard_attribute_add_param_with_value (attr, e_vcard_attribute_param_new (EVC_X_DEST_CONTACT_UID), member_info [1]);
if (member_info [2]) {
- int len = strlen (member_info [2]);
- char *value;
+ gint len = strlen (member_info [2]);
+ gchar *value;
if (member_info [2][0] == '\"' && member_info [2][len - 1] == '\"')
value = g_strdup_printf ("%s <%s>", member_info [2], member_info [0]);
@@ -1301,11 +1301,11 @@ member_populate (EContact *contact, char **values, EBookBackendGAL *bl, E2kOpera
}
}
-static char *
-get_time_stamp (char *serv_time_str, time_t *mtime)
+static gchar *
+get_time_stamp (gchar *serv_time_str, time_t *mtime)
{
- char *input_str = serv_time_str, *result_str = NULL;
- char *year, *month, *date, *hour, *minute, *second, *zone;
+ gchar *input_str = serv_time_str, *result_str = NULL;
+ gchar *year, *month, *date, *hour, *minute, *second, *zone;
struct tm mytime;
/* input time string will be of the format 20050419162256.0Z
* out put string shd be of the format 2005-04-19T16:22:56.0Z
@@ -1348,10 +1348,10 @@ get_time_stamp (char *serv_time_str, time_t *mtime)
}
static void
-last_mod_time_populate (EContact *contact, char **values,
+last_mod_time_populate (EContact *contact, gchar **values,
EBookBackendGAL *bl, E2kOperation *op)
{
- char *time_str;
+ gchar *time_str;
time_t mtime = 0;
/* FIXME: Some better way to do this */
@@ -1383,8 +1383,8 @@ build_contact_from_entry (EBookBackendGAL *bl, LDAPMessage *e, GList **existing_
{
LDAP *subldap = NULL;
EContact *contact = e_contact_new ();
- char *dn;
- char *attr;
+ gchar *dn;
+ gchar *attr;
BerElement *ber = NULL, *tber = NULL;
gboolean is_group = FALSE;
@@ -1416,9 +1416,9 @@ build_contact_from_entry (EBookBackendGAL *bl, LDAPMessage *e, GList **existing_
g_mutex_unlock (bl->priv->ldap_lock);
while (attr) {
- int i;
+ gint i;
struct prop_info *info = NULL;
- char **values;
+ gchar **values;
if (existing_objectclasses && !g_ascii_strcasecmp (attr, "objectclass")) {
g_mutex_lock (bl->priv->ldap_lock);
@@ -1464,17 +1464,17 @@ build_contact_from_entry (EBookBackendGAL *bl, LDAPMessage *e, GList **existing_
info->populate_contact_func(contact, values, bl, NULL);
}
else if (info->prop_type & PROP_TYPE_GROUP) {
- char *grpattrs[3];
- int i, view_limit = -1, ldap_error = LDAP_SUCCESS, count;
+ gchar *grpattrs[3];
+ gint i, view_limit = -1, ldap_error = LDAP_SUCCESS, count;
EDataBookView *book_view;
LDAPMessage *result;
- char **email_values, **cn_values, **member_info;
+ gchar **email_values, **cn_values, **member_info;
if (!subldap) {
subldap = e2k_global_catalog_get_ldap (bl->priv->gc, NULL, NULL);
}
- grpattrs[0] = (char *) "cn";
- grpattrs[1] = (char *) "mail";
+ grpattrs[0] = (gchar *) "cn";
+ grpattrs[1] = (gchar *) "mail";
grpattrs[2] = NULL;
/*search for member attributes*/
/*get the e-mail id for each member and add them to the list*/
@@ -1564,7 +1564,7 @@ build_contact_from_entry (EBookBackendGAL *bl, LDAPMessage *e, GList **existing_
static gboolean
poll_ldap (EBookBackendGAL *bl)
{
- int rc;
+ gint rc;
LDAPMessage *res;
struct timeval timeout;
@@ -1600,7 +1600,7 @@ poll_ldap (EBookBackendGAL *bl)
#endif
}
else {
- int msgid = ldap_msgid (res);
+ gint msgid = ldap_msgid (res);
LDAPOp *op;
g_static_rec_mutex_lock (&bl->priv->op_hash_mutex);
@@ -1631,7 +1631,7 @@ ldap_search_handler (LDAPOp *op, LDAPMessage *res)
EDataBookView *view = search_op->view;
EBookBackendGAL *bl = E_BOOK_BACKEND_GAL (op->backend);
LDAPMessage *e;
- int msg_type;
+ gint msg_type;
d(printf ("ldap_search_handler (%p)\n", view));
g_mutex_lock (bl->priv->ldap_lock);
@@ -1668,8 +1668,8 @@ ldap_search_handler (LDAPOp *op, LDAPMessage *res)
}
}
else if (msg_type == LDAP_RES_SEARCH_RESULT) {
- char *ldap_error_msg;
- int ldap_error;
+ gchar *ldap_error_msg;
+ gint ldap_error;
g_mutex_lock (bl->priv->ldap_lock);
ldap_parse_result (bl->priv->ldap, res, &ldap_error,
@@ -1723,15 +1723,15 @@ ldap_search_dtor (LDAPOp *op)
#if ENABLE_CACHE
static void
get_contacts_from_cache (EBookBackendGAL *ebg,
- const char *query,
+ const gchar *query,
GPtrArray *ids,
EDataBookView *book_view)
{
- int i;
+ gint i;
for (i = 0; i < ids->len; i ++) {
- char *uid = g_ptr_array_index (ids, i);
+ gchar *uid = g_ptr_array_index (ids, i);
EContact *contact =
@@ -1753,10 +1753,10 @@ start_book_view (EBookBackend *backend,
EBookBackendGAL *bl = E_BOOK_BACKEND_GAL (backend);
GNOME_Evolution_Addressbook_CallStatus status;
GList *contacts;
- char *ldap_query;
- int ldap_err = LDAP_SUCCESS;
- int search_msgid;
- int view_limit;
+ gchar *ldap_query;
+ gint ldap_err = LDAP_SUCCESS;
+ gint search_msgid;
+ gint view_limit;
GList *l;
d(printf("start book view\n"));
@@ -1789,7 +1789,7 @@ start_book_view (EBookBackend *backend,
#if ENABLE_CACHE
d(printf("Mode:Remote\n"));
if (bl->priv->marked_for_offline && bl->priv->file_db) {
- const char *query = e_data_book_view_get_card_query (view);
+ const gchar *query = e_data_book_view_get_card_query (view);
GPtrArray *ids = NULL;
d(printf("Marked for offline and cache present\n"));
@@ -1963,27 +1963,27 @@ static void
get_changes (EBookBackend *backend,
EDataBook *book,
guint32 opid,
- const char *change_id)
+ const gchar *change_id)
{
/* FIXME: implement */
}
-static int pagedResults = 1;
+static gint pagedResults = 1;
static ber_int_t pageSize = 1000;
static ber_int_t entriesLeft = 0;
static ber_int_t morePagedResults = 1;
static struct berval cookie = { 0, NULL };
-static int npagedresponses;
-static int npagedentries;
-static int npagedreferences;
-static int npagedextended;
-static int npagedpartial;
+static gint npagedresponses;
+static gint npagedentries;
+static gint npagedreferences;
+static gint npagedextended;
+static gint npagedpartial;
/* Set server controls. Add controls extra_c[0..count-1], if set. */
static void
-tool_server_controls( LDAP *ld, LDAPControl *extra_c, int count )
+tool_server_controls( LDAP *ld, LDAPControl *extra_c, gint count )
{
- int i = 0, j, crit = 0, err;
+ gint i = 0, j, crit = 0, err;
LDAPControl c[3], **ctrls;
ctrls = (LDAPControl**) malloc(sizeof(c) + (count+1)*sizeof(LDAPControl*));
@@ -2039,8 +2039,8 @@ parse_page_control(
LDAPMessage *result,
struct berval *cookie )
{
- int rc;
- int err;
+ gint rc;
+ gint err;
LDAPControl **ctrl = NULL;
LDAPControl *ctrlp = NULL;
BerElement *ber;
@@ -2105,26 +2105,26 @@ parse_page_control(
}
#if ENABLE_CACHE
-static int dosearch(
+static gint dosearch(
EBookBackendGAL *bl,
- const char *base,
- int scope,
- char *filtpatt,
- char *value,
- char **attrs,
- int attrsonly,
+ const gchar *base,
+ gint scope,
+ gchar *filtpatt,
+ gchar *value,
+ gchar **attrs,
+ gint attrsonly,
LDAPControl **sctrls,
LDAPControl **cctrls,
struct timeval *timeout,
- const char *changed_filter,
- int sizelimit )
+ const gchar *changed_filter,
+ gint sizelimit )
{
int rc;
LDAPMessage *res, *msg;
ber_int_t msgid;
- static int count = 0;
- char *ssize = getenv("LDAP_LIMIT");
- int size = 0;
+ static gint count = 0;
+ gchar *ssize = getenv("LDAP_LIMIT");
+ gint size = 0;
if (ssize && *ssize)
size = atoi(ssize);
@@ -2150,7 +2150,7 @@ static int dosearch(
msg = ldap_next_message (bl->priv->ldap, msg ) )
{
EContact *contact;
- const char *uid;
+ const gchar *uid;
switch( ldap_msgtype( msg ) ) {
case LDAP_RES_SEARCH_ENTRY:
@@ -2205,14 +2205,14 @@ done:
}
static void
-generate_cache (EBookBackendGAL *book_backend_gal, const char * changed_filter)
+generate_cache (EBookBackendGAL *book_backend_gal, const gchar * changed_filter)
{
LDAPGetContactListOp *contact_list_op = g_new0 (LDAPGetContactListOp, 1);
EBookBackendGALPrivate *priv;
gchar *ldap_query;
- int i = 0, rc ;
+ gint i = 0, rc ;
BerElement *prber = NULL;
- char t[15], *cachetime;
+ gchar t[15], *cachetime;
LDAPControl c[6];
d(printf ("Generate Cache\n"));
@@ -2292,8 +2292,8 @@ static void
update_cache (EBookBackendGAL *gal)
{
time_t t1;
- char *t = e_book_backend_db_cache_get_time (gal->priv->file_db);
- char *filter, *galtime;
+ gchar *t = e_book_backend_db_cache_get_time (gal->priv->file_db);
+ gchar *filter, *galtime;
struct tm *tm;
printf("Cache is populated, Refresh now... \n");
@@ -2323,9 +2323,9 @@ static void
authenticate_user (EBookBackend *backend,
EDataBook *book,
guint32 opid,
- const char *user,
- const char *password,
- const char *auth_method)
+ const gchar *user,
+ const gchar *password,
+ const gchar *auth_method)
{
EBookBackendGAL *be = E_BOOK_BACKEND_GAL (backend);
EBookBackendGALPrivate *bepriv = be->priv;
@@ -2333,7 +2333,7 @@ authenticate_user (EBookBackend *backend,
ExchangeAccount *account;
GNOME_Evolution_Addressbook_CallStatus res;
GConfClient *gc = gconf_client_get_default();
- int interval = gconf_client_get_int (gc, "/apps/evolution/addressbook/gal_cache_interval", NULL);
+ gint interval = gconf_client_get_int (gc, "/apps/evolution/addressbook/gal_cache_interval", NULL);
/* We should not be here */
/* e_data_book_respond_authenticate_user (book, */
@@ -2373,9 +2373,9 @@ authenticate_user (EBookBackend *backend,
if (be->priv->marked_for_offline) {
if (e_book_backend_db_cache_is_populated (be->priv->file_db) ) {
time_t t1, t2;
- int diff;
+ gint diff;
- char *t = e_book_backend_db_cache_get_time (be->priv->file_db);
+ gchar *t = e_book_backend_db_cache_get_time (be->priv->file_db);
d(printf("Cache is populated, check if refresh is required \n"));
if (t && *t)
t1 = atoi (t);
@@ -2414,7 +2414,7 @@ authenticate_user (EBookBackend *backend,
#ifdef SUNLDAP
static int
-ber_flatten2( BerElement *ber, struct berval *bv, int alloc )
+ber_flatten2( BerElement *ber, struct berval *bv, gint alloc )
{
struct berval *tmp;
@@ -2432,7 +2432,7 @@ ber_flatten2( BerElement *ber, struct berval *bv, int alloc )
#endif
static void
-ldap_cancel_op(void *key, void *value, void *data)
+ldap_cancel_op(gpointer key, gpointer value, gpointer data)
{
EBookBackendGAL *bl = data;
LDAPOp *op = value;
@@ -2457,7 +2457,7 @@ cancel_operation (EBookBackend *backend, EDataBook *book)
}
static void
-set_mode (EBookBackend *backend, int mode)
+set_mode (EBookBackend *backend, gint mode)
{
EBookBackendGAL *be = E_BOOK_BACKEND_GAL (backend);
EBookBackendGALPrivate *bepriv;
@@ -2546,13 +2546,13 @@ load_source (EBookBackend *backend,
{
EBookBackendGAL *bl = E_BOOK_BACKEND_GAL (backend);
GConfClient *gc = gconf_client_get_default();
- const char *host;
- char **tokens;
- const char *offline;
- char *uri;
- char *book_name;
- char *dirname, *filename;
- int i, db_error;
+ const gchar *host;
+ gchar **tokens;
+ const gchar *offline;
+ gchar *uri;
+ gchar *book_name;
+ gchar *dirname, *filename;
+ gint i, db_error;
#if ENABLE_CACHE
DB *db;
DB_ENV *env;
@@ -2681,7 +2681,7 @@ load_source (EBookBackend *backend,
bl->priv->file_db = db;
if (db_error != 0) {
- int rv;
+ gint rv;
/* the database didn't exist, so we create the directory then the .db */
rv= g_mkdir_with_parents (dirname, 0777);
@@ -2735,7 +2735,7 @@ remove_gal (EBookBackend *backend, EDataBook *book, guint32 opid)
e_data_book_respond_remove (book, opid, GNOME_Evolution_Addressbook_PermissionDenied);
}
-static char *
+static gchar *
get_static_capabilities (EBookBackend *backend)
{
if (can_browse (backend))
@@ -2767,7 +2767,7 @@ e_book_backend_gal_new (void)
}
static gboolean
-call_dtor (int msgid, LDAPOp *op, gpointer data)
+call_dtor (gint msgid, LDAPOp *op, gpointer data)
{
EBookBackendGAL *bl = E_BOOK_BACKEND_GAL (op->backend);
@@ -2844,7 +2844,7 @@ class_init (EBookBackendGALClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
EBookBackendClass *backend_class = E_BOOK_BACKEND_CLASS (klass);
- int i;
+ gint i;
parent_class = g_type_class_peek_parent (klass);
@@ -2874,11 +2874,11 @@ class_init (EBookBackendGALClass *klass)
supported_fields = NULL;
for (i = 0; i < num_prop_infos; i++) {
supported_fields = g_list_append (supported_fields,
- (char *)e_contact_field_name (prop_info[i].field_id));
+ (gchar *)e_contact_field_name (prop_info[i].field_id));
}
supported_fields = g_list_append (supported_fields, (gpointer) "file_as");
- search_attrs = g_new (char *, num_prop_infos + 1);
+ search_attrs = g_new (gchar *, num_prop_infos + 1);
for (i = 0; i < num_prop_infos; i++)
search_attrs[i] = prop_info[i].ldap_attr;
search_attrs[num_prop_infos] = NULL;
diff --git a/calendar/e-cal-backend-exchange-calendar.c b/calendar/e-cal-backend-exchange-calendar.c
index dad252a..dad79a6 100644
--- a/calendar/e-cal-backend-exchange-calendar.c
+++ b/calendar/e-cal-backend-exchange-calendar.c
@@ -40,7 +40,7 @@
#include <mapi.h>
struct ECalBackendExchangeCalendarPrivate {
- int dummy;
+ gint dummy;
GMutex *mutex;
gboolean is_loaded;
};
@@ -57,9 +57,9 @@ static ECalBackendExchange *parent_class = NULL;
#define d(x)
-static ECalBackendSyncStatus modify_object_with_href (ECalBackendSync *backend, EDataCal *cal, const char *calobj, CalObjModType mod, char **old_object, char **new_object, const char *href, const char *rid_to_remove);
+static ECalBackendSyncStatus modify_object_with_href (ECalBackendSync *backend, EDataCal *cal, const gchar *calobj, CalObjModType mod, gchar **old_object, gchar **new_object, const gchar *href, const gchar *rid_to_remove);
-static icalproperty *find_attendee_prop (icalcomponent *ical_comp, const char *address);
+static icalproperty *find_attendee_prop (icalcomponent *ical_comp, const gchar *address);
static gboolean check_owner_partstatus_for_declined (ECalBackendSync *backend,
icalcomponent *icalcomp);
@@ -95,7 +95,7 @@ add_timezones_from_comp (ECalBackendExchange *cbex, icalcomponent *icalcomp)
static gboolean
add_vevent (ECalBackendExchange *cbex,
- const char *href, const char *lastmod,
+ const gchar *href, const gchar *lastmod,
icalcomponent *icalcomp)
{
icalproperty *prop, *transp;
@@ -109,7 +109,7 @@ add_vevent (ECalBackendExchange *cbex,
/* Check all X-MICROSOFT-CDO properties to fix any needed stuff */
prop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY);
while (prop) {
- const char *x_name, *x_val;
+ const gchar *x_name, *x_val;
struct icaltimetype itt;
x_name = icalproperty_get_x_name (prop);
@@ -188,11 +188,11 @@ add_vevent (ECalBackendExchange *cbex,
/* Add the event to the cache, Notify the backend if it is sucessfully added */
static gboolean
-add_ical (ECalBackendExchange *cbex, const char *href, const char *lastmod,
- const char *uid, const char *body, int len, int receipts)
+add_ical (ECalBackendExchange *cbex, const gchar *href, const gchar *lastmod,
+ const gchar *uid, const gchar *body, gint len, gint receipts)
{
- const char *start, *end;
- char *ical_body;
+ const gchar *start, *end;
+ gchar *ical_body;
icalcomponent *icalcomp, *subcomp, *new_comp;
icalcomponent_kind kind;
icalproperty *icalprop;
@@ -246,7 +246,7 @@ add_ical (ECalBackendExchange *cbex, const char *href, const char *lastmod,
status = add_vevent (cbex, href, lastmod, icalcomp);
if (status) {
- char *object = icalcomponent_as_ical_string_r (icalcomp);
+ gchar *object = icalcomponent_as_ical_string_r (icalcomp);
e_cal_backend_notify_object_created (backend, object);
g_free (object);
}
@@ -289,7 +289,7 @@ add_ical (ECalBackendExchange *cbex, const char *href, const char *lastmod,
status = add_vevent (cbex, href, lastmod, new_comp);
if (status) {
- char *object = icalcomponent_as_ical_string_r (new_comp);
+ gchar *object = icalcomponent_as_ical_string_r (new_comp);
e_cal_backend_notify_object_created (backend, object);
g_free (object);
}
@@ -310,7 +310,7 @@ add_ical (ECalBackendExchange *cbex, const char *href, const char *lastmod,
return retval;
}
-static const char *event_properties[] = {
+static const gchar *event_properties[] = {
E2K_PR_CALENDAR_UID,
PR_CAL_RECURRING_ID,
E2K_PR_DAV_LAST_MODIFIED,
@@ -318,14 +318,14 @@ static const char *event_properties[] = {
PR_READ_RECEIPT_REQUESTED,
PR_ORIGINATOR_DELIVERY_REPORT_REQUESTED
};
-static const int n_event_properties = G_N_ELEMENTS (event_properties);
+static const gint n_event_properties = G_N_ELEMENTS (event_properties);
-static const char *new_event_properties[] = {
+static const gchar *new_event_properties[] = {
PR_INTERNET_CONTENT,
PR_READ_RECEIPT_REQUESTED,
PR_ORIGINATOR_DELIVERY_REPORT_REQUESTED
};
-static const int n_new_event_properties = G_N_ELEMENTS (new_event_properties);
+static const gint n_new_event_properties = G_N_ELEMENTS (new_event_properties);
static guint
get_changed_events (ECalBackendExchange *cbex)
@@ -336,11 +336,11 @@ get_changed_events (ECalBackendExchange *cbex)
E2kRestriction *rn;
E2kResultIter *iter;
E2kResult *result;
- const char *prop, *uid, *modtime, *attach_prop, *receipts, *rid;
+ const gchar *prop, *uid, *modtime, *attach_prop, *receipts, *rid;
guint status;
E2kContext *ctx;
- int i, status_tracking = EX_NO_RECEIPTS;
- const char *since = NULL;
+ gint i, status_tracking = EX_NO_RECEIPTS;
+ const gchar *since = NULL;
ECalBackendExchangeCalendar *cbexc = E_CAL_BACKEND_EXCHANGE_CALENDAR (cbex);
g_return_val_if_fail (E_IS_CAL_BACKEND_EXCHANGE (cbex), SOUP_STATUS_CANCELLED);
@@ -458,7 +458,7 @@ get_changed_events (ECalBackendExchange *cbex)
PR_INTERNET_CONTENT property. Fetch events created from OWA */
prop = PR_INTERNET_CONTENT;
iter = e_folder_exchange_bpropfind_start (cbex->folder, NULL,
- (const char **)hrefs->pdata,
+ (const gchar **)hrefs->pdata,
hrefs->len,
new_event_properties, n_new_event_properties);
for (i = 0; i < hrefs->len; i++)
@@ -496,7 +496,7 @@ get_changed_events (ECalBackendExchange *cbex)
/* The icaldata already has the attachment. So no need to
re-fetch it from the server. */
add_ical (cbex, result->href, modtime, uid,
- (char *) ical_data->data, ical_data->len, status_tracking);
+ (gchar *) ical_data->data, ical_data->len, status_tracking);
}
status = e2k_result_iter_free (iter);
@@ -554,7 +554,7 @@ get_changed_events (ECalBackendExchange *cbex)
/* folder subscription notify callback */
static void
-notify_changes (E2kContext *ctx, const char *uri,
+notify_changes (E2kContext *ctx, const gchar *uri,
E2kContextChangeType type, gpointer user_data)
{
@@ -570,7 +570,7 @@ notify_changes (E2kContext *ctx, const char *uri,
static ECalBackendSyncStatus
open_calendar (ECalBackendSync *backend, EDataCal *cal,
gboolean only_if_exists,
- const char *username, const char *password)
+ const gchar *username, const gchar *password)
{
ECalBackendSyncStatus status;
GThread *thread = NULL;
@@ -613,12 +613,12 @@ struct _cb_data {
};
static void
-add_timezone_cb (icalparameter *param, void *data)
+add_timezone_cb (icalparameter *param, gpointer data)
{
struct _cb_data *cbdata = (struct _cb_data *) data;
icalcomponent *vtzcomp;
- const char *tzid;
- char *izone = NULL;
+ const gchar *tzid;
+ gchar *izone = NULL;
g_return_if_fail (cbdata != NULL);
@@ -642,7 +642,7 @@ check_for_send_options (icalcomponent *icalcomp, E2kProperties *props)
{
icalproperty *icalprop;
gboolean exists = FALSE;
- const char *x_name, *x_val;
+ const gchar *x_name, *x_val;
icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY);
while (icalprop && !exists) {
@@ -673,7 +673,7 @@ check_for_send_options (icalcomponent *icalcomp, E2kProperties *props)
/* stolen from e-itip-control.c with some modifications */
static icalproperty *
-find_attendee_prop (icalcomponent *ical_comp, const char *address)
+find_attendee_prop (icalcomponent *ical_comp, const gchar *address)
{
icalproperty *prop;
@@ -683,8 +683,8 @@ find_attendee_prop (icalcomponent *ical_comp, const char *address)
for (prop = icalcomponent_get_first_property (ical_comp, ICAL_ATTENDEE_PROPERTY);
prop != NULL;
prop = icalcomponent_get_next_property (ical_comp, ICAL_ATTENDEE_PROPERTY)) {
- const char *attendee;
- char *text = NULL;
+ const gchar *attendee;
+ gchar *text = NULL;
attendee = icalproperty_get_value_as_string_r (prop);
if (!attendee)
@@ -728,7 +728,7 @@ check_owner_partstatus_for_declined (ECalBackendSync *backend,
static ECalBackendSyncStatus
create_object (ECalBackendSync *backend, EDataCal *cal,
- char **calobj, char **uid)
+ gchar **calobj, gchar **uid)
{
/* FIXME : Return some value in uid */
ECalBackendExchangeCalendar *cbexc;
@@ -736,17 +736,17 @@ create_object (ECalBackendSync *backend, EDataCal *cal,
icalcomponent *icalcomp, *real_icalcomp;
icalcomponent_kind kind;
icalproperty *icalprop;
- const char *temp_comp_uid;
- char *lastmod;
+ const gchar *temp_comp_uid;
+ gchar *lastmod;
struct icaltimetype current;
- char *location = NULL, *ru_header = NULL;
+ gchar *location = NULL, *ru_header = NULL;
ECalComponent *comp;
- char *body_crlf, *msg;
- char *from, *date;
- const char *summary;
- char *attach_body = NULL;
- char *attach_body_crlf = NULL;
- char *boundary = NULL;
+ gchar *body_crlf, *msg;
+ gchar *from, *date;
+ const gchar *summary;
+ gchar *attach_body = NULL;
+ gchar *attach_body_crlf = NULL;
+ gchar *boundary = NULL;
E2kHTTPStatus http_status;
E2kProperties *props = e2k_properties_new ();
E2kContext *e2kctx;
@@ -958,12 +958,12 @@ update_x_properties (ECalBackendExchange *cbex, ECalComponent *comp)
{
icalcomponent *icalcomp;
icalproperty *icalprop;
- const char *x_name, *x_val;
+ const gchar *x_name, *x_val;
ECalComponentTransparency transp;
ECalComponentDateTime dtstart;
- int *priority;
- const char *busystatus, *insttype, *allday, *importance;
- int prop_set = 0;
+ gint *priority;
+ const gchar *busystatus, *insttype, *allday, *importance;
+ gint prop_set = 0;
GSList *props = NULL, *l = NULL;
e_cal_component_get_transparency (comp, &transp);
@@ -1063,8 +1063,8 @@ update_x_properties (ECalBackendExchange *cbex, ECalComponent *comp)
static ECalBackendSyncStatus
modify_object (ECalBackendSync *backend, EDataCal *cal,
- const char *calobj, CalObjModType mod,
- char **old_object, char **new_object)
+ const gchar *calobj, CalObjModType mod,
+ gchar **old_object, gchar **new_object)
{
ECalBackendSyncStatus status;
@@ -1077,28 +1077,28 @@ modify_object (ECalBackendSync *backend, EDataCal *cal,
static ECalBackendSyncStatus
modify_object_with_href (ECalBackendSync *backend, EDataCal *cal,
- const char *calobj, CalObjModType mod,
- char **old_object, char **new_object, const char *href, const char *rid_to_remove)
+ const gchar *calobj, CalObjModType mod,
+ gchar **old_object, gchar **new_object, const gchar *href, const gchar *rid_to_remove)
{
ECalBackendExchangeCalendar *cbexc;
ECalBackendExchangeComponent *ecomp;
ECalBackendExchange *cbex;
icalcomponent *icalcomp, *real_icalcomp, *updated_icalcomp;
ECalComponent *real_ecomp, *cached_ecomp = NULL, *updated_ecomp;
- const char *comp_uid;
- char *updated_ecomp_str, *real_comp_str;
- char *body_crlf, *msg;
- char *attach_body = NULL;
- char *attach_body_crlf = NULL;
- char *boundary = NULL;
+ const gchar *comp_uid;
+ gchar *updated_ecomp_str, *real_comp_str;
+ gchar *body_crlf, *msg;
+ gchar *attach_body = NULL;
+ gchar *attach_body_crlf = NULL;
+ gchar *boundary = NULL;
struct icaltimetype last_modified, key_rid;
icalcomponent_kind kind;
ECalComponentDateTime dt;
struct _cb_data *cbdata;
icalproperty *icalprop;
E2kHTTPStatus http_status;
- char *from, *date;
- const char *summary, *new_href;
+ gchar *from, *date;
+ const gchar *summary, *new_href;
gboolean send_options;
E2kContext *ctx;
E2kProperties *props = e2k_properties_new ();
@@ -1262,7 +1262,7 @@ modify_object_with_href (ECalBackendSync *backend, EDataCal *cal,
dt.value->hour = dt.value->minute = dt.value->second = 0;
dt.value->zone = zone;
- g_free ((char *)dt.tzid);
+ g_free ((gchar *)dt.tzid);
dt.tzid = g_strdup (icaltimezone_get_tzid (zone));
e_cal_component_set_dtstart (real_ecomp, &dt);
e_cal_component_free_datetime (&dt);
@@ -1273,7 +1273,7 @@ modify_object_with_href (ECalBackendSync *backend, EDataCal *cal,
dt.value->hour = dt.value->minute = dt.value->second = 0;
dt.value->zone = zone;
- g_free ((char *)dt.tzid);
+ g_free ((gchar *)dt.tzid);
dt.tzid = g_strdup (icaltimezone_get_tzid (zone));
e_cal_component_set_dtend (real_ecomp, &dt);
}
@@ -1296,7 +1296,7 @@ modify_object_with_href (ECalBackendSync *backend, EDataCal *cal,
if (dt.tzid == NULL)
from_zone = icaltimezone_get_utc_timezone ();
else {
- char *izone = NULL;
+ gchar *izone = NULL;
get_timezone (backend, cal, dt.tzid, &izone);
from_zone = icalcomponent_get_timezone (icalcomponent_new_from_string (izone),
dt.tzid);
@@ -1488,8 +1488,8 @@ modify_object_with_href (ECalBackendSync *backend, EDataCal *cal,
static ECalBackendSyncStatus
remove_object (ECalBackendSync *backend, EDataCal *cal,
- const char *uid, const char *rid, CalObjModType mod,
- char **old_object, char **object)
+ const gchar *uid, const gchar *rid, CalObjModType mod,
+ gchar **old_object, gchar **object)
{
ECalBackendExchangeCalendar *cbexc;
ECalBackendExchange *cbex;
@@ -1497,7 +1497,7 @@ remove_object (ECalBackendSync *backend, EDataCal *cal,
E2kHTTPStatus status;
E2kContext *ctx;
ECalComponent *comp;
- char *calobj, *obj = NULL;
+ gchar *calobj, *obj = NULL;
struct icaltimetype time_rid;
ECalBackendSyncStatus ebs_status;
@@ -1532,12 +1532,12 @@ remove_object (ECalBackendSync *backend, EDataCal *cal,
/*TODO How handle multiple detached intances with no master object ?*/
if (mod == CALOBJ_MOD_THIS && rid && *rid && ecomp->icomp) {
- char *new_object = NULL;
+ gchar *new_object = NULL;
/*remove a single instance of a recurring event and modify */
time_rid = icaltime_from_string (rid);
e_cal_util_remove_instances (ecomp->icomp, time_rid, mod);
- calobj = (char *) icalcomponent_as_ical_string_r (ecomp->icomp);
+ calobj = (gchar *) icalcomponent_as_ical_string_r (ecomp->icomp);
e_cal_backend_exchange_cache_unlock (cbex);
ebs_status = modify_object_with_href (backend, cal, calobj, mod, &obj, &new_object, NULL, rid);
@@ -1577,7 +1577,7 @@ error:
static ECalBackendSyncStatus
receive_objects (ECalBackendSync *backend, EDataCal *cal,
- const char *calobj)
+ const gchar *calobj)
{
ECalBackendExchangeCalendar *cbexc;
ECalBackendExchange *cbex;
@@ -1626,9 +1626,9 @@ receive_objects (ECalBackendSync *backend, EDataCal *cal,
icalcomponent_free (icalcomp);
for (l = comps; l; l= l->next) {
- const char *uid;
- char *icalobj, *rid = NULL;
- char *object = NULL;
+ const gchar *uid;
+ gchar *icalobj, *rid = NULL;
+ gchar *object = NULL;
subcomp = l->data;
@@ -1649,7 +1649,7 @@ receive_objects (ECalBackendSync *backend, EDataCal *cal,
case ICAL_METHOD_REPLY:
e_cal_backend_exchange_cache_lock (cbex);
if ((ecomp = get_exchange_comp (E_CAL_BACKEND_EXCHANGE (cbexc), uid)) != NULL ) {
- char *old_object = NULL;
+ gchar *old_object = NULL;
d(printf ("uid : %s : found in the cache\n", uid));
@@ -1668,13 +1668,13 @@ receive_objects (ECalBackendSync *backend, EDataCal *cal,
old_object, NULL);
e_cal_component_free_id (id);
} else {
- char *new_object = NULL;
+ gchar *new_object = NULL;
CalObjModType mod = CALOBJ_MOD_ALL;
if (e_cal_util_component_is_instance (subcomp))
mod = CALOBJ_MOD_THIS;
- icalobj = (char *) icalcomponent_as_ical_string_r (subcomp);
+ icalobj = (gchar *) icalcomponent_as_ical_string_r (subcomp);
status = modify_object_with_href (backend, cal, icalobj,
mod,
&old_object, &new_object, NULL, NULL);
@@ -1693,9 +1693,9 @@ receive_objects (ECalBackendSync *backend, EDataCal *cal,
g_free (old_object);
} else if (!check_owner_partstatus_for_declined (backend, subcomp)) {
- char *returned_uid, *object;
+ gchar *returned_uid, *object;
d(printf ("object : %s .. not found in the cache\n", uid));
- icalobj = (char *) icalcomponent_as_ical_string_r (subcomp);
+ icalobj = (gchar *) icalcomponent_as_ical_string_r (subcomp);
d(printf ("Create a new object : %s\n", icalobj));
e_cal_backend_exchange_cache_unlock (cbex);
@@ -1720,7 +1720,7 @@ receive_objects (ECalBackendSync *backend, EDataCal *cal,
break;
case ICAL_METHOD_CANCEL:
- icalobj = (char *) icalcomponent_as_ical_string_r (subcomp);
+ icalobj = (gchar *) icalcomponent_as_ical_string_r (subcomp);
if (rid)
status = remove_object (backend, cal, uid, rid, CALOBJ_MOD_THIS, &icalobj, &object);
else
@@ -1767,7 +1767,7 @@ typedef enum {
static ECalBackendExchangeBookingResult
book_resource (ECalBackendExchange *cbex,
EDataCal *cal,
- const char *resource_email,
+ const gchar *resource_email,
ECalComponent *comp,
icalproperty_method method,
icalparameter *part_param)
@@ -1785,15 +1785,15 @@ book_resource (ECalBackendExchange *cbex,
icaltimezone *izone;
guint32 access = 0;
time_t tt;
- const char *uid, *prop_name = PR_ACCESS;
- const char *access_prop = NULL, *meeting_prop = NULL, *cal_uid = NULL;
+ const gchar *uid, *prop_name = PR_ACCESS;
+ const gchar *access_prop = NULL, *meeting_prop = NULL, *cal_uid = NULL;
gboolean bookable;
- char *top_uri = NULL, *cal_uri = NULL, *returned_uid = NULL;
- char *startz, *endz, *href = NULL, *old_object = NULL, *calobj = NULL, *new_object = NULL;
+ gchar *top_uri = NULL, *cal_uri = NULL, *returned_uid = NULL;
+ gchar *startz, *endz, *href = NULL, *old_object = NULL, *calobj = NULL, *new_object = NULL;
E2kRestriction *rn;
- int nresult;
+ gint nresult;
ECalBackendExchangeBookingResult retval = E_CAL_BACKEND_EXCHANGE_BOOKING_ERROR;
- const char *localfreebusy_path = "NON_IPM_SUBTREE/Freebusy%20Data/LocalFreebusy.EML";
+ const gchar *localfreebusy_path = "NON_IPM_SUBTREE/Freebusy%20Data/LocalFreebusy.EML";
g_object_ref (comp);
@@ -1872,7 +1872,7 @@ book_resource (ECalBackendExchange *cbex,
e_cal_backend_exchange_cache_unlock (cbex);
if (method == ICAL_METHOD_CANCEL) {
- char *object = NULL;
+ gchar *object = NULL;
/* g_object_unref (comp); */
/* If there is nothing to cancel, we're good */
@@ -1968,7 +1968,7 @@ book_resource (ECalBackendExchange *cbex,
icalparameter_set_partstat (part_param, ICAL_PARTSTAT_ACCEPTED);
e_cal_component_commit_sequence (comp);
- calobj = (char *) e_cal_component_get_as_string (comp);
+ calobj = (gchar *) e_cal_component_get_as_string (comp);
/* status = e_cal_component_update (comp, method, FALSE ); */
if (ecomp) {
@@ -2011,8 +2011,8 @@ book_resource (ECalBackendExchange *cbex,
static ECalBackendSyncStatus
send_objects (ECalBackendSync *backend, EDataCal *cal,
- const char *calobj,
- GList **users, char **modified_calobj)
+ const gchar *calobj,
+ GList **users, gchar **modified_calobj)
{
ECalBackendExchange *cbex = (ECalBackendExchange *) backend;
ECalBackendSyncStatus retval = GNOME_Evolution_Calendar_Success;
@@ -2071,7 +2071,7 @@ send_objects (ECalBackendSync *backend, EDataCal *cal,
{
icalvalue *value;
icalparameter *param;
- const char *attendee;
+ const gchar *attendee;
param = icalproperty_get_first_parameter (prop, ICAL_CUTYPE_PARAMETER);
if (!param)
@@ -2179,9 +2179,9 @@ create_freebusy_prop (E2kBusyStatus fbstatus, time_t start, time_t end)
}
static void
-set_freebusy_info (icalcomponent *vfb, const char *data, time_t start)
+set_freebusy_info (icalcomponent *vfb, const gchar *data, time_t start)
{
- const char *span_start, *span_end;
+ const gchar *span_start, *span_end;
E2kBusyStatus busy;
icalproperty *prop;
time_t end;
@@ -2203,13 +2203,13 @@ set_freebusy_info (icalcomponent *vfb, const char *data, time_t start)
static ECalBackendSyncStatus
discard_alarm (ECalBackendSync *backend, EDataCal *cal,
- const char *uid, const char *auid)
+ const gchar *uid, const gchar *auid)
{
ECalBackendSyncStatus result = GNOME_Evolution_Calendar_Success;
ECalBackendExchange *cbex = NULL;
ECalBackendExchangeComponent *ecbexcomp;
ECalComponent *ecomp;
- char *ecomp_str;
+ gchar *ecomp_str;
icalcomponent *icalcomp = NULL;
g_return_val_if_fail (E_IS_CAL_BACKEND_EXCHANGE_CALENDAR (backend),
@@ -2261,7 +2261,7 @@ get_free_busy (ECalBackendSync *backend, EDataCal *cal,
GList **freebusy)
{
ECalBackendExchange *cbex = E_CAL_BACKEND_EXCHANGE (backend);
- char *start_str, *end_str;
+ gchar *start_str, *end_str;
GList *l;
GString *uri;
SoupBuffer *response;
@@ -2293,7 +2293,7 @@ get_free_busy (ECalBackendSync *backend, EDataCal *cal,
g_string_append (uri, "&interval=30");
for (l = users; l; l = l->next) {
g_string_append (uri, "&u=SMTP:");
- g_string_append (uri, (char *) l->data);
+ g_string_append (uri, (gchar *) l->data);
}
g_free (start_str);
g_free (end_str);
@@ -2323,8 +2323,8 @@ get_free_busy (ECalBackendSync *backend, EDataCal *cal,
icalcomponent *vfb;
icalproperty *organizer;
xmlNode *node, *fbdata;
- char *org_uri, *calobj;
- char *content;
+ gchar *org_uri, *calobj;
+ gchar *content;
fbdata = e2k_xml_find_in (item, item, "fbdata");
if (!fbdata || !fbdata->children || !fbdata->children->content)
@@ -2341,7 +2341,7 @@ get_free_busy (ECalBackendSync *backend, EDataCal *cal,
if (node && node->children && node->children->content) {
icalparameter *cn;
- content = (char *) node->children->content;
+ content = (gchar *) node->children->content;
cn = icalparameter_new_cn (content);
icalproperty_add_parameter (organizer, cn);
}
@@ -2351,7 +2351,7 @@ get_free_busy (ECalBackendSync *backend, EDataCal *cal,
icalcomponent_set_dtend (vfb, icaltime_from_timet_with_zone (end, 0, utc));
icalcomponent_add_property (vfb, organizer);
- content = (char *) fbdata->children->content;
+ content = (gchar *) fbdata->children->content;
set_freebusy_info (vfb, content, start);
calobj = icalcomponent_as_ical_string_r (vfb);
diff --git a/calendar/e-cal-backend-exchange-factory.c b/calendar/e-cal-backend-exchange-factory.c
index 92181b9..3715e7c 100644
--- a/calendar/e-cal-backend-exchange-factory.c
+++ b/calendar/e-cal-backend-exchange-factory.c
@@ -33,7 +33,7 @@ e_cal_backend_exchange_factory_instance_init (ECalBackendExchangeFactory *factor
{
}
-static const char *
+static const gchar *
_get_protocol (ECalBackendFactory *factory)
{
return "exchange";
diff --git a/calendar/e-cal-backend-exchange-tasks.c b/calendar/e-cal-backend-exchange-tasks.c
index 34cecf0..adeb0cc 100644
--- a/calendar/e-cal-backend-exchange-tasks.c
+++ b/calendar/e-cal-backend-exchange-tasks.c
@@ -46,7 +46,7 @@ typedef struct {
/* Private part of the ECalBackendExchangeTasks structure */
struct _ECalBackendExchangeTasksPrivate {
/* URI where the task data is stored */
- char *uri;
+ gchar *uri;
/* Top level VTODO component */
icalcomponent *icalcomp;
@@ -64,14 +64,14 @@ struct _ECalBackendExchangeTasksPrivate {
gboolean is_loaded;
- int dummy;
+ gint dummy;
};
#define PARENT_TYPE E_TYPE_CAL_BACKEND_EXCHANGE
static ECalBackendExchange *parent_class = NULL;
static void
-get_from (ECalBackendSync *backend, ECalComponent *comp, char **from_name, char **from_addr)
+get_from (ECalBackendSync *backend, ECalComponent *comp, gchar **from_name, gchar **from_addr)
{
if (!g_ascii_strcasecmp(e_cal_backend_exchange_get_owner_email (backend), exchange_account_get_email_id (E_CAL_BACKEND_EXCHANGE (backend)->account)))
e_cal_backend_exchange_get_from (backend, comp, from_name, from_addr);
@@ -99,7 +99,7 @@ get_from (ECalBackendSync *backend, ECalComponent *comp, char **from_name, char
static void
set_uid (E2kProperties *props, ECalComponent *comp)
{
- const char *uid;
+ const gchar *uid;
e_cal_component_get_uid (E_CAL_COMPONENT (comp), &uid);
e2k_properties_set_string (props, E2K_PR_CALENDAR_UID, g_strdup (uid));
@@ -121,7 +121,7 @@ set_summary (E2kProperties *props, ECalComponent *comp)
static void
set_priority (E2kProperties *props, ECalComponent *comp)
{
- int *priority, value = 0;
+ gint *priority, value = 0;
e_cal_component_get_priority (E_CAL_COMPONENT (comp), &priority);
if (priority) {
@@ -142,7 +142,7 @@ static void
set_sensitivity (E2kProperties *props, ECalComponent *comp)
{
ECalComponentClassification classif;
- int sensitivity;
+ gint sensitivity;
e_cal_component_get_classification (E_CAL_COMPONENT (comp), &classif);
switch (classif) {
@@ -183,7 +183,7 @@ get_default_timezone (void)
return local_timezone;
}
-char *
+gchar *
calcomponentdatetime_to_string (ECalComponentDateTime *dt,
icaltimezone *izone)
{
@@ -200,7 +200,7 @@ calcomponentdatetime_to_string (ECalComponentDateTime *dt,
return e2k_make_timestamp (tt);
}
-static char *
+static gchar *
convert_to_utc (ECalComponentDateTime *dt)
{
icaltimezone *from_zone;
@@ -221,7 +221,7 @@ static void
set_dtstart (E2kProperties *props, ECalComponent *comp)
{
ECalComponentDateTime dt;
- char *dtstart_str;
+ gchar *dtstart_str;
e_cal_component_get_dtstart (E_CAL_COMPONENT (comp), &dt);
if (!dt.value || icaltime_is_null_time (*dt.value)) {
@@ -239,7 +239,7 @@ static void
set_due_date (E2kProperties *props, ECalComponent *comp)
{
ECalComponentDateTime dt;
- char *due_str;
+ gchar *due_str;
e_cal_component_get_due (E_CAL_COMPONENT (comp), &dt);
if (!dt.value || icaltime_is_null_time (*dt.value)) {
@@ -253,7 +253,7 @@ set_due_date (E2kProperties *props, ECalComponent *comp)
e2k_properties_set_date (props, E2K_PR_MAPI_COMMON_END, due_str);
}
-char *
+gchar *
icaltime_to_e2k_time (struct icaltimetype *itt)
{
time_t tt;
@@ -268,7 +268,7 @@ static void
set_date_completed (E2kProperties *props, ECalComponent *comp)
{
struct icaltimetype *itt;
- char *tstr;
+ gchar *tstr;
e_cal_component_get_completed (E_CAL_COMPONENT (comp), &itt);
if (!itt || icaltime_is_null_time (*itt)) {
@@ -277,7 +277,7 @@ set_date_completed (E2kProperties *props, ECalComponent *comp)
}
icaltimezone_convert_time (itt,
- icaltimezone_get_builtin_timezone ((const char *)itt->zone),
+ icaltimezone_get_builtin_timezone ((const gchar *)itt->zone),
icaltimezone_get_utc_timezone ());
tstr = icaltime_to_e2k_time (itt);
e_cal_component_free_icaltimetype (itt);
@@ -289,7 +289,7 @@ static void
set_status (E2kProperties *props, ECalComponent *comp)
{
icalproperty_status ical_status;
- int status;
+ gint status;
e_cal_component_get_status (E_CAL_COMPONENT (comp), &ical_status);
switch (ical_status) {
@@ -321,7 +321,7 @@ set_status (E2kProperties *props, ECalComponent *comp)
static void
set_percent (E2kProperties *props, ECalComponent *comp)
{
- int *percent;
+ gint *percent;
float res;
e_cal_component_get_percent (E_CAL_COMPONENT (comp), &percent);
@@ -349,7 +349,7 @@ set_categories (E2kProperties *props, ECalComponent *comp)
array = g_ptr_array_new ();
for (sl = categories; sl != NULL; sl = sl->next) {
- char *cat = (char *) sl->data;
+ gchar *cat = (gchar *) sl->data;
if (cat)
g_ptr_array_add (array, g_strdup (cat));
@@ -362,7 +362,7 @@ set_categories (E2kProperties *props, ECalComponent *comp)
static void
set_url (E2kProperties *props, ECalComponent *comp)
{
- const char *url;
+ const gchar *url;
e_cal_component_get_url (E_CAL_COMPONENT (comp), &url);
if (url)
@@ -392,11 +392,11 @@ update_props (ECalComponent *comp, E2kProperties **properties)
set_url (props, E_CAL_COMPONENT (comp));
}
-static const char *
+static const gchar *
get_priority (ECalComponent *comp)
{
- int *priority;
- const char *result;
+ gint *priority;
+ const gchar *result;
e_cal_component_get_priority (E_CAL_COMPONENT (comp), &priority);
@@ -417,16 +417,16 @@ get_priority (ECalComponent *comp)
return result;
}
-static const char *
+static const gchar *
get_uid (ECalComponent *comp)
{
- const char *uid;
+ const gchar *uid;
e_cal_component_get_uid (E_CAL_COMPONENT(comp), &uid);
return uid;
}
-static const char *
+static const gchar *
get_summary (ECalComponent *comp)
{
ECalComponentText summary;
@@ -438,16 +438,16 @@ get_summary (ECalComponent *comp)
static int
put_body (ECalComponent *comp, E2kContext *ctx, E2kOperation *op,
- const char *uri, const char *from_name, const char *from_addr,
- const char *attach_body, const char *boundary,
- char **repl_uid)
+ const gchar *uri, const gchar *from_name, const gchar *from_addr,
+ const gchar *attach_body, const gchar *boundary,
+ gchar **repl_uid)
{
GSList *desc_list;
GString *desc;
- char *desc_crlf;
- char *body, *date;
- int status;
+ gchar *desc_crlf;
+ gchar *body, *date;
+ gint status;
/* get the description */
e_cal_component_get_description_list (E_CAL_COMPONENT (comp), &desc_list);
@@ -464,7 +464,7 @@ put_body (ECalComponent *comp, E2kContext *ctx, E2kOperation *op,
}
/* PUT the component on the server */
- desc_crlf = e2k_lf_to_crlf ((const char *) desc->str);
+ desc_crlf = e2k_lf_to_crlf ((const gchar *) desc->str);
date = e2k_make_timestamp_rfc822 (time (NULL));
if (attach_body) {
@@ -537,7 +537,7 @@ put_body (ECalComponent *comp, E2kContext *ctx, E2kOperation *op,
return status;
}
-static const char *task_props[] = {
+static const gchar *task_props[] = {
E2K_PR_EXCHANGE_MESSAGE_CLASS,
E2K_PR_DAV_UID,
E2K_PR_CALENDAR_UID,
@@ -559,7 +559,7 @@ static const char *task_props[] = {
E2K_PR_EXCHANGE_KEYWORDS,
E2K_PR_CALENDAR_URL
};
-static const int n_task_props = sizeof (task_props) / sizeof (task_props[0]);
+static const gint n_task_props = sizeof (task_props) / sizeof (task_props[0]);
static guint
get_changed_tasks (ECalBackendExchange *cbex)
@@ -572,17 +572,17 @@ get_changed_tasks (ECalBackendExchange *cbex)
GSList *attachment_list = NULL;
E2kResult *result;
E2kContext *ctx;
- const char *modtime, *str, *prop;
- char *uid;
- const char *tzid;
- int status, i, priority, percent;
+ const gchar *modtime, *str, *prop;
+ gchar *uid;
+ const gchar *tzid;
+ gint status, i, priority, percent;
float f_percent;
ECalComponent *ecal, *ecomp;
struct icaltimetype itt;
const icaltimezone *itzone;
ECalComponentDateTime ecdatetime;
icalcomponent *icalcomp;
- const char *since = NULL;
+ const gchar *since = NULL;
ECalBackendExchangeTasks *cbext = E_CAL_BACKEND_EXCHANGE_TASKS (cbex);
g_return_val_if_fail (E_IS_CAL_BACKEND_EXCHANGE (cbex), SOUP_STATUS_CANCELLED);
@@ -635,7 +635,7 @@ get_changed_tasks (ECalBackendExchange *cbex)
ecal = e_cal_component_new ();
icalcomp = icalcomponent_new_vtodo ();
e_cal_component_set_icalcomponent (ecal, icalcomp);
- e_cal_component_set_uid (ecal, (const char *)uid);
+ e_cal_component_set_uid (ecal, (const gchar *)uid);
modtime = e2k_properties_get_prop (result->props,
E2K_PR_DAV_LAST_MODIFIED);
@@ -705,7 +705,7 @@ get_changed_tasks (ECalBackendExchange *cbex)
sl.data = &text;
sl.next = NULL;
e_cal_component_set_description_list (E_CAL_COMPONENT (ecal), &sl);
- g_free ((char *)text.value);
+ g_free ((gchar *)text.value);
}
/* Set DUE */
@@ -804,7 +804,7 @@ get_changed_tasks (ECalBackendExchange *cbex)
if ((array = e2k_properties_get_prop (result->props,
E2K_PR_EXCHANGE_KEYWORDS))) {
GSList *list = NULL;
- int i;
+ gint i;
for (i = 0; i < array->len; i++)
list = g_slist_prepend (list, array->pdata[i]);
@@ -837,7 +837,7 @@ get_changed_tasks (ECalBackendExchange *cbex)
e_cal_backend_exchange_cache_unlock (cbex);
if (status && kind == ICAL_VTODO_COMPONENT) {
- char *str = icalcomponent_as_ical_string_r (icalcomp);
+ gchar *str = icalcomponent_as_ical_string_r (icalcomp);
e_cal_backend_notify_object_created (E_CAL_BACKEND (cbex), str);
g_free (str);
}
@@ -873,7 +873,7 @@ get_changed_tasks (ECalBackendExchange *cbex)
prop = PR_INTERNET_CONTENT;
iter = e_folder_exchange_bpropfind_start (cbex->folder, NULL,
- (const char **)hrefs->pdata,
+ (const gchar **)hrefs->pdata,
hrefs->len, &prop, 1);
for (i = 0; i < hrefs->len; i++)
g_free (hrefs->pdata[i]);
@@ -894,7 +894,7 @@ get_changed_tasks (ECalBackendExchange *cbex)
e_cal_backend_exchange_cache_lock (cbex);
ecalbexcomp = get_exchange_comp (cbex, uid);
- attachment_list = get_attachment (cbex, uid, (char *) ical_data->data, ical_data->len);
+ attachment_list = get_attachment (cbex, uid, (gchar *) ical_data->data, ical_data->len);
if (attachment_list) {
ecomp = e_cal_component_new ();
e_cal_component_set_icalcomponent (ecomp, icalcomponent_new_clone (ecalbexcomp->icomp));
@@ -972,7 +972,7 @@ get_changed_tasks (ECalBackendExchange *cbex)
/* folder subscription notify callback */
static void
-notify_changes (E2kContext *ctx, const char *uri,
+notify_changes (E2kContext *ctx, const gchar *uri,
E2kContextChangeType type, gpointer user_data)
{
@@ -988,7 +988,7 @@ notify_changes (E2kContext *ctx, const char *uri,
static ECalBackendSyncStatus
open_task (ECalBackendSync *backend, EDataCal *cal,
gboolean only_if_exits,
- const char *username, const char *password)
+ const gchar *username, const gchar *password)
{
ECalBackendSyncStatus status;
GThread *thread = NULL;
@@ -1033,7 +1033,7 @@ struct _cb_data {
static ECalBackendSyncStatus
create_task_object (ECalBackendSync *backend, EDataCal *cal,
- char **calobj, char **return_uid)
+ gchar **calobj, gchar **return_uid)
{
ECalBackendExchangeTasks *ecalbextask;
ECalBackendExchange *ecalbex;
@@ -1044,15 +1044,15 @@ create_task_object (ECalBackendSync *backend, EDataCal *cal,
icalcomponent_kind kind;
icalproperty *icalprop;
struct icaltimetype current;
- char *from_name = NULL, *from_addr = NULL;
- char *boundary = NULL;
- char *attach_body = NULL;
- char *attach_body_crlf = NULL;
- const char *summary;
- char * modtime;
- char *location;
+ gchar *from_name = NULL, *from_addr = NULL;
+ gchar *boundary = NULL;
+ gchar *attach_body = NULL;
+ gchar *attach_body_crlf = NULL;
+ const gchar *summary;
+ gchar * modtime;
+ gchar *location;
ECalBackendSyncStatus status;
- const char *temp_comp_uid;
+ const gchar *temp_comp_uid;
ecalbextask = E_CAL_BACKEND_EXCHANGE_TASKS (backend);
ecalbex = E_CAL_BACKEND_EXCHANGE (backend);
@@ -1195,8 +1195,8 @@ create_task_object (ECalBackendSync *backend, EDataCal *cal,
static ECalBackendSyncStatus
modify_task_object (ECalBackendSync *backend, EDataCal *cal,
- const char *calobj, CalObjModType mod,
- char **old_object, char **new_object)
+ const gchar *calobj, CalObjModType mod,
+ gchar **old_object, gchar **new_object)
{
ECalBackendExchangeTasks *ecalbextask;
ECalBackendExchangeComponent *ecalbexcomp;
@@ -1204,12 +1204,12 @@ modify_task_object (ECalBackendSync *backend, EDataCal *cal,
ECalBackendExchange *ecalbex;
E2kProperties *props;
icalcomponent *icalcomp;
- const char* comp_uid, *summary;
- char *from_name, *from_addr;
- char *comp_str;
- char *attach_body = NULL;
- char *attach_body_crlf = NULL;
- char *boundary = NULL;
+ const gchar * comp_uid, *summary;
+ gchar *from_name, *from_addr;
+ gchar *comp_str;
+ gchar *attach_body = NULL;
+ gchar *attach_body_crlf = NULL;
+ gchar *boundary = NULL;
struct icaltimetype current;
ECalBackendSyncStatus status;
E2kContext *e2kctx;
@@ -1228,7 +1228,7 @@ modify_task_object (ECalBackendSync *backend, EDataCal *cal,
}
/* Parse the icalendar text */
- icalcomp = icalparser_parse_string ((char *) calobj);
+ icalcomp = icalparser_parse_string ((gchar *) calobj);
if (!icalcomp)
return GNOME_Evolution_Calendar_InvalidObject;
@@ -1316,7 +1316,7 @@ modify_task_object (ECalBackendSync *backend, EDataCal *cal,
static ECalBackendSyncStatus
receive_task_objects (ECalBackendSync *backend, EDataCal *cal,
- const char *calobj)
+ const gchar *calobj)
{
ECalBackendExchangeTasks *ecalbextask;
ECalBackendExchange *cbex;
@@ -1345,8 +1345,8 @@ receive_task_objects (ECalBackendSync *backend, EDataCal *cal,
return GNOME_Evolution_Calendar_InvalidObject;
for (l = comps; l; l = l->next) {
- const char *uid;
- char *calobj, *rid = NULL;
+ const gchar *uid;
+ gchar *calobj, *rid = NULL;
subcomp = l->data;
@@ -1366,7 +1366,7 @@ receive_task_objects (ECalBackendSync *backend, EDataCal *cal,
e_cal_backend_exchange_cache_lock (cbex);
if (get_exchange_comp (E_CAL_BACKEND_EXCHANGE (ecalbextask), uid)) {
- char *old_object;
+ gchar *old_object;
e_cal_backend_exchange_cache_unlock (cbex);
status = modify_task_object (backend, cal, calobj, CALOBJ_MOD_THIS, &old_object, NULL);
@@ -1378,10 +1378,10 @@ receive_task_objects (ECalBackendSync *backend, EDataCal *cal,
e_cal_backend_notify_object_modified (E_CAL_BACKEND (backend), old_object, calobj);
g_free (old_object);
} else {
- char *returned_uid;
+ gchar *returned_uid;
e_cal_backend_exchange_cache_unlock (cbex);
- calobj = (char *) icalcomponent_as_ical_string_r (subcomp);
+ calobj = (gchar *) icalcomponent_as_ical_string_r (subcomp);
status = create_task_object (backend, cal, &calobj, &returned_uid);
if (status != GNOME_Evolution_Calendar_Success) {
g_free (calobj);
@@ -1402,14 +1402,14 @@ error:
static ECalBackendSyncStatus
remove_task_object (ECalBackendSync *backend, EDataCal *cal,
- const char *uid, const char *rid, CalObjModType mod,
- char **old_object, char **object)
+ const gchar *uid, const gchar *rid, CalObjModType mod,
+ gchar **old_object, gchar **object)
{
ECalBackendExchange *ecalbex = E_CAL_BACKEND_EXCHANGE (backend);
ECalBackendExchangeComponent *ecalbexcomp;
ECalComponent *comp;
E2kContext *ctx;
- int status;
+ gint status;
g_return_val_if_fail (E_IS_CAL_BACKEND_EXCHANGE (ecalbex),
GNOME_Evolution_Calendar_OtherError);
diff --git a/calendar/e-cal-backend-exchange-tasks.h b/calendar/e-cal-backend-exchange-tasks.h
index 0062764..1e7783c 100644
--- a/calendar/e-cal-backend-exchange-tasks.h
+++ b/calendar/e-cal-backend-exchange-tasks.h
@@ -33,8 +33,8 @@ struct _ECalBackendExchangeTasksClass {
GType e_cal_backend_exchange_tasks_get_type (void);
icaltimezone * get_default_timezone (void);
-char * calcomponentdatetime_to_string (ECalComponentDateTime *dt, icaltimezone *izone);
-char * icaltime_to_e2k_time (struct icaltimetype *itt);
+gchar * calcomponentdatetime_to_string (ECalComponentDateTime *dt, icaltimezone *izone);
+gchar * icaltime_to_e2k_time (struct icaltimetype *itt);
G_END_DECLS
diff --git a/calendar/e-cal-backend-exchange.c b/calendar/e-cal-backend-exchange.c
index 9be9236..eeea39d 100644
--- a/calendar/e-cal-backend-exchange.c
+++ b/calendar/e-cal-backend-exchange.c
@@ -63,9 +63,9 @@ struct ECalBackendExchangePrivate {
/* Objects */
GHashTable *objects, *cache_unseen;
- char *object_cache_file;
- char *lastmod;
- char *local_attachment_store;
+ gchar *object_cache_file;
+ gchar *lastmod;
+ gchar *local_attachment_store;
guint save_timeout_id;
GMutex *set_lock;
GMutex *open_lock;
@@ -84,7 +84,7 @@ static GObjectClass *parent_class = NULL;
#define d(x)
static icaltimezone *
-internal_get_timezone (ECalBackend *backend, const char *tzid);
+internal_get_timezone (ECalBackend *backend, const gchar *tzid);
static ECalBackendSyncStatus
is_read_only (ECalBackendSync *backend, EDataCal *cal, gboolean *read_only)
@@ -98,7 +98,7 @@ is_read_only (ECalBackendSync *backend, EDataCal *cal, gboolean *read_only)
}
static ECalBackendSyncStatus
-get_cal_address (ECalBackendSync *backend, EDataCal *cal, char **address)
+get_cal_address (ECalBackendSync *backend, EDataCal *cal, gchar **address)
{
ECalBackendExchange *cbex = E_CAL_BACKEND_EXCHANGE (backend);
ExchangeHierarchy *hier;
@@ -111,7 +111,7 @@ get_cal_address (ECalBackendSync *backend, EDataCal *cal, char **address)
}
static void
-get_cal_owner (ECalBackendSync *backend, char **name)
+get_cal_owner (ECalBackendSync *backend, gchar **name)
{
ECalBackendExchange *cbex = E_CAL_BACKEND_EXCHANGE (backend);
ExchangeHierarchy *hier;
@@ -123,7 +123,7 @@ get_cal_owner (ECalBackendSync *backend, char **name)
}
static ECalBackendSyncStatus
-get_alarm_email_address (ECalBackendSync *backend, EDataCal *cal, char **address)
+get_alarm_email_address (ECalBackendSync *backend, EDataCal *cal, gchar **address)
{
d(printf("ecbe_get_alarm_email_address(%p, %p)\n", backend, cal));
@@ -135,7 +135,7 @@ get_alarm_email_address (ECalBackendSync *backend, EDataCal *cal, char **address
}
static ECalBackendSyncStatus
-get_ldap_attribute (ECalBackendSync *backend, EDataCal *cal, char **attribute)
+get_ldap_attribute (ECalBackendSync *backend, EDataCal *cal, gchar **attribute)
{
d(printf("ecbe_get_ldap_attribute(%p, %p)\n", backend, cal));
@@ -148,7 +148,7 @@ get_ldap_attribute (ECalBackendSync *backend, EDataCal *cal, char **attribute)
}
static ECalBackendSyncStatus
-get_static_capabilities (ECalBackendSync *backend, EDataCal *cal, char **capabilities)
+get_static_capabilities (ECalBackendSync *backend, EDataCal *cal, gchar **capabilities)
{
d(printf("ecbe_get_static_capabilities(%p, %p)\n", backend, cal));
@@ -169,9 +169,9 @@ load_cache (ECalBackendExchange *cbex, E2kUri *e2kuri)
struct icaltimetype comp_last_mod, folder_last_mod;
icalcomponent_kind kind;
icalproperty *prop;
- char *lastmod, *mangled_uri, *storage_dir;
- const char *uristr;
- int i;
+ gchar *lastmod, *mangled_uri, *storage_dir;
+ const gchar *uristr;
+ gint i;
struct stat buf;
uristr = e_cal_backend_get_uri (E_CAL_BACKEND (cbex));
@@ -294,7 +294,7 @@ timeout_save_cache (gpointer user_data)
{
ECalBackendExchange *cbex = user_data;
icalcomponent *vcalcomp;
- char *data = NULL, *tmpfile;
+ gchar *data = NULL, *tmpfile;
size_t len, nwrote;
FILE *f;
@@ -340,18 +340,18 @@ save_cache (ECalBackendExchange *cbex)
static ECalBackendSyncStatus
open_calendar (ECalBackendSync *backend, EDataCal *cal, gboolean only_if_exists,
- const char *username, const char *password)
+ const gchar *username, const gchar *password)
{
ECalBackendExchange *cbex = E_CAL_BACKEND_EXCHANGE (backend);
- const char *uristr;
+ const gchar *uristr;
ExchangeHierarchy *hier;
ExchangeAccountResult acresult;
- const char *prop = PR_ACCESS;
+ const gchar *prop = PR_ACCESS;
E2kHTTPStatus status;
ECalBackendSyncStatus load_status;
E2kResult *results;
E2kUri *euri = NULL;
- int nresults = 0;
+ gint nresults = 0;
guint access = 0;
d(printf("ecbe_open_calendar(%p, %p, %sonly if exists, user=%s, pass=%s)\n", backend, cal, only_if_exists?"":"not ", username?username:"(null)", password?password:"(null)"));
@@ -362,7 +362,7 @@ open_calendar (ECalBackendSync *backend, EDataCal *cal, gboolean only_if_exists,
if (cbex->priv->mode == CAL_MODE_LOCAL) {
ESource *source;
- const char *display_contents = NULL;
+ const gchar *display_contents = NULL;
d(printf ("ECBE : cal is offline .. load cache\n"));
@@ -430,7 +430,7 @@ open_calendar (ECalBackendSync *backend, EDataCal *cal, gboolean only_if_exists,
cbex->folder = exchange_account_get_folder (cbex->account, uristr);
if (!cbex->folder) {
ESource *source;
- const char *foreign;
+ const gchar *foreign;
ExchangeHierarchy *hier_to_rescan = NULL;
/* FIXME: theoretically we should create it if
* only_if_exists is FALSE.
@@ -440,8 +440,8 @@ open_calendar (ECalBackendSync *backend, EDataCal *cal, gboolean only_if_exists,
foreign = e_source_get_property (source, "foreign");
if (foreign && (g_str_equal (foreign, "1"))) {
- char **split_path;
- const char *email, *path;
+ gchar **split_path;
+ const gchar *email, *path;
path = strrchr (uristr, ';');
split_path = g_strsplit (++path, "/", -1);
@@ -528,7 +528,7 @@ remove_calendar (ECalBackendSync *backend, EDataCal *cal)
{
ECalBackendExchange *cbex = E_CAL_BACKEND_EXCHANGE (backend);
ExchangeAccountFolderResult result;
- const char *uri;
+ const gchar *uri;
d(printf("ecbe_remove_calendar(%p, %p)\n", backend, cal));
@@ -571,7 +571,7 @@ e_cal_backend_exchange_cache_sync_start (ECalBackendExchange *cbex)
}
static gboolean
-find_instance (ECalBackendExchange *cbex, ECalBackendExchangeComponent *ecomp, const char *rid, const char *lastmod)
+find_instance (ECalBackendExchange *cbex, ECalBackendExchangeComponent *ecomp, const gchar *rid, const gchar *lastmod)
{
GList *l;
gboolean found = FALSE;
@@ -632,8 +632,8 @@ e_cal_backend_exchange_ensure_utc_zone (ECalBackend *cb, struct icaltimetype *it
gboolean
e_cal_backend_exchange_in_cache (ECalBackendExchange *cbex,
- const char *uid,
- const char *lastmod,
+ const gchar *uid,
+ const gchar *lastmod,
const char *href,
const char *rid
)
@@ -679,7 +679,7 @@ uncache (gpointer key, gpointer value, gpointer data)
id->uid = g_strdup (key);
id->rid = NULL;
if (ecomp->icomp) {
- char *str = NULL;
+ gchar *str = NULL;
/* FIXME somehow the query does not match with the component in some cases, so user needs to press a
clear to get rid of the component from the view in that case*/
str = icalcomponent_as_ical_string_r (ecomp->icomp);
@@ -718,12 +718,12 @@ e_cal_backend_exchange_cache_sync_end (ECalBackendExchange *cbex)
**/
gboolean
e_cal_backend_exchange_add_object (ECalBackendExchange *cbex,
- const char *href, const char *lastmod,
+ const gchar *href, const gchar *lastmod,
icalcomponent *comp)
{
ECalBackendExchangeComponent *ecomp;
gboolean is_instance;
- const char *uid;
+ const gchar *uid;
struct icaltimetype rid;
d(printf("ecbe_add_object(%p, %s, %s)\n", cbex, href, lastmod));
@@ -823,7 +823,7 @@ e_cal_backend_exchange_modify_object (ECalBackendExchange *cbex,
gboolean discard_detached)
{
ECalBackendExchangeComponent *ecomp;
- const char *uid;
+ const gchar *uid;
struct icaltimetype rid;
d(printf("ecbe_modify_object(%p)\n", cbex));
@@ -869,7 +869,7 @@ e_cal_backend_exchange_modify_object (ECalBackendExchange *cbex,
* Return value: %TRUE on success, %FALSE if @comp was not found.
**/
gboolean
-e_cal_backend_exchange_remove_object (ECalBackendExchange *cbex, const char *uid)
+e_cal_backend_exchange_remove_object (ECalBackendExchange *cbex, const gchar *uid)
{
d(printf("ecbe_remove_object(%p, %s)\n", cbex, uid));
@@ -884,7 +884,7 @@ e_cal_backend_exchange_remove_object (ECalBackendExchange *cbex, const char *uid
static ECalBackendSyncStatus
discard_alarm (ECalBackendSync *backend, EDataCal *cal,
- const char *uid, const char *auid)
+ const gchar *uid, const gchar *auid)
{
/* To be called from the Calendar derived class */
return GNOME_Evolution_Calendar_OtherError;
@@ -893,7 +893,7 @@ discard_alarm (ECalBackendSync *backend, EDataCal *cal,
/*To be overriden by Calendar and Task classes*/
static ECalBackendSyncStatus
create_object (ECalBackendSync *backend, EDataCal *cal,
- char **calobj, char **uid)
+ gchar **calobj, gchar **uid)
{
return GNOME_Evolution_Calendar_OtherError;
}
@@ -901,7 +901,7 @@ create_object (ECalBackendSync *backend, EDataCal *cal,
/*To be overriden by Calendar and Task classes*/
static ECalBackendSyncStatus
modify_object (ECalBackendSync *backend, EDataCal *cal,
- const char * calobj, CalObjModType mod, char **old_object, char **new_object)
+ const gchar * calobj, CalObjModType mod, gchar **old_object, gchar **new_object)
{
return GNOME_Evolution_Calendar_OtherError;
}
@@ -919,7 +919,7 @@ e_cal_backend_exchange_cache_unlock (ECalBackendExchange *cbex)
}
ECalBackendExchangeComponent *
-get_exchange_comp (ECalBackendExchange *cbex, const char *uid)
+get_exchange_comp (ECalBackendExchange *cbex, const gchar *uid)
{
ECalBackendExchangeComponent *ecomp;
@@ -947,7 +947,7 @@ add_instances_to_vcal (gpointer value, gpointer user_data)
static ECalBackendSyncStatus
get_object (ECalBackendSync *backend, EDataCal *cal,
- const char *uid, const char *rid, char **object)
+ const gchar *uid, const gchar *rid, gchar **object)
{
ECalBackendExchange *cbex = E_CAL_BACKEND_EXCHANGE (backend);
ECalBackendExchangeComponent *ecomp;
@@ -1036,7 +1036,7 @@ get_object (ECalBackendSync *backend, EDataCal *cal,
}
ECalBackendSyncStatus
-e_cal_backend_exchange_extract_components (const char *calobj,
+e_cal_backend_exchange_extract_components (const gchar *calobj,
icalproperty_method *method,
GList **comp_list)
{
@@ -1102,8 +1102,8 @@ error:
static ECalBackendSyncStatus
send_objects (ECalBackendSync *backend, EDataCal *cal,
- const char *calobj,
- GList **users, char **modified_calobj)
+ const gchar *calobj,
+ GList **users, gchar **modified_calobj)
{
d(printf("ecbe_send_objects(%p, %p, %s)\n", backend, cal, calobj));
@@ -1112,10 +1112,10 @@ send_objects (ECalBackendSync *backend, EDataCal *cal,
}
static ECalBackendSyncStatus
-get_default_object (ECalBackendSync *backend, EDataCal *cal, char **object)
+get_default_object (ECalBackendSync *backend, EDataCal *cal, gchar **object)
{
icalcomponent *comp;
- char *ical_obj;
+ gchar *ical_obj;
d(printf("ecbe_get_default_object(%p, %p)\n", backend, cal));
@@ -1131,7 +1131,7 @@ get_default_object (ECalBackendSync *backend, EDataCal *cal, char **object)
typedef struct {
GList *obj_list;
gboolean search_needed;
- const char *query;
+ const gchar *query;
ECalBackendSExp *obj_sexp;
ECalBackend *backend;
icaltimezone *default_zone;
@@ -1142,7 +1142,7 @@ match_recurrence_sexp (gpointer data, gpointer user_data)
icalcomponent *icomp = data;
MatchObjectData *match_data = user_data;
ECalComponent *comp = NULL;
- char* comp_as_string = NULL;
+ gchar * comp_as_string = NULL;
d(printf("ecbe_match_recurrence_sexp(%p, %p)\n", icomp, match_data));
@@ -1196,7 +1196,7 @@ match_object_sexp (gpointer key, gpointer value, gpointer data)
static ECalBackendSyncStatus
get_object_list (ECalBackendSync *backend, EDataCal *cal,
- const char *sexp, GList **objects)
+ const gchar *sexp, GList **objects)
{
ECalBackendExchange *cbex;
@@ -1232,12 +1232,12 @@ get_object_list (ECalBackendSync *backend, EDataCal *cal,
ECalBackendSyncStatus
get_timezone (ECalBackendSync *backend, EDataCal *cal,
- const char *tzid, char **object)
+ const gchar *tzid, gchar **object)
{
ECalBackendExchange *cbex = E_CAL_BACKEND_EXCHANGE (backend);
icaltimezone *zone;
icalcomponent *vtzcomp;
- char *ical_obj;
+ gchar *ical_obj;
d(printf("ecbe_get_timezone(%p, %p, %s)\n", backend, cal, tzid));
@@ -1272,7 +1272,7 @@ e_cal_backend_exchange_add_timezone (ECalBackendExchange *cbex,
{
icalproperty *prop;
icaltimezone *zone;
- const char *tzid;
+ const gchar *tzid;
d(printf("ecbe_add_timezone(%p)\n", cbex));
@@ -1296,7 +1296,7 @@ e_cal_backend_exchange_add_timezone (ECalBackendExchange *cbex,
static ECalBackendSyncStatus
add_timezone (ECalBackendSync *backend, EDataCal *cal,
- const char *tzobj)
+ const gchar *tzobj)
{
ECalBackendExchange *cbex = E_CAL_BACKEND_EXCHANGE (backend);
GNOME_Evolution_Calendar_CallStatus status;
@@ -1305,7 +1305,7 @@ add_timezone (ECalBackendSync *backend, EDataCal *cal,
if (!tzobj)
return GNOME_Evolution_Calendar_InvalidObject;
- vtzcomp = icalcomponent_new_from_string ((char *)tzobj);
+ vtzcomp = icalcomponent_new_from_string ((gchar *)tzobj);
if (!vtzcomp)
return GNOME_Evolution_Calendar_InvalidObject;
@@ -1327,7 +1327,7 @@ add_timezone (ECalBackendSync *backend, EDataCal *cal,
static ECalBackendSyncStatus
set_default_timezone (ECalBackendSync *backend, EDataCal *cal,
- const char *tzid)
+ const gchar *tzid)
{
ECalBackendExchange *cbex = E_CAL_BACKEND_EXCHANGE (backend);
@@ -1345,7 +1345,7 @@ set_default_timezone (ECalBackendSync *backend, EDataCal *cal,
static void
start_query (ECalBackend *backend, EDataCalView *view)
{
- const char *sexp = NULL;
+ const gchar *sexp = NULL;
ECalBackendSyncStatus status = GNOME_Evolution_Calendar_OtherError;
GList *m, *objects = NULL;
@@ -1480,12 +1480,12 @@ get_freebusy (ECalBackendSync *backend, EDataCal *cal,
* Return value: text with all LFs converted to CRLF. The caller must
* free the text.
**/
-char *
-e_cal_backend_exchange_lf_to_crlf (const char *in)
+gchar *
+e_cal_backend_exchange_lf_to_crlf (const gchar *in)
{
- int len;
- const char *s;
- char *out, *d;
+ gint len;
+ const gchar *s;
+ gchar *out, *d;
g_return_val_if_fail (in != NULL, NULL);
@@ -1506,7 +1506,7 @@ e_cal_backend_exchange_lf_to_crlf (const char *in)
void
e_cal_backend_exchange_get_from (ECalBackendSync *backend, ECalComponent *comp,
- char **name, char **email)
+ gchar **name, gchar **email)
{
ECalComponentOrganizer org;
ECalBackendSyncStatus status;
@@ -1525,7 +1525,7 @@ e_cal_backend_exchange_get_from (ECalBackendSync *backend, ECalComponent *comp,
void
e_cal_backend_exchange_get_sender (ECalBackendSync *backend, ECalComponent *comp,
- char **name, char **email)
+ gchar **name, gchar **email)
{
ECalBackendExchange *cbex;
@@ -1538,7 +1538,7 @@ e_cal_backend_exchange_get_sender (ECalBackendSync *backend, ECalComponent *comp
}
/* Do not internationalize */
-static const char *e2k_rfc822_months [] = {
+static const gchar *e2k_rfc822_months [] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
@@ -1552,11 +1552,11 @@ static const char *e2k_rfc822_months [] = {
*
* Return value: the timestamp, which the caller must free.
**/
-char *
+gchar *
e_cal_backend_exchange_make_timestamp_rfc822 (time_t when)
{
struct tm tm;
- int offset;
+ gint offset;
e_localtime_with_offset (when, &tm, &offset);
offset = (offset / 3600) * 100 + (offset / 60) % 60;
@@ -1568,10 +1568,10 @@ e_cal_backend_exchange_make_timestamp_rfc822 (time_t when)
offset);
}
-char *
+gchar *
e_cal_backend_exchange_get_from_string (ECalBackendSync *backend, ECalComponent *comp)
{
- char *name = NULL, *addr = NULL, *from_string = NULL;
+ gchar *name = NULL, *addr = NULL, *from_string = NULL;
e_cal_backend_exchange_get_from (backend, comp, &name, &addr);
from_string = g_strdup_printf ("\"%s\" <%s>", name, addr);
@@ -1580,10 +1580,10 @@ e_cal_backend_exchange_get_from_string (ECalBackendSync *backend, ECalComponent
return from_string;
}
-char *
+gchar *
e_cal_backend_exchange_get_sender_string (ECalBackendSync *backend, ECalComponent *comp)
{
- char *name = NULL, *addr = NULL, *sender_string = NULL;
+ gchar *name = NULL, *addr = NULL, *sender_string = NULL;
e_cal_backend_exchange_get_sender (backend, comp, &name, &addr);
sender_string = g_strdup_printf ("\"%s\" <%s>", name, addr);
@@ -1623,9 +1623,9 @@ check_change_type (gpointer key, gpointer value, gpointer data)
{
ECalBackendExchangeComponent *ecomp = value;
struct ChangeData *change_data = data;
- char *calobj;
+ gchar *calobj;
ECalComponent *comp = NULL;
- char *uid = key;
+ gchar *uid = key;
GList *l = NULL;
icalcomponent *icomp = NULL;
@@ -1674,7 +1674,7 @@ struct cbe_data {
};
static gboolean
-e_cal_backend_exchange_compute_changes_foreach_key (const char *key, const char *value, gpointer data)
+e_cal_backend_exchange_compute_changes_foreach_key (const gchar *key, const gchar *value, gpointer data)
{
struct cbe_data *cbedata = data;
ECalBackendExchangeComponent *ecomp;
@@ -1699,11 +1699,11 @@ e_cal_backend_exchange_compute_changes_foreach_key (const char *key, const char
}
/* Attachments */
-static char *
-save_attach_file (const char *dest_file, char *file_contents, int len)
+static gchar *
+save_attach_file (const gchar *dest_file, gchar *file_contents, gint len)
{
- char *dest_url = NULL;
- int fd;
+ gchar *dest_url = NULL;
+ gint fd;
d(printf ("dest_file is :%s\n", dest_file));
@@ -1728,19 +1728,19 @@ end :
}
GSList *
-get_attachment (ECalBackendExchange *cbex, const char *uid,
- const char *body, int len)
+get_attachment (ECalBackendExchange *cbex, const gchar *uid,
+ const gchar *body, gint len)
{
CamelStream *stream;
CamelMimeMessage *msg;
CamelDataWrapper *msg_content, *content = NULL;
CamelMultipart *multipart;
CamelMimePart *part;
- const char *filename = NULL;
- char *attach_file_url, *attach_file;
- int i;
+ const gchar *filename = NULL;
+ gchar *attach_file_url, *attach_file;
+ gint i;
GSList *list = NULL;
- unsigned char *attach_data;
+ guchar *attach_data;
stream = camel_stream_mem_new_with_buffer (body, len);
msg = camel_mime_message_new ();
@@ -1766,7 +1766,7 @@ get_attachment (ECalBackendExchange *cbex, const char *uid,
attach_data = g_memdup (stream_mem->buffer->data, stream_mem->buffer->len);
attach_file = g_strdup_printf ("%s/%s-%s", cbex->priv->local_attachment_store, uid, filename);
// Attach
- attach_file_url = save_attach_file (attach_file, (char *) attach_data, stream_mem->buffer->len);
+ attach_file_url = save_attach_file (attach_file, (gchar *) attach_data, stream_mem->buffer->len);
g_free (attach_data);
g_free (attach_file);
d(printf ("attach file name : %s\n", attach_file_url));
@@ -1781,12 +1781,12 @@ get_attachment (ECalBackendExchange *cbex, const char *uid,
return list;
}
-static char *
-get_attach_file_contents (const char *filename, int *length)
+static gchar *
+get_attach_file_contents (const gchar *filename, gint *length)
{
- int fd, len = 0;
+ gint fd, len = 0;
struct stat sb;
- char *file_contents = NULL;
+ gchar *file_contents = NULL;
fd = g_open (filename, O_RDONLY | O_BINARY, 0);
if (fd < 0) {
@@ -1818,14 +1818,14 @@ end :
}
void
-process_delegated_cal_object (icalcomponent *icalcomp, const char *delegator_name, const char *delegator_email, const char *delegatee_email)
+process_delegated_cal_object (icalcomponent *icalcomp, const gchar *delegator_name, const gchar *delegator_email, const gchar *delegatee_email)
{
icalproperty *prop = NULL;
prop = icalcomponent_get_first_property (icalcomp, ICAL_ORGANIZER_PROPERTY);
if (prop) {
- const char *organizer;
- char *text = NULL;
+ const gchar *organizer;
+ gchar *text = NULL;
organizer = icalproperty_get_value_as_string_r (prop);
if (organizer) {
@@ -1849,8 +1849,8 @@ process_delegated_cal_object (icalcomponent *icalcomp, const char *delegator_nam
for (prop = icalcomponent_get_first_property (icalcomp, ICAL_ATTENDEE_PROPERTY);
prop != NULL;
prop = icalcomponent_get_next_property (icalcomp, ICAL_ATTENDEE_PROPERTY)) {
- const char *attendee;
- char *text = NULL;
+ const gchar *attendee;
+ gchar *text = NULL;
attendee = icalproperty_get_value_as_string_r (prop);
if (!attendee)
@@ -1872,12 +1872,12 @@ process_delegated_cal_object (icalcomponent *icalcomp, const char *delegator_nam
}
}
-static char *
-get_mime_type (const char *uri)
+static gchar *
+get_mime_type (const gchar *uri)
{
GFile *file;
GFileInfo *fi;
- char *mime_type;
+ gchar *mime_type;
g_return_val_if_fail (uri != NULL, NULL);
@@ -1899,8 +1899,8 @@ get_mime_type (const char *uri)
return mime_type;
}
-char *
-build_msg ( ECalBackendExchange *cbex, ECalComponent *comp, const char *subject, char **boundary)
+gchar *
+build_msg ( ECalBackendExchange *cbex, ECalComponent *comp, const gchar *subject, gchar **boundary)
{
CamelMimeMessage *msg;
CamelStreamMem *content;
@@ -1910,12 +1910,12 @@ build_msg ( ECalBackendExchange *cbex, ECalComponent *comp, const char *subject,
CamelInternetAddress *from;
CamelStream *stream;
CamelContentType *type;
- const char *uid;
- char *buffer = NULL, *cid;
- char *from_name = NULL, *from_email = NULL;
+ const gchar *uid;
+ gchar *buffer = NULL, *cid;
+ gchar *from_name = NULL, *from_email = NULL;
GSList *attach_list = NULL, *l, *new_attach_list = NULL;
- char *fname, *file_contents = NULL, *filename, *dest_url, *mime_filename, *attach_file;
- int len = 0;
+ gchar *fname, *file_contents = NULL, *filename, *dest_url, *mime_filename, *attach_file;
+ gint len = 0;
if (!g_ascii_strcasecmp(e_cal_backend_exchange_get_owner_email (E_CAL_BACKEND_SYNC (cbex)), exchange_account_get_email_id (cbex->account)))
e_cal_backend_exchange_get_from (E_CAL_BACKEND_SYNC (cbex), comp, &from_name, &from_email);
@@ -1939,16 +1939,16 @@ build_msg ( ECalBackendExchange *cbex, ECalComponent *comp, const char *subject,
e_cal_component_get_uid (comp, &uid);
e_cal_component_get_attachment_list (comp, &attach_list);
for (l = attach_list; l ; l = l->next){
- char *mime_type;
+ gchar *mime_type;
- if (!strncmp ((char *)l->data, "file://", 7)) {
- fname = g_filename_from_uri ((char *)l->data, NULL, NULL);
+ if (!strncmp ((gchar *)l->data, "file://", 7)) {
+ fname = g_filename_from_uri ((gchar *)l->data, NULL, NULL);
filename = g_path_get_basename (fname);
mime_filename = g_strdup (filename + strlen(uid) + 1);
g_free (filename);
attach_file = fname;
} else {
- fname = (char *)(l->data);
+ fname = (gchar *)(l->data);
filename = g_strrstr (fname, "/");
if (!filename) {
/*
@@ -2032,11 +2032,11 @@ build_msg ( ECalBackendExchange *cbex, ECalComponent *comp, const char *subject,
static ECalBackendSyncStatus
get_changes (ECalBackendSync *backend, EDataCal *cal,
- const char *change_id,
+ const gchar *change_id,
GList **adds, GList **modifies, GList **deletes)
{
ECalBackendExchange *cbex = E_CAL_BACKEND_EXCHANGE (backend);
- char *path, *filename;
+ gchar *path, *filename;
EXmlHash *ehash;
struct ChangeData data;
struct cbe_data cbedata;
@@ -2099,7 +2099,7 @@ internal_get_default_timezone (ECalBackend *backend)
}
static icaltimezone *
-internal_get_timezone (ECalBackend *backend, const char *tzid)
+internal_get_timezone (ECalBackend *backend, const gchar *tzid)
{
ECalBackendExchange *cbex = E_CAL_BACKEND_EXCHANGE (backend);
@@ -2110,8 +2110,8 @@ internal_get_timezone (ECalBackend *backend, const char *tzid)
}
icaltimezone *
-e_cal_backend_exchange_lookup_timezone (const char *tzid,
- const void *custom,
+e_cal_backend_exchange_lookup_timezone (const gchar *tzid,
+ gconstpointer custom,
GError **error)
{
return internal_get_timezone (E_CAL_BACKEND ((ECalBackendExchange *)custom),
diff --git a/calendar/e-cal-backend-exchange.h b/calendar/e-cal-backend-exchange.h
index bbf0692..f36e5a0 100644
--- a/calendar/e-cal-backend-exchange.h
+++ b/calendar/e-cal-backend-exchange.h
@@ -43,7 +43,7 @@ struct ECalBackendExchangeClass {
};
struct ECalBackendExchangeComponent {
- char *uid, *href, *lastmod;
+ gchar *uid, *href, *lastmod;
icalcomponent *icomp;
GList *instances;
};
@@ -52,8 +52,8 @@ GType e_cal_backend_exchange_get_type (void);
void e_cal_backend_exchange_cache_sync_start (ECalBackendExchange *cbex);
gboolean e_cal_backend_exchange_in_cache (ECalBackendExchange *cbex,
- const char *uid,
- const char *lastmod,
+ const gchar *uid,
+ const gchar *lastmod,
const char *href,
const char *rid
);
@@ -62,52 +62,52 @@ void e_cal_backend_exchange_cache_sync_end (ECalBackendExchange *cbex);
gboolean e_cal_backend_exchange_add_object (ECalBackendExchange *cbex,
- const char *href,
- const char *lastmod,
+ const gchar *href,
+ const gchar *lastmod,
icalcomponent *comp);
gboolean e_cal_backend_exchange_modify_object (ECalBackendExchange *cbex,
icalcomponent *comp,
CalObjModType mod,
gboolean remove_detached);
gboolean e_cal_backend_exchange_remove_object (ECalBackendExchange *cbex,
- const char *uid);
+ const gchar *uid);
ECalBackendSyncStatus e_cal_backend_exchange_add_timezone (ECalBackendExchange *cbex,
icalcomponent *vtzcomp);
icaltimezone * e_cal_backend_exchange_get_default_time_zone (ECalBackendSync *backend);
-char * e_cal_backend_exchange_lf_to_crlf (const char *in);
-char * e_cal_backend_exchange_make_timestamp_rfc822 (time_t when);
+gchar * e_cal_backend_exchange_lf_to_crlf (const gchar *in);
+gchar * e_cal_backend_exchange_make_timestamp_rfc822 (time_t when);
ECalBackendSyncStatus get_timezone (ECalBackendSync *backend,
- EDataCal *cal, const char *tzid, char **object);
+ EDataCal *cal, const gchar *tzid, gchar **object);
/** lookup function for e_cal_check_timezones() */
icaltimezone *
-e_cal_backend_exchange_lookup_timezone (const char *tzid,
- const void *custom,
+e_cal_backend_exchange_lookup_timezone (const gchar *tzid,
+ gconstpointer custom,
GError **error);
ECalBackendExchangeComponent * get_exchange_comp (ECalBackendExchange *cbex,
- const char *uid);
+ const gchar *uid);
-ECalBackendSyncStatus e_cal_backend_exchange_extract_components (const char *calobj,
+ECalBackendSyncStatus e_cal_backend_exchange_extract_components (const gchar *calobj,
icalproperty_method *method,
GList **comp_list);
/* Utility functions */
void e_cal_backend_exchange_get_from (ECalBackendSync *backend, ECalComponent *comp,
- char **from_name, char **from_addr);
-char * e_cal_backend_exchange_get_from_string (ECalBackendSync *backend, ECalComponent *comp);
+ gchar **from_name, gchar **from_addr);
+gchar * e_cal_backend_exchange_get_from_string (ECalBackendSync *backend, ECalComponent *comp);
void e_cal_backend_exchange_get_sender (ECalBackendSync *backend, ECalComponent *comp,
- char **from_name, char **from_addr);
-char * e_cal_backend_exchange_get_sender_string (ECalBackendSync *backend, ECalComponent *comp);
+ gchar **from_name, gchar **from_addr);
+gchar * e_cal_backend_exchange_get_sender_string (ECalBackendSync *backend, ECalComponent *comp);
gboolean e_cal_backend_exchange_is_online (ECalBackendExchange *cbex);
-GSList * get_attachment (ECalBackendExchange *cbex, const char *uid, const char *body, int len);
-void process_delegated_cal_object (icalcomponent *icalcomp, const char *delegator_name,
- const char *delegator_email, const char *delegatee_email);
-char * build_msg ( ECalBackendExchange *cbex, ECalComponent *comp, const char *subject, char **boundary);
+GSList * get_attachment (ECalBackendExchange *cbex, const gchar *uid, const gchar *body, gint len);
+void process_delegated_cal_object (icalcomponent *icalcomp, const gchar *delegator_name,
+ const gchar *delegator_email, const gchar *delegatee_email);
+gchar * build_msg ( ECalBackendExchange *cbex, ECalComponent *comp, const gchar *subject, gchar **boundary);
gchar *e_cal_backend_exchange_get_owner_email (ECalBackendSync *backend);
gchar *e_cal_backend_exchange_get_owner_name (ECalBackendSync *backend);
void e_cal_backend_exchange_cache_lock (ECalBackendExchange *cbex);
diff --git a/calendar/e2k-cal-query.c b/calendar/e2k-cal-query.c
index 9dddf6a..e869e91 100644
--- a/calendar/e2k-cal-query.c
+++ b/calendar/e2k-cal-query.c
@@ -33,10 +33,10 @@
/* E-Sexp functions */
static E2kRestriction **
-rns_array (ESExp *esexp, int argc, ESExpResult **argv)
+rns_array (ESExp *esexp, gint argc, ESExpResult **argv)
{
E2kRestriction **rns;
- int i;
+ gint i;
rns = g_new (E2kRestriction *, argc);
for (i = 0; i < argc; i ++) {
@@ -55,7 +55,7 @@ rns_array (ESExp *esexp, int argc, ESExpResult **argv)
}
static ESExpResult *
-func_and (ESExp *esexp, int argc, ESExpResult **argv, void *data)
+func_and (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
{
ESExpResult *result;
E2kRestriction **rns;
@@ -63,7 +63,7 @@ func_and (ESExp *esexp, int argc, ESExpResult **argv, void *data)
rns = rns_array (esexp, argc, argv);
result = e_sexp_result_new (esexp, ESEXP_RES_UNDEFINED);
- result->value.string = (char *)
+ result->value.string = (gchar *)
e2k_restriction_and (argc, rns, TRUE);
g_free (rns);
@@ -71,7 +71,7 @@ func_and (ESExp *esexp, int argc, ESExpResult **argv, void *data)
}
static ESExpResult *
-func_or (ESExp *esexp, int argc, ESExpResult **argv, void *data)
+func_or (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
{
ESExpResult *result;
E2kRestriction **rns;
@@ -79,7 +79,7 @@ func_or (ESExp *esexp, int argc, ESExpResult **argv, void *data)
rns = rns_array (esexp, argc, argv);
result = e_sexp_result_new (esexp, ESEXP_RES_UNDEFINED);
- result->value.string = (char *)
+ result->value.string = (gchar *)
e2k_restriction_or (argc, rns, TRUE);
g_free (rns);
@@ -87,7 +87,7 @@ func_or (ESExp *esexp, int argc, ESExpResult **argv, void *data)
}
static ESExpResult *
-func_not (ESExp *esexp, int argc, ESExpResult **argv, void *data)
+func_not (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
{
ESExpResult *result;
@@ -97,7 +97,7 @@ func_not (ESExp *esexp, int argc, ESExpResult **argv, void *data)
}
result = e_sexp_result_new (esexp, ESEXP_RES_UNDEFINED);
- result->value.string = (char *)
+ result->value.string = (gchar *)
e2k_restriction_not ((E2kRestriction *)argv[0]->value.string,
TRUE);
@@ -113,10 +113,10 @@ func_not (ESExp *esexp, int argc, ESExpResult **argv, void *data)
* specified time range.
*/
static ESExpResult *
-func_occur_in_time_range (ESExp *esexp, int argc, ESExpResult **argv, void *user_data)
+func_occur_in_time_range (ESExp *esexp, gint argc, ESExpResult **argv, gpointer user_data)
{
ECalBackend *backend = user_data;
- char *start, *end;
+ gchar *start, *end;
ESExpResult *result;
/* check argument types */
@@ -143,7 +143,7 @@ func_occur_in_time_range (ESExp *esexp, int argc, ESExpResult **argv, void *user
result = e_sexp_result_new (esexp, ESEXP_RES_UNDEFINED);
switch (e_cal_backend_get_kind (backend)) {
case ICAL_VEVENT_COMPONENT:
- result->value.string = (char *)
+ result->value.string = (gchar *)
e2k_restriction_andv (
e2k_restriction_prop_date (
E2K_PR_CALENDAR_DTSTART,
@@ -155,7 +155,7 @@ func_occur_in_time_range (ESExp *esexp, int argc, ESExpResult **argv, void *user
break;
case ICAL_VTODO_COMPONENT:
- result->value.string = (char *)
+ result->value.string = (gchar *)
e2k_restriction_andv (
e2k_restriction_prop_date (
E2K_PR_MAPI_COMMON_START,
@@ -185,12 +185,12 @@ func_occur_in_time_range (ESExp *esexp, int argc, ESExpResult **argv, void *user
* specified string.
*/
static ESExpResult *
-func_contains (ESExp *esexp, int argc, ESExpResult **argv, void *user_data)
+func_contains (ESExp *esexp, gint argc, ESExpResult **argv, gpointer user_data)
{
ESExpResult *result;
E2kRestriction *rn;
- const char *field;
- const char *str;
+ const gchar *field;
+ const gchar *str;
/* check argument types */
if (argc != 2) {
@@ -238,7 +238,7 @@ func_contains (ESExp *esexp, int argc, ESExpResult **argv, void *user_data)
}
result = e_sexp_result_new (esexp, ESEXP_RES_UNDEFINED);
- result->value.string = (char *)rn;
+ result->value.string = (gchar *)rn;
return result;
}
@@ -250,7 +250,7 @@ func_contains (ESExp *esexp, int argc, ESExpResult **argv, void *user_data)
* Returns: a boolean indicating whether the component has alarms or not.
*/
static ESExpResult *
-func_has_alarms (ESExp *esexp, int argc, ESExpResult **argv, void *user_data)
+func_has_alarms (ESExp *esexp, gint argc, ESExpResult **argv, gpointer user_data)
{
ESExpResult *result;
@@ -261,7 +261,7 @@ func_has_alarms (ESExp *esexp, int argc, ESExpResult **argv, void *user_data)
}
result = e_sexp_result_new (esexp, ESEXP_RES_UNDEFINED);
- result->value.string = (char *)
+ result->value.string = (gchar *)
e2k_restriction_prop_bool (E2K_PR_MAPI_REMINDER_SET,
E2K_RELOP_EQ, TRUE);
return result;
@@ -278,7 +278,7 @@ func_has_alarms (ESExp *esexp, int argc, ESExpResult **argv, void *user_data)
* categories.
*/
static ESExpResult *
-func_has_categories (ESExp *esexp, int argc, ESExpResult **argv, void *user_data)
+func_has_categories (ESExp *esexp, gint argc, ESExpResult **argv, gpointer user_data)
{
ESExpResult *result;
@@ -295,7 +295,7 @@ func_has_categories (ESExp *esexp, int argc, ESExpResult **argv, void *user_data
* a COMPLETED property. This is really only useful for TODO components.
*/
static ESExpResult *
-func_is_completed (ESExp *esexp, int argc, ESExpResult **argv, void *user_data)
+func_is_completed (ESExp *esexp, gint argc, ESExpResult **argv, gpointer user_data)
{
ECalBackend *backend = user_data;
ESExpResult *result;
@@ -312,7 +312,7 @@ func_is_completed (ESExp *esexp, int argc, ESExpResult **argv, void *user_data)
}
result = e_sexp_result_new (esexp, ESEXP_RES_UNDEFINED);
- result->value.string = (char *)
+ result->value.string = (gchar *)
e2k_restriction_prop_bool (E2K_PR_OUTLOOK_TASK_IS_DONE,
E2K_RELOP_EQ, TRUE);
return result;
@@ -327,11 +327,11 @@ func_is_completed (ESExp *esexp, int argc, ESExpResult **argv, void *user_data)
* This is really only useful for TODO components.
*/
static ESExpResult *
-func_completed_before (ESExp *esexp, int argc, ESExpResult **argv, void *user_data)
+func_completed_before (ESExp *esexp, gint argc, ESExpResult **argv, gpointer user_data)
{
ECalBackend *backend = user_data;
ESExpResult *result;
- char *before_time;
+ gchar *before_time;
if (e_cal_backend_get_kind (backend) != ICAL_VTODO_COMPONENT) {
e_sexp_fatal_error (esexp, "completed-before? is only meaningful for task folders");
@@ -353,7 +353,7 @@ func_completed_before (ESExp *esexp, int argc, ESExpResult **argv, void *user_da
result = e_sexp_result_new (esexp, ESEXP_RES_UNDEFINED);
before_time = e2k_make_timestamp (argv[0]->value.time);
- result->value.string = (char *)
+ result->value.string = (gchar *)
e2k_restriction_prop_date (E2K_PR_OUTLOOK_TASK_DONE_DT,
E2K_RELOP_LT, before_time);
g_free (before_time);
@@ -362,7 +362,7 @@ func_completed_before (ESExp *esexp, int argc, ESExpResult **argv, void *user_da
}
static struct {
- const char *name;
+ const gchar *name;
ESExpFunc *func;
} functions[] = {
{ "and", func_and },
@@ -387,19 +387,19 @@ static struct {
E2kRestriction *
e2k_cal_query_to_restriction (ECalBackendExchange *cbex,
- const char *sexp)
+ const gchar *sexp)
{
E2kRestriction *rn;
ESExp *esexp;
ESExpResult *result;
- int i;
+ gint i;
g_return_val_if_fail (E_IS_CAL_BACKEND_EXCHANGE (cbex), NULL);
g_return_val_if_fail (sexp != NULL, NULL);
esexp = e_sexp_new ();
for (i = 0; i < (sizeof (functions) / sizeof (functions[0])); i++)
- e_sexp_add_function (esexp, 0, (char *) functions[i].name, functions[i].func, NULL);
+ e_sexp_add_function (esexp, 0, (gchar *) functions[i].name, functions[i].func, NULL);
e_sexp_input_text (esexp, sexp, strlen (sexp));
if (e_sexp_parse (esexp) == -1) {
diff --git a/calendar/e2k-cal-query.h b/calendar/e2k-cal-query.h
index e3fa259..8e8961e 100644
--- a/calendar/e2k-cal-query.h
+++ b/calendar/e2k-cal-query.h
@@ -10,7 +10,7 @@
G_BEGIN_DECLS
E2kRestriction * e2k_cal_query_to_restriction (ECalBackendExchange *cbex,
- const char *sexp);
+ const gchar *sexp);
G_END_DECLS
diff --git a/calendar/e2k-cal-utils.c b/calendar/e2k-cal-utils.c
index 55633e7..af5d232 100644
--- a/calendar/e2k-cal-utils.c
+++ b/calendar/e2k-cal-utils.c
@@ -33,7 +33,7 @@
* Return value: the #icaltimetype
**/
struct icaltimetype
-e2k_timestamp_to_icaltime (const char *timestamp)
+e2k_timestamp_to_icaltime (const gchar *timestamp)
{
return icaltime_from_timet_with_zone (
e2k_parse_timestamp (timestamp), FALSE,
@@ -48,7 +48,7 @@ e2k_timestamp_to_icaltime (const char *timestamp)
*
* Return value: the timestamp, which the caller must free.
**/
-char *
+gchar *
e2k_timestamp_from_icaltime (struct icaltimetype itt)
{
return e2k_make_timestamp (icaltime_as_timet_with_zone (itt, itt.zone));
diff --git a/calendar/e2k-cal-utils.h b/calendar/e2k-cal-utils.h
index c0c36ae..e0ee8a0 100644
--- a/calendar/e2k-cal-utils.h
+++ b/calendar/e2k-cal-utils.h
@@ -9,8 +9,8 @@
G_BEGIN_DECLS
-char *e2k_timestamp_from_icaltime (struct icaltimetype itt);
-struct icaltimetype e2k_timestamp_to_icaltime (const char *timestamp);
+gchar *e2k_timestamp_from_icaltime (struct icaltimetype itt);
+struct icaltimetype e2k_timestamp_to_icaltime (const gchar *timestamp);
G_END_DECLS
diff --git a/camel/camel-exchange-folder.c b/camel/camel-exchange-folder.c
index 1f31c9f..2fbd957 100644
--- a/camel/camel-exchange-folder.c
+++ b/camel/camel-exchange-folder.c
@@ -55,20 +55,20 @@ static CamelOfflineFolderClass *parent_class = NULL;
static void exchange_expunge (CamelFolder *folder, CamelException *ex);
static void append_message (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, char **appended_uid,
+ const CamelMessageInfo *info, gchar **appended_uid,
CamelException *ex);
static CamelMimeMessage *get_message (CamelFolder *folder,
const gchar *uid,
CamelException *ex);
static GPtrArray *search_by_expression (CamelFolder *folder,
- const char *exp,
+ const gchar *exp,
CamelException *ex);
static guint32 count_by_expression (CamelFolder *folder,
- const char *exp,
+ const gchar *exp,
CamelException *ex);
static GPtrArray *search_by_uids (CamelFolder *folder,
- const char *expression,
+ const gchar *expression,
GPtrArray *uids,
CamelException *ex);
static void transfer_messages_to (CamelFolder *source,
@@ -85,8 +85,8 @@ static void transfer_messages_the_hard_way (CamelFolder *source,
CamelException *ex);
static void refresh_info (CamelFolder *folder, CamelException *ex);
static void exchange_sync (CamelFolder *folder, gboolean expunge, CamelException *ex);
-static char* get_filename (CamelFolder *folder, const char *uid, CamelException *ex);
-static gint cmp_uids (CamelFolder *folder, const char *uid1, const char *uid2);
+static gchar * get_filename (CamelFolder *folder, const gchar *uid, CamelException *ex);
+static gint cmp_uids (CamelFolder *folder, const gchar *uid1, const gchar *uid2);
static void
class_init (CamelFolderClass *camel_folder_class)
@@ -224,12 +224,12 @@ exchange_expunge (CamelFolder *folder, CamelException *ex)
static void
append_message_data (CamelFolder *folder, GByteArray *message,
- const char *subject, const CamelMessageInfo *info,
- char **appended_uid, CamelException *ex)
+ const gchar *subject, const CamelMessageInfo *info,
+ gchar **appended_uid, CamelException *ex)
{
CamelExchangeFolder *exch = CAMEL_EXCHANGE_FOLDER (folder);
CamelStream *stream_cache;
- char *new_uid;
+ gchar *new_uid;
if (!subject)
subject = camel_message_info_subject (info);;
@@ -248,7 +248,7 @@ append_message_data (CamelFolder *folder, GByteArray *message,
"cache", new_uid, NULL);
if (stream_cache) {
camel_stream_write (stream_cache,
- (char *) message->data,
+ (gchar *) message->data,
message->len);
camel_stream_flush (stream_cache);
camel_object_unref (CAMEL_OBJECT (stream_cache));
@@ -263,15 +263,15 @@ append_message_data (CamelFolder *folder, GByteArray *message,
static void
append_message (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, char **appended_uid,
+ const CamelMessageInfo *info, gchar **appended_uid,
CamelException *ex)
{
CamelStream *stream_mem;
CamelExchangeStore *store = CAMEL_EXCHANGE_STORE (folder->parent_store);
- char *old_subject = NULL;
+ gchar *old_subject = NULL;
GString *new_subject;
- int i, len;
+ gint i, len;
/*
FIXME: We should add a top-level camel API camel_mime_message_prune_invalid_chars
@@ -319,7 +319,7 @@ fix_broken_multipart_related (CamelMimePart *part)
CamelDataWrapper *content;
CamelMultipart *multipart, *new;
CamelMimePart *subpart;
- int i, count, broken_parts;
+ gint i, count, broken_parts;
content = camel_medium_get_content_object (CAMEL_MEDIUM (part));
@@ -366,8 +366,8 @@ fix_broken_multipart_related (CamelMimePart *part)
}
}
-static char*
-get_filename (CamelFolder *folder, const char *uid, CamelException *ex)
+static gchar *
+get_filename (CamelFolder *folder, const gchar *uid, CamelException *ex)
{
CamelExchangeFolder *exch = CAMEL_EXCHANGE_FOLDER (folder);
@@ -375,7 +375,7 @@ get_filename (CamelFolder *folder, const char *uid, CamelException *ex)
}
static GByteArray *
-get_message_data (CamelFolder *folder, const char *uid, CamelException *ex)
+get_message_data (CamelFolder *folder, const gchar *uid, CamelException *ex)
{
CamelExchangeFolder *exch = CAMEL_EXCHANGE_FOLDER (folder);
CamelExchangeStore *store = CAMEL_EXCHANGE_STORE (folder->parent_store);
@@ -415,7 +415,7 @@ get_message_data (CamelFolder *folder, const char *uid, CamelException *ex)
return NULL;
}
- camel_stream_write (stream, (char *) ba->data, ba->len);
+ camel_stream_write (stream, (gchar *) ba->data, ba->len);
camel_stream_flush (stream);
camel_object_unref (CAMEL_OBJECT (stream));
@@ -425,7 +425,7 @@ get_message_data (CamelFolder *folder, const char *uid, CamelException *ex)
#define MAILING_LIST_HEADERS "X-MAILING-LIST X-LOOP LIST-ID LIST-POST MAILING-LIST ORIGINATOR X-LIST RETURN-PATH X-BEENTHERE "
static CamelMimeMessage *
-get_message (CamelFolder *folder, const char *uid, CamelException *ex)
+get_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
{
CamelExchangeFolder *exch = CAMEL_EXCHANGE_FOLDER (folder);
CamelMimeMessage *msg;
@@ -457,7 +457,7 @@ get_message (CamelFolder *folder, const char *uid, CamelException *ex)
if(camel_medium_get_header (CAMEL_MEDIUM (msg), "Sender")) {
list_headers = g_strsplit (MAILING_LIST_HEADERS, " ", 0);
if (list_headers) {
- int i = 0;
+ gint i = 0;
while (list_headers[i]) {
if (camel_medium_get_header (CAMEL_MEDIUM (msg), list_headers[i])) {
found_list = TRUE;
@@ -477,7 +477,7 @@ get_message (CamelFolder *folder, const char *uid, CamelException *ex)
}
static GPtrArray *
-search_by_expression (CamelFolder *folder, const char *expression,
+search_by_expression (CamelFolder *folder, const gchar *expression,
CamelException *ex)
{
CamelFolderSearch *search;
@@ -493,7 +493,7 @@ search_by_expression (CamelFolder *folder, const char *expression,
}
static guint32
-count_by_expression (CamelFolder *folder, const char *expression,
+count_by_expression (CamelFolder *folder, const gchar *expression,
CamelException *ex)
{
CamelFolderSearch *search;
@@ -509,7 +509,7 @@ count_by_expression (CamelFolder *folder, const char *expression,
}
static gint
-cmp_uids (CamelFolder *folder, const char *uid1, const char *uid2)
+cmp_uids (CamelFolder *folder, const gchar *uid1, const gchar *uid2)
{
g_return_val_if_fail (uid1 != NULL, 0);
g_return_val_if_fail (uid2 != NULL, 0);
@@ -518,7 +518,7 @@ cmp_uids (CamelFolder *folder, const char *uid1, const char *uid2)
}
static GPtrArray *
-search_by_uids (CamelFolder *folder, const char *expression,
+search_by_uids (CamelFolder *folder, const gchar *expression,
GPtrArray *uids, CamelException *ex)
{
CamelFolderSearch *search;
@@ -544,8 +544,8 @@ transfer_messages_the_hard_way (CamelFolder *source, GPtrArray *uids,
CamelException local_ex;
CamelMessageInfo *info;
GByteArray *ba;
- char *ret_uid;
- int i;
+ gchar *ret_uid;
+ gint i;
if (transferred_uids)
*transferred_uids = g_ptr_array_new ();
@@ -594,10 +594,10 @@ cache_xfer (CamelExchangeFolder *stub_source, CamelExchangeFolder *stub_dest,
GPtrArray *src_uids, GPtrArray *dest_uids, gboolean delete)
{
CamelStream *src, *dest;
- int i;
+ gint i;
for (i = 0; i < src_uids->len; i++) {
- if (!*(char *)dest_uids->pdata[i])
+ if (!*(gchar *)dest_uids->pdata[i])
continue;
src = camel_data_cache_get (stub_source->cache, "cache",
@@ -630,7 +630,7 @@ transfer_messages_to (CamelFolder *source, GPtrArray *uids,
CamelExchangeStore *store = CAMEL_EXCHANGE_STORE (source->parent_store);
CamelMessageInfo *info;
GPtrArray *ret_uids = NULL;
- int hier_len, i;
+ gint hier_len, i;
camel_operation_start (NULL, delete_originals ? _("Moving messages") :
_("Copying messages"));
@@ -684,7 +684,7 @@ transfer_messages_to (CamelFolder *source, GPtrArray *uids,
if (transferred_uids)
*transferred_uids = ret_uids;
else {
- int i;
+ gint i;
for (i = 0; i < ret_uids->len; i++)
g_free (ret_uids->pdata[i]);
@@ -704,7 +704,7 @@ end:
* base64 representation of this value.
*/
static CamelSummaryMessageID *
-find_parent (CamelExchangeFolder *exch, const char *thread_index)
+find_parent (CamelExchangeFolder *exch, const gchar *thread_index)
{
CamelSummaryMessageID *msgid;
guchar *decoded;
@@ -740,9 +740,9 @@ find_parent (CamelExchangeFolder *exch, const char *thread_index)
**/
void
camel_exchange_folder_add_message (CamelExchangeFolder *exch,
- const char *uid, guint32 flags,
- guint32 size, const char *headers,
- const char *href)
+ const gchar *uid, guint32 flags,
+ guint32 size, const gchar *headers,
+ const gchar *href)
{
CamelFolder *folder = CAMEL_FOLDER (exch);
CamelMessageInfo *info;
@@ -812,7 +812,7 @@ camel_exchange_folder_add_message (CamelExchangeFolder *exch,
**/
void
camel_exchange_folder_remove_message (CamelExchangeFolder *exch,
- const char *uid)
+ const gchar *uid)
{
CamelFolderSummary *summary = CAMEL_FOLDER (exch)->summary;
CamelFolderChangeInfo *changes;
@@ -857,7 +857,7 @@ camel_exchange_folder_remove_message (CamelExchangeFolder *exch,
**/
void
camel_exchange_folder_uncache_message (CamelExchangeFolder *exch,
- const char *uid)
+ const gchar *uid)
{
camel_data_cache_remove (exch->cache, "cache", uid, NULL);
}
@@ -873,7 +873,7 @@ camel_exchange_folder_uncache_message (CamelExchangeFolder *exch,
**/
void
camel_exchange_folder_update_message_flags (CamelExchangeFolder *exch,
- const char *uid, guint32 flags)
+ const gchar *uid, guint32 flags)
{
CamelFolder *folder = CAMEL_FOLDER (exch);
CamelMessageInfoBase *info;
@@ -909,7 +909,7 @@ camel_exchange_folder_update_message_flags (CamelExchangeFolder *exch,
**/
void
camel_exchange_folder_update_message_flags_ex (CamelExchangeFolder *exch,
- const char *uid, guint32 flags,
+ const gchar *uid, guint32 flags,
guint32 mask)
{
CamelFolder *folder = CAMEL_FOLDER (exch);
@@ -950,9 +950,9 @@ camel_exchange_folder_update_message_flags_ex (CamelExchangeFolder *exch,
**/
void
camel_exchange_folder_update_message_tag (CamelExchangeFolder *exch,
- const char *uid,
- const char *name,
- const char *value)
+ const gchar *uid,
+ const gchar *name,
+ const gchar *value)
{
CamelFolder *folder = CAMEL_FOLDER (exch);
CamelMessageInfoBase *info;
@@ -990,19 +990,19 @@ camel_exchange_folder_update_message_tag (CamelExchangeFolder *exch,
**/
gboolean
camel_exchange_folder_construct (CamelFolder *folder, CamelStore *parent,
- const char *name, guint32 camel_flags,
- const char *folder_dir, int offline_state,
+ const gchar *name, guint32 camel_flags,
+ const gchar *folder_dir, gint offline_state,
CamelStub *stub, CamelException *ex)
{
CamelExchangeFolder *exch = (CamelExchangeFolder *)folder;
- const char *short_name;
- char *summary_file, *journal_file, *path;
+ const gchar *short_name;
+ gchar *summary_file, *journal_file, *path;
GPtrArray *summary, *uids, *hrefs;
GByteArray *flags;
guint32 folder_flags;
CamelMessageInfo *info;
CamelExchangeMessageInfo *einfo;
- int i, len = 0;
+ gint i, len = 0;
short_name = strrchr (name, '/');
if (!short_name++)
diff --git a/camel/camel-exchange-folder.h b/camel/camel-exchange-folder.h
index e1b40b7..e709975 100644
--- a/camel/camel-exchange-folder.h
+++ b/camel/camel-exchange-folder.h
@@ -30,7 +30,7 @@ typedef struct {
CamelStub *stub;
CamelDataCache *cache;
CamelOfflineJournal *journal;
- char *source;
+ gchar *source;
GHashTable *thread_index_to_message_id;
} CamelExchangeFolder;
@@ -47,39 +47,39 @@ CamelType camel_exchange_folder_get_type (void);
gboolean camel_exchange_folder_construct (CamelFolder *folder,
CamelStore *parent,
- const char *name,
+ const gchar *name,
guint32 camel_flags,
- const char *folder_dir,
- int offline_state,
+ const gchar *folder_dir,
+ gint offline_state,
CamelStub *stub,
CamelException *ex);
void camel_exchange_folder_add_message (CamelExchangeFolder *exch,
- const char *uid,
+ const gchar *uid,
guint32 flags,
guint32 size,
- const char *headers,
- const char *href);
+ const gchar *headers,
+ const gchar *href);
void camel_exchange_folder_remove_message (CamelExchangeFolder *exch,
- const char *uid);
+ const gchar *uid);
void camel_exchange_folder_uncache_message (CamelExchangeFolder *exch,
- const char *uid);
+ const gchar *uid);
void camel_exchange_folder_update_message_flags (CamelExchangeFolder *exch,
- const char *uid,
+ const gchar *uid,
guint32 flags);
void camel_exchange_folder_update_message_flags_ex (CamelExchangeFolder *exch,
- const char *uid,
+ const gchar *uid,
guint32 flags,
guint32 mask);
void camel_exchange_folder_update_message_tag (CamelExchangeFolder *exch,
- const char *uid,
- const char *name,
- const char *value);
+ const gchar *uid,
+ const gchar *name,
+ const gchar *value);
#ifdef __cplusplus
diff --git a/camel/camel-exchange-journal.c b/camel/camel-exchange-journal.c
index 1bec1ee..06b31bb 100644
--- a/camel/camel-exchange-journal.c
+++ b/camel/camel-exchange-journal.c
@@ -54,8 +54,8 @@ static void camel_exchange_journal_finalize (CamelObject *object);
static void exchange_entry_free (CamelOfflineJournal *journal, CamelDListNode *entry);
static CamelDListNode *exchange_entry_load (CamelOfflineJournal *journal, FILE *in);
-static int exchange_entry_write (CamelOfflineJournal *journal, CamelDListNode *entry, FILE *out);
-static int exchange_entry_play (CamelOfflineJournal *journal, CamelDListNode *entry, CamelException *ex);
+static gint exchange_entry_write (CamelOfflineJournal *journal, CamelDListNode *entry, FILE *out);
+static gint exchange_entry_play (CamelOfflineJournal *journal, CamelDListNode *entry, CamelException *ex);
static CamelOfflineJournalClass *parent_class = NULL;
@@ -120,7 +120,7 @@ static CamelDListNode *
exchange_entry_load (CamelOfflineJournal *journal, FILE *in)
{
CamelExchangeJournalEntry *entry;
- char *tmp;
+ gchar *tmp;
entry = g_malloc0 (sizeof (CamelExchangeJournalEntry));
@@ -180,8 +180,8 @@ static int
exchange_entry_write (CamelOfflineJournal *journal, CamelDListNode *entry, FILE *out)
{
CamelExchangeJournalEntry *exchange_entry = (CamelExchangeJournalEntry *) entry;
- const char *string;
- char *tmp;
+ const gchar *string;
+ gchar *tmp;
if (camel_file_util_encode_uint32 (out, exchange_entry->type) == -1)
return -1;
@@ -262,7 +262,7 @@ exchange_entry_play_append (CamelOfflineJournal *journal, CamelExchangeJournalEn
CamelMessageInfo *info, *real;
CamelStream *stream;
CamelException lex;
- char *uid = NULL;
+ gchar *uid = NULL;
/* if the message isn't in the cache, the user went behind our backs so "not our problem" */
if (!exchange_folder->cache || !(stream = camel_data_cache_get (exchange_folder->cache, "cache", entry->uid, ex)))
@@ -358,7 +358,7 @@ exchange_entry_play_transfer (CamelOfflineJournal *journal, CamelExchangeJournal
if (!camel_exception_is_set (&lex)) {
real = camel_folder_summary_info_new_from_message (folder->summary, message);
camel_object_unref (message);
- real->uid = camel_pstring_strdup ((char *)xuids->pdata[0]);
+ real->uid = camel_pstring_strdup ((gchar *)xuids->pdata[0]);
/* Transfer flags */
exchange_message_info_dup_to ((CamelMessageInfoBase *) real, (CamelMessageInfoBase *) info);
camel_folder_summary_add (folder->summary, real);
@@ -411,7 +411,7 @@ exchange_entry_play (CamelOfflineJournal *journal, CamelDListNode *entry, CamelE
CamelOfflineJournal *
-camel_exchange_journal_new (CamelExchangeFolder *folder, const char *filename)
+camel_exchange_journal_new (CamelExchangeFolder *folder, const gchar *filename)
{
CamelOfflineJournal *journal;
@@ -425,7 +425,7 @@ camel_exchange_journal_new (CamelExchangeFolder *folder, const char *filename)
static gboolean
update_cache (CamelExchangeJournal *exchange_journal, CamelMimeMessage *message,
- const CamelMessageInfo *mi, char **updated_uid, CamelException *ex)
+ const CamelMessageInfo *mi, gchar **updated_uid, CamelException *ex)
{
CamelOfflineJournal *journal = (CamelOfflineJournal *) exchange_journal;
CamelExchangeFolder *exchange_folder = (CamelExchangeFolder *) journal->folder;
@@ -433,7 +433,7 @@ update_cache (CamelExchangeJournal *exchange_journal, CamelMimeMessage *message,
CamelMessageInfo *info;
CamelStream *cache;
guint32 nextuid;
- char *uid;
+ gchar *uid;
if (exchange_folder->cache == NULL) {
camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
@@ -481,11 +481,11 @@ update_cache (CamelExchangeJournal *exchange_journal, CamelMimeMessage *message,
void
camel_exchange_journal_append (CamelExchangeJournal *exchange_journal, CamelMimeMessage *message,
- const CamelMessageInfo *mi, char **appended_uid, CamelException *ex)
+ const CamelMessageInfo *mi, gchar **appended_uid, CamelException *ex)
{
CamelOfflineJournal *journal = (CamelOfflineJournal *) exchange_journal;
CamelExchangeJournalEntry *entry;
- char *uid;
+ gchar *uid;
if (!update_cache (exchange_journal, message, mi, &uid, ex))
return;
@@ -503,15 +503,15 @@ camel_exchange_journal_append (CamelExchangeJournal *exchange_journal, CamelMime
static int
find_real_source_for_message (CamelExchangeFolder *folder,
- const char **folder_name,
- const char **uid,
+ const gchar **folder_name,
+ const gchar **uid,
gboolean delete_original)
{
CamelOfflineJournal *journal = folder->journal;
CamelDListNode *entry, *next;
CamelExchangeJournalEntry *ex_entry;
- const char *offline_uid = *uid;
- int type = -1;
+ const gchar *offline_uid = *uid;
+ gint type = -1;
if (*offline_uid != '-') {
return CAMEL_EXCHANGE_JOURNAL_ENTRY_TRANSFER;
@@ -545,14 +545,14 @@ find_real_source_for_message (CamelExchangeFolder *folder,
void
camel_exchange_journal_transfer (CamelExchangeJournal *exchange_journal, CamelExchangeFolder *source_folder,
CamelMimeMessage *message, const CamelMessageInfo *mi,
- const char *original_uid, char **transferred_uid, gboolean delete_original,
+ const gchar *original_uid, gchar **transferred_uid, gboolean delete_original,
CamelException *ex)
{
CamelOfflineJournal *journal = (CamelOfflineJournal *) exchange_journal;
CamelExchangeJournalEntry *entry;
- char *uid;
- const char *real_source_folder = NULL, *real_uid = NULL;
- int type;
+ gchar *uid;
+ const gchar *real_source_folder = NULL, *real_uid = NULL;
+ gint type;
if (!update_cache (exchange_journal, message, mi, &uid, ex))
return;
@@ -585,7 +585,7 @@ camel_exchange_journal_transfer (CamelExchangeJournal *exchange_journal, CamelEx
void
camel_exchange_journal_delete (CamelExchangeJournal *exchange_journal,
- const char *uid, guint32 flags, guint32 set,
+ const gchar *uid, guint32 flags, guint32 set,
CamelException *ex)
{
CamelOfflineJournal *journal = (CamelOfflineJournal *) exchange_journal;
diff --git a/camel/camel-exchange-journal.h b/camel/camel-exchange-journal.h
index b583663..0019159 100644
--- a/camel/camel-exchange-journal.h
+++ b/camel/camel-exchange-journal.h
@@ -58,11 +58,11 @@ enum {
struct _CamelExchangeJournalEntry {
CamelDListNode node;
- int type;
+ gint type;
- char *uid;
- char *original_uid;
- char *folder_name;
+ gchar *uid;
+ gchar *original_uid;
+ gchar *folder_name;
gboolean delete_original;
guint32 flags;
guint32 set;
@@ -81,18 +81,18 @@ struct _CamelExchangeJournalClass {
CamelType camel_exchange_journal_get_type (void);
-CamelOfflineJournal *camel_exchange_journal_new (CamelExchangeFolder *folder, const char *filename);
+CamelOfflineJournal *camel_exchange_journal_new (CamelExchangeFolder *folder, const gchar *filename);
/* interfaces for adding a journal entry */
void camel_exchange_journal_append (CamelExchangeJournal *journal, CamelMimeMessage *message,
- const CamelMessageInfo *mi, char **appended_uid, CamelException *ex);
+ const CamelMessageInfo *mi, gchar **appended_uid, CamelException *ex);
void camel_exchange_journal_transfer (CamelExchangeJournal *journal, CamelExchangeFolder *source_folder,
CamelMimeMessage *message, const CamelMessageInfo *mi,
- const char *original_uid, char **transferred_uid,
+ const gchar *original_uid, gchar **transferred_uid,
gboolean delete_original, CamelException *ex);
-void camel_exchange_journal_delete (CamelExchangeJournal *journal, const char *uid,
+void camel_exchange_journal_delete (CamelExchangeJournal *journal, const gchar *uid,
guint32 flags, guint32 set, CamelException *ex);
#ifdef __cplusplus
diff --git a/camel/camel-exchange-provider.c b/camel/camel-exchange-provider.c
index b6997f1..27537c9 100644
--- a/camel/camel-exchange-provider.c
+++ b/camel/camel-exchange-provider.c
@@ -40,7 +40,7 @@ static gint exchange_url_equal (gconstpointer a, gconstpointer b);
#ifdef G_OS_WIN32
-static const char *
+static const gchar *
get_localedir (void)
{
return e_util_replace_prefix (PREFIX, e_util_get_cp_prefix (), CONNECTOR_LOCALEDIR);
@@ -51,7 +51,7 @@ get_localedir (void)
#endif
-static const char *auth_types[] = {
+static const gchar *auth_types[] = {
N_("Secure or Plaintext Password"),
N_("Plaintext Password"),
N_("Secure Password"),
@@ -166,7 +166,7 @@ exchange_auto_detect_cb (CamelURL *url, GHashTable **auto_detected,
void
camel_provider_module_init (void)
{
- int i;
+ gint i;
exchange_provider.object_types[CAMEL_PROVIDER_STORE] = camel_exchange_store_get_type ();
exchange_provider.object_types[CAMEL_PROVIDER_TRANSPORT] = camel_exchange_transport_get_type ();
@@ -188,10 +188,10 @@ camel_provider_module_init (void)
camel_provider_register (&exchange_provider);
}
-static const char *
-exchange_username (const char *user)
+static const gchar *
+exchange_username (const gchar *user)
{
- const char *p;
+ const gchar *p;
if (user) {
p = strpbrk (user, "\\/");
@@ -217,7 +217,7 @@ exchange_url_hash (gconstpointer key)
}
static gboolean
-check_equal (const char *s1, const char *s2)
+check_equal (const gchar *s1, const gchar *s2)
{
if (!s1)
return s2 == NULL;
diff --git a/camel/camel-exchange-search.c b/camel/camel-exchange-search.c
index a6b50f9..f58aa42 100644
--- a/camel/camel-exchange-search.c
+++ b/camel/camel-exchange-search.c
@@ -32,7 +32,7 @@
#include "camel-exchange-folder.h"
static ESExpResult *
-exchange_body_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv,
+exchange_body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv,
CamelFolderSearch *s);
@@ -70,17 +70,17 @@ camel_exchange_search_get_type (void)
}
static ESExpResult *
-exchange_body_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv,
+exchange_body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv,
CamelFolderSearch *s)
{
CamelExchangeFolder *folder = CAMEL_EXCHANGE_FOLDER (s->folder);
- char *value = argv[0]->value.string, *real_uid;
- const char *uid;
+ gchar *value = argv[0]->value.string, *real_uid;
+ const gchar *uid;
ESExpResult *r;
CamelMessageInfo *info;
GHashTable *uid_hash = NULL;
GPtrArray *found_uids;
- int i;
+ gint i;
if (((CamelOfflineStore *) s->folder->parent_store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
return parent_class->body_contains (f, argc, argv, s);
@@ -136,7 +136,7 @@ exchange_body_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv,
access to the summary memory which is locked for the duration of
the search, and wont vanish on us */
if (uid_hash == NULL) {
- int i;
+ gint i;
uid_hash = g_hash_table_new (g_str_hash, g_str_equal);
for (i = 0; i < s->summary->len; i++) {
@@ -146,7 +146,7 @@ exchange_body_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv,
}
for (i = 0; i < found_uids->len; i++) {
- if (g_hash_table_lookup_extended (uid_hash, found_uids->pdata[i], (void *)&real_uid, (void *)&info))
+ if (g_hash_table_lookup_extended (uid_hash, found_uids->pdata[i], (gpointer)&real_uid, (gpointer)&info))
g_ptr_array_add (r->value.ptrarray, real_uid);
g_free (found_uids->pdata[i]);
}
diff --git a/camel/camel-exchange-store.c b/camel/camel-exchange-store.c
index 552e092..7b04721 100644
--- a/camel/camel-exchange-store.c
+++ b/camel/camel-exchange-store.c
@@ -50,38 +50,38 @@ static void construct (CamelService *service, CamelSession *session,
CamelException *ex);
static GList *query_auth_types (CamelService *service, CamelException *ex);
-static char *get_name (CamelService *service, gboolean brief);
+static gchar *get_name (CamelService *service, gboolean brief);
static CamelFolder *get_trash (CamelStore *store,
CamelException *ex);
-char * exchange_path_to_physical (const char *prefix, const char *vpath);
+gchar * exchange_path_to_physical (const gchar *prefix, const gchar *vpath);
static gboolean exchange_connect (CamelService *service, CamelException *ex);
static gboolean exchange_disconnect (CamelService *service, gboolean clean, CamelException *ex);
-static CamelFolder *exchange_get_folder (CamelStore *store, const char *folder_name,
+static CamelFolder *exchange_get_folder (CamelStore *store, const gchar *folder_name,
guint32 flags, CamelException *ex);
-static CamelFolderInfo *exchange_get_folder_info (CamelStore *store, const char *top,
+static CamelFolderInfo *exchange_get_folder_info (CamelStore *store, const gchar *top,
guint32 flags, CamelException *ex);
static CamelFolderInfo *exchange_create_folder (CamelStore *store,
- const char *parent_name,
- const char *folder_name,
+ const gchar *parent_name,
+ const gchar *folder_name,
CamelException *ex);
static void exchange_delete_folder (CamelStore *store,
- const char *folder_name,
+ const gchar *folder_name,
CamelException *ex);
static void exchange_rename_folder (CamelStore *store,
- const char *old_name,
- const char *new_name,
+ const gchar *old_name,
+ const gchar *new_name,
CamelException *ex);
static gboolean exchange_folder_subscribed (CamelStore *store,
- const char *folder_name);
+ const gchar *folder_name);
static void exchange_subscribe_folder (CamelStore *store,
- const char *folder_name,
+ const gchar *folder_name,
CamelException *ex);
static void exchange_unsubscribe_folder (CamelStore *store,
- const char *folder_name,
+ const gchar *folder_name,
CamelException *ex);
static gboolean exchange_can_refresh_folder (CamelStore *store, CamelFolderInfo *info, CamelException *ex);
@@ -198,14 +198,14 @@ camel_exchange_store_connected (CamelExchangeStore *store, CamelException *ex)
* Also note that this is similar to the call in e2k-path.c. The name of the
* function has been changed to avoid any conflicts.
*/
-char *
-exchange_path_to_physical (const char *prefix, const char *vpath)
+gchar *
+exchange_path_to_physical (const gchar *prefix, const gchar *vpath)
{
- const char *p, *newp;
- char *dp;
- char *ppath;
- int ppath_len;
- int prefix_len;
+ const gchar *p, *newp;
+ gchar *dp;
+ gchar *ppath;
+ gint ppath_len;
+ gint prefix_len;
while (*vpath == '/')
vpath++;
@@ -278,7 +278,7 @@ construct (CamelService *service, CamelSession *session,
CamelProvider *provider, CamelURL *url, CamelException *ex)
{
CamelExchangeStore *exch = CAMEL_EXCHANGE_STORE (service);
- char *p;
+ gchar *p;
CAMEL_SERVICE_CLASS (parent_class)->construct (service, session, provider, url, ex);
@@ -307,7 +307,7 @@ query_auth_types (CamelService *service, CamelException *ex)
&camel_exchange_ntlm_authtype);
}
-static char *
+static gchar *
get_name (CamelService *service, gboolean brief)
{
if (brief) {
@@ -367,7 +367,7 @@ static gboolean
exchange_connect (CamelService *service, CamelException *ex)
{
CamelExchangeStore *exch = CAMEL_EXCHANGE_STORE (service);
- char *real_user, *socket_path, *dot_exchange_username, *user_at_host;
+ gchar *real_user, *socket_path, *dot_exchange_username, *user_at_host;
gchar *password = NULL;
guint32 connect_status;
gboolean online_mode = FALSE;
@@ -477,12 +477,12 @@ exchange_disconnect (CamelService *service, gboolean clean, CamelException *ex)
return val;
static CamelFolder *
-exchange_get_folder (CamelStore *store, const char *folder_name,
+exchange_get_folder (CamelStore *store, const gchar *folder_name,
guint32 flags, CamelException *ex)
{
CamelExchangeStore *exch = CAMEL_EXCHANGE_STORE (store);
CamelFolder *folder;
- char *folder_dir;
+ gchar *folder_dir;
RETURN_VAL_IF_NOT_CONNECTED (exch, ex, NULL);
@@ -540,7 +540,7 @@ exchange_get_folder (CamelStore *store, const char *folder_name,
}
static gboolean
-exchange_folder_subscribed (CamelStore *store, const char *folder_name)
+exchange_folder_subscribed (CamelStore *store, const gchar *folder_name)
{
CamelExchangeStore *exch = CAMEL_EXCHANGE_STORE (store);
guint32 is_subscribed;
@@ -562,7 +562,7 @@ exchange_folder_subscribed (CamelStore *store, const char *folder_name)
}
static void
-exchange_subscribe_folder (CamelStore *store, const char *folder_name,
+exchange_subscribe_folder (CamelStore *store, const gchar *folder_name,
CamelException *ex)
{
CamelExchangeStore *exch = CAMEL_EXCHANGE_STORE (store);
@@ -579,7 +579,7 @@ exchange_subscribe_folder (CamelStore *store, const char *folder_name,
}
static void
-exchange_unsubscribe_folder (CamelStore *store, const char *folder_name,
+exchange_unsubscribe_folder (CamelStore *store, const gchar *folder_name,
CamelException *ex)
{
CamelExchangeStore *exch = CAMEL_EXCHANGE_STORE (store);
@@ -616,14 +616,14 @@ get_trash (CamelStore *store, CamelException *ex)
/* Note: steals @name and @uri */
static CamelFolderInfo *
-make_folder_info (CamelExchangeStore *exch, char *name, char *uri,
- int unread_count, int flags)
+make_folder_info (CamelExchangeStore *exch, gchar *name, gchar *uri,
+ gint unread_count, gint flags)
{
CamelFolderInfo *info;
- const char *path;
+ const gchar *path;
gchar **components;
- char *new_uri;
- char *temp;
+ gchar *new_uri;
+ gchar *temp;
d(printf ("make folder info : %s flags : %d\n", name, flags));
path = strstr (uri, "://");
@@ -713,7 +713,7 @@ postprocess_tree (CamelFolderInfo *info)
static CamelFolderInfo *
-exchange_get_folder_info (CamelStore *store, const char *top, guint32 flags, CamelException *ex)
+exchange_get_folder_info (CamelStore *store, const gchar *top, guint32 flags, CamelException *ex)
{
CamelExchangeStore *exch = CAMEL_EXCHANGE_STORE (store);
GPtrArray *folders, *folder_names, *folder_uris;
@@ -721,7 +721,7 @@ exchange_get_folder_info (CamelStore *store, const char *top, guint32 flags, Cam
GArray *folder_flags;
CamelFolderInfo *info;
guint32 store_flags = 0;
- int i;
+ gint i;
#if 0
if (((CamelOfflineStore *) store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL) {
camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot get folder info in offline mode."));
@@ -788,11 +788,11 @@ exchange_get_folder_info (CamelStore *store, const char *top, guint32 flags, Cam
}
static CamelFolderInfo *
-exchange_create_folder (CamelStore *store, const char *parent_name,
- const char *folder_name, CamelException *ex)
+exchange_create_folder (CamelStore *store, const gchar *parent_name,
+ const gchar *folder_name, CamelException *ex)
{
CamelExchangeStore *exch = CAMEL_EXCHANGE_STORE (store);
- char *folder_uri;
+ gchar *folder_uri;
guint32 unread_count, flags;
CamelFolderInfo *info;
@@ -818,7 +818,7 @@ exchange_create_folder (CamelStore *store, const char *parent_name,
}
static void
-exchange_delete_folder (CamelStore *store, const char *folder_name,
+exchange_delete_folder (CamelStore *store, const gchar *folder_name,
CamelException *ex)
{
CamelExchangeStore *exch = CAMEL_EXCHANGE_STORE (store);
@@ -834,14 +834,14 @@ exchange_delete_folder (CamelStore *store, const char *folder_name,
}
static void
-exchange_rename_folder (CamelStore *store, const char *old_name,
- const char *new_name, CamelException *ex)
+exchange_rename_folder (CamelStore *store, const gchar *old_name,
+ const gchar *new_name, CamelException *ex)
{
GPtrArray *folders = NULL, *folder_names = NULL, *folder_uris = NULL;
GArray *unread_counts = NULL;
GArray *folder_flags = NULL;
CamelFolderInfo *info;
- int i;
+ gint i;
CamelRenameInfo reninfo;
CamelFolder *folder;
@@ -892,7 +892,7 @@ exchange_rename_folder (CamelStore *store, const char *old_name,
g_ptr_array_free (folders, TRUE);
reninfo.new = info;
- reninfo.old_base = (char *)old_name;
+ reninfo.old_base = (gchar *)old_name;
g_mutex_lock (exch->folders_lock);
folder = g_hash_table_lookup (exch->folders, reninfo.old_base);
@@ -919,7 +919,7 @@ stub_notification (CamelObject *object, gpointer event_data, gpointer user_data)
case CAMEL_STUB_RETVAL_NEW_MESSAGE:
{
CamelExchangeFolder *folder;
- char *folder_name, *uid, *headers, *href;
+ gchar *folder_name, *uid, *headers, *href;
guint32 flags, size;
if (camel_stub_marshal_decode_folder (stub->status, &folder_name) == -1 ||
@@ -948,7 +948,7 @@ stub_notification (CamelObject *object, gpointer event_data, gpointer user_data)
case CAMEL_STUB_RETVAL_REMOVED_MESSAGE:
{
CamelExchangeFolder *folder;
- char *folder_name, *uid;
+ gchar *folder_name, *uid;
CamelMessageInfo *info;
if (camel_stub_marshal_decode_folder (stub->status, &folder_name) == -1 ||
@@ -971,7 +971,7 @@ stub_notification (CamelObject *object, gpointer event_data, gpointer user_data)
case CAMEL_STUB_RETVAL_CHANGED_MESSAGE:
{
CamelExchangeFolder *folder;
- char *folder_name, *uid;
+ gchar *folder_name, *uid;
if (camel_stub_marshal_decode_folder (stub->status, &folder_name) == -1 ||
camel_stub_marshal_decode_string (stub->status, &uid) == -1)
@@ -991,7 +991,7 @@ stub_notification (CamelObject *object, gpointer event_data, gpointer user_data)
case CAMEL_STUB_RETVAL_CHANGED_FLAGS:
{
CamelExchangeFolder *folder;
- char *folder_name, *uid;
+ gchar *folder_name, *uid;
guint32 flags;
if (camel_stub_marshal_decode_folder (stub->status, &folder_name) == -1 ||
@@ -1013,7 +1013,7 @@ stub_notification (CamelObject *object, gpointer event_data, gpointer user_data)
case CAMEL_STUB_RETVAL_CHANGED_FLAGS_EX:
{
CamelExchangeFolder *folder;
- char *folder_name, *uid;
+ gchar *folder_name, *uid;
guint32 flags;
guint32 mask;
@@ -1038,7 +1038,7 @@ stub_notification (CamelObject *object, gpointer event_data, gpointer user_data)
case CAMEL_STUB_RETVAL_CHANGED_TAG:
{
CamelExchangeFolder *folder;
- char *folder_name, *uid, *name, *value;
+ gchar *folder_name, *uid, *name, *value;
if (camel_stub_marshal_decode_folder (stub->status, &folder_name) == -1 ||
camel_stub_marshal_decode_string (stub->status, &uid) == -1 ||
@@ -1062,7 +1062,7 @@ stub_notification (CamelObject *object, gpointer event_data, gpointer user_data)
case CAMEL_STUB_RETVAL_FREEZE_FOLDER:
{
CamelFolder *folder;
- char *folder_name;
+ gchar *folder_name;
if (camel_stub_marshal_decode_folder (stub->status, &folder_name) == -1)
break;
@@ -1080,7 +1080,7 @@ stub_notification (CamelObject *object, gpointer event_data, gpointer user_data)
case CAMEL_STUB_RETVAL_THAW_FOLDER:
{
CamelFolder *folder;
- char *folder_name;
+ gchar *folder_name;
if (camel_stub_marshal_decode_folder (stub->status, &folder_name) == -1)
break;
@@ -1098,7 +1098,7 @@ stub_notification (CamelObject *object, gpointer event_data, gpointer user_data)
case CAMEL_STUB_RETVAL_FOLDER_CREATED:
{
CamelFolderInfo *info;
- char *name, *uri;
+ gchar *name, *uri;
if (camel_stub_marshal_decode_string (stub->status, &name) == -1 ||
camel_stub_marshal_decode_string (stub->status, &uri) == -1)
@@ -1116,7 +1116,7 @@ stub_notification (CamelObject *object, gpointer event_data, gpointer user_data)
{
CamelFolderInfo *info;
CamelFolder *folder;
- char *name, *uri;
+ gchar *name, *uri;
if (camel_stub_marshal_decode_string (stub->status, &name) == -1 ||
camel_stub_marshal_decode_string (stub->status, &uri) == -1)
diff --git a/camel/camel-exchange-store.h b/camel/camel-exchange-store.h
index 17d4f2a..8e2f141 100644
--- a/camel/camel-exchange-store.h
+++ b/camel/camel-exchange-store.h
@@ -26,8 +26,8 @@ typedef struct {
CamelOfflineStore parent_object;
CamelStub *stub;
- char *storage_path, *base_url;
- char *trash_name;
+ gchar *storage_path, *base_url;
+ gchar *trash_name;
GHashTable *folders;
GMutex *folders_lock;
diff --git a/camel/camel-exchange-summary.c b/camel/camel-exchange-summary.c
index 4f7e2ea..5b143a4 100644
--- a/camel/camel-exchange-summary.c
+++ b/camel/camel-exchange-summary.c
@@ -46,15 +46,15 @@
#define d(x)
-static int header_load (CamelFolderSummary *summary, FILE *in);
-static int header_save (CamelFolderSummary *summary, FILE *out);
+static gint header_load (CamelFolderSummary *summary, FILE *in);
+static gint header_save (CamelFolderSummary *summary, FILE *out);
static CamelMessageInfo *message_info_load (CamelFolderSummary *summary,
FILE *in);
-static int message_info_save (CamelFolderSummary *summary,
+static gint message_info_save (CamelFolderSummary *summary,
FILE *out,
CamelMessageInfo *info);
-static int summary_header_from_db (CamelFolderSummary *s, CamelFIRecord *mir);
+static gint summary_header_from_db (CamelFolderSummary *s, CamelFIRecord *mir);
static CamelFIRecord * summary_header_to_db (CamelFolderSummary *s, CamelException *ex);
static CamelMIRecord * message_info_to_db (CamelFolderSummary *s, CamelMessageInfo *info);
static CamelMessageInfo * message_info_from_db (CamelFolderSummary *s, CamelMIRecord *mir);
@@ -67,7 +67,7 @@ static gboolean check_for_trash (CamelFolder *folder);
static gboolean expunge_mail (CamelFolder *folder, CamelMessageInfo *info);
static gboolean info_set_flags(CamelMessageInfo *info, guint32 flags, guint32 set);
-static gboolean info_set_user_tag(CamelMessageInfo *info, const char *name, const char *value);
+static gboolean info_set_user_tag(CamelMessageInfo *info, const gchar *name, const gchar *value);
static CamelFolderSummaryClass *parent_class = NULL;
@@ -133,7 +133,7 @@ camel_exchange_summary_get_type (void)
* Return value: the summary object.
**/
CamelFolderSummary *
-camel_exchange_summary_new (struct _CamelFolder *folder, const char *filename)
+camel_exchange_summary_new (struct _CamelFolder *folder, const gchar *filename)
{
CamelFolderSummary *summary;
CamelException lex;
@@ -156,7 +156,7 @@ static int
summary_header_from_db (CamelFolderSummary *s, CamelFIRecord *mir)
{
CamelExchangeSummary *exchange = (CamelExchangeSummary *) s;
- char *part;
+ gchar *part;
if (CAMEL_FOLDER_SUMMARY_CLASS (parent_class)->summary_header_from_db (s, mir) == -1)
return -1;
@@ -257,8 +257,8 @@ message_info_from_db (CamelFolderSummary *s, CamelMIRecord *mir)
info = CAMEL_FOLDER_SUMMARY_CLASS(parent_class)->message_info_from_db (s, mir);
if (info) {
- char *part = g_strdup (mir->bdata);
- int len;
+ gchar *part = g_strdup (mir->bdata);
+ gint len;
einfo = (CamelExchangeMessageInfo *)info;
EXTRACT_FIRST_STRING (einfo->thread_index)
EXTRACT_FIRST_STRING (einfo->href)
@@ -272,7 +272,7 @@ message_info_load (CamelFolderSummary *summary, FILE *in)
{
CamelMessageInfo *info;
CamelExchangeMessageInfo *einfo;
- char *thread_index, *href = NULL;
+ gchar *thread_index, *href = NULL;
info = CAMEL_FOLDER_SUMMARY_CLASS (parent_class)->message_info_load (summary, in);
if (info) {
@@ -341,7 +341,7 @@ message_info_new_from_header (CamelFolderSummary *summary, struct _camel_header_
{
CamelMessageInfo *info;
CamelExchangeMessageInfo *einfo;
- const char *thread_index;
+ const gchar *thread_index;
info = CAMEL_FOLDER_SUMMARY_CLASS (parent_class)->message_info_new_from_header (summary, h);
if (!info)
@@ -392,7 +392,7 @@ expunge_mail (CamelFolder *folder, CamelMessageInfo *info)
{
CamelExchangeFolder *exchange_folder = (CamelExchangeFolder *) folder;
GPtrArray *uids = g_ptr_array_new ();
- char *uid = g_strdup (info->uid);
+ gchar *uid = g_strdup (info->uid);
CamelException lex;
g_ptr_array_add (uids, uid);
@@ -451,9 +451,9 @@ info_set_flags(CamelMessageInfo *info, guint32 flags, guint32 set)
}
static gboolean
-info_set_user_tag(CamelMessageInfo *info, const char *name, const char *value)
+info_set_user_tag(CamelMessageInfo *info, const gchar *name, const gchar *value)
{
- int res;
+ gint res;
if (CAMEL_EXCHANGE_SUMMARY (info->summary)->readonly)
return FALSE;
@@ -560,7 +560,7 @@ camel_exchange_summary_set_article_num (CamelFolderSummary *summary,
**/
void
camel_exchange_summary_add_offline (CamelFolderSummary *summary,
- const char *uid,
+ const gchar *uid,
CamelMimeMessage *message,
CamelMessageInfo *info)
{
@@ -601,7 +601,7 @@ camel_exchange_summary_add_offline (CamelFolderSummary *summary,
**/
void
camel_exchange_summary_add_offline_uncached (CamelFolderSummary *summary,
- const char *uid,
+ const gchar *uid,
CamelMessageInfo *info)
{
CamelMessageInfo *mi;
diff --git a/camel/camel-exchange-summary.h b/camel/camel-exchange-summary.h
index 7b18e61..6bab6b2 100644
--- a/camel/camel-exchange-summary.h
+++ b/camel/camel-exchange-summary.h
@@ -17,8 +17,8 @@ typedef struct _CamelExchangeSummaryClass CamelExchangeSummaryClass;
typedef struct _CamelExchangeMessageInfo {
CamelMessageInfoBase info;
- char *thread_index;
- char *href;
+ gchar *thread_index;
+ gchar *href;
} CamelExchangeMessageInfo;
struct _CamelExchangeSummary {
@@ -35,7 +35,7 @@ struct _CamelExchangeSummaryClass {
};
CamelType camel_exchange_summary_get_type (void);
-CamelFolderSummary *camel_exchange_summary_new (struct _CamelFolder *folder, const char *filename);
+CamelFolderSummary *camel_exchange_summary_new (struct _CamelFolder *folder, const gchar *filename);
gboolean camel_exchange_summary_get_readonly (CamelFolderSummary *summary);
void camel_exchange_summary_set_readonly (CamelFolderSummary *summary,
@@ -43,11 +43,11 @@ void camel_exchange_summary_set_readonly (CamelFolderSummary
void camel_exchange_summary_add_offline (CamelFolderSummary *summary,
- const char *uid,
+ const gchar *uid,
CamelMimeMessage *message,
CamelMessageInfo *info);
void camel_exchange_summary_add_offline_uncached (CamelFolderSummary *summary,
- const char *uid,
+ const gchar *uid,
CamelMessageInfo *info);
guint32 camel_exchange_summary_get_article_num (CamelFolderSummary *summary);
diff --git a/camel/camel-exchange-transport.c b/camel/camel-exchange-transport.c
index 8a6c8f4..7f70d12 100644
--- a/camel/camel-exchange-transport.c
+++ b/camel/camel-exchange-transport.c
@@ -90,9 +90,9 @@ exchange_send_to (CamelTransport *transport, CamelMimeMessage *message,
{
CamelService *service = CAMEL_SERVICE (transport);
CamelStore *store = NULL;
- char *url_string;
+ gchar *url_string;
const CamelInternetAddress *cia;
- const char *addr;
+ const gchar *addr;
GPtrArray *recipients_array;
gboolean success;
CamelStream *stream;
@@ -100,7 +100,7 @@ exchange_send_to (CamelTransport *transport, CamelMimeMessage *message,
CamelMimeFilter *crlffilter;
struct _camel_header_raw *header;
GSList *h, *bcc = NULL;
- int len, i;
+ gint len, i;
url_string = camel_session_get_password (service->session, service, NULL,
"ignored", "popb4smtp_uri", 0, ex);
@@ -124,7 +124,7 @@ exchange_send_to (CamelTransport *transport, CamelMimeMessage *message,
g_free (url_string);
return FALSE;
}
- g_ptr_array_add (recipients_array, (char *)addr);
+ g_ptr_array_add (recipients_array, (gchar *)addr);
}
if (!camel_internet_address_get (CAMEL_INTERNET_ADDRESS (from), 0, NULL, &addr)) {
diff --git a/camel/camel-stub-marshal.c b/camel/camel-stub-marshal.c
index 7d36566..b624c05 100644
--- a/camel/camel-stub-marshal.c
+++ b/camel/camel-stub-marshal.c
@@ -63,12 +63,12 @@ static gboolean debug = 0;
* Return value: the new #CamelStubMarshal.
**/
CamelStubMarshal *
-camel_stub_marshal_new (int fd)
+camel_stub_marshal_new (gint fd)
{
CamelStubMarshal *marshal = g_new0 (CamelStubMarshal, 1);
#ifdef CAMEL_MARSHAL_DEBUG
- char *e2k_debug = getenv ("E2K_DEBUG");
+ gchar *e2k_debug = getenv ("E2K_DEBUG");
if (e2k_debug && strchr (e2k_debug, 'm'))
debug = TRUE;
@@ -78,7 +78,7 @@ camel_stub_marshal_new (int fd)
marshal->out = g_byte_array_new ();
g_byte_array_set_size (marshal->out, 4);
marshal->in = g_byte_array_new ();
- marshal->inptr = (char *)marshal->in->data;
+ marshal->inptr = (gchar *)marshal->in->data;
return marshal;
}
@@ -98,7 +98,7 @@ camel_stub_marshal_free (CamelStubMarshal *marshal)
}
static gboolean
-do_read (CamelStubMarshal *marshal, char *buf, size_t len)
+do_read (CamelStubMarshal *marshal, gchar *buf, size_t len)
{
size_t nread = 0;
ssize_t n;
@@ -123,25 +123,25 @@ do_read (CamelStubMarshal *marshal, char *buf, size_t len)
}
static int
-marshal_read (CamelStubMarshal *marshal, char *buf, int len)
+marshal_read (CamelStubMarshal *marshal, gchar *buf, gint len)
{
- int avail = marshal->in->len - (marshal->inptr - (char *)marshal->in->data);
- int nread;
+ gint avail = marshal->in->len - (marshal->inptr - (gchar *)marshal->in->data);
+ gint nread;
if (avail == 0) {
g_byte_array_set_size (marshal->in, 4);
- marshal->inptr = (char *)marshal->in->data + 4;
- if (!do_read (marshal, (char *)marshal->in->data, 4))
+ marshal->inptr = (gchar *)marshal->in->data + 4;
+ if (!do_read (marshal, (gchar *)marshal->in->data, 4))
return -1;
avail = (int)marshal->in->data[0] +
((int)marshal->in->data[1] << 8) +
((int)marshal->in->data[2] << 16) +
((int)marshal->in->data[3] << 24) - 4;
g_byte_array_set_size (marshal->in, avail + 4);
- marshal->inptr = (char *)marshal->in->data + 4;
- if (!do_read (marshal, ((char *)marshal->in->data) + 4, avail)) {
+ marshal->inptr = (gchar *)marshal->in->data + 4;
+ if (!do_read (marshal, ((gchar *)marshal->in->data) + 4, avail)) {
g_byte_array_set_size (marshal->in, 4);
- marshal->inptr = (char *)marshal->in->data + 4;
+ marshal->inptr = (gchar *)marshal->in->data + 4;
return -1;
}
}
@@ -164,7 +164,7 @@ marshal_read (CamelStubMarshal *marshal, char *buf, int len)
static int
marshal_getc (CamelStubMarshal *marshal)
{
- char buf;
+ gchar buf;
if (marshal_read (marshal, &buf, 1) == 1)
return (unsigned char)buf;
@@ -174,8 +174,8 @@ marshal_getc (CamelStubMarshal *marshal)
static void
encode_uint32 (CamelStubMarshal *marshal, guint32 value)
{
- unsigned char c;
- int i;
+ guchar c;
+ gint i;
for (i = 28; i > 0; i -= 7) {
if (value >= (1 << i)) {
@@ -191,7 +191,7 @@ static int
decode_uint32 (CamelStubMarshal *marshal, guint32 *dest)
{
guint32 value = 0;
- int v;
+ gint v;
/* until we get the last byte, keep decoding 7 bits at a time */
while ( ((v = marshal_getc (marshal)) & 0x80) == 0 && v!=-1) {
@@ -208,9 +208,9 @@ decode_uint32 (CamelStubMarshal *marshal, guint32 *dest)
}
static void
-encode_string (CamelStubMarshal *marshal, const char *str)
+encode_string (CamelStubMarshal *marshal, const gchar *str)
{
- int len;
+ gint len;
if (!str || !*str) {
encode_uint32 (marshal, 1);
@@ -223,10 +223,10 @@ encode_string (CamelStubMarshal *marshal, const char *str)
}
static int
-decode_string (CamelStubMarshal *marshal, char **str)
+decode_string (CamelStubMarshal *marshal, gchar **str)
{
guint32 len;
- char *ret;
+ gchar *ret;
if (decode_uint32 (marshal, &len) == -1) {
*str = NULL;
@@ -276,7 +276,7 @@ camel_stub_marshal_encode_uint32 (CamelStubMarshal *marshal, guint32 value)
*
* Return value: 0 on success, -1 on failure.
**/
-int
+gint
camel_stub_marshal_decode_uint32 (CamelStubMarshal *marshal, guint32 *dest)
{
if (decode_uint32 (marshal, dest) == -1)
@@ -295,7 +295,7 @@ camel_stub_marshal_decode_uint32 (CamelStubMarshal *marshal, guint32 *dest)
* Sends @str across @marshall.
**/
void
-camel_stub_marshal_encode_string (CamelStubMarshal *marshal, const char *str)
+camel_stub_marshal_encode_string (CamelStubMarshal *marshal, const gchar *str)
{
if (DEBUGGING)
printf (">>> \"%s\"\n", str ? str : "");
@@ -312,8 +312,8 @@ camel_stub_marshal_encode_string (CamelStubMarshal *marshal, const char *str)
*
* Return value: 0 on success, -1 on failure.
**/
-int
-camel_stub_marshal_decode_string (CamelStubMarshal *marshal, char **str)
+gint
+camel_stub_marshal_decode_string (CamelStubMarshal *marshal, gchar **str)
{
if (decode_string (marshal, str) == -1)
return -1;
@@ -337,7 +337,7 @@ camel_stub_marshal_decode_string (CamelStubMarshal *marshal, char **str)
* the folder name only needs to be sent once.
**/
void
-camel_stub_marshal_encode_folder (CamelStubMarshal *marshal, const char *name)
+camel_stub_marshal_encode_folder (CamelStubMarshal *marshal, const gchar *name)
{
if (marshal->last_folder) {
if (!strcmp (name, marshal->last_folder)) {
@@ -365,8 +365,8 @@ camel_stub_marshal_encode_folder (CamelStubMarshal *marshal, const char *name)
*
* Return value: 0 on success, -1 on failure.
**/
-int
-camel_stub_marshal_decode_folder (CamelStubMarshal *marshal, char **name)
+gint
+camel_stub_marshal_decode_folder (CamelStubMarshal *marshal, gchar **name)
{
if (decode_string (marshal, name) == -1)
return -1;
@@ -409,7 +409,7 @@ camel_stub_marshal_encode_bytes (CamelStubMarshal *marshal, GByteArray *ba)
*
* Return value: 0 on success, -1 on failure.
**/
-int
+gint
camel_stub_marshal_decode_bytes (CamelStubMarshal *marshal, GByteArray **ba)
{
guint32 len;
@@ -421,7 +421,7 @@ camel_stub_marshal_decode_bytes (CamelStubMarshal *marshal, GByteArray **ba)
*ba = g_byte_array_new ();
g_byte_array_set_size (*ba, len);
- if (len > 0 && marshal_read (marshal, (char *) (*ba)->data, len) != len) {
+ if (len > 0 && marshal_read (marshal, (gchar *) (*ba)->data, len) != len) {
g_byte_array_free (*ba, TRUE);
*ba = NULL;
return -1;
@@ -442,10 +442,10 @@ camel_stub_marshal_decode_bytes (CamelStubMarshal *marshal, GByteArray **ba)
*
* Return value: 0 on success, -1 on failure.
**/
-int
+gint
camel_stub_marshal_flush (CamelStubMarshal *marshal)
{
- int left;
+ gint left;
if (marshal->out->len == 4)
return 0;
@@ -466,7 +466,7 @@ camel_stub_marshal_flush (CamelStubMarshal *marshal)
marshal->out->data[2] = (left >> 16) & 0xFF;
marshal->out->data[3] = (left >> 24) & 0xFF;
- if (camel_write_socket (marshal->fd, (char *) marshal->out->data, marshal->out->len) == -1) {
+ if (camel_write_socket (marshal->fd, (gchar *) marshal->out->data, marshal->out->len) == -1) {
CLOSESOCKET (marshal->fd);
marshal->fd = -1;
return -1;
diff --git a/camel/camel-stub-marshal.h b/camel/camel-stub-marshal.h
index bd9328e..d01ff01 100644
--- a/camel/camel-stub-marshal.h
+++ b/camel/camel-stub-marshal.h
@@ -15,33 +15,33 @@ extern "C" {
typedef struct {
GByteArray *in, *out;
- char *inptr;
- int fd;
+ gchar *inptr;
+ gint fd;
- char *last_folder;
+ gchar *last_folder;
} CamelStubMarshal;
-CamelStubMarshal *camel_stub_marshal_new (int fd);
+CamelStubMarshal *camel_stub_marshal_new (gint fd);
void camel_stub_marshal_free (CamelStubMarshal *marshal);
void camel_stub_marshal_encode_uint32 (CamelStubMarshal *marshal,
guint32 value);
-int camel_stub_marshal_decode_uint32 (CamelStubMarshal *marshal,
+gint camel_stub_marshal_decode_uint32 (CamelStubMarshal *marshal,
guint32 *dest);
void camel_stub_marshal_encode_string (CamelStubMarshal *marshal,
- const char *str);
-int camel_stub_marshal_decode_string (CamelStubMarshal *marshal,
- char **str);
+ const gchar *str);
+gint camel_stub_marshal_decode_string (CamelStubMarshal *marshal,
+ gchar **str);
void camel_stub_marshal_encode_folder (CamelStubMarshal *marshal,
- const char *name);
-int camel_stub_marshal_decode_folder (CamelStubMarshal *marshal,
- char **name);
+ const gchar *name);
+gint camel_stub_marshal_decode_folder (CamelStubMarshal *marshal,
+ gchar **name);
void camel_stub_marshal_encode_bytes (CamelStubMarshal *marshal,
GByteArray *ba);
-int camel_stub_marshal_decode_bytes (CamelStubMarshal *marshal,
+gint camel_stub_marshal_decode_bytes (CamelStubMarshal *marshal,
GByteArray **ba);
-int camel_stub_marshal_flush (CamelStubMarshal *marshal);
+gint camel_stub_marshal_flush (CamelStubMarshal *marshal);
gboolean camel_stub_marshal_eof (CamelStubMarshal *marshal);
#ifdef __cplusplus
diff --git a/camel/camel-stub.c b/camel/camel-stub.c
index 6d1f53b..a9eaf0d 100644
--- a/camel/camel-stub.c
+++ b/camel/camel-stub.c
@@ -64,7 +64,7 @@ finalize (CamelStub *stub)
camel_stub_marshal_free (stub->cmd);
if (stub->have_status_thread) {
- void *unused;
+ gpointer unused;
/* When we close the command channel, the storage will
* close the status channel, which will in turn cause
@@ -114,8 +114,8 @@ camel_stub_get_type (void)
}
-static void *
-status_main (void *data)
+static gpointer
+status_main (gpointer data)
{
CamelObject *stub_object = data;
CamelStub *stub = data;
@@ -157,7 +157,7 @@ static int
connect_to_storage (CamelStub *stub, struct sockaddr_un *sa_un,
CamelException *ex)
{
- int fd;
+ gint fd;
fd = socket (AF_UNIX, SOCK_STREAM, 0);
if (fd == -1) {
@@ -197,14 +197,14 @@ connect_to_storage (CamelStub *stub, struct sockaddr_un *sa_un,
#else
static int
-connect_to_storage (CamelStub *stub, const char *socket_path,
+connect_to_storage (CamelStub *stub, const gchar *socket_path,
CamelException *ex)
{
SOCKET fd;
struct sockaddr_in *sa_in;
gsize contents_length;
GError *error = NULL;
- int rc;
+ gint rc;
if (!g_file_get_contents (socket_path, (gchar **) &sa_in,
&contents_length, &error)) {
@@ -268,14 +268,14 @@ connect_to_storage (CamelStub *stub, const char *socket_path,
* which case @ex will be set.
**/
CamelStub *
-camel_stub_new (const char *socket_path, const char *backend_name,
+camel_stub_new (const gchar *socket_path, const gchar *backend_name,
CamelException *ex)
{
CamelStub *stub;
#ifndef G_OS_WIN32
struct sockaddr_un sa_un;
#endif
- int fd;
+ gint fd;
#ifndef G_OS_WIN32
if (strlen (socket_path) > sizeof (sa_un.sun_path) - 1) {
@@ -330,7 +330,7 @@ stub_send_internal (CamelStub *stub, CamelException *ex, gboolean oneway,
CamelStubCommand command, va_list ap)
{
CamelStubArgType argtype;
- int status = 0;
+ gint status = 0;
guint32 retval;
g_return_val_if_fail (stub, FALSE);
@@ -359,7 +359,7 @@ stub_send_internal (CamelStub *stub, CamelException *ex, gboolean oneway,
case CAMEL_STUB_ARG_STRING:
{
- char *string = va_arg (ap, char *);
+ gchar *string = va_arg (ap, gchar *);
camel_stub_marshal_encode_string (stub->cmd, string);
break;
@@ -367,7 +367,7 @@ stub_send_internal (CamelStub *stub, CamelException *ex, gboolean oneway,
case CAMEL_STUB_ARG_FOLDER:
{
- char *name = va_arg (ap, char *);
+ gchar *name = va_arg (ap, gchar *);
camel_stub_marshal_encode_folder (stub->cmd, name);
break;
@@ -384,7 +384,7 @@ stub_send_internal (CamelStub *stub, CamelException *ex, gboolean oneway,
case CAMEL_STUB_ARG_STRINGARRAY:
{
GPtrArray *arr = va_arg (ap, GPtrArray *);
- int i;
+ gint i;
camel_stub_marshal_encode_uint32 (stub->cmd, arr->len);
for (i = 0; i < arr->len; i++)
@@ -395,7 +395,7 @@ stub_send_internal (CamelStub *stub, CamelException *ex, gboolean oneway,
case CAMEL_STUB_ARG_UINT32ARRAY:
{
GArray *arr = va_arg (ap, GArray *);
- int i;
+ gint i;
camel_stub_marshal_encode_uint32 (stub->cmd, arr->len);
for (i = 0; i < arr->len; i++)
@@ -429,7 +429,7 @@ stub_send_internal (CamelStub *stub, CamelException *ex, gboolean oneway,
case CAMEL_STUB_RETVAL_EXCEPTION:
{
- char *desc;
+ gchar *desc;
/* FIXME: exception id? */
@@ -474,7 +474,7 @@ stub_send_internal (CamelStub *stub, CamelException *ex, gboolean oneway,
case CAMEL_STUB_ARG_STRING:
{
- char **string = va_arg (ap, char **);
+ gchar **string = va_arg (ap, gchar **);
status = camel_stub_marshal_decode_string (stub->cmd, string);
break;
@@ -482,7 +482,7 @@ stub_send_internal (CamelStub *stub, CamelException *ex, gboolean oneway,
case CAMEL_STUB_ARG_FOLDER:
{
- char **name = va_arg (ap, char **);
+ gchar **name = va_arg (ap, gchar **);
status = camel_stub_marshal_decode_folder (stub->cmd, name);
break;
@@ -500,8 +500,8 @@ stub_send_internal (CamelStub *stub, CamelException *ex, gboolean oneway,
{
GPtrArray **arr = va_arg (ap, GPtrArray **);
guint32 len;
- char *string;
- int i;
+ gchar *string;
+ gint i;
status = camel_stub_marshal_decode_uint32 (stub->cmd, &len);
if (status == -1)
diff --git a/camel/camel-stub.h b/camel/camel-stub.h
index 82a48f0..0c176af 100644
--- a/camel/camel-stub.h
+++ b/camel/camel-stub.h
@@ -28,7 +28,7 @@ extern "C" {
typedef struct {
CamelObject parent_object;
- char *backend_name;
+ gchar *backend_name;
GMutex *read_lock, *write_lock;
CamelStubMarshal *cmd, *status;
@@ -47,8 +47,8 @@ typedef struct {
/* Standard Camel function */
CamelType camel_stub_get_type (void);
-CamelStub *camel_stub_new (const char *socket_path,
- const char *backend_name,
+CamelStub *camel_stub_new (const gchar *socket_path,
+ const gchar *backend_name,
CamelException *ex);
gboolean camel_stub_send (CamelStub *stub, CamelException *ex,
diff --git a/mail/mail-stub-exchange.c b/mail/mail-stub-exchange.c
index cd8cd43..f705078 100644
--- a/mail/mail-stub-exchange.c
+++ b/mail/mail-stub-exchange.c
@@ -52,7 +52,7 @@ static MailStubClass *parent_class = NULL;
/* static gulong offline_listener_handler_id; */
typedef struct {
- char *uid, *href;
+ gchar *uid, *href;
guint32 seq, flags;
guint32 change_flags, change_mask;
GData *tag_updates;
@@ -69,7 +69,7 @@ typedef struct {
MailStubExchange *mse;
EFolder *folder;
- const char *name;
+ const gchar *name;
MailStubExchangeFolderType type;
guint32 access;
@@ -89,41 +89,41 @@ typedef struct {
static void dispose (GObject *);
-static void stub_connect (MailStub *stub, char *pwd);
-static void get_folder (MailStub *stub, const char *name, gboolean create,
+static void stub_connect (MailStub *stub, gchar *pwd);
+static void get_folder (MailStub *stub, const gchar *name, gboolean create,
GPtrArray *uids, GByteArray *flags, GPtrArray *hrefs, guint32 high_article_num);
static void get_trash_name (MailStub *stub);
-static void sync_folder (MailStub *stub, const char *folder_name);
-static void refresh_folder (MailStub *stub, const char *folder_name);
-static void sync_count (MailStub *stub, const char *folder_name);
+static void sync_folder (MailStub *stub, const gchar *folder_name);
+static void refresh_folder (MailStub *stub, const gchar *folder_name);
+static void sync_count (MailStub *stub, const gchar *folder_name);
static void refresh_folder_internal (MailStub *stub, MailStubExchangeFolder *mfld,
gboolean background);
static void sync_deletions (MailStubExchange *mse, MailStubExchangeFolder *mfld);
-static void expunge_uids (MailStub *stub, const char *folder_name, GPtrArray *uids);
-static void append_message (MailStub *stub, const char *folder_name, guint32 flags,
- const char *subject, const char *data, int length);
-static void set_message_flags (MailStub *, const char *folder_name,
- const char *uid, guint32 flags, guint32 mask);
-static void set_message_tag (MailStub *, const char *folder_name,
- const char *uid, const char *name, const char *value);
-static void get_message (MailStub *stub, const char *folder_name, const char *uid);
-static void search (MailStub *stub, const char *folder_name, const char *text);
-static void transfer_messages (MailStub *stub, const char *source_name,
- const char *dest_name, GPtrArray *uids,
+static void expunge_uids (MailStub *stub, const gchar *folder_name, GPtrArray *uids);
+static void append_message (MailStub *stub, const gchar *folder_name, guint32 flags,
+ const gchar *subject, const gchar *data, gint length);
+static void set_message_flags (MailStub *, const gchar *folder_name,
+ const gchar *uid, guint32 flags, guint32 mask);
+static void set_message_tag (MailStub *, const gchar *folder_name,
+ const gchar *uid, const gchar *name, const gchar *value);
+static void get_message (MailStub *stub, const gchar *folder_name, const gchar *uid);
+static void search (MailStub *stub, const gchar *folder_name, const gchar *text);
+static void transfer_messages (MailStub *stub, const gchar *source_name,
+ const gchar *dest_name, GPtrArray *uids,
gboolean delete_originals);
-static void get_folder_info (MailStub *stub, const char *top,
+static void get_folder_info (MailStub *stub, const gchar *top,
guint32 store_flags);
-static void send_message (MailStub *stub, const char *from,
+static void send_message (MailStub *stub, const gchar *from,
GPtrArray *recipients,
- const char *data, int length);
-static void create_folder (MailStub *, const char *parent_name,
- const char *folder_name);
-static void delete_folder (MailStub *, const char *folder_name);
-static void rename_folder (MailStub *, const char *old_name,
- const char *new_name);
-static void subscribe_folder (MailStub *, const char *folder_name);
-static void unsubscribe_folder (MailStub *, const char *folder_name);
-static void is_subscribed_folder (MailStub *, const char *folder_name);
+ const gchar *data, gint length);
+static void create_folder (MailStub *, const gchar *parent_name,
+ const gchar *folder_name);
+static void delete_folder (MailStub *, const gchar *folder_name);
+static void rename_folder (MailStub *, const gchar *old_name,
+ const gchar *new_name);
+static void subscribe_folder (MailStub *, const gchar *folder_name);
+static void unsubscribe_folder (MailStub *, const gchar *folder_name);
+static void is_subscribed_folder (MailStub *, const gchar *folder_name);
static gboolean process_flags (gpointer user_data);
@@ -135,7 +135,7 @@ static void storage_folder_changed (EFolder *folder, gpointer user_data);
static void folder_update_linestatus (gpointer key, gpointer value, gpointer data);
static void free_folder (gpointer value);
static gboolean get_folder_online (MailStubExchangeFolder *mfld, gboolean background);
-static void get_folder_info_data (MailStub *stub, const char *top, guint32 store_flags,
+static void get_folder_info_data (MailStub *stub, const gchar *top, guint32 store_flags,
GPtrArray **names, GPtrArray **uris,
GArray **unread, GArray **flags);
@@ -196,7 +196,7 @@ static void
free_folder (gpointer value)
{
MailStubExchangeFolder *mfld = value;
- int i;
+ gint i;
d(g_print ("%s:%s:%d: freeing mfld: name=[%s]\n", __FILE__, __PRETTY_FUNCTION__, __LINE__,
mfld->name));
@@ -258,7 +258,7 @@ E2K_MAKE_TYPE (mail_stub_exchange, MailStubExchange, class_init, init, PARENT_TY
static MailStubExchangeFolder *
-folder_from_name (MailStubExchange *mse, const char *folder_name,
+folder_from_name (MailStubExchange *mse, const gchar *folder_name,
guint32 perms, gboolean background)
{
MailStubExchangeFolder *mfld;
@@ -304,10 +304,10 @@ folder_changed (MailStubExchangeFolder *mfld)
}
static int
-find_message_index (MailStubExchangeFolder *mfld, int seq)
+find_message_index (MailStubExchangeFolder *mfld, gint seq)
{
MailStubExchangeMessage *mmsg;
- int low, high, mid;
+ gint low, high, mid;
low = 0;
high = mfld->messages->len - 1;
@@ -327,19 +327,19 @@ find_message_index (MailStubExchangeFolder *mfld, int seq)
}
static inline MailStubExchangeMessage *
-find_message (MailStubExchangeFolder *mfld, const char *uid)
+find_message (MailStubExchangeFolder *mfld, const gchar *uid)
{
return g_hash_table_lookup (mfld->messages_by_uid, uid);
}
static inline MailStubExchangeMessage *
-find_message_by_href (MailStubExchangeFolder *mfld, const char *href)
+find_message_by_href (MailStubExchangeFolder *mfld, const gchar *href)
{
return g_hash_table_lookup (mfld->messages_by_href, href);
}
static MailStubExchangeMessage *
-new_message (const char *uid, const char *uri, guint32 seq, guint32 flags)
+new_message (const gchar *uid, const gchar *uri, guint32 seq, guint32 flags)
{
MailStubExchangeMessage *mmsg;
@@ -353,7 +353,7 @@ new_message (const char *uid, const char *uri, guint32 seq, guint32 flags)
}
static void
-message_remove_at_index (MailStub *stub, MailStubExchangeFolder *mfld, int index)
+message_remove_at_index (MailStub *stub, MailStubExchangeFolder *mfld, gint index)
{
MailStubExchangeMessage *mmsg;
@@ -371,7 +371,7 @@ message_remove_at_index (MailStub *stub, MailStubExchangeFolder *mfld, int index
g_static_rec_mutex_unlock (&g_changed_msgs_mutex);
if (mmsg->change_mask || mmsg->tag_updates) {
- int i;
+ gint i;
g_static_rec_mutex_lock (&g_changed_msgs_mutex);
@@ -397,7 +397,7 @@ message_remove_at_index (MailStub *stub, MailStubExchangeFolder *mfld, int index
}
static void
-message_removed (MailStub *stub, MailStubExchangeFolder *mfld, const char *href)
+message_removed (MailStub *stub, MailStubExchangeFolder *mfld, const gchar *href)
{
MailStubExchangeMessage *mmsg;
guint index;
@@ -412,8 +412,8 @@ message_removed (MailStub *stub, MailStubExchangeFolder *mfld, const char *href)
}
static void
-return_tag (MailStubExchangeFolder *mfld, const char *uid,
- const char *name, const char *value)
+return_tag (MailStubExchangeFolder *mfld, const gchar *uid,
+ const gchar *name, const gchar *value)
{
mail_stub_return_data (MAIL_STUB (mfld->mse),
CAMEL_STUB_RETVAL_CHANGED_TAG,
@@ -445,8 +445,8 @@ change_flags (MailStubExchangeFolder *mfld, MailStubExchangeMessage *mmsg,
CAMEL_STUB_ARG_END);
}
-static const char *
-uidstrip (const char *repl_uid)
+static const gchar *
+uidstrip (const gchar *repl_uid)
{
/* The first two cases are just to prevent crashes in the face
* of extreme lossage. They shouldn't ever happen, and the
@@ -474,7 +474,7 @@ timeout_sync_deletions (gpointer user_data)
}
static void
-notify_cb (E2kContext *ctx, const char *uri,
+notify_cb (E2kContext *ctx, const gchar *uri,
E2kContextChangeType type, gpointer user_data)
{
MailStubExchangeFolder *mfld = user_data;
@@ -545,13 +545,13 @@ storage_folder_changed (EFolder *folder, gpointer user_data)
}
static void
-got_folder_error (MailStubExchangeFolder *mfld, const char *error)
+got_folder_error (MailStubExchangeFolder *mfld, const gchar *error)
{
mail_stub_return_error (MAIL_STUB (mfld->mse), error);
free_folder (mfld);
}
-static const char *open_folder_sync_props[] = {
+static const gchar *open_folder_sync_props[] = {
E2K_PR_REPL_UID,
PR_INTERNET_ARTICLE_NUMBER,
PR_ACTION_FLAG,
@@ -562,19 +562,19 @@ static const char *open_folder_sync_props[] = {
E2K_PR_MAILHEADER_REPLY_BY,
E2K_PR_MAILHEADER_COMPLETED
};
-static const int n_open_folder_sync_props = sizeof (open_folder_sync_props) / sizeof (open_folder_sync_props[0]);
+static const gint n_open_folder_sync_props = sizeof (open_folder_sync_props) / sizeof (open_folder_sync_props[0]);
-static const char *open_folder_props[] = {
+static const gchar *open_folder_props[] = {
PR_ACCESS,
PR_DELETED_COUNT_TOTAL
};
-static const int n_open_folder_props = sizeof (open_folder_props) / sizeof (open_folder_props[0]);
+static const gint n_open_folder_props = sizeof (open_folder_props) / sizeof (open_folder_props[0]);
static void
mse_get_folder_online_sync_updates (gpointer key, gpointer value,
gpointer user_data)
{
- unsigned int index, seq, i;
+ guint index, seq, i;
MailStubExchangeFolder *mfld = (MailStubExchangeFolder *)user_data;
/*MailStub *stub = MAIL_STUB (mfld->mse);*/
MailStubExchangeMessage *mmsg = NULL;
@@ -620,10 +620,10 @@ get_folder_contents_online (MailStubExchangeFolder *mfld, gboolean background)
E2kRestriction *rn;
E2kResultIter *iter;
E2kResult *result;
- const char *prop, *uid;
+ const gchar *prop, *uid;
guint32 article_num, camel_flags, high_article_num;
- int i, total = -1;
- unsigned int m;
+ gint i, total = -1;
+ guint m;
GPtrArray *msgs_copy = NULL;
GHashTable *rm_idx_uid = NULL;
@@ -858,9 +858,9 @@ get_folder_online (MailStubExchangeFolder *mfld, gboolean background)
MailStub *stub = MAIL_STUB (mfld->mse);
E2kHTTPStatus status;
E2kResult *results;
- int nresults = 0;
+ gint nresults = 0;
gboolean readonly;
- const char *prop;
+ const gchar *prop;
mfld->changed_messages = g_ptr_array_new ();
@@ -945,7 +945,7 @@ get_folder_online (MailStubExchangeFolder *mfld, gboolean background)
}
static void
-get_folder (MailStub *stub, const char *name, gboolean create,
+get_folder (MailStub *stub, const gchar *name, gboolean create,
GPtrArray *uids, GByteArray *flags, GPtrArray *hrefs,
guint32 high_article_num)
{
@@ -953,10 +953,10 @@ get_folder (MailStub *stub, const char *name, gboolean create,
MailStubExchangeFolder *mfld;
MailStubExchangeMessage *mmsg;
EFolder *folder;
- char *path;
- const char *outlook_class;
+ gchar *path;
+ const gchar *outlook_class;
guint32 camel_flags;
- int i, mode;
+ gint i, mode;
ExchangeHierarchy *hier;
path = g_strdup_printf ("/%s", name);
@@ -1008,7 +1008,7 @@ get_folder (MailStub *stub, const char *name, gboolean create,
g_ptr_array_add (mfld->messages, mmsg);
g_hash_table_insert (mfld->messages_by_uid, mmsg->uid, mmsg);
- if (hrefs->pdata[i] && *((char *)hrefs->pdata[i])) {
+ if (hrefs->pdata[i] && *((gchar *)hrefs->pdata[i])) {
mmsg->href = g_strdup (hrefs->pdata[i]);
g_hash_table_insert (mfld->messages_by_href, mmsg->href, mmsg);
}
@@ -1027,7 +1027,7 @@ get_folder (MailStub *stub, const char *name, gboolean create,
g_signal_connect (mfld->folder, "changed",
G_CALLBACK (storage_folder_changed), mfld);
- g_hash_table_insert (mse->folders_by_name, (char *)mfld->name, mfld);
+ g_hash_table_insert (mse->folders_by_name, (gchar *)mfld->name, mfld);
folder_changed (mfld);
camel_flags = 0;
@@ -1070,7 +1070,7 @@ get_trash_name (MailStub *stub)
}
static void
-sync_folder (MailStub *stub, const char *folder_name)
+sync_folder (MailStub *stub, const gchar *folder_name)
{
MailStubExchangeFolder *mfld;
@@ -1086,11 +1086,11 @@ sync_folder (MailStub *stub, const char *folder_name)
mail_stub_return_ok (stub);
}
-static const char *sync_deleted_props[] = {
+static const gchar *sync_deleted_props[] = {
PR_DELETED_COUNT_TOTAL,
E2K_PR_DAV_VISIBLE_COUNT
};
-static const int n_sync_deleted_props = sizeof (sync_deleted_props) / sizeof (sync_deleted_props[0]);
+static const gint n_sync_deleted_props = sizeof (sync_deleted_props) / sizeof (sync_deleted_props[0]);
static void
sync_deletions (MailStubExchange *mse, MailStubExchangeFolder *mfld)
@@ -1098,13 +1098,13 @@ sync_deletions (MailStubExchange *mse, MailStubExchangeFolder *mfld)
MailStub *stub = MAIL_STUB (mse);
E2kHTTPStatus status;
E2kResult *results;
- int nresults = 0;
- const char *prop;
- int deleted_count = -1, new_deleted_count, visible_count = -1, mode;
+ gint nresults = 0;
+ const gchar *prop;
+ gint deleted_count = -1, new_deleted_count, visible_count = -1, mode;
E2kRestriction *rn;
E2kResultIter *iter;
E2kResult *result;
- int my_i, read, highest_unverified_index, highest_verified_seq;
+ gint my_i, read, highest_unverified_index, highest_verified_seq;
MailStubExchangeMessage *mmsg, *my_mmsg;
gboolean changes = FALSE;
@@ -1225,19 +1225,19 @@ sync_deletions (MailStubExchange *mse, MailStubExchangeFolder *mfld)
}
struct refresh_message {
- char *uid, *href, *headers, *fff, *reply_by, *completed;
+ gchar *uid, *href, *headers, *fff, *reply_by, *completed;
guint32 flags, size, article_num;
};
static int
-refresh_message_compar (const void *a, const void *b)
+refresh_message_compar (gconstpointer a, gconstpointer b)
{
const struct refresh_message *rma = a, *rmb = b;
return strcmp (rma->uid, rmb->uid);
}
-static const char *mapi_message_props[] = {
+static const gchar *mapi_message_props[] = {
E2K_PR_MAILHEADER_SUBJECT,
E2K_PR_MAILHEADER_FROM,
E2K_PR_MAILHEADER_TO,
@@ -1250,9 +1250,9 @@ static const char *mapi_message_props[] = {
E2K_PR_MAILHEADER_THREAD_INDEX,
E2K_PR_DAV_CONTENT_TYPE
};
-static const int n_mapi_message_props = sizeof (mapi_message_props) / sizeof (mapi_message_props[0]);
+static const gint n_mapi_message_props = sizeof (mapi_message_props) / sizeof (mapi_message_props[0]);
-static const char *new_message_props[] = {
+static const gchar *new_message_props[] = {
E2K_PR_REPL_UID,
PR_INTERNET_ARTICLE_NUMBER,
PR_TRANSPORT_MESSAGE_HEADERS,
@@ -1266,7 +1266,7 @@ static const char *new_message_props[] = {
E2K_PR_MAILHEADER_COMPLETED,
E2K_PR_DAV_CONTENT_LENGTH
};
-static const int num_new_message_props = sizeof (new_message_props) / sizeof (new_message_props[0]);
+static const gint num_new_message_props = sizeof (new_message_props) / sizeof (new_message_props[0]);
static void
refresh_folder_internal (MailStub *stub, MailStubExchangeFolder *mfld,
@@ -1279,10 +1279,10 @@ refresh_folder_internal (MailStub *stub, MailStubExchangeFolder *mfld,
gboolean has_read_flag = (mfld->access & MAPI_ACCESS_READ);
E2kResultIter *iter;
E2kResult *result;
- char *prop, *uid, *href;
+ gchar *prop, *uid, *href;
struct refresh_message rm, *rmp;
E2kHTTPStatus status;
- int got, total, i, n, mode;
+ gint got, total, i, n, mode;
gpointer key, value;
MailStubExchangeMessage *mmsg;
@@ -1403,7 +1403,7 @@ refresh_folder_internal (MailStub *stub, MailStubExchangeFolder *mfld,
*/
iter = e_folder_exchange_bpropfind_start (mfld->folder, NULL,
- (const char **)mapi_hrefs->pdata,
+ (const gchar **)mapi_hrefs->pdata,
mapi_hrefs->len,
mapi_message_props,
n_mapi_message_props);
@@ -1529,7 +1529,7 @@ refresh_folder_internal (MailStub *stub, MailStubExchangeFolder *mfld,
}
static void
-sync_count (MailStub *stub, const char *folder_name)
+sync_count (MailStub *stub, const gchar *folder_name)
{
MailStubExchange *mse = MAIL_STUB_EXCHANGE (stub);
MailStubExchangeFolder *mfld;
@@ -1556,7 +1556,7 @@ sync_count (MailStub *stub, const char *folder_name)
}
static void
-refresh_folder (MailStub *stub, const char *folder_name)
+refresh_folder (MailStub *stub, const gchar *folder_name)
{
MailStubExchange *mse = MAIL_STUB_EXCHANGE (stub);
MailStubExchangeFolder *mfld;
@@ -1570,7 +1570,7 @@ refresh_folder (MailStub *stub, const char *folder_name)
}
static void
-expunge_uids (MailStub *stub, const char *folder_name, GPtrArray *uids)
+expunge_uids (MailStub *stub, const gchar *folder_name, GPtrArray *uids)
{
MailStubExchange *mse = MAIL_STUB_EXCHANGE (stub);
MailStubExchangeFolder *mfld;
@@ -1579,7 +1579,7 @@ expunge_uids (MailStub *stub, const char *folder_name, GPtrArray *uids)
E2kResultIter *iter;
E2kResult *result;
E2kHTTPStatus status;
- int i, ndeleted;
+ gint i, ndeleted;
gboolean some_error = FALSE;
if (!uids->len) {
@@ -1612,7 +1612,7 @@ expunge_uids (MailStub *stub, const char *folder_name, GPtrArray *uids)
CAMEL_STUB_ARG_END);
iter = e_folder_exchange_bdelete_start (mfld->folder, NULL,
- (const char **)hrefs->pdata,
+ (const gchar **)hrefs->pdata,
hrefs->len);
ndeleted = 0;
while ((result = e2k_result_iter_next (iter))) {
@@ -1645,7 +1645,7 @@ expunge_uids (MailStub *stub, const char *folder_name, GPtrArray *uids)
}
static void
-mark_one_read (E2kContext *ctx, const char *uri, gboolean read)
+mark_one_read (E2kContext *ctx, const gchar *uri, gboolean read)
{
E2kProperties *props;
E2kHTTPStatus status;
@@ -1670,7 +1670,7 @@ mark_read (EFolder *folder, GPtrArray *hrefs, gboolean read)
e2k_properties_set_bool (props, E2K_PR_HTTPMAIL_READ, read);
iter = e_folder_exchange_bproppatch_start (folder, NULL,
- (const char **)hrefs->pdata,
+ (const gchar **)hrefs->pdata,
hrefs->len, props, FALSE);
e2k_properties_free (props);
@@ -1683,19 +1683,19 @@ mark_read (EFolder *folder, GPtrArray *hrefs, gboolean read)
}
static gboolean
-test_uri (E2kContext *ctx, const char *test_name, gpointer messages_by_href)
+test_uri (E2kContext *ctx, const gchar *test_name, gpointer messages_by_href)
{
return g_hash_table_lookup (messages_by_href, test_name) == NULL;
}
static void
-append_message (MailStub *stub, const char *folder_name, guint32 flags,
- const char *subject, const char *data, int length)
+append_message (MailStub *stub, const gchar *folder_name, guint32 flags,
+ const gchar *subject, const gchar *data, gint length)
{
MailStubExchange *mse = MAIL_STUB_EXCHANGE (stub);
MailStubExchangeFolder *mfld;
E2kHTTPStatus status;
- char *ru_header = NULL, *repl_uid, *location = NULL;
+ gchar *ru_header = NULL, *repl_uid, *location = NULL;
mfld = folder_from_name (mse, folder_name, MAPI_ACCESS_CREATE_CONTENTS, FALSE);
if (!mfld)
@@ -1804,8 +1804,8 @@ static void
update_tags (MailStubExchange *mse, MailStubExchangeMessage *mmsg)
{
E2kProperties *props;
- const char *value;
- int flag_status;
+ const gchar *value;
+ gint flag_status;
E2kHTTPStatus status;
flag_status = MAPI_FOLLOWUP_UNFLAGGED;
@@ -1866,7 +1866,7 @@ process_flags (gpointer user_data)
MailStubExchange *mse = mfld->mse;
MailStubExchangeMessage *mmsg;
GPtrArray *seen = NULL, *unseen = NULL, *deleted = NULL;
- int i;
+ gint i;
guint32 hier_type = e_folder_exchange_get_hierarchy (mfld->folder)->type;
g_static_rec_mutex_lock (&g_changed_msgs_mutex);
@@ -1968,7 +1968,7 @@ process_flags (gpointer user_data)
show the mail folder again if the deletion fails in
such public folder */
iter = e_folder_exchange_bdelete_start (mfld->folder, NULL,
- (const char **)deleted->pdata,
+ (const gchar **)deleted->pdata,
deleted->len);
}
g_ptr_array_free (deleted, FALSE);
@@ -2018,7 +2018,7 @@ static void
change_message (MailStubExchange *mse, MailStubExchangeFolder *mfld,
MailStubExchangeMessage *mmsg)
{
- int i;
+ gint i;
g_static_rec_mutex_lock (&g_changed_msgs_mutex);
@@ -2039,7 +2039,7 @@ change_message (MailStubExchange *mse, MailStubExchangeFolder *mfld,
}
static void
-set_message_flags (MailStub *stub, const char *folder_name, const char *uid,
+set_message_flags (MailStub *stub, const gchar *folder_name, const gchar *uid,
guint32 flags, guint32 mask)
{
MailStubExchange *mse = MAIL_STUB_EXCHANGE (stub);
@@ -2107,8 +2107,8 @@ set_message_flags (MailStub *stub, const char *folder_name, const char *uid,
}
static void
-set_message_tag (MailStub *stub, const char *folder_name, const char *uid,
- const char *name, const char *value)
+set_message_tag (MailStub *stub, const gchar *folder_name, const gchar *uid,
+ const gchar *name, const gchar *value)
{
MailStubExchange *mse = MAIL_STUB_EXCHANGE (stub);
MailStubExchangeFolder *mfld;
@@ -2127,7 +2127,7 @@ set_message_tag (MailStub *stub, const char *folder_name, const char *uid,
change_message (mse, mfld, mmsg);
}
-static const char *stickynote_props[] = {
+static const gchar *stickynote_props[] = {
E2K_PR_MAILHEADER_SUBJECT,
E2K_PR_DAV_LAST_MODIFIED,
E2K_PR_OUTLOOK_STICKYNOTE_COLOR,
@@ -2135,15 +2135,15 @@ static const char *stickynote_props[] = {
E2K_PR_OUTLOOK_STICKYNOTE_WIDTH,
E2K_PR_HTTPMAIL_TEXT_DESCRIPTION,
};
-static const int n_stickynote_props = sizeof (stickynote_props) / sizeof (stickynote_props[0]);
+static const gint n_stickynote_props = sizeof (stickynote_props) / sizeof (stickynote_props[0]);
static E2kHTTPStatus
-get_stickynote (E2kContext *ctx, E2kOperation *op, const char *uri,
- char **body, int *len)
+get_stickynote (E2kContext *ctx, E2kOperation *op, const gchar *uri,
+ gchar **body, gint *len)
{
E2kHTTPStatus status;
E2kResult *results;
- int nresults = 0;
+ gint nresults = 0;
GString *message;
status = e2k_context_propfind (ctx, op, uri,
@@ -2163,14 +2163,14 @@ get_stickynote (E2kContext *ctx, E2kOperation *op, const char *uri,
static E2kHTTPStatus
build_message_from_document (E2kContext *ctx, E2kOperation *op,
- const char *uri,
- char **body, int *len)
+ const gchar *uri,
+ gchar **body, gint *len)
{
E2kHTTPStatus status;
E2kResult *results;
- int nresults = 0;
+ gint nresults = 0;
GString *message;
- char *headers;
+ gchar *headers;
status = e2k_context_propfind (ctx, op, uri,
mapi_message_props,
@@ -2198,12 +2198,12 @@ build_message_from_document (E2kContext *ctx, E2kOperation *op,
static E2kHTTPStatus
unmangle_delegated_meeting_request (MailStubExchange *mse, E2kOperation *op,
- const char *uri,
- char **body, int *len)
+ const gchar *uri,
+ gchar **body, gint *len)
{
- const char *prop = PR_RCVD_REPRESENTING_EMAIL_ADDRESS;
+ const gchar *prop = PR_RCVD_REPRESENTING_EMAIL_ADDRESS;
GString *message;
- char *delegator_dn, *delegator_uri, *delegator_folder_physical_uri = NULL;
+ gchar *delegator_dn, *delegator_uri, *delegator_folder_physical_uri = NULL;
ExchangeAccount *account;
E2kGlobalCatalog *gc;
E2kGlobalCatalogEntry *entry;
@@ -2211,7 +2211,7 @@ unmangle_delegated_meeting_request (MailStubExchange *mse, E2kOperation *op,
EFolder *folder = NULL;
E2kHTTPStatus status;
E2kResult *results;
- int nresults = 0;
+ gint nresults = 0;
MailUtilDemangleType unmangle_type = MAIL_UTIL_DEMANGLE_DELGATED_MEETING;
status = e2k_context_propfind (mse->ctx, op, uri, &prop, 1,
@@ -2276,11 +2276,11 @@ unmangle_delegated_meeting_request (MailStubExchange *mse, E2kOperation *op,
static E2kHTTPStatus
unmangle_meeting_request_in_subscribed_inbox (MailStubExchange *mse,
- const char *delegator_email,
- char **body, int *len)
+ const gchar *delegator_email,
+ gchar **body, gint *len)
{
GString *message;
- char *delegator_uri, *delegator_folder_physical_uri = NULL;
+ gchar *delegator_uri, *delegator_folder_physical_uri = NULL;
ExchangeAccount *account;
E2kGlobalCatalog *gc;
E2kGlobalCatalogEntry *entry;
@@ -2334,12 +2334,12 @@ unmangle_meeting_request_in_subscribed_inbox (MailStubExchange *mse,
static E2kHTTPStatus
unmangle_sender_field (MailStubExchange *mse, E2kOperation *op,
- const char *uri,
- char **body, int *len)
+ const gchar *uri,
+ gchar **body, gint *len)
{
- const char *props[] = { PR_SENT_REPRESENTING_EMAIL_ADDRESS, PR_SENDER_EMAIL_ADDRESS };
+ const gchar *props[] = { PR_SENT_REPRESENTING_EMAIL_ADDRESS, PR_SENDER_EMAIL_ADDRESS };
GString *message;
- char *delegator_dn, *sender_dn;
+ gchar *delegator_dn, *sender_dn;
ExchangeAccount *account;
E2kGlobalCatalog *gc;
E2kGlobalCatalogEntry *delegator_entry;
@@ -2347,7 +2347,7 @@ unmangle_sender_field (MailStubExchange *mse, E2kOperation *op,
E2kGlobalCatalogStatus gcstatus;
E2kHTTPStatus status;
E2kResult *results;
- int nresults = 0;
+ gint nresults = 0;
MailUtilDemangleType unmangle_type = MAIL_UTIL_DEMANGLE_SENDER_FIELD;
status = e2k_context_propfind (mse->ctx, op, uri, props, 2,
@@ -2423,12 +2423,12 @@ unmangle_sender_field (MailStubExchange *mse, E2kOperation *op,
}
static gboolean
-is_foreign_folder (MailStub *stub, const char *folder_name, char **owner_email)
+is_foreign_folder (MailStub *stub, const gchar *folder_name, gchar **owner_email)
{
MailStubExchange *mse = MAIL_STUB_EXCHANGE (stub);
EFolder *folder;
ExchangeHierarchy *hier;
- char *path;
+ gchar *path;
path = g_build_filename ("/", folder_name, NULL);
folder = exchange_account_get_folder (mse->account, path);
@@ -2453,14 +2453,14 @@ is_foreign_folder (MailStub *stub, const char *folder_name, char **owner_email)
}
static void
-get_message (MailStub *stub, const char *folder_name, const char *uid)
+get_message (MailStub *stub, const gchar *folder_name, const gchar *uid)
{
MailStubExchange *mse = MAIL_STUB_EXCHANGE (stub);
MailStubExchangeFolder *mfld;
MailStubExchangeMessage *mmsg;
E2kHTTPStatus status;
- char *body = NULL, *content_type = NULL, *owner_email = NULL;
- int len = 0;
+ gchar *body = NULL, *content_type = NULL, *owner_email = NULL;
+ gint len = 0;
mfld = folder_from_name (mse, folder_name, MAPI_ACCESS_READ, FALSE);
if (!mfld)
@@ -2565,12 +2565,12 @@ cleanup:
static void
-search (MailStub *stub, const char *folder_name, const char *text)
+search (MailStub *stub, const gchar *folder_name, const gchar *text)
{
MailStubExchange *mse = MAIL_STUB_EXCHANGE (stub);
MailStubExchangeFolder *mfld;
E2kRestriction *rn;
- const char *prop, *repl_uid;
+ const gchar *prop, *repl_uid;
E2kResultIter *iter;
E2kResult *result;
E2kHTTPStatus status;
@@ -2593,7 +2593,7 @@ search (MailStub *stub, const char *folder_name, const char *text)
repl_uid = e2k_properties_get_prop (result->props,
E2K_PR_REPL_UID);
if (repl_uid)
- g_ptr_array_add (matches, (char *)uidstrip (repl_uid));
+ g_ptr_array_add (matches, (gchar *)uidstrip (repl_uid));
}
status = e2k_result_iter_free (iter);
@@ -2610,8 +2610,8 @@ search (MailStub *stub, const char *folder_name, const char *text)
}
static void
-transfer_messages (MailStub *stub, const char *source_name,
- const char *dest_name, GPtrArray *uids,
+transfer_messages (MailStub *stub, const gchar *source_name,
+ const gchar *dest_name, GPtrArray *uids,
gboolean delete_originals)
{
MailStubExchange *mse = MAIL_STUB_EXCHANGE (stub);
@@ -2623,8 +2623,8 @@ transfer_messages (MailStub *stub, const char *source_name,
E2kResultIter *iter;
E2kResult *result;
E2kHTTPStatus status;
- const char *uid;
- int i, num;
+ const gchar *uid;
+ gint i, num;
source = folder_from_name (mse, source_name, delete_originals ? MAPI_ACCESS_DELETE : 0, FALSE);
if (!source)
@@ -2642,7 +2642,7 @@ transfer_messages (MailStub *stub, const char *source_name,
continue;
if (!mmsg->href || !strrchr (mmsg->href, '/')) {
- g_warning ("%s: Message '%s' with invalid href '%s'", G_STRFUNC, (char *)uids->pdata[i], mmsg->href ? mmsg->href : "NULL");
+ g_warning ("%s: Message '%s' with invalid href '%s'", G_STRFUNC, (gchar *)uids->pdata[i], mmsg->href ? mmsg->href : "NULL");
continue;
}
@@ -2681,7 +2681,7 @@ transfer_messages (MailStub *stub, const char *source_name,
if (num > new_uids->len)
continue;
- new_uids->pdata[num] = (char *)uidstrip (uid);
+ new_uids->pdata[num] = (gchar *)uidstrip (uid);
if (delete_originals)
message_removed (stub, source, result->href);
@@ -2768,7 +2768,7 @@ account_removed_folder (ExchangeAccount *account, EFolder *folder, gpointer user
}
static void
-get_folder_info_data (MailStub *stub, const char *top, guint32 store_flags,
+get_folder_info_data (MailStub *stub, const gchar *top, guint32 store_flags,
GPtrArray **names, GPtrArray **uris,
GArray **unread, GArray **flags)
{
@@ -2776,12 +2776,12 @@ get_folder_info_data (MailStub *stub, const char *top, guint32 store_flags,
GPtrArray *folders = NULL;
ExchangeHierarchy *hier;
EFolder *folder;
- const char *type, *name, *uri, *inbox_uri = NULL, *trash_uri = NULL, *sent_items_uri = NULL;
- int unread_count, i, toplen = top ? strlen (top) : 0;
+ const gchar *type, *name, *uri, *inbox_uri = NULL, *trash_uri = NULL, *sent_items_uri = NULL;
+ gint unread_count, i, toplen = top ? strlen (top) : 0;
guint32 folder_flags = 0;
gboolean recursive, subscribed, subscription_list;
- int mode = -1;
- char *full_path;
+ gint mode = -1;
+ gchar *full_path;
recursive = (store_flags & CAMEL_STUB_STORE_FOLDER_INFO_RECURSIVE);
subscribed = (store_flags & CAMEL_STUB_STORE_FOLDER_INFO_SUBSCRIBED);
@@ -2912,8 +2912,8 @@ get_folder_info_data (MailStub *stub, const char *top, guint32 store_flags,
d(g_print ("folder flags is : %d\n", folder_flags));
- g_ptr_array_add (*names, (char *)name);
- g_ptr_array_add (*uris, (char *)uri);
+ g_ptr_array_add (*names, (gchar *)name);
+ g_ptr_array_add (*uris, (gchar *)uri);
g_array_append_val (*unread, unread_count);
g_array_append_val (*flags, folder_flags);
}
@@ -2923,7 +2923,7 @@ get_folder_info_data (MailStub *stub, const char *top, guint32 store_flags,
}
static void
-get_folder_info (MailStub *stub, const char *top, guint32 store_flags)
+get_folder_info (MailStub *stub, const gchar *top, guint32 store_flags)
{
MailStubExchange *mse = MAIL_STUB_EXCHANGE (stub);
GPtrArray *names, *uris;
@@ -2957,15 +2957,15 @@ get_folder_info (MailStub *stub, const char *top, guint32 store_flags)
}
static void
-send_message (MailStub *stub, const char *from, GPtrArray *recipients,
- const char *body, int length)
+send_message (MailStub *stub, const gchar *from, GPtrArray *recipients,
+ const gchar *body, gint length)
{
MailStubExchange *mse = MAIL_STUB_EXCHANGE (stub);
SoupMessage *msg;
E2kHTTPStatus status;
- char *timestamp, *errmsg;
+ gchar *timestamp, *errmsg;
GString *data;
- int i;
+ gint i;
if (!mse->mail_submission_uri) {
mail_stub_return_error (stub, _("No mail submission URI for this mailbox"));
@@ -2976,7 +2976,7 @@ send_message (MailStub *stub, const char *from, GPtrArray *recipients,
g_string_append_printf (data, "MAIL FROM:<%s>\r\n", from);
for (i = 0; i < recipients->len; i++) {
g_string_append_printf (data, "RCPT TO:<%s>\r\n",
- (char *)recipients->pdata[i]);
+ (gchar *)recipients->pdata[i]);
}
g_string_append (data, "\r\n");
@@ -3025,12 +3025,12 @@ send_message (MailStub *stub, const char *from, GPtrArray *recipients,
}
static void
-create_folder (MailStub *stub, const char *parent_name, const char *folder_name)
+create_folder (MailStub *stub, const gchar *parent_name, const gchar *folder_name)
{
MailStubExchange *mse = MAIL_STUB_EXCHANGE (stub);
ExchangeAccountFolderResult result;
EFolder *folder;
- char *path;
+ gchar *path;
path = g_build_filename ("/", parent_name, folder_name, NULL);
result = exchange_account_create_folder (mse->account, path, "mail");
@@ -3064,12 +3064,12 @@ create_folder (MailStub *stub, const char *parent_name, const char *folder_name)
}
static void
-delete_folder (MailStub *stub, const char *folder_name)
+delete_folder (MailStub *stub, const gchar *folder_name)
{
MailStubExchange *mse = MAIL_STUB_EXCHANGE (stub);
ExchangeAccountFolderResult result;
EFolder *folder;
- char *path;
+ gchar *path;
path = g_build_filename ("/", folder_name, NULL);
folder = exchange_account_get_folder (mse->account, path);
@@ -3107,19 +3107,19 @@ delete_folder (MailStub *stub, const char *folder_name)
}
static void
-rename_folder (MailStub *stub, const char *old_name, const char *new_name)
+rename_folder (MailStub *stub, const gchar *old_name, const gchar *new_name)
{
MailStubExchange *mse = MAIL_STUB_EXCHANGE (stub);
MailStubExchangeFolder *mfld;
ExchangeAccountFolderResult result;
EFolder *folder;
- char *old_path, *new_path;
+ gchar *old_path, *new_path;
GPtrArray *names, *uris;
GArray *unread, *flags;
- int i = 0, j = 0, mode;
- char **folder_name;
- const char *uri;
- char *new_name_mod, *old_name_remove, *uri_unescaped, *old_name_mod = NULL;
+ gint i = 0, j = 0, mode;
+ gchar **folder_name;
+ const gchar *uri;
+ gchar *new_name_mod, *old_name_remove, *uri_unescaped, *old_name_mod = NULL;
old_path = g_build_filename ("/", old_name, NULL);
folder = exchange_account_get_folder (mse->account, old_path);
@@ -3149,7 +3149,7 @@ rename_folder (MailStub *stub, const char *old_name, const char *new_name)
mfld->name = e_folder_exchange_get_path (folder) + 1;
g_hash_table_steal (mse->folders_by_name, old_name);
- g_hash_table_insert (mse->folders_by_name, (char *)mfld->name, mfld);
+ g_hash_table_insert (mse->folders_by_name, (gchar *)mfld->name, mfld);
get_folder_info_data (stub, new_name, CAMEL_STUB_STORE_FOLDER_INFO_SUBSCRIBED,
&names, &uris, &unread, &flags);
@@ -3215,7 +3215,7 @@ rename_folder (MailStub *stub, const char *old_name, const char *new_name)
mfld->name = e_folder_exchange_get_path (folder) + 1;
g_hash_table_steal (mse->folders_by_name, old_name_remove);
- g_hash_table_insert (mse->folders_by_name, (char *)mfld->name, mfld);
+ g_hash_table_insert (mse->folders_by_name, (gchar *)mfld->name, mfld);
g_hash_table_remove_all (mfld->messages_by_href);
@@ -3271,12 +3271,12 @@ cont_free: g_free (new_name_mod);
}
static void
-subscribe_folder (MailStub *stub, const char *folder_name)
+subscribe_folder (MailStub *stub, const gchar *folder_name)
{
MailStubExchange *mse = MAIL_STUB_EXCHANGE (stub);
ExchangeAccountFolderResult result;
EFolder *folder;
- char *path;
+ gchar *path;
path = g_build_filename ("/", folder_name, NULL);
folder = exchange_account_get_folder (mse->account, path);
@@ -3323,12 +3323,12 @@ subscribe_folder (MailStub *stub, const char *folder_name)
}
static void
-unsubscribe_folder (MailStub *stub, const char *folder_name)
+unsubscribe_folder (MailStub *stub, const gchar *folder_name)
{
MailStubExchange *mse = MAIL_STUB_EXCHANGE (stub);
ExchangeAccountFolderResult result;
EFolder *folder;
- char *path, *pub_name;
+ gchar *path, *pub_name;
d(printf ("unsubscribe folder : %s\n", folder_name));
path = g_build_filename ("/", folder_name, NULL);
@@ -3390,11 +3390,11 @@ unsubscribe_folder (MailStub *stub, const char *folder_name)
}
static void
-is_subscribed_folder (MailStub *stub, const char *folder_name)
+is_subscribed_folder (MailStub *stub, const gchar *folder_name)
{
MailStubExchange *mse = MAIL_STUB_EXCHANGE (stub);
EFolder *folder;
- char *path;
+ gchar *path;
guint32 is_subscribed = 0;
path = g_build_filename ("/", folder_name, NULL);
@@ -3422,15 +3422,15 @@ is_subscribed_folder (MailStub *stub, const char *folder_name)
}
static void
-stub_connect (MailStub *stub, char *pwd)
+stub_connect (MailStub *stub, gchar *pwd)
{
MailStubExchange *mse = MAIL_STUB_EXCHANGE (stub);
ExchangeAccount *account;
ExchangeAccountResult result;
E2kContext *ctx;
guint32 retval = 1;
- const char *uri;
- int mode;
+ const gchar *uri;
+ gint mode;
exchange_component_is_offline (global_exchange_component, &mode);
@@ -3485,7 +3485,7 @@ linestatus_listener (ExchangeComponent *component,
{
MailStubExchange *mse = MAIL_STUB_EXCHANGE (data);
ExchangeAccount *account = mse->account;
- const char *uri;
+ const gchar *uri;
if (linestatus == ONLINE_MODE && mse->ctx == NULL) {
mse->ctx = exchange_account_get_context (account);
@@ -3545,7 +3545,7 @@ folder_update_linestatus (gpointer key, gpointer value, gpointer data)
* Return value: the new stub
**/
MailStub *
-mail_stub_exchange_new (ExchangeAccount *account, int cmd_fd, int status_fd)
+mail_stub_exchange_new (ExchangeAccount *account, gint cmd_fd, gint status_fd)
{
MailStubExchange *mse;
MailStub *stub;
diff --git a/mail/mail-stub-exchange.h b/mail/mail-stub-exchange.h
index c53a8ab..2267619 100644
--- a/mail/mail-stub-exchange.h
+++ b/mail/mail-stub-exchange.h
@@ -27,11 +27,11 @@ struct _MailStubExchange {
ExchangeAccount *account;
E2kContext *ctx;
GHashTable *folders_by_name;
- const char *mail_submission_uri;
+ const gchar *mail_submission_uri;
EFolder *inbox, *deleted_items, *sent_items;
guint new_folder_id, removed_folder_id;
- const char *ignore_new_folder, *ignore_removed_folder;
+ const gchar *ignore_new_folder, *ignore_removed_folder;
};
struct _MailStubExchangeClass {
@@ -43,7 +43,7 @@ GType mail_stub_exchange_get_type (void);
gboolean mail_stub_exchange_construct (MailStubExchange *exchange);
MailStub *mail_stub_exchange_new (ExchangeAccount *account,
- int cmd_fd, int status_fd);
+ gint cmd_fd, gint status_fd);
#ifdef __cplusplus
}
diff --git a/mail/mail-stub-listener.c b/mail/mail-stub-listener.c
index daa7317..048f501 100644
--- a/mail/mail-stub-listener.c
+++ b/mail/mail-stub-listener.c
@@ -93,7 +93,7 @@ static gboolean
new_connection (GIOChannel *source, GIOCondition condition, gpointer data)
{
MailStubListener *listener = data;
- int fd;
+ gint fd;
fd = accept (g_io_channel_unix_get_fd (source), NULL, NULL);
if (fd == -1)
@@ -112,16 +112,16 @@ new_connection (GIOChannel *source, GIOCondition condition, gpointer data)
}
gboolean
-mail_stub_listener_construct (MailStubListener *listener, const char *socket_path)
+mail_stub_listener_construct (MailStubListener *listener, const gchar *socket_path)
{
#ifndef G_OS_WIN32
struct sockaddr_un sa_un;
#else
struct sockaddr_in sa_in;
- int addr_len;
+ gint addr_len;
GError *error = NULL;
#endif
- int fd;
+ gint fd;
#ifndef G_OS_WIN32
g_return_val_if_fail (strlen (socket_path) < sizeof (sa_un.sun_path), FALSE);
@@ -177,7 +177,7 @@ mail_stub_listener_construct (MailStubListener *listener, const char *socket_pat
printf ("listening on port %d\n", ntohs(sa_in.sin_port));
- if (!g_file_set_contents (socket_path, (char *) &sa_in, addr_len, &error)) {
+ if (!g_file_set_contents (socket_path, (gchar *) &sa_in, addr_len, &error)) {
g_warning ("Could not save socket address in '%s': %s",
socket_path, error->message);
g_error_free (error);
@@ -204,7 +204,7 @@ mail_stub_listener_construct (MailStubListener *listener, const char *socket_pat
* Return value: the new #MailStubListener.
**/
MailStubListener *
-mail_stub_listener_new (const char *socket_path)
+mail_stub_listener_new (const gchar *socket_path)
{
MailStubListener *listener;
diff --git a/mail/mail-stub-listener.h b/mail/mail-stub-listener.h
index 6cf1c1f..7054b3b 100644
--- a/mail/mail-stub-listener.h
+++ b/mail/mail-stub-listener.h
@@ -24,10 +24,10 @@ struct _MailStubListener {
GObject parent;
gpointer stub;
- char *socket_path;
+ gchar *socket_path;
GIOChannel *channel;
- int cmd_fd;
+ gint cmd_fd;
};
struct _MailStubListenerClass {
@@ -39,9 +39,9 @@ struct _MailStubListenerClass {
GType mail_stub_listener_get_type (void);
gboolean mail_stub_listener_construct (MailStubListener *stub,
- const char *socket_path);
+ const gchar *socket_path);
-MailStubListener *mail_stub_listener_new (const char *socket_path);
+MailStubListener *mail_stub_listener_new (const gchar *socket_path);
#ifdef __cplusplus
}
diff --git a/mail/mail-stub.c b/mail/mail-stub.c
index fba8cc0..d4fb712 100644
--- a/mail/mail-stub.c
+++ b/mail/mail-stub.c
@@ -70,7 +70,7 @@ E2K_MAKE_TYPE (mail_stub, MailStub, class_init, NULL, PARENT_TYPE)
static void
free_string_array (GPtrArray *strings)
{
- int i;
+ gint i;
for (i = 0; i < strings->len; i++)
g_free (strings->pdata[i]);
@@ -92,7 +92,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
switch (command) {
case CAMEL_STUB_CMD_CONNECT:
{
- char *pwd
+ gchar *pwd
d(printf("CONNECT\n"));
g_object_ref (stub);
if (!mail_stub_read_args (stub,
@@ -106,7 +106,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
case CAMEL_STUB_CMD_GET_FOLDER:
{
- char *folder_name;
+ gchar *folder_name;
GPtrArray *uids;
GByteArray *flags;
GPtrArray *hrefs;
@@ -142,7 +142,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
case CAMEL_STUB_CMD_SYNC_FOLDER:
{
- char *folder_name;
+ gchar *folder_name;
if (!mail_stub_read_args (stub,
CAMEL_STUB_ARG_FOLDER, &folder_name,
@@ -157,7 +157,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
case CAMEL_STUB_CMD_REFRESH_FOLDER:
{
- char *folder_name;
+ gchar *folder_name;
if (!mail_stub_read_args (stub,
CAMEL_STUB_ARG_FOLDER, &folder_name,
@@ -172,7 +172,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
case CAMEL_STUB_CMD_SYNC_COUNT:
{
- char *folder_name;
+ gchar *folder_name;
if (!mail_stub_read_args (stub,
CAMEL_STUB_ARG_FOLDER, &folder_name,
@@ -187,7 +187,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
case CAMEL_STUB_CMD_EXPUNGE_UIDS:
{
- char *folder_name;
+ gchar *folder_name;
GPtrArray *uids;
if (!mail_stub_read_args (stub,
@@ -205,7 +205,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
case CAMEL_STUB_CMD_APPEND_MESSAGE:
{
- char *folder_name, *subject;
+ gchar *folder_name, *subject;
guint32 flags;
GByteArray *body;
@@ -219,7 +219,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
d(printf("APPEND_MESSAGE %s %lu %s\n", folder_name,
(gulong)flags, subject));
g_object_ref (stub);
- MS_CLASS (stub)->append_message (stub, folder_name, flags, subject, (char *) body->data, body->len);
+ MS_CLASS (stub)->append_message (stub, folder_name, flags, subject, (gchar *) body->data, body->len);
g_free (folder_name);
g_free (subject);
g_byte_array_free (body, TRUE);
@@ -228,7 +228,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
case CAMEL_STUB_CMD_SET_MESSAGE_FLAGS:
{
- char *folder_name, *uid;
+ gchar *folder_name, *uid;
guint32 flags, mask;
if (!mail_stub_read_args (stub,
@@ -249,7 +249,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
case CAMEL_STUB_CMD_SET_MESSAGE_TAG:
{
- char *folder_name, *uid, *name, *value;
+ gchar *folder_name, *uid, *name, *value;
if (!mail_stub_read_args (stub,
CAMEL_STUB_ARG_FOLDER, &folder_name,
@@ -272,7 +272,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
case CAMEL_STUB_CMD_GET_MESSAGE:
{
- char *folder_name, *uid;
+ gchar *folder_name, *uid;
if (!mail_stub_read_args (stub,
CAMEL_STUB_ARG_FOLDER, &folder_name,
@@ -289,7 +289,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
case CAMEL_STUB_CMD_SEARCH_FOLDER:
{
- char *folder_name, *text;
+ gchar *folder_name, *text;
if (!mail_stub_read_args (stub,
CAMEL_STUB_ARG_FOLDER, &folder_name,
@@ -306,7 +306,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
case CAMEL_STUB_CMD_TRANSFER_MESSAGES:
{
- char *source_name, *dest_name;
+ gchar *source_name, *dest_name;
guint32 delete_originals;
GPtrArray *uids;
@@ -331,7 +331,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
case CAMEL_STUB_CMD_GET_FOLDER_INFO:
{
- char *top;
+ gchar *top;
guint32 store_flags;
if (!mail_stub_read_args (stub,
@@ -348,7 +348,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
case CAMEL_STUB_CMD_SEND_MESSAGE:
{
- char *from;
+ gchar *from;
GPtrArray *recips;
GByteArray *body;
@@ -362,7 +362,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
from, recips->len));
g_object_ref (stub);
MS_CLASS (stub)->send_message (stub, from, recips,
- (char *) body->data, body->len);
+ (gchar *) body->data, body->len);
g_free (from);
free_string_array (recips);
g_byte_array_free (body, TRUE);
@@ -371,7 +371,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
case CAMEL_STUB_CMD_CREATE_FOLDER:
{
- char *parent_name, *folder_name;
+ gchar *parent_name, *folder_name;
if (!mail_stub_read_args (stub,
CAMEL_STUB_ARG_FOLDER, &parent_name,
@@ -389,7 +389,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
case CAMEL_STUB_CMD_DELETE_FOLDER:
{
- char *folder_name;
+ gchar *folder_name;
if (!mail_stub_read_args (stub,
CAMEL_STUB_ARG_FOLDER, &folder_name,
@@ -404,7 +404,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
case CAMEL_STUB_CMD_RENAME_FOLDER:
{
- char *old_name, *new_name;
+ gchar *old_name, *new_name;
if (!mail_stub_read_args (stub,
CAMEL_STUB_ARG_FOLDER, &old_name,
@@ -421,7 +421,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
case CAMEL_STUB_CMD_SUBSCRIBE_FOLDER:
{
- char *folder_name;
+ gchar *folder_name;
if (!mail_stub_read_args (stub,
CAMEL_STUB_ARG_FOLDER, &folder_name,
@@ -436,7 +436,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
case CAMEL_STUB_CMD_UNSUBSCRIBE_FOLDER:
{
- char *folder_name;
+ gchar *folder_name;
if (!mail_stub_read_args (stub,
CAMEL_STUB_ARG_FOLDER, &folder_name,
@@ -451,7 +451,7 @@ connection_handler (GIOChannel *source, GIOCondition condition, gpointer data)
case CAMEL_STUB_CMD_IS_SUBSCRIBED_FOLDER:
{
- char *folder_name;
+ gchar *folder_name;
if (!mail_stub_read_args (stub,
CAMEL_STUB_ARG_FOLDER, &folder_name,
@@ -494,7 +494,7 @@ mail_stub_read_args (MailStub *stub, ...)
{
va_list ap;
CamelStubArgType argtype;
- int status;
+ gint status;
va_start (ap, stub);
@@ -516,7 +516,7 @@ mail_stub_read_args (MailStub *stub, ...)
case CAMEL_STUB_ARG_STRING:
{
- char **buf = va_arg (ap, char **);
+ gchar **buf = va_arg (ap, gchar **);
status = camel_stub_marshal_decode_string (stub->cmd, buf);
break;
@@ -524,7 +524,7 @@ mail_stub_read_args (MailStub *stub, ...)
case CAMEL_STUB_ARG_FOLDER:
{
- char **buf = va_arg (ap, char **);
+ gchar **buf = va_arg (ap, gchar **);
status = camel_stub_marshal_decode_folder (stub->cmd, buf);
break;
@@ -542,8 +542,8 @@ mail_stub_read_args (MailStub *stub, ...)
{
GPtrArray **arr = va_arg (ap, GPtrArray **);
guint32 len;
- char *string;
- int i;
+ gchar *string;
+ gint i;
status = camel_stub_marshal_decode_uint32 (stub->cmd, &len);
if (status == -1)
@@ -638,7 +638,7 @@ mail_stub_return_data (MailStub *stub, CamelStubRetval retval, ...)
case CAMEL_STUB_ARG_STRING:
{
- char *string = va_arg (ap, char *);
+ gchar *string = va_arg (ap, gchar *);
camel_stub_marshal_encode_string (marshal, string);
break;
@@ -646,7 +646,7 @@ mail_stub_return_data (MailStub *stub, CamelStubRetval retval, ...)
case CAMEL_STUB_ARG_FOLDER:
{
- char *name = va_arg (ap, char *);
+ gchar *name = va_arg (ap, gchar *);
camel_stub_marshal_encode_folder (marshal, name);
break;
@@ -654,8 +654,8 @@ mail_stub_return_data (MailStub *stub, CamelStubRetval retval, ...)
case CAMEL_STUB_ARG_BYTEARRAY:
{
- char *data = va_arg (ap, char *);
- int len = va_arg (ap, int);
+ gchar *data = va_arg (ap, gchar *);
+ gint len = va_arg (ap, int);
GByteArray ba;
ba.data = (guint8 *) data;
@@ -667,7 +667,7 @@ mail_stub_return_data (MailStub *stub, CamelStubRetval retval, ...)
case CAMEL_STUB_ARG_STRINGARRAY:
{
GPtrArray *arr = va_arg (ap, GPtrArray *);
- int i;
+ gint i;
camel_stub_marshal_encode_uint32 (marshal, arr->len);
for (i = 0; i < arr->len; i++)
@@ -678,7 +678,7 @@ mail_stub_return_data (MailStub *stub, CamelStubRetval retval, ...)
case CAMEL_STUB_ARG_UINT32ARRAY:
{
GArray *arr = va_arg (ap, GArray *);
- int i;
+ gint i;
camel_stub_marshal_encode_uint32 (marshal, arr->len);
for (i = 0; i < arr->len; i++)
@@ -702,7 +702,7 @@ mail_stub_return_data (MailStub *stub, CamelStubRetval retval, ...)
* Sends progress data on the current operation.
**/
void
-mail_stub_return_progress (MailStub *stub, int percent)
+mail_stub_return_progress (MailStub *stub, gint percent)
{
d(printf(" %d%%", percent));
camel_stub_marshal_encode_uint32 (stub->cmd, CAMEL_STUB_RETVAL_PROGRESS);
@@ -744,7 +744,7 @@ mail_stub_return_ok (MailStub *stub)
* callers should not assume it is still valid after the call.
**/
void
-mail_stub_return_error (MailStub *stub, const char *message)
+mail_stub_return_error (MailStub *stub, const gchar *message)
{
d(printf(" Error: %s\n", message));
camel_stub_marshal_flush (stub->status);
@@ -777,7 +777,7 @@ mail_stub_push_changes (MailStub *stub)
* Initializes @stub with @cmd_fd and @status_fd.
**/
void
-mail_stub_construct (MailStub *stub, int cmd_fd, int status_fd)
+mail_stub_construct (MailStub *stub, gint cmd_fd, gint status_fd)
{
#ifndef G_OS_WIN32
stub->channel = g_io_channel_unix_new (cmd_fd);
diff --git a/mail/mail-stub.h b/mail/mail-stub.h
index d994a41..2cb7178 100644
--- a/mail/mail-stub.h
+++ b/mail/mail-stub.h
@@ -34,52 +34,52 @@ struct _MailStubClass {
GObjectClass parent_class;
/* methods */
- void (*connect) (MailStub *, char *pwd);
- void (*get_folder) (MailStub *, const char *name,
+ void (*connect) (MailStub *, gchar *pwd);
+ void (*get_folder) (MailStub *, const gchar *name,
gboolean create, GPtrArray *uids,
GByteArray *flags, GPtrArray *hrefs,
guint32 high_article_num);
void (*get_trash_name) (MailStub *);
- void (*sync_folder) (MailStub *, const char *folder_name);
- void (*refresh_folder) (MailStub *, const char *folder_name);
- void (*sync_count) (MailStub *, const char *folder_name);
- void (*expunge_uids) (MailStub *, const char *folder_name,
+ void (*sync_folder) (MailStub *, const gchar *folder_name);
+ void (*refresh_folder) (MailStub *, const gchar *folder_name);
+ void (*sync_count) (MailStub *, const gchar *folder_name);
+ void (*expunge_uids) (MailStub *, const gchar *folder_name,
GPtrArray *uids);
- void (*append_message) (MailStub *, const char *folder_name,
- guint32 flags, const char *subject,
- const char *data, int length);
- void (*set_message_flags) (MailStub *, const char *folder_name,
- const char *uid,
+ void (*append_message) (MailStub *, const gchar *folder_name,
+ guint32 flags, const gchar *subject,
+ const gchar *data, gint length);
+ void (*set_message_flags) (MailStub *, const gchar *folder_name,
+ const gchar *uid,
guint32 flags, guint32 mask);
- void (*set_message_tag) (MailStub *, const char *folder_name,
- const char *uid,
- const char *name, const char *value);
- void (*get_message) (MailStub *, const char *folder_name,
- const char *uid);
- void (*search) (MailStub *, const char *folder_name,
- const char *text);
- void (*transfer_messages) (MailStub *, const char *source_name,
- const char *dest_name, GPtrArray *uids,
+ void (*set_message_tag) (MailStub *, const gchar *folder_name,
+ const gchar *uid,
+ const gchar *name, const gchar *value);
+ void (*get_message) (MailStub *, const gchar *folder_name,
+ const gchar *uid);
+ void (*search) (MailStub *, const gchar *folder_name,
+ const gchar *text);
+ void (*transfer_messages) (MailStub *, const gchar *source_name,
+ const gchar *dest_name, GPtrArray *uids,
gboolean delete_originals);
- void (*get_folder_info) (MailStub *, const char *top,
+ void (*get_folder_info) (MailStub *, const gchar *top,
guint32 store_flags);
- void (*send_message) (MailStub *, const char *from,
+ void (*send_message) (MailStub *, const gchar *from,
GPtrArray *recipients,
- const char *data, int length);
- void (*create_folder) (MailStub *, const char *parent_name,
- const char *folder_name);
- void (*delete_folder) (MailStub *, const char *folder_name);
- void (*rename_folder) (MailStub *, const char *old_name,
- const char *new_name);
- void (*subscribe_folder) (MailStub *, const char *folder_name);
- void (*unsubscribe_folder) (MailStub *, const char *folder_name);
- void (*is_subscribed_folder) (MailStub *, const char *folder_name);
+ const gchar *data, gint length);
+ void (*create_folder) (MailStub *, const gchar *parent_name,
+ const gchar *folder_name);
+ void (*delete_folder) (MailStub *, const gchar *folder_name);
+ void (*rename_folder) (MailStub *, const gchar *old_name,
+ const gchar *new_name);
+ void (*subscribe_folder) (MailStub *, const gchar *folder_name);
+ void (*unsubscribe_folder) (MailStub *, const gchar *folder_name);
+ void (*is_subscribed_folder) (MailStub *, const gchar *folder_name);
};
GType mail_stub_get_type (void);
void mail_stub_construct (MailStub *stub,
- int cmd_fd,
- int status_fd);
+ gint cmd_fd,
+ gint status_fd);
gboolean mail_stub_read_args (MailStub *stub,
...);
@@ -88,10 +88,10 @@ void mail_stub_return_data (MailStub *stub,
CamelStubRetval retval,
...);
void mail_stub_return_progress (MailStub *stub,
- int percent);
+ gint percent);
void mail_stub_return_ok (MailStub *stub);
void mail_stub_return_error (MailStub *stub,
- const char *message);
+ const gchar *message);
void mail_stub_push_changes (MailStub *stub);
diff --git a/mail/mail-utils.c b/mail/mail-utils.c
index d9be543..64453c3 100644
--- a/mail/mail-utils.c
+++ b/mail/mail-utils.c
@@ -46,11 +46,11 @@
* Return value: the headers, which must be free when you are done
* with them.
**/
-char *
+gchar *
mail_util_mapi_to_smtp_headers (E2kProperties *props)
{
GString *headers;
- char *prop, *buf;
+ gchar *prop, *buf;
time_t dt;
headers = g_string_new (NULL);
@@ -115,9 +115,9 @@ mail_util_mapi_to_smtp_headers (E2kProperties *props)
guint32
mail_util_props_to_camel_flags (E2kProperties *props, gboolean obey_read_flag)
{
- const char *prop;
+ const gchar *prop;
guint32 flags;
- int val;
+ gint val;
flags = 0;
@@ -166,11 +166,11 @@ mail_util_props_to_camel_flags (E2kProperties *props, gboolean obey_read_flag)
* found or was malformed. You must free the return value when you
* are done with it.
**/
-char *
+gchar *
mail_util_extract_transport_headers (E2kProperties *props)
{
- const char *prop, *hstart, *hend, *ctstart, *ctend;
- char *headers;
+ const gchar *prop, *hstart, *hend, *ctstart, *ctend;
+ gchar *headers;
prop = e2k_properties_get_prop (props, PR_TRANSPORT_MESSAGE_HEADERS);
if (!prop)
@@ -218,10 +218,10 @@ mail_util_extract_transport_headers (E2kProperties *props)
}
-static const char *note_colors[] = {
+static const gchar *note_colors[] = {
"#CCCCFF", "#CCFFCC", "#FFCCCC", "#FFFFCC", "#FFFFFF"
};
-static const int ncolors = sizeof (note_colors) / sizeof (note_colors[0]);
+static const gint ncolors = sizeof (note_colors) / sizeof (note_colors[0]);
#define DEFAULT_NOTE_COLOR 3
/**
@@ -237,10 +237,10 @@ static const int ncolors = sizeof (note_colors) / sizeof (note_colors[0]);
GString *
mail_util_stickynote_to_rfc822 (E2kProperties *props)
{
- const char *prop;
+ const gchar *prop;
GString *message;
- char *html, *p;
- int color;
+ gchar *html, *p;
+ gint color;
message = g_string_new (NULL);
prop = e2k_properties_get_prop (props, E2K_PR_MAILHEADER_SUBJECT);
@@ -249,7 +249,7 @@ mail_util_stickynote_to_rfc822 (E2kProperties *props)
prop = e2k_properties_get_prop (props, E2K_PR_DAV_LAST_MODIFIED);
if (prop) {
time_t dt;
- char *buf;
+ gchar *buf;
dt = e2k_parse_timestamp (prop);
buf = e2k_make_timestamp_rfc822 (dt);
@@ -312,17 +312,17 @@ mail_util_stickynote_to_rfc822 (E2kProperties *props)
**/
gboolean
mail_util_demangle_meeting_related_message (GString *body,
- const char *owner_cn,
- const char *owner_email,
- const char *owner_cal_uri,
- const char *subscriber_email,
+ const gchar *owner_cn,
+ const gchar *owner_email,
+ const gchar *owner_cal_uri,
+ const gchar *subscriber_email,
MailUtilDemangleType unmangle_type)
{
icalcomponent *vcal_comp, *event_comp;
icalproperty *prop = NULL;
- char *vstart, *vend;
- char *ical_str, *str;
- int oldlen, newlen;
+ gchar *vstart, *vend;
+ gchar *ical_str, *str;
+ gint oldlen, newlen;
gboolean modify_prop = FALSE;
vstart = strstr (body->str, "BEGIN:VCALENDAR");
@@ -349,8 +349,8 @@ mail_util_demangle_meeting_related_message (GString *body,
for (prop = icalcomponent_get_first_property (event_comp, ICAL_ATTENDEE_PROPERTY);
prop != NULL;
prop = icalcomponent_get_next_property (event_comp, ICAL_ATTENDEE_PROPERTY)) {
- const char *attendee;
- char *text = NULL;
+ const gchar *attendee;
+ gchar *text = NULL;
attendee = icalproperty_get_value_as_string_r (prop);
if (!attendee)
@@ -376,8 +376,8 @@ mail_util_demangle_meeting_related_message (GString *body,
prop = icalcomponent_get_first_property (event_comp, ICAL_ORGANIZER_PROPERTY);
if (!modify_prop && prop) {
- const char *organizer;
- char *text = NULL;
+ const gchar *organizer;
+ gchar *text = NULL;
organizer = icalproperty_get_value_as_string_r (prop);
if (organizer) {
diff --git a/mail/mail-utils.h b/mail/mail-utils.h
index 32d03e4..92b9604 100644
--- a/mail/mail-utils.h
+++ b/mail/mail-utils.h
@@ -17,21 +17,21 @@ typedef enum {
MAIL_UTIL_DEMANGLE_SENDER_FIELD
} MailUtilDemangleType;
-char *mail_util_mapi_to_smtp_headers (E2kProperties *props);
+gchar *mail_util_mapi_to_smtp_headers (E2kProperties *props);
GString *mail_util_stickynote_to_rfc822 (E2kProperties *props);
guint32 mail_util_props_to_camel_flags (E2kProperties *props,
gboolean obey_read_flag);
-char * mail_util_extract_transport_headers (E2kProperties *props);
+gchar * mail_util_extract_transport_headers (E2kProperties *props);
gboolean
mail_util_demangle_meeting_related_message (GString *body,
- const char *owner_cn,
- const char *owner_email,
- const char *owner_cal_uri,
- const char *subscriber_email,
+ const gchar *owner_cn,
+ const gchar *owner_email,
+ const gchar *owner_cal_uri,
+ const gchar *subscriber_email,
MailUtilDemangleType unmangle_type);
#ifdef __cplusplus
diff --git a/storage/exchange-autoconfig-wizard.c b/storage/exchange-autoconfig-wizard.c
index 3015661..96c4ea2 100644
--- a/storage/exchange-autoconfig-wizard.c
+++ b/storage/exchange-autoconfig-wizard.c
@@ -95,7 +95,7 @@ static void verify_page_changed (GtkEntry *entry, ExchangeAutoconfigGUI *gui);
static void
-autoconfig_gui_set_page (ExchangeAutoconfigGUI *gui, int page)
+autoconfig_gui_set_page (ExchangeAutoconfigGUI *gui, gint page)
{
gnome_druid_set_page (gui->druid, gui->pages->pdata[page]);
}
@@ -120,7 +120,7 @@ static ExchangeAutoconfigGUI *
autoconfig_gui_new (void)
{
ExchangeAutoconfigGUI *gui;
- char *gladefile;
+ gchar *gladefile;
gui = g_new0 (ExchangeAutoconfigGUI, 1);
@@ -186,7 +186,7 @@ static gboolean
owa_page_next (ExchangeAutoconfigGUI *gui)
{
E2kAutoconfigResult result;
- const char *old, *new;
+ const gchar *old, *new;
e2k_autoconfig_set_owa_uri (gui->ac, gtk_entry_get_text (gui->owa_uri_entry));
e2k_autoconfig_set_username (gui->ac, gtk_entry_get_text (gui->username_entry));
@@ -421,7 +421,7 @@ verify_page_next (ExchangeAutoconfigGUI *gui)
static gboolean
verify_page_check (ExchangeAutoconfigGUI *gui)
{
- const char *email;
+ const gchar *email;
email = gtk_entry_get_text (gui->email_entry);
@@ -451,7 +451,7 @@ autoconfig_gui_apply (ExchangeAutoconfigGUI *gui)
EAccount *account;
EIterator *iter;
GConfClient *gconf;
- char *pw_key;
+ gchar *pw_key;
gboolean found = FALSE;
/* Create the account. */
@@ -527,7 +527,7 @@ autoconfig_gui_free (ExchangeAutoconfigGUI *gui)
}
static struct {
- const char *page_name, *body_name;
+ const gchar *page_name, *body_name;
void (*prepare_func) (ExchangeAutoconfigGUI *gui);
gboolean (*back_func) (ExchangeAutoconfigGUI *gui);
gboolean (*next_func) (ExchangeAutoconfigGUI *gui);
@@ -541,14 +541,14 @@ static struct {
{ "verify_page", "verify_page_vbox", verify_page_prepare,
verify_page_back, verify_page_next }
};
-static const int num_autoconfig_pages = sizeof (autoconfig_pages) / sizeof (autoconfig_pages[0]);
+static const gint num_autoconfig_pages = sizeof (autoconfig_pages) / sizeof (autoconfig_pages[0]);
/* Autoconfig druid */
static int
find_page (ExchangeAutoconfigGUI *gui, gpointer page)
{
- int page_num;
+ gint page_num;
for (page_num = 0; page_num < gui->pages->len; page_num++) {
if (gui->pages->pdata[page_num] == (gpointer)page)
@@ -562,7 +562,7 @@ static gboolean
druid_next_cb (GnomeDruidPage *page, GtkWidget *druid,
ExchangeAutoconfigGUI *gui)
{
- int page_num = find_page (gui, page);
+ gint page_num = find_page (gui, page);
if (page_num == -1 || !autoconfig_pages[page_num].next_func)
return FALSE;
@@ -574,7 +574,7 @@ static void
druid_prepare_cb (GnomeDruidPage *page, GtkWidget *druid,
ExchangeAutoconfigGUI *gui)
{
- int page_num = find_page (gui, page);
+ gint page_num = find_page (gui, page);
if (page_num == -1 || !autoconfig_pages[page_num].prepare_func)
return;
@@ -586,7 +586,7 @@ static gboolean
druid_back_cb (GnomeDruidPage *page, GtkWidget *druid,
ExchangeAutoconfigGUI *gui)
{
- int page_num = find_page (gui, page);
+ gint page_num = find_page (gui, page);
if (page_num == -1 || !autoconfig_pages[page_num].back_func)
return FALSE;
@@ -620,7 +620,7 @@ exchange_autoconfig_druid_run (void)
ExchangeAutoconfigGUI *gui;
GtkWidget *page;
GdkPixbuf *icon;
- int i;
+ gint i;
gchar *pngfile;
gui = autoconfig_gui_new ();
diff --git a/storage/exchange-change-password.c b/storage/exchange-change-password.c
index 7e37f6a..f0a3989 100644
--- a/storage/exchange-change-password.c
+++ b/storage/exchange-change-password.c
@@ -48,7 +48,7 @@ entry_changed (GtkEntry *entry, gpointer user_data)
GladeXML *xml = user_data;
GtkEntry *new_entry, *confirm_entry;
GtkWidget *ok_button;
- const char *text;
+ const gchar *text;
new_entry = GTK_ENTRY (glade_xml_get_widget (xml, "new_pass_entry"));
confirm_entry = GTK_ENTRY (glade_xml_get_widget (xml, "confirm_pass_entry"));
@@ -77,15 +77,15 @@ entry_changed (GtkEntry *entry, gpointer user_data)
*
* Prompt the user for a new password.
*/
-char *
-exchange_get_new_password (const char *existing_password, gboolean voluntary)
+gchar *
+exchange_get_new_password (const gchar *existing_password, gboolean voluntary)
{
GladeXML *xml;
GtkWidget *top_widget;
GtkEntry *cur_entry, *new_entry, *confirm_entry;
GtkResponseType response;
GtkLabel *top_label;
- char *new_pass;
+ gchar *new_pass;
gchar *gladefile;
gladefile = g_build_filename (CONNECTOR_GLADEDIR,
@@ -111,7 +111,7 @@ exchange_get_new_password (const char *existing_password, gboolean voluntary)
run_dialog_again:
response = gtk_dialog_run (GTK_DIALOG (top_widget));
if (response == GTK_RESPONSE_OK) {
- const char *cur_pass, *new_pass1, *new_pass2;
+ const gchar *cur_pass, *new_pass1, *new_pass2;
cur_pass = gtk_entry_get_text (cur_entry);
new_pass1 = gtk_entry_get_text (new_entry);
diff --git a/storage/exchange-change-password.h b/storage/exchange-change-password.h
index c0aeccc..82e67f9 100644
--- a/storage/exchange-change-password.h
+++ b/storage/exchange-change-password.h
@@ -11,7 +11,7 @@ extern "C" {
#pragma }
#endif /* __cplusplus */
-char *exchange_get_new_password (const char *existing_password,
+gchar *exchange_get_new_password (const gchar *existing_password,
gboolean voluntary);
#ifdef __cplusplus
diff --git a/storage/exchange-component.c b/storage/exchange-component.c
index 855af9c..0bed49f 100644
--- a/storage/exchange-component.c
+++ b/storage/exchange-component.c
@@ -166,7 +166,7 @@ impl_upgradeFromVersion (PortableServer_Servant servant,
ExchangeComponent *component = EXCHANGE_COMPONENT (bonobo_object_from_servant (servant));
ExchangeAccount *account;
gchar *base_directory=NULL;
- char *account_filename;
+ gchar *account_filename;
d(printf("upgradeFromVersion %d %d %d\n", major, minor, revision));
@@ -317,13 +317,13 @@ exchange_component_update_accounts (ExchangeComponent *component,
}
static void
-new_connection (MailStubListener *listener, int cmd_fd, int status_fd,
+new_connection (MailStubListener *listener, gint cmd_fd, gint status_fd,
ExchangeComponentAccount *baccount)
{
MailStub *stub;
MailStubExchange *mse, *mse_prev;
ExchangeAccount *account = baccount->account;
- int mode;
+ gint mode;
g_object_ref (account);
@@ -366,7 +366,7 @@ config_listener_account_created (ExchangeConfigListener *config_listener,
ExchangeComponent *component = user_data;
ExchangeComponentPrivate *priv = component->priv;
ExchangeComponentAccount *baccount;
- char *path, *dot_exchange_username, *account_filename;
+ gchar *path, *dot_exchange_username, *account_filename;
baccount = g_new0 (ExchangeComponentAccount, 1);
baccount->account = g_object_ref (account);
@@ -494,7 +494,7 @@ exchange_component_new (void)
ExchangeAccount *
exchange_component_get_account_for_uri (ExchangeComponent *component,
- const char *uri)
+ const gchar *uri)
{
ExchangeComponentPrivate *priv = component->priv;
ExchangeComponentAccount *baccount;
@@ -522,7 +522,7 @@ exchange_component_get_account_for_uri (ExchangeComponent *component,
}
void
-exchange_component_is_offline (ExchangeComponent *component, int *state)
+exchange_component_is_offline (ExchangeComponent *component, gint *state)
{
g_return_if_fail (EXCHANGE_IS_COMPONENT (component));
diff --git a/storage/exchange-component.h b/storage/exchange-component.h
index f70e754..ba8ed83 100644
--- a/storage/exchange-component.h
+++ b/storage/exchange-component.h
@@ -46,9 +46,9 @@ GType exchange_component_get_type (void);
ExchangeComponent *exchange_component_new (void);
ExchangeAccount *exchange_component_get_account_for_uri (ExchangeComponent *component,
- const char *uri);
+ const gchar *uri);
gboolean exchange_component_is_interactive (ExchangeComponent *component);
-void exchange_component_is_offline (ExchangeComponent *component, int *state);
+void exchange_component_is_offline (ExchangeComponent *component, gint *state);
void exchange_component_set_factories (ExchangeComponent *component,
EDataCalFactory *cal_factory,
diff --git a/storage/exchange-config-listener.c b/storage/exchange-config-listener.c
index 7a8142b..ff42e31 100644
--- a/storage/exchange-config-listener.c
+++ b/storage/exchange-config-listener.c
@@ -56,16 +56,16 @@ struct _ExchangeConfigListenerPrivate {
GConfClient *gconf;
guint idle_id;
- char *configured_uri, *configured_name;
+ gchar *configured_uri, *configured_name;
EAccount *configured_account;
ExchangeAccount *exchange_account;
};
typedef struct {
- const char *name;
- const char *uri;
- int type;
+ const gchar *name;
+ const gchar *uri;
+ gint type;
}FolderInfo;
enum {
@@ -192,9 +192,9 @@ is_active_exchange_account (EAccount *account)
}
static void
-update_foreign_uri (const char *path, const char *account_uri)
+update_foreign_uri (const gchar *path, const gchar *account_uri)
{
- char *file_path, *phy_uri, *foreign_uri, *new_phy_uri;
+ gchar *file_path, *phy_uri, *foreign_uri, *new_phy_uri;
GHashTable *old_props = NULL;
xmlDoc *old_doc = NULL, *new_doc = NULL;
@@ -228,7 +228,7 @@ update_foreign_uri (const char *path, const char *account_uri)
new_phy_uri = g_strdup_printf ("exchange://%s/;%s", account_uri, foreign_uri + 1);
g_hash_table_remove (old_props, "physical_uri_prefix");
- g_hash_table_insert (old_props, (char *)g_strdup ("physical_uri_prefix"), new_phy_uri);
+ g_hash_table_insert (old_props, (gchar *)g_strdup ("physical_uri_prefix"), new_phy_uri);
new_doc = e_xml_from_hash (old_props, E_XML_HASH_TYPE_PROPERTY, "foreign-hierarchy");
e_xml_save_file (file_path, new_doc);
@@ -246,8 +246,8 @@ static void
migrate_foreign_hierarchy (ExchangeAccount *account)
{
GDir *d;
- const char *dentry;
- char *dir;
+ const gchar *dentry;
+ gchar *dir;
d = g_dir_open (account->storage_dir, 0, NULL);
if (d) {
@@ -264,11 +264,11 @@ migrate_foreign_hierarchy (ExchangeAccount *account)
}
static void
-ex_set_relative_uri (ESource *source, const char *url)
+ex_set_relative_uri (ESource *source, const gchar *url)
{
- const char *rel_uri = e_source_peek_relative_uri (source);
- char *folder_name;
- char *new_rel_uri;
+ const gchar *rel_uri = e_source_peek_relative_uri (source);
+ gchar *folder_name;
+ gchar *new_rel_uri;
if (!rel_uri)
return;
@@ -294,11 +294,11 @@ migrate_account_esource (EAccount *account,
GSList *groups;
GSList *sources;
gboolean found_group;
- const char *user_name, *authtype;
+ const gchar *user_name, *authtype;
GConfClient *client;
ESourceList *source_list = NULL;
CamelURL *camel_url;
- char *url_string;
+ gchar *url_string;
camel_url = camel_url_new (account->source->url, NULL);
if (!camel_url)
@@ -429,13 +429,13 @@ configured_account_destroyed (gpointer user_data, GObject *where_account_was)
}
static gboolean
-requires_relogin (char *current_url, char *new_url)
+requires_relogin (gchar *current_url, gchar *new_url)
{
E2kUri *current_uri, *new_uri;
- const char *current_param_val, *new_param_val;
- const char *params [] = { "owa_url", "ad_server", "use_ssl" };
- const int n_params = G_N_ELEMENTS (params);
- int i;
+ const gchar *current_param_val, *new_param_val;
+ const gchar *params [] = { "owa_url", "ad_server", "use_ssl" };
+ const gint n_params = G_N_ELEMENTS (params);
+ gint i;
gboolean relogin = FALSE;
current_uri = e2k_uri_new (current_url);
@@ -665,23 +665,23 @@ static gboolean
exchange_camel_urls_is_equal (const gchar *url1, const gchar *url2)
{
CamelURL *curl1, *curl2;
- const char *param1, *param2;
- const char *params[] = {
+ const gchar *param1, *param2;
+ const gchar *params[] = {
"auth",
"owa_url",
"owa_path",
"mailbox",
"ad_server",
};
- const int n_params = 5;
- int i;
+ const gint n_params = 5;
+ gint i;
curl1 = camel_url_new (url1, NULL);
curl2 = camel_url_new (url2, NULL);
for (i = 0; i < n_params; ++i) {
- param1 = (gchar*) camel_url_get_param (curl1, params[i]);
- param2 = (gchar*) camel_url_get_param (curl2, params[i]);
+ param1 = (gchar *) camel_url_get_param (curl1, params[i]);
+ param2 = (gchar *) camel_url_get_param (curl2, params[i]);
if ((param1 && !param2) || (!param1 && param2) || /* Missing */
(param1 && param2 && strcmp (param1, param2))) { /* Differing */
camel_url_free (curl1);
diff --git a/storage/exchange-config-listener.h b/storage/exchange-config-listener.h
index c0e0eaf..b713822 100644
--- a/storage/exchange-config-listener.h
+++ b/storage/exchange-config-listener.h
@@ -57,8 +57,8 @@ GSList *exchange_config_listener_get_accounts (ExchangeConfigLis
void exchange_config_listener_migrate_esources (ExchangeConfigListener *config_listener);
-void add_folder_esource (ExchangeAccount *account, FolderType folder_type, const char *folder_name, const char *physical_uri);
-void remove_folder_esource (ExchangeAccount *account, FolderType folder_type, const char *physical_uri);
+void add_folder_esource (ExchangeAccount *account, FolderType folder_type, const gchar *folder_name, const gchar *physical_uri);
+void remove_folder_esource (ExchangeAccount *account, FolderType folder_type, const gchar *physical_uri);
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/storage/exchange-migrate.c b/storage/exchange-migrate.c
index 2bbe30c..4bb8973 100644
--- a/storage/exchange-migrate.c
+++ b/storage/exchange-migrate.c
@@ -125,9 +125,9 @@ dialog_close ()
}
static void
-dialog_set_folder_name (const char *folder_name)
+dialog_set_folder_name (const gchar *folder_name)
{
- char *text;
+ gchar *text;
text = g_strdup_printf (_("Migrating `%s':"), folder_name);
gtk_label_set_text (label, text);
@@ -142,7 +142,7 @@ dialog_set_folder_name (const char *folder_name)
static void
dialog_set_progress (double percent)
{
- char text[5];
+ gchar text[5];
snprintf (text, sizeof (text), "%d%%", (int) (percent * 100.0f));
@@ -154,11 +154,11 @@ dialog_set_progress (double percent)
}
static gboolean
-cp (const char *src, const char *dest, gboolean show_progress)
+cp (const gchar *src, const gchar *dest, gboolean show_progress)
{
- unsigned char readbuf[65536];
+ guchar readbuf[65536];
ssize_t nread, nwritten;
- int errnosav, readfd, writefd;
+ gint errnosav, readfd, writefd;
size_t total = 0;
struct stat st;
struct utimbuf ut;
@@ -236,7 +236,7 @@ cp (const char *src, const char *dest, gboolean show_progress)
}
static gboolean
-cp_r (char *src, const char *dest)
+cp_r (gchar *src, const gchar *dest)
{
GString *srcpath, *destpath;
struct dirent *dent;
@@ -288,11 +288,11 @@ cp_r (char *src, const char *dest)
}
static gchar *
-form_dir_path (char *file_name, const char *delim)
+form_dir_path (gchar *file_name, const gchar *delim)
{
GString *path = g_string_new (NULL);
gchar *dir_path;
- char *token;
+ gchar *token;
token = strtok (file_name, delim);
while (token != NULL) {
@@ -305,12 +305,12 @@ form_dir_path (char *file_name, const char *delim)
return dir_path;
}
-static gchar*
-get_contacts_dir_from_filename(const char *migr_file)
+static gchar *
+get_contacts_dir_from_filename(const gchar *migr_file)
{
- char *file_to_be_migrated = g_strdup (migr_file);
- char *dot, *file_name;
- const char *delim = "_";
+ gchar *file_to_be_migrated = g_strdup (migr_file);
+ gchar *dot, *file_name;
+ const gchar *delim = "_";
gchar *dir_path = NULL;
dot = strchr (file_to_be_migrated, '.');
@@ -459,7 +459,7 @@ exchange_migrate (const CORBA_short major,
const CORBA_short minor,
const CORBA_short revision,
const gchar *base_dir,
- char *account_filename)
+ gchar *account_filename)
{
gboolean ret = TRUE;
struct stat st;
diff --git a/storage/exchange-migrate.h b/storage/exchange-migrate.h
index db5be76..406c455 100644
--- a/storage/exchange-migrate.h
+++ b/storage/exchange-migrate.h
@@ -6,6 +6,6 @@
#include "exchange-component.h"
-void exchange_migrate (const CORBA_short major, const CORBA_short minor, const CORBA_short revision, const gchar *base_diri, char *account_filename);
+void exchange_migrate (const CORBA_short major, const CORBA_short minor, const CORBA_short revision, const gchar *base_diri, gchar *account_filename);
#endif /* _EXCHANGE_MIGRATE_H_ */
diff --git a/storage/exchange-storage.c b/storage/exchange-storage.c
index 38570a3..d6c2f21 100644
--- a/storage/exchange-storage.c
+++ b/storage/exchange-storage.c
@@ -44,22 +44,22 @@ static EStorageClass *parent_class = NULL;
static void finalize (GObject *);
static void create_folder (EStorage *storage,
- const char *path,
- const char *type,
+ const gchar *path,
+ const gchar *type,
EStorageResultCallback callback,
gpointer user_data);
static void remove_folder (EStorage *storage,
- const char *path,
+ const gchar *path,
EStorageResultCallback callback,
gpointer user_data);
static void xfer_folder (EStorage *storage,
- const char *source_path,
- const char *destination_path,
+ const gchar *source_path,
+ const gchar *destination_path,
const gboolean remove_source,
EStorageResultCallback callback,
gpointer user_data);
static void open_folder (EStorage *storage,
- const char *path,
+ const gchar *path,
EStorageDiscoveryCallback callback,
gpointer user_data);
static gboolean will_accept_folder (EStorage *storage,
@@ -67,15 +67,15 @@ static gboolean will_accept_folder (EStorage *storage,
EFolder *source);
static void discover_shared_folder (EStorage *storage,
- const char *owner,
- const char *folder_name,
+ const gchar *owner,
+ const gchar *folder_name,
EStorageDiscoveryCallback callback,
gpointer user_data);
static void cancel_discover_shared_folder (EStorage *storage,
- const char *owner,
- const char *folder_name);
+ const gchar *owner,
+ const gchar *folder_name);
static void remove_shared_folder (EStorage *storage,
- const char *path,
+ const gchar *path,
EStorageResultCallback callback,
gpointer user_data);
@@ -127,7 +127,7 @@ static void
account_new_folder (ExchangeAccount *account, EFolder *folder,
EStorage *storage)
{
- const char *path = e_folder_exchange_get_path (folder);
+ const gchar *path = e_folder_exchange_get_path (folder);
e_storage_new_folder (storage, path, g_object_ref (folder));
if (e_folder_exchange_get_has_subfolders (folder)) {
@@ -140,7 +140,7 @@ static void
account_removed_folder (ExchangeAccount *account, EFolder *folder,
EStorage *storage)
{
- const char *path = e_folder_exchange_get_path (folder);
+ const gchar *path = e_folder_exchange_get_path (folder);
e_storage_removed_folder (storage, path);
}
@@ -168,7 +168,7 @@ account_to_storage_result (ExchangeAccountFolderResult result)
static void
create_folder (EStorage *storage,
- const char *path, const char *type,
+ const gchar *path, const gchar *type,
EStorageResultCallback callback,
gpointer user_data)
{
@@ -181,7 +181,7 @@ create_folder (EStorage *storage,
}
static void
-remove_folder (EStorage *storage, const char *path,
+remove_folder (EStorage *storage, const gchar *path,
EStorageResultCallback callback,
gpointer user_data)
{
@@ -195,7 +195,7 @@ remove_folder (EStorage *storage, const char *path,
static void
xfer_folder (EStorage *storage,
- const char *source_path, const char *dest_path,
+ const gchar *source_path, const gchar *dest_path,
const gboolean remove_source,
EStorageResultCallback callback,
gpointer user_data)
@@ -212,7 +212,7 @@ xfer_folder (EStorage *storage,
struct open_folder_data {
EStorage *storage;
- char *path;
+ gchar *path;
EStorageDiscoveryCallback callback;
gpointer user_data;
};
@@ -245,7 +245,7 @@ idle_open_folder (gpointer user_data)
}
static void
-open_folder (EStorage *storage, const char *path,
+open_folder (EStorage *storage, const gchar *path,
EStorageDiscoveryCallback callback, gpointer user_data)
{
struct open_folder_data *ofd;
@@ -280,7 +280,7 @@ will_accept_folder (EStorage *storage,
static void
discover_shared_folder (EStorage *storage,
- const char *owner, const char *folder_name,
+ const gchar *owner, const gchar *folder_name,
EStorageDiscoveryCallback callback,
gpointer user_data)
{
@@ -300,8 +300,8 @@ discover_shared_folder (EStorage *storage,
}
static void
-cancel_discover_shared_folder (EStorage *storage, const char *owner,
- const char *folder_name)
+cancel_discover_shared_folder (EStorage *storage, const gchar *owner,
+ const gchar *folder_name)
{
ExchangeStorage *exstorage = EXCHANGE_STORAGE (storage);
ExchangeAccount *account = exstorage->priv->account;
@@ -311,7 +311,7 @@ cancel_discover_shared_folder (EStorage *storage, const char *owner,
}
static void
-remove_shared_folder (EStorage *storage, const char *path,
+remove_shared_folder (EStorage *storage, const gchar *path,
EStorageResultCallback callback, gpointer user_data)
{
ExchangeStorage *exstorage = EXCHANGE_STORAGE (storage);
@@ -329,7 +329,7 @@ idle_fill_storage (gpointer user_data)
EStorage *storage = user_data;
ExchangeAccount *account = exstorage->priv->account;
GPtrArray *folders;
- int i;
+ gint i;
exstorage->priv->idle_id = 0;
diff --git a/storage/exchange-storage.h b/storage/exchange-storage.h
index 953411b..ace0fef 100644
--- a/storage/exchange-storage.h
+++ b/storage/exchange-storage.h
@@ -35,9 +35,9 @@ EStorage *exchange_storage_new (ExchangeAccount *account);
#ifdef G_OS_WIN32
-extern const char *_exchange_storage_datadir;
-extern const char *_exchange_storage_gladedir;
-extern const char *_exchange_storage_imagesdir;
+extern const gchar *_exchange_storage_datadir;
+extern const gchar *_exchange_storage_gladedir;
+extern const gchar *_exchange_storage_imagesdir;
#endif
diff --git a/storage/main.c b/storage/main.c
index c45b2cc..c26a8e6 100644
--- a/storage/main.c
+++ b/storage/main.c
@@ -67,14 +67,14 @@ static EDataBookFactory *book_factory = NULL;
ExchangeComponent *global_exchange_component;
#ifdef G_OS_WIN32
-const char *_exchange_storage_datadir;
-const char *_exchange_storage_gladedir;
-const char *_exchange_storage_imagesdir;
+const gchar *_exchange_storage_datadir;
+const gchar *_exchange_storage_gladedir;
+const gchar *_exchange_storage_imagesdir;
#endif
static BonoboObject *
exchange_component_factory (BonoboGenericFactory *factory,
- const char *component_id, void *component)
+ const gchar *component_id, gpointer component)
{
g_return_val_if_fail (strcmp (component_id, EXCHANGE_COMPONENT_IID) == 0, NULL);
@@ -103,7 +103,7 @@ last_calendar_gone_cb (EDataCalFactory *factory, gpointer data)
static gboolean
setup_calendar_factory (void)
{
- int mode;
+ gint mode;
cal_factory = e_data_cal_factory_new ();
if (!cal_factory) {
@@ -147,7 +147,7 @@ last_book_gone_cb (EDataBookFactory *factory, gpointer data)
static gboolean
setup_addressbook_factory (void)
{
- int mode;
+ gint mode;
book_factory = e_data_book_factory_new ();
if (!book_factory)
@@ -179,15 +179,15 @@ setup_addressbook_factory (void)
return TRUE;
}
-int
-main (int argc, char **argv)
+gint
+main (gint argc, gchar **argv)
{
- char *userdir, *path;
- char *config_directory;
+ gchar *userdir, *path;
+ gchar *config_directory;
#ifdef G_OS_WIN32
{
- char *localedir;
+ gchar *localedir;
/* We assume evolution-exchange is installed in the
* same run-time prefix as evolution-data-server.
diff --git a/storage/migr-test.c b/storage/migr-test.c
index 26b8725..b18222f 100644
--- a/storage/migr-test.c
+++ b/storage/migr-test.c
@@ -37,8 +37,8 @@
#include "exchange-types.h"
#include "exchange-migrate.h"
-int
-main (int argc, char **argv)
+gint
+main (gint argc, gchar **argv)
{
CORBA_short major=1;
CORBA_short minor=4;
@@ -46,8 +46,8 @@ main (int argc, char **argv)
const gchar *source = "~/evolution";
const gchar *dest= "/tmp/.evolution-test";
gchar *user = NULL, *server = NULL, *base_dir, *uid = NULL;
- int opt;
- char optstr[] = "M:m:r:u:h:s:d:";
+ gint opt;
+ gchar optstr[] = "M:m:r:u:h:s:d:";
gnome_program_init("migr-test", VERSION, LIBGNOMEUI_MODULE, argc, argv, NULL);
gdk_init(&argc, &argv);
@@ -100,7 +100,7 @@ main (int argc, char **argv)
base_dir = g_build_filename (dest, uid, NULL);
printf("base dir is %s; uid = %s; dest = %s ; source=%s \n", base_dir, uid, dest, source);
- exchange_migrate (major, minor, revision, base_dir, (char *) uid);
+ exchange_migrate (major, minor, revision, base_dir, (gchar *) uid);
g_free (base_dir);
g_free (uid);
diff --git a/storage/ximian-connector-setup.c b/storage/ximian-connector-setup.c
index ba47f06..9dd8455 100644
--- a/storage/ximian-connector-setup.c
+++ b/storage/ximian-connector-setup.c
@@ -32,17 +32,17 @@
#include "exchange-autoconfig-wizard.h"
#ifdef G_OS_WIN32
-const char *_exchange_storage_datadir;
-const char *_exchange_storage_gladedir;
-const char *_exchange_storage_imagesdir;
+const gchar *_exchange_storage_datadir;
+const gchar *_exchange_storage_gladedir;
+const gchar *_exchange_storage_imagesdir;
#endif
-int
-main (int argc, char **argv)
+gint
+main (gint argc, gchar **argv)
{
#ifdef G_OS_WIN32
{
- char *localedir;
+ gchar *localedir;
/* We assume evolution-exchange is installed in the
* same run-time prefix as evolution-data-server.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]