aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-04-15 01:19:45 +0800
committerChris Lahey <clahey@src.gnome.org>2001-04-15 01:19:45 +0800
commita0a4b49f2d361521bc9173c15148a543a9c4b756 (patch)
treeff0c4ad2342b65b424737859917e117a12cc40a8 /addressbook/backend/ebook
parent04fac44de1b9b0106ef95b6bf6cfc2d877b01fd2 (diff)
downloadgsoc2013-evolution-a0a4b49f2d361521bc9173c15148a543a9c4b756.tar
gsoc2013-evolution-a0a4b49f2d361521bc9173c15148a543a9c4b756.tar.gz
gsoc2013-evolution-a0a4b49f2d361521bc9173c15148a543a9c4b756.tar.bz2
gsoc2013-evolution-a0a4b49f2d361521bc9173c15148a543a9c4b756.tar.lz
gsoc2013-evolution-a0a4b49f2d361521bc9173c15148a543a9c4b756.tar.xz
gsoc2013-evolution-a0a4b49f2d361521bc9173c15148a543a9c4b756.tar.zst
gsoc2013-evolution-a0a4b49f2d361521bc9173c15148a543a9c4b756.zip
Ref the cursor here when we receive it.
2001-04-14 Christopher James Lahey <clahey@ximian.com> * backend/ebook/e-book-listener.c (impl_BookListener_respond_get_cursor): Ref the cursor here when we receive it. (impl_BookListener_respond_get_view, impl_BookListener_respond_get_changes): Ref the book_view here when we receive it. (impl_BookListener_respond_open_book): Ref the book here when we receive it. (e_book_listener_destroy): Unref the objects in our queue here. * backend/ebook/e-book-view.c (e_book_view_construct): Cleaned this up using bonobo_object_dup_ref. (e_book_view_destroy): Cleaned this up using bonobo_object_release_unref. * backend/ebook/e-book.c (e_book_do_response_get_cursor, e_book_do_response_get_view, e_book_do_response_get_changes, e_book_unload_uri): Cleaned this up using bonobo_object_release_unref. svn path=/trunk/; revision=9311
Diffstat (limited to 'addressbook/backend/ebook')
-rw-r--r--addressbook/backend/ebook/e-book-listener.c20
-rw-r--r--addressbook/backend/ebook/e-book-view.c25
-rw-r--r--addressbook/backend/ebook/e-book.c46
3 files changed, 17 insertions, 74 deletions
diff --git a/addressbook/backend/ebook/e-book-listener.c b/addressbook/backend/ebook/e-book-listener.c
index e1d47d70d2..ee4107190b 100644
--- a/addressbook/backend/ebook/e-book-listener.c
+++ b/addressbook/backend/ebook/e-book-listener.c
@@ -137,7 +137,7 @@ e_book_listener_queue_get_cursor_response (EBookListener *listener,
resp->op = GetCursorResponse;
resp->status = status;
resp->cursor = cursor;
-
+
e_book_listener_queue_response (listener, resp);
}
@@ -153,7 +153,7 @@ e_book_listener_queue_get_view_response (EBookListener *listener,
resp->op = GetBookViewResponse;
resp->status = status;
resp->book_view = book_view;
-
+
e_book_listener_queue_response (listener, resp);
}
@@ -169,7 +169,7 @@ e_book_listener_queue_get_changes_response (EBookListener *listener,
resp->op = GetChangesResponse;
resp->status = status;
resp->book_view = book_view;
-
+
e_book_listener_queue_response (listener, resp);
}
@@ -283,7 +283,7 @@ impl_BookListener_respond_get_cursor (PortableServer_Servant servant,
EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant));
GNOME_Evolution_Addressbook_CardCursor cursor_copy;
- cursor_copy = CORBA_Object_duplicate (cursor, ev);
+ cursor_copy = bonobo_object_dup_ref (cursor, ev);
if (ev->_major != CORBA_NO_EXCEPTION) {
g_warning ("EBookListener: Exception while duplicating CardCursor!\n");
@@ -305,7 +305,7 @@ impl_BookListener_respond_get_view (PortableServer_Servant servant,
EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant));
GNOME_Evolution_Addressbook_BookView book_view_copy;
- book_view_copy = CORBA_Object_duplicate (book_view, ev);
+ book_view_copy = bonobo_object_dup_ref (book_view, ev);
if (ev->_major != CORBA_NO_EXCEPTION) {
g_warning ("EBookListener: Exception while duplicating BookView.\n");
@@ -327,7 +327,7 @@ impl_BookListener_respond_get_changes (PortableServer_Servant servant,
EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant));
GNOME_Evolution_Addressbook_BookView book_view_copy;
- book_view_copy = CORBA_Object_duplicate (book_view, ev);
+ book_view_copy = bonobo_object_dup_ref (book_view, ev);
if (ev->_major != CORBA_NO_EXCEPTION) {
g_warning ("EBookListener: Exception while duplicating BookView.\n");
@@ -349,7 +349,7 @@ impl_BookListener_respond_open_book (PortableServer_Servant servant,
EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant));
GNOME_Evolution_Addressbook_Book book_copy;
- book_copy = CORBA_Object_duplicate (book, ev);
+ book_copy = bonobo_object_dup_ref (book, ev);
if (ev->_major != CORBA_NO_EXCEPTION) {
g_warning ("EBookListener: Exception while duplicating Book!\n");
@@ -577,7 +577,7 @@ e_book_listener_destroy (GtkObject *object)
CORBA_exception_init (&ev);
- CORBA_Object_release (resp->book, &ev);
+ bonobo_object_release_unref (resp->book, &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
g_warning ("e_book_listener_destroy: "
@@ -593,7 +593,7 @@ e_book_listener_destroy (GtkObject *object)
CORBA_exception_init (&ev);
- CORBA_Object_release (resp->cursor, &ev);
+ bonobo_object_release_unref (resp->cursor, &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
g_warning ("e_book_listener_destroy: "
@@ -609,7 +609,7 @@ e_book_listener_destroy (GtkObject *object)
CORBA_exception_init (&ev);
- CORBA_Object_release (resp->book_view, &ev);
+ bonobo_object_release_unref (resp->book_view, &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
g_warning ("e_book_listener_destroy: "
diff --git a/addressbook/backend/ebook/e-book-view.c b/addressbook/backend/ebook/e-book-view.c
index 8faebe140f..3528bde63f 100644
--- a/addressbook/backend/ebook/e-book-view.c
+++ b/addressbook/backend/ebook/e-book-view.c
@@ -136,25 +136,11 @@ e_book_view_construct (EBookView *book_view, GNOME_Evolution_Addressbook_BookVie
*/
CORBA_exception_init (&ev);
- book_view->priv->corba_book_view = CORBA_Object_duplicate(corba_book_view, &ev);
+ book_view->priv->corba_book_view = bonobo_object_dup_ref(corba_book_view, &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
g_warning ("e_book_view_construct: Exception duplicating corba_book_view.\n");
CORBA_exception_free (&ev);
- return FALSE;
- }
-
- GNOME_Evolution_Addressbook_BookView_ref(book_view->priv->corba_book_view, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("e_book_view_construct: Exception reffing corba_book_view.\n");
- CORBA_exception_free (&ev);
- CORBA_exception_init (&ev);
- CORBA_Object_release (book_view->priv->corba_book_view, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("e_book_view_construct: Exception releasing corba_book_view.\n");
- }
- CORBA_exception_free (&ev);
book_view->priv->corba_book_view = NULL;
return FALSE;
}
@@ -209,15 +195,8 @@ e_book_view_destroy (GtkObject *object)
if (book_view->priv->corba_book_view) {
CORBA_exception_init (&ev);
- GNOME_Evolution_Addressbook_BookView_unref(book_view->priv->corba_book_view, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("EBookView: Exception while unreffing BookView\n");
-
- CORBA_exception_free (&ev);
- CORBA_exception_init (&ev);
- }
+ bonobo_object_release_unref (book_view->priv->corba_book_view, &ev);
- CORBA_Object_release (book_view->priv->corba_book_view, &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
g_warning ("EBookView: Exception while releasing BookView\n");
}
diff --git a/addressbook/backend/ebook/e-book.c b/addressbook/backend/ebook/e-book.c
index aaa46af719..a5231f8303 100644
--- a/addressbook/backend/ebook/e-book.c
+++ b/addressbook/backend/ebook/e-book.c
@@ -195,16 +195,7 @@ e_book_do_response_get_cursor (EBook *book,
*/
CORBA_exception_init (&ev);
- Bonobo_Unknown_unref (resp->cursor, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("e_book_do_response_get_cursor: Exception unref'ing "
- "remote GNOME_Evolution_Addressbook_CardCursor interface!\n");
- CORBA_exception_free (&ev);
- CORBA_exception_init (&ev);
- }
-
- CORBA_Object_release (resp->cursor, &ev);
+ bonobo_object_release_unref (resp->cursor, &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
g_warning ("e_book_do_response_get_cursor: Exception releasing "
@@ -237,7 +228,7 @@ e_book_do_response_get_view (EBook *book,
}
book_view = e_book_view_new(resp->book_view, op->listener);
-
+
/* Only execute the callback if the operation is still flagged as active (i.e. hasn't
been cancelled. This is mildly wasteful since we unnecessaryily create the
book_view, etc... but I'm leery of tinkering with the CORBA magic. */
@@ -253,16 +244,7 @@ e_book_do_response_get_view (EBook *book,
*/
CORBA_exception_init (&ev);
- Bonobo_Unknown_unref (resp->book_view, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("e_book_do_response_get_view: Exception unref'ing "
- "remote GNOME_Evolution_Addressbook_BookView interface!\n");
- CORBA_exception_free (&ev);
- CORBA_exception_init (&ev);
- }
-
- CORBA_Object_release (resp->book_view, &ev);
+ bonobo_object_release_unref (resp->book_view, &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
g_warning ("e_book_do_response_get_view: Exception releasing "
@@ -307,16 +289,7 @@ e_book_do_response_get_changes (EBook *book,
*/
CORBA_exception_init (&ev);
- Bonobo_Unknown_unref (resp->book_view, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("e_book_do_response_get_changes: Exception unref'ing "
- "remote GNOME_Evolution_Addressbook_BookView interface!\n");
- CORBA_exception_free (&ev);
- CORBA_exception_init (&ev);
- }
-
- CORBA_Object_release (resp->book_view, &ev);
+ bonobo_object_release_unref (resp->book_view, &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
g_warning ("e_book_do_response_get_changes: Exception releasing "
@@ -546,16 +519,7 @@ e_book_unload_uri (EBook *book)
*/
CORBA_exception_init (&ev);
- Bonobo_Unknown_unref (book->priv->corba_book, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("e_book_unload_uri: Exception unref'ing "
- "remote GNOME_Evolution_Addressbook_Book interface!\n");
- CORBA_exception_free (&ev);
- CORBA_exception_init (&ev);
- }
-
- CORBA_Object_release (book->priv->corba_book, &ev);
+ bonobo_object_release_unref (book->priv->corba_book, &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
g_warning ("e_book_unload_uri: Exception releasing "