Replace functions which called once with their bodies
[pidgin-git.git] / pidgin / plugins / gevolution / gevolution.h
blobaea1f3d7b9e9b5fbef8eaf41a64b2868e5c1e805
1 /*
2 * Evolution integration plugin for Purple
4 * Copyright (C) 2003 Christian Hammond.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 * 02111-1301, USA.
21 #ifndef _GEVOLUTION_H_
22 #define _GEVOLUTION_H_
24 #ifdef HAVE_CONFIG_H
25 # include "config.h"
26 #endif
28 #include <libebook/libebook.h>
30 enum
32 ADDRBOOK_COLUMN_NAME,
33 ADDRBOOK_COLUMN_UID,
34 NUM_ADDRBOOK_COLUMNS
37 typedef struct
39 GtkListStore *sources;
40 EBook *active_book;
41 GList *contacts;
43 } GevoAddrbooksSelector;
45 typedef struct
47 PurpleAccount *account;
48 char *username;
50 EBook *book;
52 GtkWidget *win;
53 GtkWidget *treeview;
54 GtkWidget *addrbooks_combo;
55 GtkWidget *search_field;
56 GtkWidget *group_combo;
57 GtkWidget *select_button;
58 GtkWidget *account_optmenu;
59 GtkListStore *model;
61 GtkTreeModel *addrbooks;
62 GList *contacts;
64 } GevoAddBuddyDialog;
66 typedef struct
68 gboolean person_only;
70 PurpleAccount *account;
71 PurpleBuddy *buddy;
73 EBook *book;
74 EContact *contact;
76 GtkWidget *win;
77 GtkWidget *accounts_menu;
78 GtkWidget *username;
79 GtkWidget *firstname;
80 GtkWidget *lastname;
81 GtkWidget *email;
82 GtkWidget *group_combo;
83 GtkWidget *add_button;
85 char *buddy_icon;
87 } GevoNewPersonDialog;
89 typedef struct
91 PurpleBuddy *buddy;
93 EBook *book;
95 GtkWidget *win;
96 GtkWidget *treeview;
97 GtkWidget *addrbooks_combo;
98 GtkWidget *search_field;
99 GtkWidget *assoc_button;
100 GtkListStore *model;
102 GtkTreeModel *addrbooks;
103 GList *contacts;
105 } GevoAssociateBuddyDialog;
107 void gevo_add_buddy_dialog_show(PurpleAccount *account, const char *username,
108 const char *group, const char *alias);
109 void gevo_add_buddy_dialog_add_person(GevoAddBuddyDialog *dialog,
110 EContact *contact,
111 const char *name, PurpleAccount *account,
112 const char *screenname);
114 void gevo_new_person_dialog_show(EBook *book, EContact *contact,
115 PurpleAccount *account, const char *username,
116 const char *group, PurpleBuddy *buddy,
117 gboolean person_only);
119 void gevo_add_buddy(PurpleAccount *account, const char *group_name,
120 const char *screenname, const char *alias);
121 GList *gevo_get_groups(void);
123 EContactField gevo_protocol_get_field(PurpleAccount *account, PurpleBuddy *buddy);
124 gboolean gevo_protocol_is_supported(PurpleAccount *account, PurpleBuddy *buddy);
125 gboolean gevo_load_addressbook(const gchar *uid, EBook **book, GError **error);
126 gboolean gevo_load_addressbook_from_source(ESource *source, EBook **book,
127 GError **error);
128 char *gevo_get_email_for_buddy(PurpleBuddy *buddy);
130 GevoAssociateBuddyDialog *gevo_associate_buddy_dialog_new(PurpleBuddy *buddy);
132 GtkTreeModel *gevo_addrbooks_model_new(void);
133 void gevo_addrbooks_model_unref(GtkTreeModel *model);
134 void gevo_addrbooks_model_populate(GtkTreeModel *model);
135 EContact *gevo_search_buddy_in_contacts(PurpleBuddy *buddy, EBookQuery *query);
137 #endif /* _GEVOLUTION_H_ */