diff --git a/sflphone-client-gnome/Makefile.am b/sflphone-client-gnome/Makefile.am index e738c4d1604c0fd7a8c550433693ebb1a1d0ba4e..766c3fca11559c664fbd69722a8ebf6ff3e0c181 100644 --- a/sflphone-client-gnome/Makefile.am +++ b/sflphone-client-gnome/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = src pixmaps webkit tests man po doc +SUBDIRS = src pixmaps webkit tests man po doc plugin CFLAGS=-Wall -Werror -Wextra diff --git a/sflphone-client-gnome/configure.ac b/sflphone-client-gnome/configure.ac index 81c1f5cc4b066f407ed42a79db6969f6839dd524..f2196c13acaba8fef2ffb6bd581d35639f96a760 100644 --- a/sflphone-client-gnome/configure.ac +++ b/sflphone-client-gnome/configure.ac @@ -84,11 +84,12 @@ src/Makefile src/config/Makefile src/dbus/Makefile src/contacts/Makefile -src/contacts/addressbook/Makefile src/widget/Makefile src/icons/Makefile pixmaps/Makefile webkit/Makefile +plugin/addressbook/Makefile +plugin/Makefile sflphone.desktop tests/Makefile man/Makefile diff --git a/sflphone-client-gnome/src/contacts/addressbook/Makefile.am b/sflphone-client-gnome/plugin/addressbook/Makefile.am similarity index 97% rename from sflphone-client-gnome/src/contacts/addressbook/Makefile.am rename to sflphone-client-gnome/plugin/addressbook/Makefile.am index 9ebaad1c9beda688ea8e6a4d53eab1cf341242cb..afd10fa06ee669f50d2ba7fe352b6ba14e09d8b8 100644 --- a/sflphone-client-gnome/src/contacts/addressbook/Makefile.am +++ b/sflphone-client-gnome/plugin/addressbook/Makefile.am @@ -1,4 +1,4 @@ -include ../../../globals.mak +include ../../globals.mak noinst_PROGRAMS = libevladdrbook.so diff --git a/sflphone-client-gnome/src/contacts/addressbook/addressbook.c b/sflphone-client-gnome/plugin/addressbook/addressbook.c similarity index 99% rename from sflphone-client-gnome/src/contacts/addressbook/addressbook.c rename to sflphone-client-gnome/plugin/addressbook/addressbook.c index 188e546e53b7082af34e5cbbbb00fffb95d3b993..26a6f713f6ef32d1e75672a3f5c066d213526320 100644 --- a/sflphone-client-gnome/src/contacts/addressbook/addressbook.c +++ b/sflphone-client-gnome/plugin/addressbook/addressbook.c @@ -30,6 +30,7 @@ #include <string.h> #include <stdio.h> +#include "eds.h" #include "addressbook.h" #include "searchbar.h" #include "addressbook-config.h" diff --git a/sflphone-client-gnome/src/contacts/addressbook/eds.c b/sflphone-client-gnome/plugin/addressbook/eds.c similarity index 100% rename from sflphone-client-gnome/src/contacts/addressbook/eds.c rename to sflphone-client-gnome/plugin/addressbook/eds.c diff --git a/sflphone-client-gnome/src/contacts/addressbook/eds.h b/sflphone-client-gnome/plugin/addressbook/eds.h similarity index 98% rename from sflphone-client-gnome/src/contacts/addressbook/eds.h rename to sflphone-client-gnome/plugin/addressbook/eds.h index 73f033852d8466a94753ede9f8eae505d197b44a..d276207af3b54bf4c1b785d6db58b135ee66748e 100644 --- a/sflphone-client-gnome/src/contacts/addressbook/eds.h +++ b/sflphone-client-gnome/plugin/addressbook/eds.h @@ -41,7 +41,9 @@ #include <glib/gtypes.h> #include <gdk-pixbuf/gdk-pixbuf.h> #include <libebook/e-book.h> -#include <sflphone_const.h> + +#include "addressbook.h" +#include "sflphone_const.h" #define EMPTY_ENTRY "empty" @@ -57,6 +59,7 @@ int current_search_id; /** * Represent a contact entry */ +/* typedef struct _Hit { gchar *name; GdkPixbuf *photo; @@ -64,10 +67,11 @@ typedef struct _Hit { gchar *phone_home; gchar *phone_mobile; } Hit; - +*/ /** * Book structure for "outside world" */ +/* typedef struct { gchar *uid; gchar *uri; @@ -75,7 +79,7 @@ typedef struct { gboolean active; gboolean isdefault; } book_data_t; - +*/ /** * Free a contact entry diff --git a/sflphone-client-gnome/src/config/addressbook-config.c b/sflphone-client-gnome/src/config/addressbook-config.c index 6c8174d6340a381011e8275d55d5d8e87b2a3f11..e2108b362d98e1da4684ad367b8fcca924b7a6f6 100644 --- a/sflphone-client-gnome/src/config/addressbook-config.c +++ b/sflphone-client-gnome/src/config/addressbook-config.c @@ -31,7 +31,7 @@ #include "addressbook-config.h" #include "searchbar.h" #include "contacts/addrbookfactory.h" -#include "contacts/addressbook/eds.h" +// #include "contacts/addressbook/eds.h" #include <string.h> #include <stdlib.h> diff --git a/sflphone-client-gnome/src/contacts/Makefile.am b/sflphone-client-gnome/src/contacts/Makefile.am index 025bbd14eb69184b7319347a0af7cc4deec2f23e..42d337906b26a3e5ce7b08b25ef844592bdc9e58 100644 --- a/sflphone-client-gnome/src/contacts/Makefile.am +++ b/sflphone-client-gnome/src/contacts/Makefile.am @@ -1,7 +1,5 @@ include ../../globals.mak -SUBDIRS = addressbook - noinst_LTLIBRARIES = libcontacts.la libcontacts_la_SOURCES = \ @@ -23,4 +21,3 @@ libcontacts_la_CFLAGS = $(DBUSGLIB_CFLAGS) $(LIBNOTIFY_CFLAGS) \ $(LIBEDATASERVER_CFLAGS) $(LIBEDATASERVERUI_CFLAGS) $(LIBGNOMEUI_CFLAGS) \ $(GNOMEDOCUTILS_CFLAGS) -libcontacts_la_LIBADD = ./addressbook/libevladdrbook.so diff --git a/sflphone-client-gnome/src/contacts/addrbookfactory.h b/sflphone-client-gnome/src/contacts/addrbookfactory.h index f7b9c4f3330cd2c5286e12861a598e3b11dd2742..e9a5f1a2b4ecb384fab100c6c182c17ab76f41c1 100644 --- a/sflphone-client-gnome/src/contacts/addrbookfactory.h +++ b/sflphone-client-gnome/src/contacts/addrbookfactory.h @@ -36,7 +36,6 @@ #include <gtk/gtk.h> #include "addressbook.h" - typedef struct _addrbookfactory { gboolean is_loaded; AddrBookHandle *addrbook; diff --git a/sflphone-client-gnome/src/contacts/addressbook.h b/sflphone-client-gnome/src/contacts/addressbook.h index 51477595f2c917512e75cd76f680716847b367e6..54322c300a47e7d6ade45899333dc0f30f05d5e3 100644 --- a/sflphone-client-gnome/src/contacts/addressbook.h +++ b/sflphone-client-gnome/src/contacts/addressbook.h @@ -39,10 +39,35 @@ #define __ADDRESSBOOK_H__ #include <gtk/gtk.h> -#include <addressbook/eds.h> +// #include <addressbook/eds.h> + + +#define EMPTY_ENTRY "empty" typedef enum {ABOOK_QUERY_IS, ABOOK_QUERY_BEGINS_WITH, ABOOK_QUERY_CONTAINS} AddrbookSearchType; +/** + * Represent a contact entry + */ +typedef struct _Hit { + gchar *name; + GdkPixbuf *photo; + gchar *phone_business; + gchar *phone_home; + gchar *phone_mobile; +} Hit; + +/** + * Book structure for "outside world" + */ +typedef struct { + gchar *uid; + gchar *uri; + gchar *name; + gboolean active; + gboolean isdefault; +} book_data_t; + typedef struct _AddressBook_Config { // gint64: a signed integer guaranteed to be 64 bits on all platforms // To print or scan values of this type, use G_GINT64_MODIFIER and/or G_GINT64_FORMAT diff --git a/sflphone-client-gnome/src/contacts/searchbar.c b/sflphone-client-gnome/src/contacts/searchbar.c index 545e33651a93e19050b5c671d9593cc31ffc1da5..1bd06c3c5770ad078092b470921d3f91d3854a08 100644 --- a/sflphone-client-gnome/src/contacts/searchbar.c +++ b/sflphone-client-gnome/src/contacts/searchbar.c @@ -35,7 +35,7 @@ #include <calltree.h> #include <config/addressbook-config.h> #include <contacts/addressbook.h> -#include <contacts/addressbook/eds.h> +// #include <contacts/addressbook/eds.h> #include <contacts/addrbookfactory.h> GtkWidget * searchbox;