2
GQ -- a GTK-based LDAP client
3
Copyright (C) 1998-2003 Bert Vermeulen
4
Copyright (C) 2002-2003 Peter Stamfest
6
This program is released under the Gnu General Public License with
7
the additional exemption that compiling, linking, and/or using
10
This program is free software; you can redistribute it and/or modify
11
it under the terms of the GNU General Public License as published by
12
the Free Software Foundation; either version 2 of the License, or
13
(at your option) any later version.
15
This program is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
GNU General Public License for more details.
20
You should have received a copy of the GNU General Public License
21
along with this program; if not, write to the Free Software
22
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28
#include <ldap_schema.h>
31
# include <config.h> /* pull in HAVE_* defines */
32
#endif /* HAVE_CONFIG_H */
38
typedef GObject GqFormfill;
39
typedef GObjectClass GqFormfillClass;
47
#define GQ_TYPE_FORMFILL (gq_formfill_get_type())
48
#define GQ_FORMFILL(i) (G_TYPE_CHECK_INSTANCE_CAST((i), GQ_TYPE_FORMFILL, GqFormfill))
49
#define GQ_FORMFILL_CLASS(c) (G_TYPE_CHECK_CLASS_CAST((c), GQ_TYPE_FORMFILL, GqFormfillClass))
50
#define GQ_IS_FORMFILL(i) (G_TYPE_CHECK_INSTANCE_TYPE((i), GQ_TYPE_FORMFILL))
51
#define GQ_IS_FORMFILL_CLASS(c) (G_TYPE_CHECK_CLASS_CAST((c), GQ_TYPE_FORMFILL))
52
#define GQ_FORMFILL_GET_CLASS(i) (G_TYPE_INSTANCE_GET_CLASS((i), GQ_TYPE_FORMFILL, GqFormfillClass))
55
// FIXME: add DISPLAYTYPE_INVALID = 0,
57
GQ_DISPLAY_TYPE_ENTRY,
59
DISPLAYTYPE_PASSWORD = 4,
60
DISPLAYTYPE_BINARY = 5,
67
DISPLAYTYPE_CERT = DISPLAYTYPE_BINARY,
68
DISPLAYTYPE_CRL = DISPLAYTYPE_BINARY,
70
DISPLAYTYPE_TIME = 10,
72
DISPLAYTYPE_NUMSTR = 12,
75
#warning "FIXME: call them right"
77
typedef GQDisplayType GqDisplayType;
79
#warning "FIXME: make flags from these"
80
#define FLAG_NOT_IN_SCHEMA 0x01
81
#define FLAG_MUST_IN_SCHEMA 0x02
82
/* The FLAG_DEL_ME is used to mark form entries not compatible with
83
the schema of the object */
84
#define FLAG_DEL_ME 0x04
85
/* Used to suppress the "more" button for single valued attributes */
86
#define FLAG_SINGLE_VALUE 0x08
87
/* Used to temporarily mark attributes added for extensibleObject entries */
88
#define FLAG_EXTENSIBLE_OBJECT_ATTR 0x10
90
/* Used to disable widgets for attributes marked as no_user_mod */
91
#define FLAG_NO_USER_MOD 0x80
93
/* forward decls to avoid circular inclusion problems */
94
#warning "FIXME: remove these forward decls"
95
struct _display_type_handler;
97
#warning "FIXME: remove aliases"
98
#define DISPLAYTYPE_ENTRY GQ_DISPLAY_TYPE_ENTRY
99
#define new_formfill() gq_formfill_new()
100
#define free_formfill(i) g_object_unref(i)
102
GType gq_formfill_get_type(void);
103
GqFormfill* gq_formfill_new (void);
105
gboolean gq_formfill_equals_data (GqFormfill * form1,
108
gchar const* gq_formfill_get_attrname(GqFormfill const* self);
109
void gq_formfill_set_attrname(GqFormfill * self,
110
gchar const * attrname);
112
GqDisplayType gq_formfill_get_display_type(GqFormfill const* self);
113
void gq_formfill_set_display_type(GqFormfill * self,
116
GType gq_formfill_get_dt_handler(GqFormfill const* self);
117
void gq_formfill_change_display_type(GqFormfill* self,
119
void gq_formfill_set_dt_handler(GqFormfill * self,
122
GtkWidget* gq_formfill_get_event_box(GqFormfill const* self);
123
void gq_formfill_set_event_box(GqFormfill * self,
124
GtkWidget * event_box);
126
int gq_formfill_get_flags (GqFormfill const* self);
127
void gq_formfill_set_flag (GqFormfill * self,
129
void gq_formfill_unset_flag(GqFormfill * self,
132
GtkWidget* gq_formfill_get_label(GqFormfill const* self);
133
void gq_formfill_set_label(GqFormfill * self,
136
GtkWidget* gq_formfill_get_morebutton(GqFormfill const* self);
137
void gq_formfill_set_morebutton(GqFormfill * self,
138
GtkWidget * morebutton);
140
int gq_formfill_get_n_inputfields(GqFormfill const* self);
141
void gq_formfill_set_n_inputfields(GqFormfill * self,
144
GqServer* gq_formfill_get_server(GqFormfill const* self);
145
void gq_formfill_set_server(GqFormfill * self,
148
GqSyntax* gq_formfill_get_syntax(GqFormfill const* self);
149
void gq_formfill_set_syntax(GqFormfill * self,
152
GList* gq_formfill_get_values(GqFormfill const* self);
153
void gq_formfill_add_value (GqFormfill * self,
156
GtkWidget* gq_formfill_get_vbox(GqFormfill const* self);
157
void gq_formfill_set_vbox(GqFormfill * self,
160
GList* gq_formfill_get_widgets (GqFormfill const* self);
161
void gq_formfill_add_widget (GqFormfill * self,
163
void gq_formfill_clear_widgets(GqFormfill * self);
165
#warning "FIXME: (un)init the internal attrs from the class"
166
void init_internalAttrs(void);
167
gboolean isInternalAttr(const char *attr);
169
void free_formlist(GList *formlist);
170
void free_formfill_values(GqFormfill *form);
171
GList *formlist_append(GList *formlist, GqFormfill *form);
172
#warning "FIXME: formfill_from_entry() should get a GqServerDn"
173
GList *formlist_from_entry(int error_context,
175
const char *dn, int ocvalues_only);
176
GList *dup_formlist(GList *formlist);
177
void dump_formlist(GList *formlist);
178
GqFormfill* lookup_attribute(GList * formlist,
180
GqFormfill *lookup_attribute_using_schema(GList *formlist,
182
struct server_schema *schema,
183
LDAPAttributeType **attrtype);
184
int find_displaytype(int error_context, GqServer *server,
186
void set_displaytype(int error_context, GqServer *server,
189
char *attr_strip(const char *attr);
193
#endif /* GQ_FORMFILL_H */