2008-08-28 [iwkse] 3.5.0cvs79
[claws.git] / src / editaddress_other_attributes_ldap.h
1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2007 Michael Rasmussen and the Claws Mail team
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  * 
18  */
19
20 /*
21  * Edit address item data.
22  */
23
24 #ifndef __EDITADDRESS_OTHER_ATTRIBUTES_LDAP_H__
25 #define __EDITADDRESS_OTHER_ATTRIBUTES_LDAP_H__
26
27 #include <glib.h>
28 #include <glib/gi18n.h>
29 #include <gdk/gdkkeysyms.h>
30 #include <gtk/gtkwindow.h>
31 #include <gtk/gtksignal.h>
32 #include <gtk/gtklabel.h>
33 #include <gtk/gtkvbox.h>
34 #include <gtk/gtkentry.h>
35 #include <gtk/gtktable.h>
36 #include <gtk/gtkitemfactory.h>
37
38 typedef struct _PersonEdit_dlg PersonEditDlg;
39 struct _PersonEdit_dlg {
40         GtkWidget *container;
41         GtkWidget *notebook;
42         GtkWidget *ok_btn;
43         GtkWidget *cancel_btn;
44         GtkWidget *statusbar;   /* used when prefs_common.addressbook_use_editaddress_dialog is TRUE */
45         GtkWidget *title;       /* used when prefs_common.addressbook_use_editaddress_dialog is FALSE */
46         gint status_cid;
47
48         /* User data tab */
49         GtkWidget *image;
50         gboolean picture_set;
51         GtkWidget *entry_name;
52         GtkWidget *entry_first;
53         GtkWidget *entry_last;
54         GtkWidget *entry_nick;
55
56         /* EMail data tab */
57         GtkWidget *entry_email;
58         GtkWidget *entry_alias;
59         GtkWidget *entry_remarks;
60         GtkWidget *clist_email;
61         GtkWidget *email_up;
62         GtkWidget *email_down;
63         GtkWidget *email_del;
64         GtkWidget *email_mod;
65         GtkWidget *email_add;
66
67         /* Attribute data tab */
68         GtkWidget *entry_atname;
69         GtkWidget *entry_atvalue;
70         GtkWidget *clist_attrib;
71         GtkWidget *attrib_add;
72         GtkWidget *attrib_del;
73         GtkWidget *attrib_mod;
74
75         gint rowIndEMail;
76         gint rowIndAttrib;
77         gboolean editNew;
78         gboolean read_only;
79         gboolean ldap;
80 };
81
82 #ifdef USE_LDAP
83
84 static const char *ATTRIBUTE[] = {
85         "telephoneNumber",
86         /*"description (Remarks)",*/
87         "title",
88         "telexNumber",
89         "facsimileTelephoneNumber",
90         "street",
91         "postOfficeBox",
92         "postalCode",
93         "postalAddress",
94         "st", /* state or province */
95         "l", /* locality Name */
96         "departmentNumber",
97         "homePhone",
98         "homePostalAddress",
99         "initials",
100         "labeledURI",
101         "mobile",
102         "pager",
103         "roomNumber",
104         "jpegPhoto",
105         NULL
106 };
107
108 static const int ATTRIBUTE_SIZE = (sizeof(ATTRIBUTE) / sizeof(*ATTRIBUTE)) - 1;
109
110 /* Function proto types */
111 void addressbook_edit_person_page_attrib_ldap(PersonEditDlg *personEditDlg, gint pageNum, gchar *pageLbl);
112 int get_attribute_index(const gchar *string_literal);
113
114 #endif  /* USE_LDAP */
115
116 #endif /* __EDITADDRESS_OTHER_ATTRIBUTES_LDAP_H__ */