[evolution-kolab/ek-wip-porting] EBookBackendKolab: internal API sanitization
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/ek-wip-porting] EBookBackendKolab: internal API sanitization
- Date: Mon, 12 Dec 2011 18:55:11 +0000 (UTC)
commit e6b073c8b8d514a8e68796eb38356c0cceeb9dfd
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Mon Dec 12 16:29:35 2011 +0100
EBookBackendKolab: internal API sanitization
* do not refer to EBookBackendSync* parameters as 'self',
but as 'backend' ('backend' gets cast to EBookBackendKolab*
inside the functions, and that pointer is referred to
as 'self')
src/addressbook/e-book-backend-kolab.c | 127 ++++++++++++++++++++++++--------
1 files changed, 97 insertions(+), 30 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-kolab.c b/src/addressbook/e-book-backend-kolab.c
index 8790626..e689419 100644
--- a/src/addressbook/e-book-backend-kolab.c
+++ b/src/addressbook/e-book-backend-kolab.c
@@ -74,18 +74,22 @@ G_DEFINE_TYPE (EBookBackendKolab, e_book_backend_kolab, E_TYPE_BOOK_BACKEND_SYNC
/* internal statics */
static void
-e_book_backend_kolab_open (EBookBackendSync *self,
+e_book_backend_kolab_open (EBookBackendSync *backend,
EDataBook *book,
GCancellable *cancellable,
gboolean only_if_exists,
GError **err)
{
- g_assert (E_IS_BOOK_BACKEND_SYNC (self));
+ EBookBackendKolab *self = E_BOOK_BACKEND_KOLAB (backend);
+ EBookBackendKolabPrivate *priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
+
g_assert (E_IS_DATA_BOOK (book));
(void)cancellable; /* FIXME */ /* cancellable may be NULL */
(void)only_if_exists; /* FIXME */
g_return_if_fail (err == NULL || *err == NULL);
+ (void)self;
+ (void)priv;
g_error ("%s: FIXME implement me", __func__);
#if 0 /* FIXME old*/
@@ -248,16 +252,20 @@ e_book_backend_kolab_open (EBookBackendSync *self,
}
static void
-e_book_backend_kolab_remove (EBookBackendSync *self,
+e_book_backend_kolab_remove (EBookBackendSync *backend,
EDataBook *book,
GCancellable *cancellable,
GError **err)
{
- g_assert (E_IS_BOOK_BACKEND_SYNC (self));
+ EBookBackendKolab *self = E_BOOK_BACKEND_KOLAB (backend);
+ EBookBackendKolabPrivate *priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
+
g_assert (E_IS_DATA_BOOK (book));
(void)cancellable; /* FIXME */ /* cancellable may be NULL */
g_return_if_fail (err == NULL || *err == NULL);
+ (void)self;
+ (void)priv;
g_error ("%s: FIXME implement me", __func__);
#if 0 /* FIXME old */
@@ -285,70 +293,86 @@ e_book_backend_kolab_remove (EBookBackendSync *self,
}
static void
-e_book_backend_kolab_refresh (EBookBackendSync *self,
+e_book_backend_kolab_refresh (EBookBackendSync *backend,
EDataBook *book,
GCancellable *cancellable,
GError **err)
{
- g_assert (E_IS_BOOK_BACKEND_SYNC (self));
+ EBookBackendKolab *self = E_BOOK_BACKEND_KOLAB (backend);
+ EBookBackendKolabPrivate *priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
+
g_assert (E_IS_DATA_BOOK (book));
(void)cancellable; /* FIXME */ /* cancellable may be NULL */
g_return_if_fail (err == NULL || *err == NULL);
+ (void)self;
+ (void)priv;
g_error ("%s: FIXME implement me", __func__);
}
static gboolean
-e_book_backend_kolab_get_backend_property (EBookBackendSync *self,
+e_book_backend_kolab_get_backend_property (EBookBackendSync *backend,
EDataBook *book,
GCancellable *cancellable,
const gchar *prop_name,
gchar **prop_value,
GError **err)
{
- g_assert (E_IS_BOOK_BACKEND_SYNC (self));
+ EBookBackendKolab *self = E_BOOK_BACKEND_KOLAB (backend);
+ EBookBackendKolabPrivate *priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
+
g_assert (E_IS_DATA_BOOK (book));
(void)cancellable; /* FIXME */ /* cancellable may be NULL */
(void)prop_name; /* FIXME */
(void)prop_value; /* FIXME */
g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
+ (void)self;
+ (void)priv;
g_error ("%s: FIXME implement me", __func__);
}
static gboolean
-e_book_backend_kolab_set_backend_property (EBookBackendSync *self,
+e_book_backend_kolab_set_backend_property (EBookBackendSync *backend,
EDataBook *book,
GCancellable *cancellable,
const gchar *prop_name,
const gchar *prop_value,
GError **err)
{
- g_assert (E_IS_BOOK_BACKEND_SYNC (self));
+ EBookBackendKolab *self = E_BOOK_BACKEND_KOLAB (backend);
+ EBookBackendKolabPrivate *priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
+
g_assert (E_IS_DATA_BOOK (book));
(void)cancellable; /* FIXME */ /* cancellable may be NULL */
(void)prop_name; /* FIXME */
(void)prop_value; /* FIXME */
g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
+ (void)self;
+ (void)priv;
g_error ("%s: FIXME implement me", __func__);
}
static void
-e_book_backend_kolab_create_contacts (EBookBackendSync *self,
+e_book_backend_kolab_create_contacts (EBookBackendSync *backend,
EDataBook *book,
GCancellable *cancellable,
const GSList *vcards,
GSList **added_contacts,
GError **err)
{
- g_assert (E_IS_BOOK_BACKEND_SYNC (self));
+ EBookBackendKolab *self = E_BOOK_BACKEND_KOLAB (backend);
+ EBookBackendKolabPrivate *priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
+
g_assert (E_IS_DATA_BOOK (book));
(void)cancellable; /* FIXME */ /* cancellable may be NULL */
(void)vcards; /* FIXME */
(void)added_contacts; /* FIXME */
g_return_if_fail (err == NULL || *err == NULL);
+ (void)self;
+ (void)priv;
g_error ("%s: FIXME implement me", __func__);
#if 0 /* FIXME old */
@@ -396,20 +420,24 @@ e_book_backend_kolab_create_contacts (EBookBackendSync *self,
}
static void
-e_book_backend_kolab_remove_contacts (EBookBackendSync *self,
+e_book_backend_kolab_remove_contacts (EBookBackendSync *backend,
EDataBook *book,
GCancellable *cancellable,
const GSList *id_list,
GSList **removed_ids,
GError **err)
{
- g_assert (E_IS_BOOK_BACKEND_SYNC (self));
+ EBookBackendKolab *self = E_BOOK_BACKEND_KOLAB (backend);
+ EBookBackendKolabPrivate *priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
+
g_assert (E_IS_DATA_BOOK (book));
(void)cancellable; /* FIXME */ /* cancellable may be NULL */
(void)id_list; /* FIXME */
(void)removed_ids; /* FIXME */
g_return_if_fail (err == NULL || *err == NULL);
+ (void)self;
+ (void)priv;
g_error ("%s: FIXME implement me", __func__);
#if 0 /* FIXME old */
@@ -433,20 +461,24 @@ e_book_backend_kolab_remove_contacts (EBookBackendSync *self,
}
static void
-e_book_backend_kolab_modify_contacts (EBookBackendSync *self,
+e_book_backend_kolab_modify_contacts (EBookBackendSync *backend,
EDataBook *book,
GCancellable *cancellable,
const GSList *vcards,
GSList **modified_contacts,
GError **err)
{
- g_assert (E_IS_BOOK_BACKEND_SYNC (self));
+ EBookBackendKolab *self = E_BOOK_BACKEND_KOLAB (backend);
+ EBookBackendKolabPrivate *priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
+
g_assert (E_IS_DATA_BOOK (book));
(void)cancellable; /* FIXME */ /* cancellable may be NULL */
(void)vcards; /* FIXME */
(void)modified_contacts; /* FIXME */
g_return_if_fail (err == NULL || *err == NULL);
+ (void)self;
+ (void)priv;
g_error ("%s: FIXME implement me", __func__);
#if 0 /* FIXME old */
@@ -473,20 +505,24 @@ e_book_backend_kolab_modify_contacts (EBookBackendSync *self,
}
static void
-e_book_backend_kolab_get_contact (EBookBackendSync *self,
+e_book_backend_kolab_get_contact (EBookBackendSync *backend,
EDataBook *book,
GCancellable *cancellable,
const gchar *id,
gchar **vcard,
GError **err)
{
- g_assert (E_IS_BOOK_BACKEND_SYNC (self));
+ EBookBackendKolab *self = E_BOOK_BACKEND_KOLAB (backend);
+ EBookBackendKolabPrivate *priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
+
g_assert (E_IS_DATA_BOOK (book));
(void)cancellable; /* FIXME */ /* cancellable may be NULL */
(void)id; /* FIXME */
(void)vcard; /* FIXME */
g_return_if_fail (err == NULL || *err == NULL);
+ (void)self;
+ (void)priv;
g_error ("%s: FIXME implement me", __func__);
#if 0 /* FIXME old */
@@ -515,20 +551,24 @@ e_book_backend_kolab_get_contact (EBookBackendSync *self,
}
static void
-e_book_backend_kolab_get_contact_list (EBookBackendSync *self,
+e_book_backend_kolab_get_contact_list (EBookBackendSync *backend,
EDataBook *book,
GCancellable *cancellable,
const gchar *query,
GSList **contacts,
GError **err)
{
- g_assert (E_IS_BOOK_BACKEND_SYNC (self));
+ EBookBackendKolab *self = E_BOOK_BACKEND_KOLAB (backend);
+ EBookBackendKolabPrivate *priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
+
g_assert (E_IS_DATA_BOOK (book));
(void)cancellable; /* FIXME */ /* cancellable may be NULL */
(void)query; /* FIXME */
(void)contacts; /* FIXME */
g_return_if_fail (err == NULL || *err == NULL);
+ (void)self;
+ (void)priv;
g_error ("%s: FIXME implement me", __func__);
#if 0 /* FIXME old */
@@ -569,34 +609,42 @@ e_book_backend_kolab_get_contact_list (EBookBackendSync *self,
}
static void
-e_book_backend_kolab_get_contact_list_uids (EBookBackendSync *self,
+e_book_backend_kolab_get_contact_list_uids (EBookBackendSync *backend,
EDataBook *book,
GCancellable *cancellable,
const gchar *query,
GSList **contacts_uids,
GError **err)
{
- g_assert (E_IS_BOOK_BACKEND_SYNC (self));
+ EBookBackendKolab *self = E_BOOK_BACKEND_KOLAB (backend);
+ EBookBackendKolabPrivate *priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
+
g_assert (E_IS_DATA_BOOK (book));
(void)cancellable; /* FIXME */ /* cancellable may be NULL */
(void)query; /* FIXME */
(void)contacts_uids; /* FIXME */
g_return_if_fail (err == NULL || *err == NULL);
+ (void)self;
+ (void)priv;
g_error ("%s: FIXME implement me", __func__);
}
static void
-e_book_backend_kolab_authenticate_user (EBookBackendSync *self,
+e_book_backend_kolab_authenticate_user (EBookBackendSync *backend,
GCancellable *cancellable,
ECredentials *credentials,
GError **err)
{
- g_assert (E_IS_BOOK_BACKEND_SYNC (self));
+ EBookBackendKolab *self = E_BOOK_BACKEND_KOLAB (backend);
+ EBookBackendKolabPrivate *priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
+
(void)cancellable; /* FIXME */ /* cancellable may be NULL */
(void)credentials; /* FIXME */
g_return_if_fail (err == NULL || *err == NULL);
+ (void)self;
+ (void)priv;
g_error ("%s: FIXME implement me", __func__);
#if 0 /* FIXME old */
@@ -647,12 +695,18 @@ e_book_backend_kolab_authenticate_user (EBookBackendSync *self,
}
static void
-e_book_backend_kolab_start_book_view (EBookBackend *self,
+e_book_backend_kolab_start_book_view (EBookBackend *backend,
EDataBookView *book_view)
{
- g_assert (E_IS_BOOK_BACKEND_SYNC (self));
+ EBookBackendKolab *self = E_BOOK_BACKEND_KOLAB (backend);
+ EBookBackendKolabPrivate *priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
+
g_assert (E_IS_DATA_BOOK_VIEW (book_view));
+ (void)self;
+ (void)priv;
+ g_error ("%s: FIXME implement me", __func__);
+
#if 0 /* FIXME old */
g_debug ("%s()[%u] called.", __func__, __LINE__);
/* This should not be necessary, if everything works as expected,
@@ -713,19 +767,32 @@ e_book_backend_kolab_start_book_view (EBookBackend *self,
}
static void
-e_book_backend_kolab_stop_book_view (EBookBackend *self,
+e_book_backend_kolab_stop_book_view (EBookBackend *backend,
EDataBookView *book_view)
{
- g_assert (E_IS_BOOK_BACKEND_SYNC (self));
+ EBookBackendKolab *self = E_BOOK_BACKEND_KOLAB (backend);
+ EBookBackendKolabPrivate *priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
+
g_assert (E_IS_DATA_BOOK_VIEW (book_view));
+
+ (void)self;
+ (void)priv;
+ g_error ("%s: FIXME implement me", __func__);
+
}
static void
-e_book_backend_kolab_notify_update (EBookBackend *self,
+e_book_backend_kolab_notify_update (EBookBackend *backend,
const EContact *contact)
{
- g_assert (E_IS_BOOK_BACKEND_SYNC (self));
+ EBookBackendKolab *self = E_BOOK_BACKEND_KOLAB (backend);
+ EBookBackendKolabPrivate *priv = E_BOOK_BACKEND_KOLAB_PRIVATE (self);
+
g_assert (E_IS_CONTACT (contact));
+
+ (void)self;
+ (void)priv;
+ g_error ("%s: FIXME implement me", __func__);
}
/*----------------------------------------------------------------------------*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]