1 /*
2  *
3  * This program is free software; you can redistribute it and/or modify it
4  * under the terms of the GNU Lesser General Public License as published by
5  * the Free Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful, but
8  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
9  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
10  * for more details.
11  *
12  * You should have received a copy of the GNU Lesser General Public License
13  * along with this program; if not, see <http://www.gnu.org/licenses/>.
14  *
15  *
16  * Authors:
17  *		Chris Toshok <toshok@ximian.com>
18  *
19  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
20  *
21  */
22 
23 #ifndef __E_ADDRESSBOOK_UTIL_H__
24 #define __E_ADDRESSBOOK_UTIL_H__
25 
26 #include <gtk/gtk.h>
27 #include <libebook/libebook.h>
28 
29 #include <e-util/e-util.h>
30 
31 G_BEGIN_DECLS
32 
33 void		eab_error_dialog		(EAlertSink *alert_sink,
34 						 GtkWindow *parent,
35 						 const gchar *msg,
36 						 const GError *error);
37 void		eab_load_error_dialog		(GtkWidget *parent,
38 						 EAlertSink *alert_sink,
39 						 ESource *source,
40 						 const GError *error);
41 void		eab_search_result_dialog	(EAlertSink *alert_sink,
42 						 const GError *error);
43 gint		eab_prompt_save_dialog		(GtkWindow *parent);
44 void		eab_transfer_contacts		(ESourceRegistry *registry,
45 						 EBookClient *source_client,
46 						 GSList *contacts, /* adopted */
47 						 gboolean delete_from_source,
48 						 EAlertSink *alert_sink);
49 gchar *		eab_suggest_filename		(const GSList *contact_list);
50 ESource *	eab_select_source		(ESourceRegistry *registry,
51 						 ESource *except_source,
52 						 const gchar *title,
53 						 const gchar *message,
54 						 const gchar *select_uid,
55 						 GtkWindow *parent);
56 
57 gchar *		eab_format_address		(EContact *contact,
58 						 EContactField address_type);
59 gboolean	eab_fullname_matches_nickname	(EContact *contact);
60 
61 G_END_DECLS
62 
63 #endif /* __E_ADDRESSBOOK_UTIL_H__ */
64