From 5e2f638d6a612bcbc36a507531ea69cc5b39a839 Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Sun, 25 Oct 2015 06:52:12 +0100 Subject: [PATCH] Removed cgi from namespace. --- src/formelementfiltertrim.c | 92 ++++++++++++++--------------- src/formelementfiltertrim.h | 12 ++-- src/formelementifilter.c | 10 ++-- src/formelementifilter.h | 16 ++--- src/formelementivalidator.c | 10 ++-- src/formelementivalidator.h | 16 ++--- src/formelementvalidatornotempty.c | 90 ++++++++++++++-------------- src/formelementvalidatornotempty.h | 12 ++-- src/formelementvalidatorregex.c | 94 +++++++++++++++--------------- src/formelementvalidatorregex.h | 12 ++-- 10 files changed, 182 insertions(+), 182 deletions(-) diff --git a/src/formelementfiltertrim.c b/src/formelementfiltertrim.c index 8c3fa6a..1ee5b29 100644 --- a/src/formelementfiltertrim.c +++ b/src/formelementfiltertrim.c @@ -23,92 +23,92 @@ #include "formelementifilter.h" #include "formelementfiltertrim.h" -static void zak_cgi_form_element_filter_trim_class_init (ZakCgiFormElementFilterTrimClass *class); -static void zak_cgi_form_element_filter_trim_interface_init (ZakCgiFormElementIFilterInterface *iface); -static void zak_cgi_form_element_filter_trim_init (ZakCgiFormElementFilterTrim *zak_cgi_form_element); +static void zak_form_element_filter_trim_class_init (ZakFormElementFilterTrimClass *class); +static void zak_form_element_filter_trim_interface_init (ZakFormElementIFilterInterface *iface); +static void zak_form_element_filter_trim_init (ZakFormElementFilterTrim *zak_form_element); -static void zak_cgi_form_element_filter_trim_set_property (GObject *object, +static void zak_form_element_filter_trim_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); -static void zak_cgi_form_element_filter_trim_get_property (GObject *object, +static void zak_form_element_filter_trim_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); -static void zak_cgi_form_element_filter_trim_dispose (GObject *gobject); -static void zak_cgi_form_element_filter_trim_finalize (GObject *gobject); +static void zak_form_element_filter_trim_dispose (GObject *gobject); +static void zak_form_element_filter_trim_finalize (GObject *gobject); -static GValue *zak_cgi_form_element_filter_trim_filter (ZakCgiFormElementIFilter *filter_trim, GValue *value); +static GValue *zak_form_element_filter_trim_filter (ZakFormElementIFilter *filter_trim, GValue *value); -struct _ZakCgiFormElementFilterTrim +struct _ZakFormElementFilterTrim { GObject parent_instance; /* Other members, including private data. */ }; -#define ZAK_CGI_FORM_ELEMENT_FILTER_TRIM_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZAK_CGI_TYPE_FORM_ELEMENT_FILTER_TRIM, ZakCgiFormElementFilterTrimPrivate)) +#define ZAK_FORM_ELEMENT_FILTER_TRIM_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZAK_TYPE_FORM_ELEMENT_FILTER_TRIM, ZakFormElementFilterTrimPrivate)) -typedef struct _ZakCgiFormElementFilterTrimPrivate ZakCgiFormElementFilterTrimPrivate; -struct _ZakCgiFormElementFilterTrimPrivate +typedef struct _ZakFormElementFilterTrimPrivate ZakFormElementFilterTrimPrivate; +struct _ZakFormElementFilterTrimPrivate { gpointer nothing; }; -G_DEFINE_TYPE_WITH_CODE (ZakCgiFormElementFilterTrim, zak_cgi_form_element_filter_trim, G_TYPE_OBJECT, - G_IMPLEMENT_INTERFACE (ZAK_CGI_TYPE_FORM_ELEMENT_IFILTER, - zak_cgi_form_element_filter_trim_interface_init)) +G_DEFINE_TYPE_WITH_CODE (ZakFormElementFilterTrim, zak_form_element_filter_trim, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (ZAK_TYPE_FORM_ELEMENT_IFILTER, + zak_form_element_filter_trim_interface_init)) static void -zak_cgi_form_element_filter_trim_class_init (ZakCgiFormElementFilterTrimClass *class) +zak_form_element_filter_trim_class_init (ZakFormElementFilterTrimClass *class) { GObjectClass *object_class = G_OBJECT_CLASS (class); - object_class->set_property = zak_cgi_form_element_filter_trim_set_property; - object_class->get_property = zak_cgi_form_element_filter_trim_get_property; - object_class->dispose = zak_cgi_form_element_filter_trim_dispose; - object_class->finalize = zak_cgi_form_element_filter_trim_finalize; + object_class->set_property = zak_form_element_filter_trim_set_property; + object_class->get_property = zak_form_element_filter_trim_get_property; + object_class->dispose = zak_form_element_filter_trim_dispose; + object_class->finalize = zak_form_element_filter_trim_finalize; - g_type_class_add_private (object_class, sizeof (ZakCgiFormElementFilterTrimPrivate)); + g_type_class_add_private (object_class, sizeof (ZakFormElementFilterTrimPrivate)); } static void -zak_cgi_form_element_filter_trim_interface_init (ZakCgiFormElementIFilterInterface *iface) +zak_form_element_filter_trim_interface_init (ZakFormElementIFilterInterface *iface) { - iface->filter = zak_cgi_form_element_filter_trim_filter; + iface->filter = zak_form_element_filter_trim_filter; } static void -zak_cgi_form_element_filter_trim_init (ZakCgiFormElementFilterTrim *zak_cgi_form_element) +zak_form_element_filter_trim_init (ZakFormElementFilterTrim *zak_form_element) { - ZakCgiFormElementFilterTrimPrivate *priv = ZAK_CGI_FORM_ELEMENT_FILTER_TRIM_GET_PRIVATE (zak_cgi_form_element); + ZakFormElementFilterTrimPrivate *priv = ZAK_FORM_ELEMENT_FILTER_TRIM_GET_PRIVATE (zak_form_element); } /** - * zak_cgi_form_element_filter_trim_new: + * zak_form_element_filter_trim_new: * - * Returns: the newly created #ZakCgiFormElementFilterTrim object. + * Returns: the newly created #ZakFormElementFilterTrim object. */ -ZakCgiFormElementFilterTrim -*zak_cgi_form_element_filter_trim_new () +ZakFormElementFilterTrim +*zak_form_element_filter_trim_new () { - ZakCgiFormElementFilterTrim *zak_cgi_form_element_filter_trim; + ZakFormElementFilterTrim *zak_form_element_filter_trim; - zak_cgi_form_element_filter_trim = ZAK_CGI_FORM_ELEMENT_FILTER_TRIM (g_object_new (zak_cgi_form_element_filter_trim_get_type (), NULL)); + zak_form_element_filter_trim = ZAK_FORM_ELEMENT_FILTER_TRIM (g_object_new (zak_form_element_filter_trim_get_type (), NULL)); - return zak_cgi_form_element_filter_trim; + return zak_form_element_filter_trim; } /* PRIVATE */ static void -zak_cgi_form_element_filter_trim_set_property (GObject *object, +zak_form_element_filter_trim_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { - ZakCgiFormElementFilterTrim *zak_cgi_form_element = (ZakCgiFormElementFilterTrim *)object; - ZakCgiFormElementFilterTrimPrivate *priv = ZAK_CGI_FORM_ELEMENT_FILTER_TRIM_GET_PRIVATE (zak_cgi_form_element); + ZakFormElementFilterTrim *zak_form_element = (ZakFormElementFilterTrim *)object; + ZakFormElementFilterTrimPrivate *priv = ZAK_FORM_ELEMENT_FILTER_TRIM_GET_PRIVATE (zak_form_element); switch (property_id) { @@ -119,13 +119,13 @@ zak_cgi_form_element_filter_trim_set_property (GObject *object, } static void -zak_cgi_form_element_filter_trim_get_property (GObject *object, +zak_form_element_filter_trim_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { - ZakCgiFormElementFilterTrim *zak_cgi_form_element = (ZakCgiFormElementFilterTrim *)object; - ZakCgiFormElementFilterTrimPrivate *priv = ZAK_CGI_FORM_ELEMENT_FILTER_TRIM_GET_PRIVATE (zak_cgi_form_element); + ZakFormElementFilterTrim *zak_form_element = (ZakFormElementFilterTrim *)object; + ZakFormElementFilterTrimPrivate *priv = ZAK_FORM_ELEMENT_FILTER_TRIM_GET_PRIVATE (zak_form_element); switch (property_id) { @@ -136,10 +136,10 @@ zak_cgi_form_element_filter_trim_get_property (GObject *object, } static void -zak_cgi_form_element_filter_trim_dispose (GObject *gobject) +zak_form_element_filter_trim_dispose (GObject *gobject) { - ZakCgiFormElementFilterTrim *zak_cgi_form_element = (ZakCgiFormElementFilterTrim *)gobject; - ZakCgiFormElementFilterTrimPrivate *priv = ZAK_CGI_FORM_ELEMENT_FILTER_TRIM_GET_PRIVATE (zak_cgi_form_element); + ZakFormElementFilterTrim *zak_form_element = (ZakFormElementFilterTrim *)gobject; + ZakFormElementFilterTrimPrivate *priv = ZAK_FORM_ELEMENT_FILTER_TRIM_GET_PRIVATE (zak_form_element); @@ -148,10 +148,10 @@ zak_cgi_form_element_filter_trim_dispose (GObject *gobject) } static void -zak_cgi_form_element_filter_trim_finalize (GObject *gobject) +zak_form_element_filter_trim_finalize (GObject *gobject) { - ZakCgiFormElementFilterTrim *zak_cgi_form_element = (ZakCgiFormElementFilterTrim *)gobject; - ZakCgiFormElementFilterTrimPrivate *priv = ZAK_CGI_FORM_ELEMENT_FILTER_TRIM_GET_PRIVATE (zak_cgi_form_element); + ZakFormElementFilterTrim *zak_form_element = (ZakFormElementFilterTrim *)gobject; + ZakFormElementFilterTrimPrivate *priv = ZAK_FORM_ELEMENT_FILTER_TRIM_GET_PRIVATE (zak_form_element); @@ -160,8 +160,8 @@ zak_cgi_form_element_filter_trim_finalize (GObject *gobject) } static GValue -*zak_cgi_form_element_filter_trim_filter (ZakCgiFormElementIFilter *filter_trim, - GValue *value) +*zak_form_element_filter_trim_filter (ZakFormElementIFilter *filter_trim, + GValue *value) { GValue *ret; gchar *_value; diff --git a/src/formelementfiltertrim.h b/src/formelementfiltertrim.h index 7b84a0d..cc666fe 100644 --- a/src/formelementfiltertrim.h +++ b/src/formelementfiltertrim.h @@ -16,8 +16,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef __ZAK_CGI_FORM_ELEMENT_FILTER_TRIM_H__ -#define __ZAK_CGI_FORM_ELEMENT_FILTER_TRIM_H__ +#ifndef __ZAK_FORM_ELEMENT_FILTER_TRIM_H__ +#define __ZAK_FORM_ELEMENT_FILTER_TRIM_H__ #include @@ -26,13 +26,13 @@ G_BEGIN_DECLS -#define ZAK_CGI_TYPE_FORM_ELEMENT_FILTER_TRIM zak_cgi_form_element_filter_trim_get_type () -G_DECLARE_FINAL_TYPE (ZakCgiFormElementFilterTrim, zak_cgi_form_element_filter_trim, ZAK_CGI, FORM_ELEMENT_FILTER_TRIM, GObject) +#define ZAK_TYPE_FORM_ELEMENT_FILTER_TRIM zak_form_element_filter_trim_get_type () +G_DECLARE_FINAL_TYPE (ZakFormElementFilterTrim, zak_form_element_filter_trim, ZAK_FORM, ELEMENT_FILTER_TRIM, GObject) -ZakCgiFormElementFilterTrim *zak_cgi_form_element_filter_trim_new (void); +ZakFormElementFilterTrim *zak_form_element_filter_trim_new (void); G_END_DECLS -#endif /* __ZAK_CGI_FORM_ELEMENT_FILTER_TRIM_H__ */ +#endif /* __ZAK_FORM_ELEMENT_FILTER_TRIM_H__ */ diff --git a/src/formelementifilter.c b/src/formelementifilter.c index 2061084..30a7259 100644 --- a/src/formelementifilter.c +++ b/src/formelementifilter.c @@ -18,18 +18,18 @@ #include "formelementifilter.h" -G_DEFINE_INTERFACE (ZakCgiFormElementIFilter, zak_cgi_form_element_ifilter, G_TYPE_OBJECT); +G_DEFINE_INTERFACE (ZakFormElementIFilter, zak_form_element_ifilter, G_TYPE_OBJECT); static void -zak_cgi_form_element_ifilter_default_init (ZakCgiFormElementIFilterInterface *iface) +zak_form_element_ifilter_default_init (ZakFormElementIFilterInterface *iface) { /* add properties and signals to the interface here */ } GValue -*zak_cgi_form_element_ifilter_filter (ZakCgiFormElementIFilter *self, GValue *value) +*zak_form_element_ifilter_filter (ZakFormElementIFilter *self, GValue *value) { - g_return_val_if_fail (ZAK_CGI_IS_FORM_ELEMENT_IFILTER (self), NULL); + g_return_val_if_fail (ZAK_FORM_IS_ELEMENT_IFILTER (self), NULL); - return ZAK_CGI_FORM_ELEMENT_IFILTER_GET_IFACE (self)->filter (self, value); + return ZAK_FORM_ELEMENT_IFILTER_GET_IFACE (self)->filter (self, value); } diff --git a/src/formelementifilter.h b/src/formelementifilter.h index fb8a09f..10676be 100644 --- a/src/formelementifilter.h +++ b/src/formelementifilter.h @@ -16,8 +16,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef __ZAK_CGI_FORM_ELEMENT_IFILTER_H__ -#define __ZAK_CGI_FORM_ELEMENT_IFILTER_H__ +#ifndef __ZAK_FORM_ELEMENT_IFILTER_H__ +#define __ZAK_FORM_ELEMENT_IFILTER_H__ #include @@ -25,20 +25,20 @@ G_BEGIN_DECLS -#define ZAK_CGI_TYPE_FORM_ELEMENT_IFILTER zak_cgi_form_element_ifilter_get_type () -G_DECLARE_INTERFACE (ZakCgiFormElementIFilter, zak_cgi_form_element_ifilter, ZAK_CGI, FORM_ELEMENT_IFILTER, GObject) +#define ZAK_TYPE_FORM_ELEMENT_IFILTER zak_form_element_ifilter_get_type () +G_DECLARE_INTERFACE (ZakFormElementIFilter, zak_form_element_ifilter, ZAK_FORM, ELEMENT_IFILTER, GObject) -struct _ZakCgiFormElementIFilterInterface +struct _ZakFormElementIFilterInterface { GTypeInterface parent_iface; - GValue *(*filter) (ZakCgiFormElementIFilter *self, GValue *value); + GValue *(*filter) (ZakFormElementIFilter *self, GValue *value); }; -GValue *zak_cgi_form_element_ifilter_filter (ZakCgiFormElementIFilter *self, GValue *value); +GValue *zak_form_element_ifilter_filter (ZakFormElementIFilter *self, GValue *value); G_END_DECLS -#endif /* __ZAK_CGI_FOR_ELEMENT_IFILTER_H__ */ +#endif /* __ZAK_FORM_ELEMENT_IFILTER_H__ */ diff --git a/src/formelementivalidator.c b/src/formelementivalidator.c index 9fb1207..1b8bc6c 100644 --- a/src/formelementivalidator.c +++ b/src/formelementivalidator.c @@ -18,18 +18,18 @@ #include "formelementivalidator.h" -G_DEFINE_INTERFACE (ZakCgiFormElementIValidator, zak_cgi_form_element_ivalidator, G_TYPE_OBJECT); +G_DEFINE_INTERFACE (ZakFormElementIValidator, zak_form_element_ivalidator, G_TYPE_OBJECT); static void -zak_cgi_form_element_ivalidator_default_init (ZakCgiFormElementIValidatorInterface *iface) +zak_form_element_ivalidator_default_init (ZakFormElementIValidatorInterface *iface) { /* add properties and signals to the interface here */ } gboolean -zak_cgi_form_element_ivalidator_validate (ZakCgiFormElementIValidator *self, GValue *value) +zak_form_element_ivalidator_validate (ZakFormElementIValidator *self, GValue *value) { - g_return_val_if_fail (ZAK_CGI_IS_FORM_ELEMENT_IVALIDATOR (self), FALSE); + g_return_val_if_fail (ZAK_FORM_IS_ELEMENT_IVALIDATOR (self), FALSE); - return ZAK_CGI_FORM_ELEMENT_IVALIDATOR_GET_IFACE (self)->validate (self, value); + return ZAK_FORM_ELEMENT_IVALIDATOR_GET_IFACE (self)->validate (self, value); } diff --git a/src/formelementivalidator.h b/src/formelementivalidator.h index cbce915..c0d76ec 100644 --- a/src/formelementivalidator.h +++ b/src/formelementivalidator.h @@ -16,8 +16,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef __ZAK_CGI_FORM_ELEMENT_IVALIDATOR_H__ -#define __ZAK_CGI_FORM_ELEMENT_IVALIDATOR_H__ +#ifndef __ZAK_FORM_ELEMENT_IVALIDATOR_H__ +#define __ZAK_FORM_ELEMENT_IVALIDATOR_H__ #include @@ -25,20 +25,20 @@ G_BEGIN_DECLS -#define ZAK_CGI_TYPE_FORM_ELEMENT_IVALIDATOR zak_cgi_form_element_ivalidator_get_type () -G_DECLARE_INTERFACE (ZakCgiFormElementIValidator, zak_cgi_form_element_ivalidator, ZAK_CGI, FORM_ELEMENT_IVALIDATOR, GObject) +#define ZAK_TYPE_FORM_ELEMENT_IVALIDATOR zak_form_element_ivalidator_get_type () +G_DECLARE_INTERFACE (ZakFormElementIValidator, zak_form_element_ivalidator, ZAK_FORM, ELEMENT_IVALIDATOR, GObject) -struct _ZakCgiFormElementIValidatorInterface +struct _ZakFormElementIValidatorInterface { GTypeInterface parent_iface; - gboolean (*validate) (ZakCgiFormElementIValidator *self, GValue *value); + gboolean (*validate) (ZakFormElementIValidator *self, GValue *value); }; -gboolean zak_cgi_form_element_ivalidator_validate (ZakCgiFormElementIValidator *self, GValue *value); +gboolean zak_form_element_ivalidator_validate (ZakFormElementIValidator *self, GValue *value); G_END_DECLS -#endif /* __ZAK_CGI_FOR_ELEMENT_IVALIDATOR_H__ */ +#endif /* __ZAK_FORM_ELEMENT_IVALIDATOR_H__ */ diff --git a/src/formelementvalidatornotempty.c b/src/formelementvalidatornotempty.c index c2e1a8d..37ef0e8 100644 --- a/src/formelementvalidatornotempty.c +++ b/src/formelementvalidatornotempty.c @@ -23,92 +23,92 @@ #include "formelementivalidator.h" #include "formelementvalidatornotempty.h" -static void zak_cgi_form_element_validator_notempty_class_init (ZakCgiFormElementValidatorNotemptyClass *class); -static void zak_cgi_form_element_validator_notempty_interface_init (ZakCgiFormElementIValidatorInterface *iface); -static void zak_cgi_form_element_validator_notempty_init (ZakCgiFormElementValidatorNotempty *zak_cgi_form_element); +static void zak_form_element_validator_notempty_class_init (ZakFormElementValidatorNotemptyClass *class); +static void zak_form_element_validator_notempty_interface_init (ZakFormElementIValidatorInterface *iface); +static void zak_form_element_validator_notempty_init (ZakFormElementValidatorNotempty *zak_form_element); -static void zak_cgi_form_element_validator_notempty_set_property (GObject *object, +static void zak_form_element_validator_notempty_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); -static void zak_cgi_form_element_validator_notempty_get_property (GObject *object, +static void zak_form_element_validator_notempty_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); -static void zak_cgi_form_element_validator_notempty_dispose (GObject *gobject); -static void zak_cgi_form_element_validator_notempty_finalize (GObject *gobject); +static void zak_form_element_validator_notempty_dispose (GObject *gobject); +static void zak_form_element_validator_notempty_finalize (GObject *gobject); -static gboolean zak_cgi_form_element_validator_notempty_validate (ZakCgiFormElementIValidator *validator_notempty, GValue *value); +static gboolean zak_form_element_validator_notempty_validate (ZakFormElementIValidator *validator_notempty, GValue *value); -struct _ZakCgiFormElementValidatorNotempty +struct _ZakFormElementValidatorNotempty { GObject parent_instance; /* Other members, including private data. */ }; -#define ZAK_CGI_FORM_ELEMENT_VALIDATOR_NOTEMPTY_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZAK_CGI_TYPE_FORM_ELEMENT_VALIDATOR_NOTEMPTY, ZakCgiFormElementValidatorNotemptyPrivate)) +#define ZAK_FORM_ELEMENT_VALIDATOR_NOTEMPTY_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZAK_TYPE_FORM_ELEMENT_VALIDATOR_NOTEMPTY, ZakFormElementValidatorNotemptyPrivate)) -typedef struct _ZakCgiFormElementValidatorNotemptyPrivate ZakCgiFormElementValidatorNotemptyPrivate; -struct _ZakCgiFormElementValidatorNotemptyPrivate +typedef struct _ZakFormElementValidatorNotemptyPrivate ZakFormElementValidatorNotemptyPrivate; +struct _ZakFormElementValidatorNotemptyPrivate { gpointer nothing; }; -G_DEFINE_TYPE_WITH_CODE (ZakCgiFormElementValidatorNotempty, zak_cgi_form_element_validator_notempty, G_TYPE_OBJECT, - G_IMPLEMENT_INTERFACE (ZAK_CGI_TYPE_FORM_ELEMENT_IVALIDATOR, - zak_cgi_form_element_validator_notempty_interface_init)) +G_DEFINE_TYPE_WITH_CODE (ZakFormElementValidatorNotempty, zak_form_element_validator_notempty, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (ZAK_TYPE_FORM_ELEMENT_IVALIDATOR, + zak_form_element_validator_notempty_interface_init)) static void -zak_cgi_form_element_validator_notempty_class_init (ZakCgiFormElementValidatorNotemptyClass *class) +zak_form_element_validator_notempty_class_init (ZakFormElementValidatorNotemptyClass *class) { GObjectClass *object_class = G_OBJECT_CLASS (class); - object_class->set_property = zak_cgi_form_element_validator_notempty_set_property; - object_class->get_property = zak_cgi_form_element_validator_notempty_get_property; - object_class->dispose = zak_cgi_form_element_validator_notempty_dispose; - object_class->finalize = zak_cgi_form_element_validator_notempty_finalize; + object_class->set_property = zak_form_element_validator_notempty_set_property; + object_class->get_property = zak_form_element_validator_notempty_get_property; + object_class->dispose = zak_form_element_validator_notempty_dispose; + object_class->finalize = zak_form_element_validator_notempty_finalize; - g_type_class_add_private (object_class, sizeof (ZakCgiFormElementValidatorNotemptyPrivate)); + g_type_class_add_private (object_class, sizeof (ZakFormElementValidatorNotemptyPrivate)); } static void -zak_cgi_form_element_validator_notempty_interface_init (ZakCgiFormElementIValidatorInterface *iface) +zak_form_element_validator_notempty_interface_init (ZakFormElementIValidatorInterface *iface) { - iface->validate = zak_cgi_form_element_validator_notempty_validate; + iface->validate = zak_form_element_validator_notempty_validate; } static void -zak_cgi_form_element_validator_notempty_init (ZakCgiFormElementValidatorNotempty *zak_cgi_form_element) +zak_form_element_validator_notempty_init (ZakFormElementValidatorNotempty *zak_form_element) { - ZakCgiFormElementValidatorNotemptyPrivate *priv = ZAK_CGI_FORM_ELEMENT_VALIDATOR_NOTEMPTY_GET_PRIVATE (zak_cgi_form_element); + ZakFormElementValidatorNotemptyPrivate *priv = ZAK_FORM_ELEMENT_VALIDATOR_NOTEMPTY_GET_PRIVATE (zak_form_element); } /** - * zak_cgi_form_element_validator_notempty_new: + * zak_form_element_validator_notempty_new: * - * Returns: the newly created #ZakCgiFormElementValidatorNotempty object. + * Returns: the newly created #ZakFormElementValidatorNotempty object. */ -ZakCgiFormElementValidatorNotempty -*zak_cgi_form_element_validator_notempty_new () +ZakFormElementValidatorNotempty +*zak_form_element_validator_notempty_new () { - ZakCgiFormElementValidatorNotempty *zak_cgi_form_element_validator_notempty; + ZakFormElementValidatorNotempty *zak_form_element_validator_notempty; - zak_cgi_form_element_validator_notempty = ZAK_CGI_FORM_ELEMENT_VALIDATOR_NOTEMPTY (g_object_new (zak_cgi_form_element_validator_notempty_get_type (), NULL)); + zak_form_element_validator_notempty = ZAK_FORM_ELEMENT_VALIDATOR_NOTEMPTY (g_object_new (zak_form_element_validator_notempty_get_type (), NULL)); - return zak_cgi_form_element_validator_notempty; + return zak_form_element_validator_notempty; } /* PRIVATE */ static void -zak_cgi_form_element_validator_notempty_set_property (GObject *object, +zak_form_element_validator_notempty_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { - ZakCgiFormElementValidatorNotempty *zak_cgi_form_element = (ZakCgiFormElementValidatorNotempty *)object; - ZakCgiFormElementValidatorNotemptyPrivate *priv = ZAK_CGI_FORM_ELEMENT_VALIDATOR_NOTEMPTY_GET_PRIVATE (zak_cgi_form_element); + ZakFormElementValidatorNotempty *zak_form_element = (ZakFormElementValidatorNotempty *)object; + ZakFormElementValidatorNotemptyPrivate *priv = ZAK_FORM_ELEMENT_VALIDATOR_NOTEMPTY_GET_PRIVATE (zak_form_element); switch (property_id) { @@ -119,13 +119,13 @@ zak_cgi_form_element_validator_notempty_set_property (GObject *object, } static void -zak_cgi_form_element_validator_notempty_get_property (GObject *object, +zak_form_element_validator_notempty_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { - ZakCgiFormElementValidatorNotempty *zak_cgi_form_element = (ZakCgiFormElementValidatorNotempty *)object; - ZakCgiFormElementValidatorNotemptyPrivate *priv = ZAK_CGI_FORM_ELEMENT_VALIDATOR_NOTEMPTY_GET_PRIVATE (zak_cgi_form_element); + ZakFormElementValidatorNotempty *zak_form_element = (ZakFormElementValidatorNotempty *)object; + ZakFormElementValidatorNotemptyPrivate *priv = ZAK_FORM_ELEMENT_VALIDATOR_NOTEMPTY_GET_PRIVATE (zak_form_element); switch (property_id) { @@ -136,10 +136,10 @@ zak_cgi_form_element_validator_notempty_get_property (GObject *object, } static void -zak_cgi_form_element_validator_notempty_dispose (GObject *gobject) +zak_form_element_validator_notempty_dispose (GObject *gobject) { - ZakCgiFormElementValidatorNotempty *zak_cgi_form_element = (ZakCgiFormElementValidatorNotempty *)gobject; - ZakCgiFormElementValidatorNotemptyPrivate *priv = ZAK_CGI_FORM_ELEMENT_VALIDATOR_NOTEMPTY_GET_PRIVATE (zak_cgi_form_element); + ZakFormElementValidatorNotempty *zak_form_element = (ZakFormElementValidatorNotempty *)gobject; + ZakFormElementValidatorNotemptyPrivate *priv = ZAK_FORM_ELEMENT_VALIDATOR_NOTEMPTY_GET_PRIVATE (zak_form_element); @@ -148,10 +148,10 @@ zak_cgi_form_element_validator_notempty_dispose (GObject *gobject) } static void -zak_cgi_form_element_validator_notempty_finalize (GObject *gobject) +zak_form_element_validator_notempty_finalize (GObject *gobject) { - ZakCgiFormElementValidatorNotempty *zak_cgi_form_element = (ZakCgiFormElementValidatorNotempty *)gobject; - ZakCgiFormElementValidatorNotemptyPrivate *priv = ZAK_CGI_FORM_ELEMENT_VALIDATOR_NOTEMPTY_GET_PRIVATE (zak_cgi_form_element); + ZakFormElementValidatorNotempty *zak_form_element = (ZakFormElementValidatorNotempty *)gobject; + ZakFormElementValidatorNotemptyPrivate *priv = ZAK_FORM_ELEMENT_VALIDATOR_NOTEMPTY_GET_PRIVATE (zak_form_element); @@ -160,7 +160,7 @@ zak_cgi_form_element_validator_notempty_finalize (GObject *gobject) } static gboolean -zak_cgi_form_element_validator_notempty_validate (ZakCgiFormElementIValidator *validator_notempty, +zak_form_element_validator_notempty_validate (ZakFormElementIValidator *validator_notempty, GValue *value) { gboolean ret; diff --git a/src/formelementvalidatornotempty.h b/src/formelementvalidatornotempty.h index 3cda157..d96c407 100644 --- a/src/formelementvalidatornotempty.h +++ b/src/formelementvalidatornotempty.h @@ -16,8 +16,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef __ZAK_CGI_FORM_ELEMENT_VALIDATOR_NOTEMPTY_H__ -#define __ZAK_CGI_FORM_ELEMENT_VALIDATOR_NOTEMPTY_H__ +#ifndef __ZAK_FORM_ELEMENT_VALIDATOR_NOTEMPTY_H__ +#define __ZAK_FORM_ELEMENT_VALIDATOR_NOTEMPTY_H__ #include @@ -26,13 +26,13 @@ G_BEGIN_DECLS -#define ZAK_CGI_TYPE_FORM_ELEMENT_VALIDATOR_NOTEMPTY zak_cgi_form_element_validator_notempty_get_type () -G_DECLARE_FINAL_TYPE (ZakCgiFormElementValidatorNotempty, zak_cgi_form_element_validator_notempty, ZAK_CGI, FORM_ELEMENT_VALIDATOR_NOTEMPTY, GObject) +#define ZAK_TYPE_FORM_ELEMENT_VALIDATOR_NOTEMPTY zak_form_element_validator_notempty_get_type () +G_DECLARE_FINAL_TYPE (ZakFormElementValidatorNotempty, zak_form_element_validator_notempty, ZAK_FORM, ELEMENT_VALIDATOR_NOTEMPTY, GObject) -ZakCgiFormElementValidatorNotempty *zak_cgi_form_element_validator_notempty_new (void); +ZakFormElementValidatorNotempty *zak_form_element_validator_notempty_new (void); G_END_DECLS -#endif /* __ZAK_CGI_FORM_ELEMENT_VALIDATOR_NOTEMPTY_H__ */ +#endif /* __ZAK_FORM_ELEMENT_VALIDATOR_NOTEMPTY_H__ */ diff --git a/src/formelementvalidatorregex.c b/src/formelementvalidatorregex.c index 3ea9ba1..94fd0fc 100644 --- a/src/formelementvalidatorregex.c +++ b/src/formelementvalidatorregex.c @@ -25,102 +25,102 @@ #include "formelementivalidator.h" #include "formelementvalidatorregex.h" -static void zak_cgi_form_element_validator_regex_class_init (ZakCgiFormElementValidatorRegexClass *class); -static void zak_cgi_form_element_validator_regex_interface_init (ZakCgiFormElementIValidatorInterface *iface); -static void zak_cgi_form_element_validator_regex_init (ZakCgiFormElementValidatorRegex *zak_cgi_form_element); +static void zak_form_element_validator_regex_class_init (ZakFormElementValidatorRegexClass *class); +static void zak_form_element_validator_regex_interface_init (ZakFormElementIValidatorInterface *iface); +static void zak_form_element_validator_regex_init (ZakFormElementValidatorRegex *zak_form_element); -static void zak_cgi_form_element_validator_regex_set_property (GObject *object, +static void zak_form_element_validator_regex_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); -static void zak_cgi_form_element_validator_regex_get_property (GObject *object, +static void zak_form_element_validator_regex_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); -static void zak_cgi_form_element_validator_regex_dispose (GObject *gobject); -static void zak_cgi_form_element_validator_regex_finalize (GObject *gobject); +static void zak_form_element_validator_regex_dispose (GObject *gobject); +static void zak_form_element_validator_regex_finalize (GObject *gobject); -static gboolean zak_cgi_form_element_validator_regex_validate (ZakCgiFormElementIValidator *validator_regex, GValue *value); +static gboolean zak_form_element_validator_regex_validate (ZakFormElementIValidator *validator_regex, GValue *value); -struct _ZakCgiFormElementValidatorRegex +struct _ZakFormElementValidatorRegex { GObject parent_instance; /* Other members, including private data. */ }; -#define ZAK_CGI_FORM_ELEMENT_VALIDATOR_REGEX_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZAK_CGI_TYPE_FORM_ELEMENT_VALIDATOR_REGEX, ZakCgiFormElementValidatorRegexPrivate)) +#define ZAK_FORM_ELEMENT_VALIDATOR_REGEX_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZAK_TYPE_FORM_ELEMENT_VALIDATOR_REGEX, ZakFormElementValidatorRegexPrivate)) -typedef struct _ZakCgiFormElementValidatorRegexPrivate ZakCgiFormElementValidatorRegexPrivate; -struct _ZakCgiFormElementValidatorRegexPrivate +typedef struct _ZakFormElementValidatorRegexPrivate ZakFormElementValidatorRegexPrivate; +struct _ZakFormElementValidatorRegexPrivate { gchar *regex; }; -G_DEFINE_TYPE_WITH_CODE (ZakCgiFormElementValidatorRegex, zak_cgi_form_element_validator_regex, G_TYPE_OBJECT, - G_IMPLEMENT_INTERFACE (ZAK_CGI_TYPE_FORM_ELEMENT_IVALIDATOR, - zak_cgi_form_element_validator_regex_interface_init)) +G_DEFINE_TYPE_WITH_CODE (ZakFormElementValidatorRegex, zak_form_element_validator_regex, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (ZAK_TYPE_FORM_ELEMENT_IVALIDATOR, + zak_form_element_validator_regex_interface_init)) static void -zak_cgi_form_element_validator_regex_class_init (ZakCgiFormElementValidatorRegexClass *class) +zak_form_element_validator_regex_class_init (ZakFormElementValidatorRegexClass *class) { GObjectClass *object_class = G_OBJECT_CLASS (class); - object_class->set_property = zak_cgi_form_element_validator_regex_set_property; - object_class->get_property = zak_cgi_form_element_validator_regex_get_property; - object_class->dispose = zak_cgi_form_element_validator_regex_dispose; - object_class->finalize = zak_cgi_form_element_validator_regex_finalize; + object_class->set_property = zak_form_element_validator_regex_set_property; + object_class->get_property = zak_form_element_validator_regex_get_property; + object_class->dispose = zak_form_element_validator_regex_dispose; + object_class->finalize = zak_form_element_validator_regex_finalize; - g_type_class_add_private (object_class, sizeof (ZakCgiFormElementValidatorRegexPrivate)); + g_type_class_add_private (object_class, sizeof (ZakFormElementValidatorRegexPrivate)); } static void -zak_cgi_form_element_validator_regex_interface_init (ZakCgiFormElementIValidatorInterface *iface) +zak_form_element_validator_regex_interface_init (ZakFormElementIValidatorInterface *iface) { - iface->validate = zak_cgi_form_element_validator_regex_validate; + iface->validate = zak_form_element_validator_regex_validate; } static void -zak_cgi_form_element_validator_regex_init (ZakCgiFormElementValidatorRegex *zak_cgi_form_element) +zak_form_element_validator_regex_init (ZakFormElementValidatorRegex *zak_form_element) { - ZakCgiFormElementValidatorRegexPrivate *priv = ZAK_CGI_FORM_ELEMENT_VALIDATOR_REGEX_GET_PRIVATE (zak_cgi_form_element); + ZakFormElementValidatorRegexPrivate *priv = ZAK_FORM_ELEMENT_VALIDATOR_REGEX_GET_PRIVATE (zak_form_element); priv->regex = NULL; } /** - * zak_cgi_form_element_validator_regex_new: + * zak_form_element_validator_regex_new: * @regex: * - * Returns: the newly created #ZakCgiFormElementValidatorRegex object. + * Returns: the newly created #ZakFormElementValidatorRegex object. */ -ZakCgiFormElementValidatorRegex -*zak_cgi_form_element_validator_regex_new (const gchar *regex) +ZakFormElementValidatorRegex +*zak_form_element_validator_regex_new (const gchar *regex) { - ZakCgiFormElementValidatorRegex *zak_cgi_form_element_validator_regex; + ZakFormElementValidatorRegex *zak_form_element_validator_regex; - zak_cgi_form_element_validator_regex = ZAK_CGI_FORM_ELEMENT_VALIDATOR_REGEX (g_object_new (zak_cgi_form_element_validator_regex_get_type (), NULL)); + zak_form_element_validator_regex = ZAK_FORM_ELEMENT_VALIDATOR_REGEX (g_object_new (zak_form_element_validator_regex_get_type (), NULL)); - ZakCgiFormElementValidatorRegexPrivate *priv = ZAK_CGI_FORM_ELEMENT_VALIDATOR_REGEX_GET_PRIVATE (zak_cgi_form_element_validator_regex); + ZakFormElementValidatorRegexPrivate *priv = ZAK_FORM_ELEMENT_VALIDATOR_REGEX_GET_PRIVATE (zak_form_element_validator_regex); if (regex != NULL) { priv->regex = g_strdup (regex); } - return zak_cgi_form_element_validator_regex; + return zak_form_element_validator_regex; } /* PRIVATE */ static void -zak_cgi_form_element_validator_regex_set_property (GObject *object, +zak_form_element_validator_regex_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { - ZakCgiFormElementValidatorRegex *zak_cgi_form_element = (ZakCgiFormElementValidatorRegex *)object; - ZakCgiFormElementValidatorRegexPrivate *priv = ZAK_CGI_FORM_ELEMENT_VALIDATOR_REGEX_GET_PRIVATE (zak_cgi_form_element); + ZakFormElementValidatorRegex *zak_form_element = (ZakFormElementValidatorRegex *)object; + ZakFormElementValidatorRegexPrivate *priv = ZAK_FORM_ELEMENT_VALIDATOR_REGEX_GET_PRIVATE (zak_form_element); switch (property_id) { @@ -131,13 +131,13 @@ zak_cgi_form_element_validator_regex_set_property (GObject *object, } static void -zak_cgi_form_element_validator_regex_get_property (GObject *object, +zak_form_element_validator_regex_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { - ZakCgiFormElementValidatorRegex *zak_cgi_form_element = (ZakCgiFormElementValidatorRegex *)object; - ZakCgiFormElementValidatorRegexPrivate *priv = ZAK_CGI_FORM_ELEMENT_VALIDATOR_REGEX_GET_PRIVATE (zak_cgi_form_element); + ZakFormElementValidatorRegex *zak_form_element = (ZakFormElementValidatorRegex *)object; + ZakFormElementValidatorRegexPrivate *priv = ZAK_FORM_ELEMENT_VALIDATOR_REGEX_GET_PRIVATE (zak_form_element); switch (property_id) { @@ -148,10 +148,10 @@ zak_cgi_form_element_validator_regex_get_property (GObject *object, } static void -zak_cgi_form_element_validator_regex_dispose (GObject *gobject) +zak_form_element_validator_regex_dispose (GObject *gobject) { - ZakCgiFormElementValidatorRegex *zak_cgi_form_element = (ZakCgiFormElementValidatorRegex *)gobject; - ZakCgiFormElementValidatorRegexPrivate *priv = ZAK_CGI_FORM_ELEMENT_VALIDATOR_REGEX_GET_PRIVATE (zak_cgi_form_element); + ZakFormElementValidatorRegex *zak_form_element = (ZakFormElementValidatorRegex *)gobject; + ZakFormElementValidatorRegexPrivate *priv = ZAK_FORM_ELEMENT_VALIDATOR_REGEX_GET_PRIVATE (zak_form_element); @@ -160,10 +160,10 @@ zak_cgi_form_element_validator_regex_dispose (GObject *gobject) } static void -zak_cgi_form_element_validator_regex_finalize (GObject *gobject) +zak_form_element_validator_regex_finalize (GObject *gobject) { - ZakCgiFormElementValidatorRegex *zak_cgi_form_element = (ZakCgiFormElementValidatorRegex *)gobject; - ZakCgiFormElementValidatorRegexPrivate *priv = ZAK_CGI_FORM_ELEMENT_VALIDATOR_REGEX_GET_PRIVATE (zak_cgi_form_element); + ZakFormElementValidatorRegex *zak_form_element = (ZakFormElementValidatorRegex *)gobject; + ZakFormElementValidatorRegexPrivate *priv = ZAK_FORM_ELEMENT_VALIDATOR_REGEX_GET_PRIVATE (zak_form_element); @@ -172,7 +172,7 @@ zak_cgi_form_element_validator_regex_finalize (GObject *gobject) } static gboolean -zak_cgi_form_element_validator_regex_validate (ZakCgiFormElementIValidator *validator_regex, +zak_form_element_validator_regex_validate (ZakFormElementIValidator *validator_regex, GValue *value) { gboolean ret; @@ -180,7 +180,7 @@ zak_cgi_form_element_validator_regex_validate (ZakCgiFormElementIValidator *vali GRegex *regex; GError *error; - ZakCgiFormElementValidatorRegexPrivate *priv = ZAK_CGI_FORM_ELEMENT_VALIDATOR_REGEX_GET_PRIVATE (validator_regex); + ZakFormElementValidatorRegexPrivate *priv = ZAK_FORM_ELEMENT_VALIDATOR_REGEX_GET_PRIVATE (validator_regex); if (G_VALUE_HOLDS (value, G_TYPE_STRING)) { diff --git a/src/formelementvalidatorregex.h b/src/formelementvalidatorregex.h index d93b05d..2d7808f 100644 --- a/src/formelementvalidatorregex.h +++ b/src/formelementvalidatorregex.h @@ -16,8 +16,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef __ZAK_CGI_FORM_ELEMENT_VALIDATOR_REGEX_H__ -#define __ZAK_CGI_FORM_ELEMENT_VALIDATOR_REGEX_H__ +#ifndef __ZAK_FORM_ELEMENT_VALIDATOR_REGEX_H__ +#define __ZAK_FORM_ELEMENT_VALIDATOR_REGEX_H__ #include @@ -26,13 +26,13 @@ G_BEGIN_DECLS -#define ZAK_CGI_TYPE_FORM_ELEMENT_VALIDATOR_REGEX zak_cgi_form_element_validator_regex_get_type () -G_DECLARE_FINAL_TYPE (ZakCgiFormElementValidatorRegex, zak_cgi_form_element_validator_regex, ZAK_CGI, FORM_ELEMENT_VALIDATOR_REGEX, GObject) +#define ZAK_TYPE_FORM_ELEMENT_VALIDATOR_REGEX zak_form_element_validator_regex_get_type () +G_DECLARE_FINAL_TYPE (ZakFormElementValidatorRegex, zak_form_element_validator_regex, ZAK_FORM, ELEMENT_VALIDATOR_REGEX, GObject) -ZakCgiFormElementValidatorRegex *zak_cgi_form_element_validator_regex_new (const gchar *regex); +ZakFormElementValidatorRegex *zak_form_element_validator_regex_new (const gchar *regex); G_END_DECLS -#endif /* __ZAK_CGI_FORM_ELEMENT_VALIDATOR_REGEX_H__ */ +#endif /* __ZAK_FORM_ELEMENT_VALIDATOR_REGEX_H__ */ -- 2.49.0