Commit 3475438a authored by Youness Alaoui's avatar Youness Alaoui

main-context changed into a construct time property

darcs-hash:20080422205938-4f0f6-f2829d40b33ed72022836cc0466e8d15fa362638.gz
parent a2521e3b
...@@ -75,6 +75,7 @@ enum ...@@ -75,6 +75,7 @@ enum
{ {
PROP_SOCKET_FACTORY = 1, PROP_SOCKET_FACTORY = 1,
PROP_COMPATIBILITY, PROP_COMPATIBILITY,
PROP_MAIN_CONTEXT,
PROP_STUN_SERVER, PROP_STUN_SERVER,
PROP_STUN_SERVER_PORT, PROP_STUN_SERVER_PORT,
PROP_TURN_SERVER, PROP_TURN_SERVER,
...@@ -191,6 +192,14 @@ nice_agent_class_init (NiceAgentClass *klass) ...@@ -191,6 +192,14 @@ nice_agent_class_init (NiceAgentClass *klass)
"The socket factory used to create new UDP sockets", "The socket factory used to create new UDP sockets",
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (gobject_class, PROP_MAIN_CONTEXT,
g_param_spec_pointer (
"main-context",
"The GMainContext to use for timeouts",
"The GMainContext to use for timeouts",
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (gobject_class, PROP_COMPATIBILITY, g_object_class_install_property (gobject_class, PROP_COMPATIBILITY,
g_param_spec_uint ( g_param_spec_uint (
"compatibility", "compatibility",
...@@ -410,10 +419,9 @@ nice_agent_new (NiceUDPSocketFactory *factory, ...@@ -410,10 +419,9 @@ nice_agent_new (NiceUDPSocketFactory *factory,
NiceAgent *agent = g_object_new (NICE_TYPE_AGENT, NiceAgent *agent = g_object_new (NICE_TYPE_AGENT,
"socket-factory", factory, "socket-factory", factory,
"compatibility", compat, "compatibility", compat,
"main-context", ctx,
NULL); NULL);
agent->main_context = ctx;
return agent; return agent;
} }
...@@ -435,6 +443,10 @@ nice_agent_get_property ( ...@@ -435,6 +443,10 @@ nice_agent_get_property (
g_value_set_pointer (value, agent->socket_factory); g_value_set_pointer (value, agent->socket_factory);
break; break;
case PROP_MAIN_CONTEXT:
g_value_set_pointer (value, agent->main_context);
break;
case PROP_COMPATIBILITY: case PROP_COMPATIBILITY:
g_value_set_uint (value, agent->compatibility); g_value_set_uint (value, agent->compatibility);
break; break;
...@@ -497,6 +509,10 @@ nice_agent_set_property ( ...@@ -497,6 +509,10 @@ nice_agent_set_property (
agent->socket_factory = g_value_get_pointer (value); agent->socket_factory = g_value_get_pointer (value);
break; break;
case PROP_MAIN_CONTEXT:
agent->main_context = g_value_get_pointer (value);
break;
case PROP_COMPATIBILITY: case PROP_COMPATIBILITY:
agent->compatibility = g_value_get_uint (value); agent->compatibility = g_value_get_uint (value);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment