diff options
-rw-r--r-- | uca-net-camera.c | 4 | ||||
-rw-r--r-- | uca-net-protocol.h | 3 | ||||
-rw-r--r-- | ucad.c | 4 |
3 files changed, 11 insertions, 0 deletions
diff --git a/uca-net-camera.c b/uca-net-camera.c index d9d561b..aefb175 100644 --- a/uca-net-camera.c +++ b/uca-net-camera.c @@ -469,6 +469,10 @@ deserialize_param_spec (UcaNetMessageProperty *prop) return g_param_spec_boolean (prop->name, prop->nick, prop->blurb, prop->spec.gboolean.default_value, prop->flags); + case G_TYPE_STRING: + return g_param_spec_string (prop->name, prop->nick, prop->blurb, + prop->spec.gstring.default_value, + prop->flags); CASE_NUMERIC (G_TYPE_INT, int) CASE_NUMERIC (G_TYPE_UINT, uint) CASE_NUMERIC (G_TYPE_FLOAT, float) diff --git a/uca-net-protocol.h b/uca-net-protocol.h index d8e07e6..de05aac 100644 --- a/uca-net-protocol.h +++ b/uca-net-protocol.h @@ -84,6 +84,9 @@ typedef struct { struct { gboolean default_value; } gboolean; + struct { + gchar default_value[128]; + } gstring; NUMERIC_STRUCT (gint) NUMERIC_STRUCT (guint) NUMERIC_STRUCT (gfloat) @@ -124,6 +124,10 @@ serialize_param_spec (GParamSpec *pspec, UcaNetMessageProperty *prop) case G_TYPE_BOOLEAN: prop->spec.gboolean.default_value = ((GParamSpecBoolean *) pspec)->default_value; break; + case G_TYPE_STRING: + strncpy (prop->spec.gstring.default_value, ((GParamSpecString *) pspec)->default_value, + sizeof (prop->spec.gstring.default_value)); + break; CASE_NUMERIC (G_TYPE_INT, gint, GParamSpecInt) break; CASE_NUMERIC (G_TYPE_UINT, guint, GParamSpecUInt) |