Create a new #NiceAgent. The returned object must be freed with g_object_unref()
The Glib Mainloop Context to use for timers
The compatibility mode of the agent
This property defines whether receive/send over a TCP or pseudo-TCP, in
reliable mode, are considered as packetized or as bytestream.
In unreliable mode, every send/recv is considered as packetized, and
this property is ignored and cannot be set.
The Nice agent can work in various compatibility modes depending on
what the application/peer needs.
Whether to perform periodic consent freshness checks as specified in RFC 7675. When %TRUE, the agent will periodically send binding requests to the peer to maintain the consent to send with the peer. On receipt of any authenticated error response, a component will immediately move to the failed state.
Setting this property to %TRUE implies that 'keepalive-conncheck' should be %TRUE as well.
Whether the agent has the controlling role. This property should be modified before gathering candidates, any modification occuring later will be hold until ICE is restarted.
Force all traffic to go through a relay for added privacy, this allows hiding the local IP address. When this is enabled, so local candidates are available before relay servers have been set with nice_agent_set_relay_info().
Whether the agent should use ICE-TCP when gathering candidates.
If the option is disabled, no TCP candidates will be generated. If the
agent is in reliable mode, then pseudotcp will need to be used over UDP
candidates.
Whether to perform Trickle ICE as per draft-ietf-ice-trickle-ice-21. When %TRUE, the agent will postpone changing a component state to %NICE_COMPONENT_STATE_FAILED until nice_agent_peer_candidate_gathering_done() has been called with the ID of the component's stream.
Whether the agent should use ICE-UDP when gathering candidates.
If the option is disabled, no UDP candidates will be generated. If the
agent is in reliable mode, then pseudotcp will not be used since pseudotcp
works on top of UDP candidates.
A final timeout in msec, launched when the agent becomes idle, before stopping its activity.
This timer will delay the decision to set a component as failed. This delay is added to reduce the chance to see the agent receiving new stun activity just after the conncheck list has been declared failed (some valid pairs, no nominated pair, and no in-progress pairs), reactiviting conncheck activity, and causing a (valid) state transitions like that: connecting -> failed -> connecting -> connected -> ready. Such transitions are not buggy per-se, but may break the test-suite, that counts precisely the number of time each state has been set, and doesnt expect these transcient failed states.
This timer is also useful when the agent is in controlled mode and the other controlling peer takes some time to elect its nominated pair (this may be the case for SfB peers).
This timer is NOT part if the RFC5245, as this situation is not covered in sect 8.1.2 "Updating States", but deals with a real use-case, where a controlled agent can not wait forever for the other peer to make a nomination decision.
Also note that the value of this timeout will not delay the emission of 'connected' and 'ready' agent signals, and will not slow down the behaviour of the agent when the peer agent works in a timely manner.
Use binding requests as keepalives instead of binding indications. This means that the keepalives may time out which will change the component state to %NICE_COMPONENT_STATE_FAILED.
Enabing this is a slight violation of RFC 5245 section 10 which recommends using Binding Indications for keepalives.
This is always enabled if the compatibility mode is %NICE_COMPATIBILITY_GOOGLE.
This is always enabled if the 'consent-freshness' property is %TRUE
A GLib main context is needed for all timeouts used by libnice. This is a property being set by the nice_agent_new() call.
The proxy server IP used to bypass a proxy firewall
The password used to authenticate with the proxy
The proxy server port used to bypass a proxy firewall
The type of proxy set in the proxy-ip property
The username used to authenticate with the proxy
Whether the agent is providing a reliable transport of messages (through ICE-TCP or PseudoTCP over ICE-UDP)
The initial timeout (msecs) of the STUN binding requests used in the gathering stage, to find our local candidates. This property is described as 'RTO' in the RFC 5389 and RFC 5245. This timeout is doubled for each retransmission, until #NiceAgent:stun-max-retransmissions have been done, with an exception for the last restransmission, where the timeout is divided by two instead (RFC 5389 indicates that a customisable multiplier 'Rm' to 'RTO' should be used).
The maximum number of retransmissions of the STUN binding requests used in the gathering stage, to find our local candidates, and used in the connection check stage, to test the validity of each constructed pair. This property is described as 'Rc' in the RFC 5389, with a default value of 7. The timeout of each STUN request is doubled for each retransmission, so the choice of this value has a direct impact on the time needed to move from the CONNECTED state to the READY state, and on the time needed to complete the GATHERING state.
The initial timeout of the STUN binding requests used for a reliable timer.
Support RENOMINATION STUN attribute proposed here: https://tools.ietf.org/html/draft-thatcher-ice-renomination-00 As soon as RENOMINATION attribute is received from remote candidate's address, corresponding candidates pair gets selected. This is specific to Google Chrome/libWebRTC.
Whether the agent should use UPnP to open a port in the router and get the external IP
The maximum amount of time (in milliseconds) to wait for UPnP discovery to finish before signaling the #NiceAgent::candidate-gathering-done signal
Add a local address from which to derive local host candidates for
candidate gathering.
See also: nice_agent_gather_candidates()
The address to listen to If the port is 0, then a random port will be chosen by the system
Adds a data stream to agent
containing n_components
components. The
returned stream ID is guaranteed to be positive on success.
The number of components to add to the stream
Creates a binding between source_property
on source
and target_property
on target
.
Whenever the source_property
is changed the target_property
is
updated using the same value. For instance:
g_object_bind_property (action, "active", widget, "sensitive", 0);
Will result in the "sensitive" property of the widget #GObject instance to be updated with the same value of the "active" property of the action #GObject instance.
If flags
contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
if target_property
on target
changes then the source_property
on source
will be updated as well.
The binding will automatically be removed when either the source
or the
target
instances are finalized. To remove the binding without affecting the
source
and the target
you can just call g_object_unref() on the returned
#GBinding instance.
Removing the binding by calling g_object_unref() on it must only be done if
the binding, source
and target
are only used from a single thread and it
is clear that both source
and target
outlive the binding. Especially it
is not safe to rely on this if the binding, source
or target
can be
finalized from different threads. Keep another reference to the binding and
use g_binding_unbind() instead to be on the safe side.
A #GObject can have multiple bindings.
the property on source
to bind
the target #GObject
the property on target
to bind
flags to pass to #GBinding
Creates a binding between source_property
on source
and target_property
on target,
allowing you to set the transformation functions to be used by
the binding.
This function is the language bindings friendly version of g_object_bind_property_full(), using #GClosures instead of function pointers.
the property on source
to bind
the target #GObject
the property on target
to bind
flags to pass to #GBinding
a #GClosure wrapping the transformation function from the source
to the target,
or %NULL to use the default
a #GClosure wrapping the transformation function from the target
to the source,
or %NULL to use the default
Asynchronously closes resources the agent has allocated on remote servers.
The agent will call the callback in the current #GMainContext in which this function is called. The #GAsyncResult in the callback can be ignored as this operation never fails.
Calling this function before freeing the agent makes sure the allocated relay ports aren't left behind on TURN server but properly removed.
A callback that will be called when the closing is complete
Notifies the agent that consent to receive has been revoked. This will cause the component to fail with 403 'Forbidden' all incoming STUN binding requests as specified in RFC 7675.
A stream with a component in the consent-lost state can be reused by performing an ice restart with nice_agent_restart() or nice_agent_restart_stream().
Calling the function only has an effect when agent
has been created with
NICE_AGENT_OPTION_CONSENT_FRESHNESS
.
The ID of the stream
The ID of the component
This function is intended for #GObject implementations to re-enforce a [floating][floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling g_object_ref_sink().
Forget all the relay servers previously added using nice_agent_set_relay_info(). Currently connected streams will keep using the relay as long as they have not been restarted and haven't succesfully negotiated a different path.
The ID of the stream
The ID of the component
Increases the freeze count on object
. If the freeze count is
non-zero, the emission of "notify" signals on object
is
stopped. The signals are queued until the freeze count is decreased
to zero. Duplicate notifications are squashed so that at most one
#GObject::notify signal is emitted for each property modified while the
object is frozen.
This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified.
Allocate and start listening on local candidate ports and start the remote candidate gathering process. Once done, #NiceAgent::candidate-gathering-done is called for the stream. As soon as this function is called, #NiceAgent::new-candidate signals may be emitted, even before this function returns.
nice_agent_get_local_candidates() will only return non-empty results after calling this function.
The ID of the stream to start
Generate an SDP string containing the local candidates and credentials for all streams and components in the agent.
Generate an SDP string containing the local candidates and credentials for a stream.
The ID of the stream
Whether or not to include non ICE specific lines (m=, c= and a=rtcp: lines)
Retrieves the current state of a component.
The ID of the stream
The ID of the component
Gets a named field from the objects table of associations (see g_object_set_data()).
name of the key for that association
This helper function will return the recommended default candidate to be
used for non-ICE compatible clients. This will usually be the candidate
with the lowest priority, since it will be the longest path but the one with
the most chances of success.
The ID of the stream
The ID of the component
Gets a #GIOStream wrapper around the given stream and component in
agent
. The I/O stream will be valid for as long as stream_id
is valid.
The #GInputStream and #GOutputStream implement #GPollableInputStream and
#GPollableOutputStream.
This function may only be called on reliable #NiceAgents. It is a programming error to try and create an I/O stream wrapper for an unreliable stream.
The ID of the stream to wrap
The ID of the component to wrap
Retrieve from the agent the list of all local candidates for a stream's component
The ID of the stream
The ID of the component
Gets the local credentials for stream stream_id
. This may be called any time
after creating a stream using nice_agent_add_stream().
An error will be returned if this is called for a non-existent stream, or if
either of ufrag
or pwd
are %NULL.
The ID of the stream
Gets a property of an object.
The value
can be:
In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling g_value_unset().
Note that g_object_get_property() is really intended for language bindings, g_object_get() is much more convenient for C programming.
the name of the property to get
return location for the property value
This function gets back user data pointers stored via g_object_set_qdata().
A #GQuark, naming the user data pointer
Get a list of the remote candidates set on a stream's component
The ID of the stream
The ID of the component
Retreive the selected candidate pair for media transmission for a given stream's component.
The ID of the stream
The ID of the component
The local selected candidate
The remote selected candidate
Retreive the local socket associated with the selected candidate pair for media transmission for a given stream's component.
This is useful for adding ICE support to legacy applications that already have a protocol that maintains a connection. If the socket is duplicated before unrefing the agent, the application can take over and continue to use it. New applications are encouraged to use the built in libnice stream handling instead and let libnice handle the connection maintenance.
Users of this method are encouraged to not use a TURN relay or any kind of proxy, as in this case, the socket will not be available to the application because the packets are encapsulated.
The ID of the stream
The ID of the component
Each component can have multiple sockets, this is an API to retrieve them all to be able to set properties. Most of the sockets for a component are created when calling nice_agent_gather_candidates(), so this API should be called right after to able to set properties on the sockets before they are used.
These sockets can be a mix of UDP & TCP sockets depending on the compatibility mode and options that have been set.
The ID of the stream
The ID of the component
This function will return the name assigned to a stream.
The ID of the stream to change
Gets n_properties
properties for an object
.
Obtained properties will be set to values
. All properties must be valid.
Warnings will be emitted and undefined behaviour may result if invalid
properties are passed in.
the names of each property to get
the values of each property to get
Checks whether object
has a [floating][floating-ref] reference.
Emits a "notify" signal for the property property_name
on object
.
When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.
Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.
the name of a property installed on the class of object
.
Emits a "notify" signal for the property specified by pspec
on object
.
This function omits the property name lookup, hence it is faster than g_object_notify().
One way to avoid using g_object_notify() from within the class that registered the properties, and using g_object_notify_by_pspec() instead, is to store the GParamSpec used with g_object_class_install_property() inside a static array, e.g.:
enum
{
PROP_0,
PROP_FOO,
PROP_LAST
};
static GParamSpec *properties[PROP_LAST];
static void
my_object_class_init (MyObjectClass *klass)
{
properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
0, 100,
50,
G_PARAM_READWRITE);
g_object_class_install_property (gobject_class,
PROP_FOO,
properties[PROP_FOO]);
}
and then notify a change on the "foo" property with:
g_object_notify_by_pspec (self, properties[PROP_FOO]);
the #GParamSpec of a property installed on the class of object
.
Parse an SDP string and extracts the candidate from it.
The ID of the stream the candidate belongs to
The remote SDP to parse
Parse an SDP string and extracts candidates and credentials from it and sets them on the agent.
The remote SDP to parse
Parse an SDP string representing a single stream and extracts candidates and credentials from it.
The ID of the stream to parse
The remote SDP to parse
Pointer to store the ice ufrag if non %NULL. Must be freed with g_free() after use
Pointer to store the ice password if non %NULL. Must be freed with g_free() after use
Notifies the agent that the remote peer has concluded candidate gathering and
thus no more remote candidates are expected to arrive for stream_id
.
This will allow the stream components without a successful connectivity check to stop waiting for more candidates to come and finally transit into %NICE_COMPONENT_STATE_FAILED.
Calling the function has an effect only when #NiceAgent:trickle-ice is %TRUE.
The ID of the stream
A single-message version of nice_agent_recv_messages().
the ID of the stream to receive on
the ID of the component to receive on
a #GCancellable to allow the operation to be cancelled from another thread, or %NULL
Block on receiving data from the given stream/component combination on
agent,
returning only once exactly n_messages
messages have been received
and written into messages,
the stream is closed by the other end or by
calling nice_agent_remove_stream(), or cancellable
is cancelled.
Any STUN packets received will not be added to messages;
instead,
they'll be passed for processing to #NiceAgent itself. Since #NiceAgent
does not poll for messages on its own, it's therefore essential to keep
calling this function for ICE connection establishment to work.
In the non-error case, in reliable mode, this will block until all buffers in
all n_messages
have been filled with received data (i.e. messages
is
treated as a large, flat array of buffers). In non-reliable mode, it will
block until n_messages
messages have been received, each of which does not
have to fill all the buffers in its #NiceInputMessage. In the non-reliable
case, each #NiceInputMessage must have enough buffers to contain an entire
message (65536 bytes), or any excess data may be silently dropped.
For each received message, #NiceInputMessage::length will be set to the number of valid bytes stored in the message’s buffers. The bytes are stored sequentially in the buffers; there are no gaps apart from at the end of the buffer array (in non-reliable mode). If non-%NULL on input, #NiceInputMessage::from will have the address of the sending peer stored in it. The base addresses, sizes, and number of buffers in each message will not be modified in any case.
This must not be used in combination with nice_agent_attach_recv() on the same stream/component pair.
If the stream/component pair doesn’t exist, or if a suitable candidate socket hasn’t yet been selected for it, a %G_IO_ERROR_BROKEN_PIPE error will be returned. A %G_IO_ERROR_CANCELLED error will be returned if the operation was cancelled. %G_IO_ERROR_FAILED will be returned for other errors.
the ID of the stream to receive on
the ID of the component to receive on
a #GCancellable to allow the operation to be cancelled from another thread, or %NULL
Try to receive data from the given stream/component combination on agent,
without blocking. If receiving data would block, -1 is returned and
%G_IO_ERROR_WOULD_BLOCK is set in error
. If any other error occurs, -1 is
returned and error
is set accordingly. Otherwise, 0 is returned if (and only
if) n_messages
is 0. In all other cases, the number of valid messages stored
in messages
is returned, and will be greater than 0.
This function behaves similarly to nice_agent_recv_messages(), except that it
will not block on filling (in reliable mode) or receiving (in non-reliable
mode) exactly n_messages
messages. In reliable mode, it will receive bytes
into messages
until it would block; in non-reliable mode, it will receive
messages until it would block.
Any STUN packets received will not be added to messages;
instead,
they'll be passed for processing to #NiceAgent itself. Since #NiceAgent
does not poll for messages on its own, it's therefore essential to keep
calling this function for ICE connection establishment to work.
As this function is non-blocking, cancellable
is included only for parity
with nice_agent_recv_messages(). If cancellable
is cancelled before this
function is called, a %G_IO_ERROR_CANCELLED error will be returned
immediately.
This must not be used in combination with nice_agent_attach_recv() on the same stream/component pair.
the ID of the stream to receive on
the ID of the component to receive on
a #GCancellable to allow the operation to be cancelled from another thread, or %NULL
A single-message version of nice_agent_recv_messages_nonblocking().
the ID of the stream to receive on
the ID of the component to receive on
a #GCancellable to allow the operation to be cancelled from another thread, or %NULL
Increase the reference count of object,
and possibly remove the
[floating][floating-ref] reference, if object
has a floating reference.
In other words, if the object is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference by clearing the floating flag while leaving the reference count unchanged. If the object is not floating, then this call adds a new normal reference increasing the reference count by one.
Since GLib 2.56, the type of object
will be propagated to the return type
under the same conditions as for g_object_ref().
Remove and free a previously created data stream from agent
. If any I/O
streams have been created using nice_agent_get_io_stream(), they should be
closed completely using g_io_stream_close() before this is called, or they
will get broken pipe errors.
The ID of the stream to remove
Restarts the session as defined in ICE draft 19. This function needs to be called both when initiating (ICE spec section 9.1.1.1. "ICE Restarts"), as well as when reacting (spec section 9.2.1.1. "Detecting ICE Restart") to a restart.
If consent-freshness has been enabled on agent,
as specified in RFC7675
then restarting streams will restore the local consent.
Restarts a single stream as defined in RFC 5245. This function needs to be called both when initiating (ICE spec section 9.1.1.1. "ICE Restarts"), as well as when reacting (spec section 9.2.1.1. "Detecting ICE Restart") to a restart.
Unlike nice_agent_restart(), this applies to a single stream. It also does not generate a new tie breaker.
If consent-freshness has been enabled on agent,
as specified in RFC7675
then restart stream_id
will restore the local consent for that stream.
The ID of the stream
Releases all references to other objects. This can be used to break reference cycles.
This function should only be called from object system implementations.
Sends a data payload over a stream's component.
The ID of the stream to send to
The ID of the component to send to
The length of the buffer to send
The buffer of data to send
Sends multiple messages on the socket identified by the given stream/component pair. Transmission is non-blocking, so a %G_IO_ERROR_WOULD_BLOCK error may be returned if the send buffer is full.
As with nice_agent_send(), the given component must be in %NICE_COMPONENT_STATE_READY or, as a special case, in any state if it was previously ready and was then restarted.
On success, the number of messages written to the socket will be returned,
which may be less than n_messages
if transmission would have blocked
part-way through. Zero will be returned if n_messages
is zero, or if
transmission would have blocked on the first message.
In reliable mode, it is instead recommended to use
nice_agent_send(). The return value can be less than n_messages
or 0 even if it is still possible to send a partial message. In
this case, "nice-agent-writable" will never be triggered, so the
application would have to use nice_agent_sent() to fill the buffer or have
to retry sending at a later point.
On failure, -1 will be returned and error
will be set. If the #NiceAgent is
reliable and the socket is not yet connected, %G_IO_ERROR_BROKEN_PIPE will be
returned; if the write buffer is full, %G_IO_ERROR_WOULD_BLOCK will be
returned. In both cases, wait for the #NiceAgent::reliable-transport-writable
signal before trying again. If the given stream_id
or component_id
are
invalid or not yet connected, %G_IO_ERROR_BROKEN_PIPE will be returned.
%G_IO_ERROR_FAILED will be returned for other errors.
the ID of the stream to send to
the ID of the component to send to
array of messages to send, of at least n_messages
entries in length
a #GCancellable to cancel the operation from another thread, or %NULL
Each object carries around a table of associations from strings to pointers. This function lets you set an association.
If the object already had an association with that name, the old association will be destroyed.
Internally, the key
is converted to a #GQuark using g_quark_from_string().
This means a copy of key
is kept permanently (even after object
has been
finalized) — so it is recommended to only use a small, bounded set of values
for key
in your program, to avoid the #GQuark storage growing unbounded.
name of the key
data to associate with that key
Sets the local credentials for stream stream_id
.
Since 0.1.11
The ID of the stream
nul-terminated string containing an ICE username fragment (length must be between 22 and 256 chars)
nul-terminated string containing an ICE password (length must be between 4 and 256 chars)
Sets a preferred port range for allocating host candidates.
The ID of the stream
The ID of the component
The minimum port to use
The maximum port to use
Sets a property on an object.
the name of the property to set
the value
Sets the settings for using a relay server during the candidate discovery. This may be called multiple times to add multiple relay servers to the discovery process; one TCP and one UDP, for example.
The ID of the stream
The ID of the component
The IP address of the TURN server
The port of the TURN server
The TURN username to use for the allocate
The TURN password to use for the allocate
The type of relay to use
Sets, adds or updates the remote candidates for a component of a stream.
The ID of the stream the candidates are for
The ID of the component the candidates are for
a #GSList of #NiceCandidate items describing each candidate to add
Sets the remote credentials for stream stream_id
.
The ID of the stream
nul-terminated string containing an ICE username fragment (length must be between 22 and 256 chars)
nul-terminated string containing an ICE password (length must be between 4 and 256 chars)
Sets the selected candidate pair for media transmission for a given stream's component. Calling this function will disable all further ICE processing (connection check, state machine updates, etc). Note that keepalives will continue to be sent.
The ID of the stream
The ID of the component
The local foundation of the candidate to use
The remote foundation of the candidate to use
Sets the selected remote candidate for media transmission for a given stream's component. This is used to force the selection of a specific remote candidate even when connectivity checks are failing (e.g. non-ICE compatible candidates). Calling this function will disable all further ICE processing (connection check, state machine updates, etc). Note that keepalives will continue to be sent.
The ID of the stream
The ID of the component
The #NiceCandidate to select
This function will set the value of the SOFTWARE attribute to be added to
STUN requests, responses and error responses sent during connectivity checks.
The value of the SOFTWARE attribute to add.
This function will assign a media type to a stream. The only values that can be used to produce a valid SDP are: "audio", "video", "text", "application", "image" and "message".
This is only useful when parsing and generating an SDP of the candidates.
The ID of the stream to change
The new name of the stream or %NULL
Sets the IP_TOS and/or IPV6_TCLASS field on the stream's sockets' options
The ID of the stream
The ToS to set
Remove a specified datum from the object's data associations, without invoking the association's destroy handler.
name of the key
This function gets back user data pointers stored via
g_object_set_qdata() and removes the data
from object
without invoking its destroy() function (if any was
set).
Usually, calling this function is only required to update
user data pointers with a destroy notifier, for example:
void
object_add_to_user_list (GObject *object,
const gchar *new_string)
{
// the quark, naming the object data
GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
// retrieve the old string list
GList *list = g_object_steal_qdata (object, quark_string_list);
// prepend new string
list = g_list_prepend (list, g_strdup (new_string));
// this changed 'list', so we need to set it again
g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
}
static void
free_string_list (gpointer data)
{
GList *node, *list = data;
for (node = list; node; node = node->next)
g_free (node->data);
g_list_free (list);
}
Using g_object_get_qdata() in the above example, instead of g_object_steal_qdata() would have left the destroy function set, and thus the partial string list would have been freed upon g_object_set_qdata_full().
A #GQuark, naming the user data pointer
Reverts the effect of a previous call to
g_object_freeze_notify(). The freeze count is decreased on object
and when it reaches zero, queued "notify" signals are emitted.
Duplicate notifications for each property are squashed so that at most one #GObject::notify signal is emitted for each property, in the reverse order in which they have been queued.
It is an error to call this function when the freeze count is zero.
Decreases the reference count of object
. When its reference count
drops to 0, the object is finalized (i.e. its memory is freed).
If the pointer to the #GObject may be reused in future (for example, if it is an instance variable of another object), it is recommended to clear the pointer to %NULL rather than retain a dangling pointer to a potentially invalid #GObject instance. Use g_clear_object() for this.
This function essentially limits the life time of the closure
to
the life time of the object. That is, when the object is finalized,
the closure
is invalidated by calling g_closure_invalidate() on
it, in order to prevent invocations of the closure with a finalized
(nonexisting) object. Also, g_object_ref() and g_object_unref() are
added as marshal guards to the closure,
to ensure that an extra
reference count is held on object
during invocation of the
closure
. Usually, this function will be called on closures that
use this object
as closure data.
#GClosure to watch
Find the #GParamSpec with the given name for an
interface. Generally, the interface vtable passed in as g_iface
will be the default vtable from g_type_default_interface_ref(), or,
if you know the interface has already been loaded,
g_type_default_interface_peek().
any interface vtable for the interface, or the default vtable for the interface
name of a property to look up.
Add a property to an interface; this is only useful for interfaces that are added to GObject-derived types. Adding a property to an interface forces all objects classes with that interface to have a compatible property. The compatible property could be a newly created #GParamSpec, but normally g_object_class_override_property() will be used so that the object class only needs to provide an implementation and inherits the property description, default value, bounds, and so forth from the interface property.
This function is meant to be called from the interface's default
vtable initialization function (the class_init
member of
#GTypeInfo.) It must not be called after after class_init
has
been called for any object types implementing this interface.
If pspec
is a floating reference, it will be consumed.
any interface vtable for the interface, or the default vtable for the interface.
the #GParamSpec for the new property
Lists the properties of an interface.Generally, the interface
vtable passed in as g_iface
will be the default vtable from
g_type_default_interface_ref(), or, if you know the interface has
already been loaded, g_type_default_interface_peek().
any interface vtable for the interface, or the default vtable for the interface
Create a new #NiceAgent. The returned object must be freed with g_object_unref()
The Glib Mainloop Context to use for timers
The compatibility mode of the agent
Create a new #NiceAgent with parameters that must be be defined at
construction time.
The returned object must be freed with g_object_unref()
The Glib Mainloop Context to use for timers
The compatibility mode of the agent
Flags to set the properties
Create a new #NiceAgent in reliable mode. If the connectivity is established
through ICE-UDP, then a #PseudoTcpSocket will be transparently used to
ensure reliability of the messages.
The returned object must be freed with g_object_unref()
The Glib Mainloop Context to use for timers
The compatibility mode of the agent
Creates a new instance of a #GObject subtype and sets its properties.
Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY) which are not explicitly specified are set to their default values.
the type id of the #GObject subtype to instantiate
an array of #GParameter
The #NiceAgent is the main GObject of the libnice library and represents the ICE agent.