Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in / Register
Toggle navigation
J
jami-daemon
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
124
Issues
124
List
Boards
Labels
Milestones
Security & Compliance
Security & Compliance
Dependency List
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
savoirfairelinux
jami-daemon
Commits
0b998639
Commit
0b998639
authored
Sep 12, 2011
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* #5695: addressbook : remove AddrBookHandle from plugin
parent
02d1e694
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
45 deletions
+8
-45
gnome/src/contacts/addrbookfactory.c
gnome/src/contacts/addrbookfactory.c
+0
-4
gnome/src/contacts/addressbook.h
gnome/src/contacts/addressbook.h
+1
-2
gnome/src/contacts/searchbar.c
gnome/src/contacts/searchbar.c
+3
-3
plugins/addressbook/evolution/addressbook.c
plugins/addressbook/evolution/addressbook.c
+2
-12
plugins/addressbook/evolution/addressbook.h
plugins/addressbook/evolution/addressbook.h
+1
-20
plugins/addressbook/evolution/eds.c
plugins/addressbook/evolution/eds.c
+1
-1
plugins/addressbook/evolution/eds.h
plugins/addressbook/evolution/eds.h
+0
-3
No files found.
gnome/src/contacts/addrbookfactory.c
View file @
0b998639
...
...
@@ -81,10 +81,6 @@ void abookfactory_load_module(AddrBookFactory *factory)
if
(
ab
->
is_ready
==
NULL
)
ERROR
(
"AddressbookFactory: Error: Could not load addressbook addressbook_is_ready function"
);
ab
->
is_enabled
=
dlsym
(
handle
,
"addressbook_is_enabled"
);
if
(
ab
->
is_enabled
==
NULL
)
ERROR
(
"AddressbookFactory: Error: Could not load addressbook addressbook_is_enabled function"
);
ab
->
is_active
=
dlsym
(
handle
,
"addressbook_is_active"
);
if
(
ab
->
is_active
==
NULL
)
ERROR
(
"AddressbookFactory: Error: Could not load addressbook addressbook_is_active function"
);
...
...
gnome/src/contacts/addressbook.h
View file @
0b998639
...
...
@@ -80,9 +80,8 @@ typedef struct AddrBookHandle AddrBookHandle;
struct
AddrBookHandle
{
void
(
*
init
)
(
gchar
**
);
gboolean
(
*
is_ready
)
(
void
);
gboolean
(
*
is_enabled
)
(
void
);
gboolean
(
*
is_active
)
(
void
);
void
(
*
search
)
(
AddrBookHandle
*
,
GtkEntry
*
,
AddressBook_Config
*
);
void
(
*
search
)
(
void
(
*
search_cb
)(
GList
*
,
gpointer
)
,
GtkEntry
*
,
AddressBook_Config
*
);
GSList
*
(
*
get_books_data
)(
gchar
**
);
book_data_t
*
(
*
get_book_data_by_uid
)(
gchar
*
);
void
(
*
set_current_book
)(
gchar
*
);
...
...
gnome/src/contacts/searchbar.c
View file @
0b998639
...
...
@@ -64,7 +64,7 @@ void searchbar_addressbook_activated (GtkEntry *entry, gchar *arg1 UNUSED, gpoin
AddrBookFactory
*
factory
=
abookfactory_get_factory
();
AddressBook_Config
*
addressbook_config
;
addressbook_config_load_parameters
(
&
addressbook_config
);
factory
->
addrbook
->
search
(
factory
->
addrbook
,
entry
,
addressbook_config
);
factory
->
addrbook
->
search
(
factory
->
addrbook
->
search_cb
,
entry
,
addressbook_config
);
}
}
...
...
@@ -88,7 +88,7 @@ static void cbox_changed_cb (GtkWidget *widget, gpointer user_data UNUSED)
factory
->
addrbook
->
set_current_book
(
gtk_combo_box_get_active_text
(
GTK_COMBO_BOX
(
widget
)));
AddressBook_Config
*
addressbook_config
;
addressbook_config_load_parameters
(
&
addressbook_config
);
factory
->
addrbook
->
search
(
factory
->
addrbook
,
GTK_ENTRY
(
addressbookentry
),
addressbook_config
);
factory
->
addrbook
->
search
(
factory
->
addrbook
->
search_cb
,
GTK_ENTRY
(
addressbookentry
),
addressbook_config
);
}
}
...
...
@@ -190,7 +190,7 @@ static void select_search_type (GtkWidget *item, GtkEntry *entry UNUSED)
AddressBook_Config
*
addressbook_config
;
addressbook_config_load_parameters
(
&
addressbook_config
);
factory
->
addrbook
->
search
(
factory
->
addrbook
,
GTK_ENTRY
(
addressbookentry
),
addressbook_config
);
factory
->
addrbook
->
search
(
factory
->
addrbook
->
search_cb
,
GTK_ENTRY
(
addressbookentry
),
addressbook_config
);
}
}
...
...
plugins/addressbook/evolution/addressbook.c
View file @
0b998639
...
...
@@ -37,22 +37,12 @@
* Perform a search on address book
*/
void
addressbook_search
(
AddrBookHandle
*
handle
,
GtkEntry
*
entry
,
AddressBook_Config
*
addressbook_config
)
addressbook_search
(
void
(
*
search_cb
)(
GList
*
,
gpointer
)
,
GtkEntry
*
entry
,
AddressBook_Config
*
addressbook_config
)
{
const
gchar
*
query
=
gtk_entry_get_text
(
GTK_ENTRY
(
entry
));
printf
(
"Addressbook: Search %s
\n
"
,
query
);
search_async_by_contacts
(
gtk_entry_get_text
(
GTK_ENTRY
(
entry
)),
addressbook_config
->
max_results
,
handle
->
search_cb
,
addressbook_config
);
}
/**
* Return addressbook state
*/
gboolean
addressbook_is_enabled
()
{
return
TRUE
;
search_async_by_contacts
(
gtk_entry_get_text
(
GTK_ENTRY
(
entry
)),
addressbook_config
->
max_results
,
search_cb
,
addressbook_config
);
}
/**
...
...
plugins/addressbook/evolution/addressbook.h
View file @
0b998639
...
...
@@ -39,10 +39,6 @@
#define __ADDRESSBOOK_H__
#include <gtk/gtk.h>
// #include <addressbook/eds.h>
#define EMPTY_ENTRY "empty"
typedef
enum
{
ABOOK_QUERY_IS
,
ABOOK_QUERY_BEGINS_WITH
,
ABOOK_QUERY_CONTAINS
}
AddrbookSearchType
;
...
...
@@ -79,21 +75,6 @@ typedef struct _AddressBook_Config {
gint
search_phone_mobile
;
}
AddressBook_Config
;
typedef
struct
AddrBookHandle
AddrBookHandle
;
struct
AddrBookHandle
{
void
(
*
init
)
(
gchar
**
);
gboolean
(
*
is_ready
)
(
void
);
gboolean
(
*
is_enabled
)
(
void
);
gboolean
(
*
is_active
)
(
void
);
void
(
*
search
)
(
AddrBookHandle
*
,
GtkEntry
*
,
AddressBook_Config
*
);
GSList
*
(
*
get_books_data
)(
gchar
**
);
book_data_t
*
(
*
get_book_data_by_uid
)(
gchar
*
);
void
(
*
set_current_book
)(
gchar
*
);
void
(
*
set_search_type
)(
AddrbookSearchType
);
void
(
*
search_cb
)(
GList
*
,
gpointer
);
};
/**
* Initialize addressbook
*/
...
...
@@ -118,7 +99,7 @@ gboolean addressbook_is_active();
/**
* Perform a search in addressbook
*/
void
addressbook_search
(
AddrBookHandle
*
,
GtkEntry
*
,
AddressBook_Config
*
);
void
addressbook_search
(
void
(
*
search_cb
)(
GList
*
,
gpointer
)
,
GtkEntry
*
,
AddressBook_Config
*
);
/**
* Get a list of addressbook book
...
...
plugins/addressbook/evolution/eds.c
View file @
0b998639
...
...
@@ -737,7 +737,7 @@ fetch_information_from_contact (EContact *contact, EContactField field, gchar **
to_fetch
=
g_strdup
(
(
char
*
)
e_contact_get_const
(
contact
,
field
));
if
(
!
to_fetch
)
{
to_fetch
=
g_strdup
(
EMPTY_ENTRY
);
to_fetch
=
g_strdup
(
"empty"
);
}
*
info
=
g_strdup
(
to_fetch
);
...
...
plugins/addressbook/evolution/eds.h
View file @
0b998639
...
...
@@ -43,11 +43,8 @@
#include <libebook/e-book.h>
#include "addressbook.h"
// #include "sflphone_const.h"
#define EMPTY_ENTRY "empty"
G_BEGIN_DECLS
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment