2007-07-09 [colin] 2.10.0cvs12
[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 2 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, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
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 #ifdef USE_LDAP
28
29 #include <glib.h>
30 #include <glib/gi18n.h>
31 #include <gdk/gdkkeysyms.h>
32 #include <gtk/gtkwindow.h>
33 #include <gtk/gtksignal.h>
34 #include <gtk/gtklabel.h>
35 #include <gtk/gtkvbox.h>
36 #include <gtk/gtkentry.h>
37 #include <gtk/gtktable.h>
38
39 typedef struct _PersonEdit_dlg PersonEditDlg;
40 struct _PersonEdit_dlg {
41         GtkWidget *container;
42         GtkWidget *notebook;
43         GtkWidget *ok_btn;
44         GtkWidget *cancel_btn;
45         GtkWidget *statusbar;   /* used when prefs_common.addressbook_use_editaddress_dialog is TRUE */
46         GtkWidget *title;       /* used when prefs_common.addressbook_use_editaddress_dialog is FALSE */
47         gint status_cid;
48
49         /* User data tab */
50         GtkWidget *entry_name;
51         GtkWidget *entry_first;
52         GtkWidget *entry_last;
53         GtkWidget *entry_nick;
54
55         /* EMail data tab */
56         GtkWidget *entry_email;
57         GtkWidget *entry_alias;
58         GtkWidget *entry_remarks;
59         GtkWidget *clist_email;
60         GtkWidget *email_up;
61         GtkWidget *email_down;
62         GtkWidget *email_del;
63         GtkWidget *email_mod;
64         GtkWidget *email_add;
65
66         /* Attribute data tab */
67         GtkWidget *entry_atname;
68         GtkWidget *entry_atvalue;
69         GtkWidget *clist_attrib;
70         GtkWidget *attrib_add;
71         GtkWidget *attrib_del;
72         GtkWidget *attrib_mod;
73
74         gint rowIndEMail;
75         gint rowIndAttrib;
76         gboolean editNew;
77         gboolean read_only;
78         gboolean ldap;
79 };
80
81 static const char *ATTRIBUTE[] = {
82         "telephoneNumber",
83         /*"description (Remarks)",*/
84         "title",
85         "telexNumber",
86         "facsimileTelephoneNumber",
87         "street",
88         "postOfficeBox",
89         "postalCode",
90         "postalAddress",
91         "st", /* state or province */
92         "departmentNumber",
93         "homePhone",
94         "homePostalAddress",
95         "initials",
96         "labeledURI",
97         "mobile",
98         "pager",
99         "roomNumber",
100         NULL
101 };
102
103 static const int ATTRIBUTE_SIZE = (sizeof(ATTRIBUTE) / sizeof(*ATTRIBUTE)) - 1;
104
105 /* Function proto types */
106 void addressbook_edit_person_page_attrib_ldap(PersonEditDlg *personEditDlg, gint pageNum, gchar *pageLbl);
107 int get_attribute_index(const gchar *string_literal);
108
109 #endif  /* USE_LDAP */
110
111 #endif /* __EDITADDRESS_OTHER_ATTRIBUTES_LDAP_H__ */