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
{
PROP_SOCKET_FACTORY = 1,
PROP_COMPATIBILITY,
PROP_MAIN_CONTEXT,
PROP_STUN_SERVER,
PROP_STUN_SERVER_PORT,
PROP_TURN_SERVER,
......@@ -191,6 +192,14 @@ nice_agent_class_init (NiceAgentClass *klass)
"The socket factory used to create new UDP sockets",
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_param_spec_uint (
"compatibility",
......@@ -410,10 +419,9 @@ nice_agent_new (NiceUDPSocketFactory *factory,
NiceAgent *agent = g_object_new (NICE_TYPE_AGENT,
"socket-factory", factory,
"compatibility", compat,
"main-context", ctx,
NULL);
agent->main_context = ctx;
return agent;
}
......@@ -435,6 +443,10 @@ nice_agent_get_property (
g_value_set_pointer (value, agent->socket_factory);
break;
case PROP_MAIN_CONTEXT:
g_value_set_pointer (value, agent->main_context);
break;
case PROP_COMPATIBILITY:
g_value_set_uint (value, agent->compatibility);
break;
......@@ -497,6 +509,10 @@ nice_agent_set_property (
agent->socket_factory = g_value_get_pointer (value);
break;
case PROP_MAIN_CONTEXT:
agent->main_context = g_value_get_pointer (value);
break;
case PROP_COMPATIBILITY:
agent->compatibility = g_value_get_uint (value);
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