aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/ipod-sync
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-27 22:29:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-27 22:29:19 +0800
commit948235c3d1076dbe6ed2e57a24c16a083bbd9f01 (patch)
tree4133b1adfd94d8f889ca7ad4ad851346518f4171 /plugins/ipod-sync
parentcc3a98fc1ad5bb87aa7335f3de404ee7feee1541 (diff)
downloadgsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.gz
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.bz2
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.lz
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.xz
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.zst
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.zip
Prefer GLib basic types over C types.
Diffstat (limited to 'plugins/ipod-sync')
-rw-r--r--plugins/ipod-sync/evolution-ipod-sync.c4
-rw-r--r--plugins/ipod-sync/evolution-ipod-sync.h6
-rw-r--r--plugins/ipod-sync/format-handler.h4
-rw-r--r--plugins/ipod-sync/ical-format.c6
-rw-r--r--plugins/ipod-sync/ipod-sync.c12
-rw-r--r--plugins/ipod-sync/ipod.c34
-rw-r--r--plugins/ipod-sync/sync.c16
7 files changed, 41 insertions, 41 deletions
diff --git a/plugins/ipod-sync/evolution-ipod-sync.c b/plugins/ipod-sync/evolution-ipod-sync.c
index 487d9f14c5..11df39777a 100644
--- a/plugins/ipod-sync/evolution-ipod-sync.c
+++ b/plugins/ipod-sync/evolution-ipod-sync.c
@@ -32,7 +32,7 @@
#include <gtk/gtk.h>
#include <glade/glade.h>
-char * mount_point = NULL;
+gchar * mount_point = NULL;
LibHalContext *ctx;
gboolean
@@ -100,7 +100,7 @@ ipod_check_status (gboolean silent)
return TRUE;
}
-char *
+gchar *
ipod_get_mount (void)
{
return mount_point;
diff --git a/plugins/ipod-sync/evolution-ipod-sync.h b/plugins/ipod-sync/evolution-ipod-sync.h
index 662b16eff0..8760c43ceb 100644
--- a/plugins/ipod-sync/evolution-ipod-sync.h
+++ b/plugins/ipod-sync/evolution-ipod-sync.h
@@ -30,9 +30,9 @@
gboolean check_hal (void);
gboolean ipod_check_status (gboolean silent);
-gboolean try_umount (char *device);
+gboolean try_umount (gchar *device);
-char *find_ipod_mount_point (LibHalContext *ctx);
-char *ipod_get_mount (void);
+gchar *find_ipod_mount_point (LibHalContext *ctx);
+gchar *ipod_get_mount (void);
diff --git a/plugins/ipod-sync/format-handler.h b/plugins/ipod-sync/format-handler.h
index 145bcb7d6d..4a9207a474 100644
--- a/plugins/ipod-sync/format-handler.h
+++ b/plugins/ipod-sync/format-handler.h
@@ -44,9 +44,9 @@ struct _FormatHandler
gpointer data;
- void (*save) (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type, char *dest_uri);
+ void (*save) (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type, gchar *dest_uri);
};
FormatHandler *ical_format_handler_new (void);
-GOutputStream *open_for_writing (GtkWindow *parent, const char *uri, GError **error);
+GOutputStream *open_for_writing (GtkWindow *parent, const gchar *uri, GError **error);
diff --git a/plugins/ipod-sync/ical-format.c b/plugins/ipod-sync/ical-format.c
index 49c042f705..d8961e2520 100644
--- a/plugins/ipod-sync/ical-format.c
+++ b/plugins/ipod-sync/ical-format.c
@@ -37,7 +37,7 @@
#include "format-handler.h"
static void
-display_error_message (GtkWidget *parent, const char *message)
+display_error_message (GtkWidget *parent, const gchar *message)
{
GtkWidget *dialog;
@@ -47,7 +47,7 @@ display_error_message (GtkWidget *parent, const char *message)
}
static void
-do_save_calendar_ical (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type, char *dest_uri)
+do_save_calendar_ical (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type, gchar *dest_uri)
{
ESource *primary_source;
ECal *source_client;
@@ -89,7 +89,7 @@ do_save_calendar_ical (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSourc
stream = open_for_writing (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (target->selector))), dest_uri, &error);
if (stream && !error) {
- char *ical_str = icalcomponent_as_ical_string_r (top_level);
+ gchar *ical_str = icalcomponent_as_ical_string_r (top_level);
g_output_stream_write_all (stream, ical_str, strlen (ical_str), NULL, NULL, &error);
g_output_stream_close (stream, NULL, NULL);
diff --git a/plugins/ipod-sync/ipod-sync.c b/plugins/ipod-sync/ipod-sync.c
index 1f589bfdc0..7615d6e7cb 100644
--- a/plugins/ipod-sync/ipod-sync.c
+++ b/plugins/ipod-sync/ipod-sync.c
@@ -56,7 +56,7 @@ void org_gnome_sync_addressbook (EPlugin *ep, EABPopupTargetSource *target);
static void
-display_error_message (GtkWidget *parent, const char *message)
+display_error_message (GtkWidget *parent, const gchar *message)
{
GtkWidget *dialog;
@@ -70,7 +70,7 @@ display_error_message (GtkWidget *parent, const char *message)
It will ask for overwrite if file already exists.
*/
GOutputStream *
-open_for_writing (GtkWindow *parent, const char *uri, GError **error)
+open_for_writing (GtkWindow *parent, const gchar *uri, GError **error)
{
GFile *file;
GFileOutputStream *fostream;
@@ -125,8 +125,8 @@ destination_save_addressbook (EPlugin *ep, EABPopupTargetSource *target)
gchar *uri;
GOutputStream *stream;
GError *error = NULL;
- char *dest_uri = NULL;
- char *mount = ipod_get_mount();
+ gchar *dest_uri = NULL;
+ gchar *mount = ipod_get_mount();
primary_source = e_source_selector_peek_primary_selection (target->selector);
@@ -199,8 +199,8 @@ static void
destination_save_cal (EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type)
{
FormatHandler *handler = NULL;
- char *mount = ipod_get_mount();
- char *dest_uri = NULL, *path;
+ gchar *mount = ipod_get_mount();
+ gchar *dest_uri = NULL, *path;
ESource *primary_source = e_source_selector_peek_primary_selection (target->selector);
/* The available formathandlers */
diff --git a/plugins/ipod-sync/ipod.c b/plugins/ipod-sync/ipod.c
index 5f399f23e6..baef16e0d5 100644
--- a/plugins/ipod-sync/ipod.c
+++ b/plugins/ipod-sync/ipod.c
@@ -35,8 +35,8 @@ gboolean
check_hal (void)
{
LibHalContext *ctx;
- char **devices;
- int num;
+ gchar **devices;
+ gint num;
DBusConnection *conn;
conn = dbus_bus_get (DBUS_BUS_SYSTEM, NULL);
@@ -64,9 +64,9 @@ check_hal (void)
* Try to mount a given device.
*/
static gboolean
-try_mount (char *device)
+try_mount (gchar *device)
{
- char *argv[3];
+ gchar *argv[3];
GError *err = NULL;
gint exit_status;
@@ -88,9 +88,9 @@ try_mount (char *device)
* Try to unmount a given device.
*/
gboolean
-try_umount (char *device)
+try_umount (gchar *device)
{
- char *argv[3];
+ gchar *argv[3];
GError *err = NULL;
gint exit_status;
@@ -117,11 +117,11 @@ try_umount (char *device)
* database at <mount_point>/iPod_Control/iTunes/.
*/
static gboolean
-is_ipod (char *mount_point)
+is_ipod (gchar *mount_point)
{
gboolean ret = FALSE;
- char *itunes_path;
+ gchar *itunes_path;
itunes_path = g_build_path (G_DIR_SEPARATOR_S, mount_point,
"iPod_Control", "iTunes",
@@ -140,17 +140,17 @@ out:
/**
* Try to find a mount point for an iPod.
*/
-char *
+gchar *
find_ipod_mount_point (LibHalContext *ctx)
{
- char **apple_devices = NULL;
- char **volumes = NULL;
- char *udi, *udi2, *device, *fsusage, *mount_point = NULL;
- char *retval = NULL;
- int apple_count = 0;
- int volume_count = 0;
- int has_fs = 0;
- int i, j;
+ gchar **apple_devices = NULL;
+ gchar **volumes = NULL;
+ gchar *udi, *udi2, *device, *fsusage, *mount_point = NULL;
+ gchar *retval = NULL;
+ gint apple_count = 0;
+ gint volume_count = 0;
+ gint has_fs = 0;
+ gint i, j;
/* First, we look for things made by Apple. */
apple_devices = libhal_manager_find_device_string_match (ctx,
diff --git a/plugins/ipod-sync/sync.c b/plugins/ipod-sync/sync.c
index 8fe83d1b5a..cc2febc5e3 100644
--- a/plugins/ipod-sync/sync.c
+++ b/plugins/ipod-sync/sync.c
@@ -50,7 +50,7 @@ static void pulse (void)
/**
* Something bad happened.
*/
-static void error_dialog (char *title, char *error)
+static void error_dialog (gchar *title, gchar *error)
{
GtkWidget *error_dlg =
gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
@@ -71,7 +71,7 @@ static void error_dialog (char *title, char *error)
/**
* Something really bad happened.
*/
-static void critical_error (char *title, char *error)
+static void critical_error (gchar *title, gchar *error)
{
error_dialog (title, error);
gtk_main_quit ();
@@ -79,7 +79,7 @@ static void critical_error (char *title, char *error)
}
static GSList *
-get_source_uris_for_type (char *key)
+get_source_uris_for_type (gchar *key)
{
ESourceList *sources;
GSList *groups;
@@ -124,9 +124,9 @@ free_uri_list (GSList *uris)
* Note: data must be of even length.
*/
static void
-force_little_endian (gunichar2 *data, int length)
+force_little_endian (gunichar2 *data, gint length)
{
- int i;
+ gint i;
/* We're big-endian?
(A little tidier than before) */
@@ -151,10 +151,10 @@ force_little_endian (gunichar2 *data, int length)
* display an error dialog and end the program.
*/
static void
-write_to_ipod (GString *str, char *path, char *filename)
+write_to_ipod (GString *str, gchar *path, gchar *filename)
{
- char *output_path;
- char *output_file;
+ gchar *output_path;
+ gchar *output_file;
FILE *f;
guchar *utf8;
gunichar2 *utf16;