diff options
author | Chris Toshok <toshok@ximian.com> | 2001-02-18 11:24:33 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2001-02-18 11:24:33 +0800 |
commit | e6d81792c4c7950a5a897211ace6590d4ad458f6 (patch) | |
tree | 8e6419caba5dbda8c71fc24177218f23491f1679 /addressbook/backend/pas/pas-book.c | |
parent | ec5d0a0fab3c33f68efe32decf6a55f0b174a796 (diff) | |
download | gsoc2013-evolution-e6d81792c4c7950a5a897211ace6590d4ad458f6.tar gsoc2013-evolution-e6d81792c4c7950a5a897211ace6590d4ad458f6.tar.gz gsoc2013-evolution-e6d81792c4c7950a5a897211ace6590d4ad458f6.tar.bz2 gsoc2013-evolution-e6d81792c4c7950a5a897211ace6590d4ad458f6.tar.lz gsoc2013-evolution-e6d81792c4c7950a5a897211ace6590d4ad458f6.tar.xz gsoc2013-evolution-e6d81792c4c7950a5a897211ace6590d4ad458f6.tar.zst gsoc2013-evolution-e6d81792c4c7950a5a897211ace6590d4ad458f6.zip |
add sequence<string> typedef, and add getSupportedFields method.
2001-02-17 Chris Toshok <toshok@ximian.com>
* backend/idl/addressbook.idl: add sequence<string> typedef, and
add getSupportedFields method.
* backend/pas/pas-book.c
(impl_GNOME_Evolution_Addressbook_Book_getSupportedFields): new
function.
* backend/pas/pas-backend.c (pas_backend_class_init): init
get_supported_fields = NULL.
(pas_backend_get_supported_fields): new function.
* backend/pas/pas-backend.h: add prototype for
pas_backend_get_supported_fields.
* backend/pas/pas-backend-file.c
(pas_backend_file_get_supported_fields): new function.
(pas_backend_file_class_init): fill in get_supported_fields.
* backend/pas/pas-backend-ldap.c
(pas_backend_ldap_get_supported_fields): new function.
(pas_backend_ldap_class_init): fill in get_supported_fields.
svn path=/trunk/; revision=8270
Diffstat (limited to 'addressbook/backend/pas/pas-book.c')
-rw-r--r-- | addressbook/backend/pas/pas-book.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/addressbook/backend/pas/pas-book.c b/addressbook/backend/pas/pas-book.c index 783c699603..2cb6c2f142 100644 --- a/addressbook/backend/pas/pas-book.c +++ b/addressbook/backend/pas/pas-book.c @@ -315,6 +315,32 @@ impl_GNOME_Evolution_Addressbook_Book_getStaticCapabilities (PortableServer_Serv return ret_val; } +static GNOME_Evolution_Addressbook_stringlist * +impl_GNOME_Evolution_Addressbook_Book_getSupportedFields (PortableServer_Servant servant, + CORBA_Environment *ev) +{ + PASBook *book = PAS_BOOK (bonobo_object_from_servant (servant)); + GNOME_Evolution_Addressbook_stringlist *stringlist; + char **supported_fields; + int num_fields, i; + + stringlist = GNOME_Evolution_Addressbook_stringlist__alloc (); + num_fields = pas_backend_get_supported_fields (book->priv->backend, &supported_fields); + + stringlist->_buffer = CORBA_sequence_CORBA_string_allocbuf (num_fields); + stringlist->_maximum = num_fields; + stringlist->_length = num_fields; + + for (i = 0; num_fields; i++) { + stringlist->_buffer[i] = CORBA_string_dup (supported_fields[i]); + g_free (supported_fields[i]); + } + + g_free (supported_fields); + + return stringlist; +} + /** * pas_book_get_backend: */ @@ -729,6 +755,7 @@ pas_book_get_epv (void) epv->modifyCard = impl_GNOME_Evolution_Addressbook_Book_modifyCard; epv->checkConnection = impl_GNOME_Evolution_Addressbook_Book_checkConnection; epv->getStaticCapabilities = impl_GNOME_Evolution_Addressbook_Book_getStaticCapabilities; + epv->getSupportedFields = impl_GNOME_Evolution_Addressbook_Book_getSupportedFields; epv->getCursor = impl_GNOME_Evolution_Addressbook_Book_getCursor; epv->getBookView = impl_GNOME_Evolution_Addressbook_Book_getBookView; epv->getChanges = impl_GNOME_Evolution_Addressbook_Book_getChanges; |