[X2Go-Commits] [libx2goclient] 05/18: src/x2goclient-network.c: move initialization/destruction functions up.
git-admin at x2go.org
git-admin at x2go.org
Mon Aug 19 15:47:03 CEST 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository libx2goclient.
commit f347bb824c00c44f68ab99344869e21cd63c8012
Author: Mihai Moldovan <ionic at ionic.de>
Date: Mon Aug 19 11:52:11 2019 +0200
src/x2goclient-network.c: move initialization/destruction functions up.
---
src/x2goclient-network.c | 103 +++++++++++++++++++++++++----------------------
1 file changed, 55 insertions(+), 48 deletions(-)
diff --git a/src/x2goclient-network.c b/src/x2goclient-network.c
index 14e48b5..2506365 100644
--- a/src/x2goclient-network.c
+++ b/src/x2goclient-network.c
@@ -74,6 +74,61 @@ enum {
static GParamSpec *net_obj_properties[X2GO_NET_N_PROPERTIES] = { NULL, };
+
+static void x2goclient_network_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *param_spec);
+static void x2goclient_network_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *param_spec);
+static GSocketAddress* x2goclient_network_parse_sockspec (X2GoClientNetwork *self, const GString *sockspec);
+
+
+static void x2goclient_network_class_init (X2GoClientNetworkClass *klass) {
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->set_property = x2goclient_network_set_property;
+ object_class->get_property = x2goclient_network_get_property;
+
+ net_obj_properties[X2GO_NET_PROP_SOCKET_SPEC] = g_param_spec_boxed ("socket-spec", _("Low-level socket string specification"),
+ _("String specification for the low-level socket network "
+ "connection. Updates the \"socket\" property."),
+ G_TYPE_GSTRING,
+ G_PARAM_WRITABLE);
+
+ net_obj_properties[X2GO_NET_PROP_SOCKET] = g_param_spec_object ("socket", _("Low-level socket"),
+ _("Low-level socket for the network connection, the local "
+ "part will be used for local binding if specified."),
+ G_TYPE_SOCKET_ADDRESS,
+ G_PARAM_READABLE);
+
+ net_obj_properties[X2GO_NET_PROP_OPTIONS] = g_param_spec_object ("options", _("Socket options"),
+ _("Specific socket options."),
+ X2GOCLIENT_TYPE_NETWORK_OPTIONS,
+ G_PARAM_READWRITE);
+
+ g_object_class_install_properties (object_class, X2GO_NET_N_PROPERTIES, net_obj_properties);
+}
+
+static void x2goclient_network_init (X2GoClientNetwork *self) {
+ X2GoClientNetworkPrivate *priv = x2goclient_network_get_instance_private (self);
+}
+
+static void x2goclient_network_dispose (GObject *object) {
+ X2GoClientNetworkPrivate *priv = x2goclient_network_get_instance_private (X2GOCLIENT_NETWORK (object));
+
+ g_clear_object (&priv->socket);
+ g_clear_object (&priv->options);
+
+ (G_OBJECT_CLASS (x2goclient_network_parent_class))->dispose (object);
+}
+
+static void x2goclient_network_finalize (GObject *object) {
+ X2GoClientNetworkPrivate *priv = x2goclient_network_get_instance_private (X2GOCLIENT_NETWORK (object));
+
+ g_string_free (priv->socket_spec, TRUE);
+ priv->socket_spec = NULL;
+
+ (G_OBJECT_CLASS (x2goclient_network_parent_class))->finalize (object);
+}
+
+
static GSocketAddress* x2goclient_network_parse_sockspec (X2GoClientNetwork *self, const GString *sockspec) {
X2GoClientNetworkClass *class = X2GOCLIENT_NETWORK_GET_CLASS (self);
@@ -129,51 +184,3 @@ static void x2goclient_network_get_property (GObject *object, guint prop_id, GVa
break;
}
}
-
-static void x2goclient_network_class_init (X2GoClientNetworkClass *klass) {
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- object_class->set_property = x2goclient_network_set_property;
- object_class->get_property = x2goclient_network_get_property;
-
- net_obj_properties[X2GO_NET_PROP_SOCKET_SPEC] = g_param_spec_boxed ("socket-spec", _("Low-level socket string specification"),
- _("String specification for the low-level socket network "
- "connection. Updates the \"socket\" property."),
- G_TYPE_GSTRING,
- G_PARAM_WRITABLE);
-
- net_obj_properties[X2GO_NET_PROP_SOCKET] = g_param_spec_object ("socket", _("Low-level socket"),
- _("Low-level socket for the network connection, the local "
- "part will be used for local binding if specified."),
- G_TYPE_SOCKET_ADDRESS,
- G_PARAM_READABLE);
-
- net_obj_properties[X2GO_NET_PROP_OPTIONS] = g_param_spec_object ("options", _("Socket options"),
- _("Specific socket options."),
- X2GOCLIENT_TYPE_NETWORK_OPTIONS,
- G_PARAM_READWRITE);
-
- g_object_class_install_properties (object_class, X2GO_NET_N_PROPERTIES, net_obj_properties);
-}
-
-static void x2goclient_network_init (X2GoClientNetwork *self) {
- X2GoClientNetworkPrivate *priv = x2goclient_network_get_instance_private (self);
-}
-
-static void x2goclient_network_dispose (GObject *object) {
- X2GoClientNetworkPrivate *priv = x2goclient_network_get_instance_private (X2GOCLIENT_NETWORK (object));
-
- g_clear_object (&priv->socket);
- g_clear_object (&priv->options);
-
- (G_OBJECT_CLASS (x2goclient_network_parent_class))->dispose (object);
-}
-
-static void x2goclient_network_finalize (GObject *object) {
- X2GoClientNetworkPrivate *priv = x2goclient_network_get_instance_private (X2GOCLIENT_NETWORK (object));
-
- g_string_free (priv->socket_spec, TRUE);
- priv->socket_spec = NULL;
-
- (G_OBJECT_CLASS (x2goclient_network_parent_class))->finalize (object);
-}
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
More information about the x2go-commits
mailing list