WockyJingleSession

WockyJingleSession

Functions

Properties

guint dialect Read / Write
WockyJingleFactory * jingle-factory Read / Write / Construct Only
gboolean local-hold Read / Write
gboolean local-initiator Read / Write / Construct Only
WockyContact * peer-contact Read / Write / Construct Only
WockyPorter * porter Read / Write / Construct Only
gboolean remote-hold Read
gboolean remote-ringing Read
gchar * session-id Read / Write / Construct Only
guint state Read / Write

Signals

Object Hierarchy

    GObject
    ╰── WockyJingleSession

Description

Functions

wocky_jingle_session_new ()

WockyJingleSession *
wocky_jingle_session_new (WockyJingleFactory *factory,
                          WockyPorter *porter,
                          const gchar *session_id,
                          gboolean local_initiator,
                          WockyContact *peer,
                          WockyJingleDialect dialect,
                          gboolean local_hold);

wocky_jingle_session_detect ()

const gchar *
wocky_jingle_session_detect (WockyStanza *stanza,
                             WockyJingleAction *action,
                             WockyJingleDialect *dialect);

wocky_jingle_session_parse ()

gboolean
wocky_jingle_session_parse (WockyJingleSession *sess,
                            WockyJingleAction action,
                            WockyStanza *stanza,
                            GError **error);

wocky_jingle_session_new_message ()

WockyStanza *
wocky_jingle_session_new_message (WockyJingleSession *sess,
                                  WockyJingleAction action,
                                  WockyNode **sess_node);

wocky_jingle_session_accept ()

void
wocky_jingle_session_accept (WockyJingleSession *sess);

For incoming calls, accepts the call. For outgoing calls, indicates that the initial contents for the call have been created and the offer can be sent to the peer.

The acceptance or offer will only be signalled to the peer once all contents are ready (as returned by wocky_jingle_content_is_ready()). For an RTP session with WockyJingleMediaRtp contents, this translates to a media description and transport candidates having been provided to all contents.

Parameters

sess

the session.

 

wocky_jingle_session_terminate ()

gboolean
wocky_jingle_session_terminate (WockyJingleSession *sess,
                                WockyJingleReason reason,
                                const gchar *text,
                                GError **error);

Ends a session.

If called for an outgoing session which has not yet been signalled to the peer (perhaps because wocky_jingle_session_accept() has not been called, or codecs or candidates have not been provided), the session will quietly terminate without the peer hearing anything about it.

If called for an already-terminated session, this is a no-op.

Parameters

sess

the session

 

reason

the reason the session should be terminated

 

text

human-readable information about why the session terminated.

[allow-none]

error

Unused, because this function never fails.

 

Returns

TRUE.


wocky_jingle_session_remove_content ()

void
wocky_jingle_session_remove_content (WockyJingleSession *sess,
                                     WockyJingleContent *c);

wocky_jingle_session_add_content ()

WockyJingleContent *
wocky_jingle_session_add_content (WockyJingleSession *sess,
                                  WockyJingleMediaType mtype,
                                  WockyJingleContentSenders senders,
                                  const char *name,
                                  const gchar *content_ns,
                                  const gchar *transport_ns);

Adds a content to the session. Once it has its codecs and transport candidates filled in, it will be signalled to the peer (either as part of the session-initiate, if it has not been sent yet, or as a content-add if sess has already been initiated).

Legal values for content_ns and transport_ns depend on the Jingle dialect in use for this session (and in some cases on mtype ); sensible values depend on the peer's capabilities.

Parameters

sess

the session

 

mtype

what kind of media will be exchanged on the content

 

senders

which directions media should initially flow in.

 

name

a descriptive name to use for the content; this is typically not shown to users.

[allow-none]

content_ns

the namespace to use for the content's description

 

transport_ns

the namespace of the media transport to use for the call

 

Returns

the new content, which is guaranteed not to be NULL.

[transfer none]


wocky_jingle_session_get_content_type ()

GType
wocky_jingle_session_get_content_type (WockyJingleSession *Param1);

wocky_jingle_session_get_contents ()

GList *
wocky_jingle_session_get_contents (WockyJingleSession *sess);

wocky_jingle_session_get_peer_resource ()

const gchar *
wocky_jingle_session_get_peer_resource
                               (WockyJingleSession *sess);

wocky_jingle_session_get_initiator ()

const gchar *
wocky_jingle_session_get_initiator (WockyJingleSession *sess);

wocky_jingle_session_get_sid ()

const gchar *
wocky_jingle_session_get_sid (WockyJingleSession *sess);

wocky_jingle_session_get_dialect ()

WockyJingleDialect
wocky_jingle_session_get_dialect (WockyJingleSession *sess);

wocky_jingle_session_can_modify_contents ()

gboolean
wocky_jingle_session_can_modify_contents
                               (WockyJingleSession *sess);

wocky_jingle_session_peer_has_cap ()

gboolean
wocky_jingle_session_peer_has_cap (WockyJingleSession *self,
                                   const gchar *cap_or_quirk);

wocky_jingle_session_send ()

void
wocky_jingle_session_send (WockyJingleSession *sess,
                           WockyStanza *stanza);

A shorthand for sending a Jingle IQ without waiting for the reply.

Parameters

sess

a session

 

stanza

a stanza, of which this function will take ownership.

[transfer full]

wocky_jingle_session_set_local_hold ()

void
wocky_jingle_session_set_local_hold (WockyJingleSession *sess,
                                     gboolean held);

wocky_jingle_session_get_remote_hold ()

gboolean
wocky_jingle_session_get_remote_hold (WockyJingleSession *sess);

wocky_jingle_session_get_remote_ringing ()

gboolean
wocky_jingle_session_get_remote_ringing
                               (WockyJingleSession *sess);

wocky_jingle_session_defines_action ()

gboolean
wocky_jingle_session_defines_action (WockyJingleSession *sess,
                                     WockyJingleAction action);

wocky_jingle_session_get_peer_contact ()

WockyContact *
wocky_jingle_session_get_peer_contact (WockyJingleSession *self);

wocky_jingle_session_get_peer_jid ()

const gchar *
wocky_jingle_session_get_peer_jid (WockyJingleSession *sess);

wocky_jingle_session_get_reason_name ()

const gchar *
wocky_jingle_session_get_reason_name (WockyJingleReason reason);

wocky_jingle_session_get_factory ()

WockyJingleFactory *
wocky_jingle_session_get_factory (WockyJingleSession *self);

wocky_jingle_session_get_porter ()

WockyPorter *
wocky_jingle_session_get_porter (WockyJingleSession *self);

wocky_jingle_session_acknowledge_iq ()

void
wocky_jingle_session_acknowledge_iq (WockyJingleSession *self,
                                     WockyStanza *stanza);

Types and Values

Property Details

The “dialect” property

  “dialect”                  guint

Jingle dialect used for this session.

Flags: Read / Write

Default value: 0


The “jingle-factory” property

  “jingle-factory”           WockyJingleFactory *

The Jingle factory which created this session.

Flags: Read / Write / Construct Only


The “local-hold” property

  “local-hold”               gboolean

TRUE if we've placed the peer on hold.

Flags: Read / Write

Default value: FALSE


The “local-initiator” property

  “local-initiator”          gboolean

Specifies if local end initiated the session.

Flags: Read / Write / Construct Only

Default value: TRUE


The “peer-contact” property

  “peer-contact”             WockyContact *

The WockyContact representing the other party in the session. Note that if this is a WockyBareContact (as opposed to a WockyResourceContact) the session is with the contact's bare JID.

Flags: Read / Write / Construct Only


The “porter” property

  “porter”                   WockyPorter *

The WockyPorter for the current connection.

Flags: Read / Write / Construct Only


The “remote-hold” property

  “remote-hold”              gboolean

TRUE if the peer has placed us on hold.

Flags: Read

Default value: FALSE


The “remote-ringing” property

  “remote-ringing”           gboolean

TRUE if the peer's client is ringing.

Flags: Read

Default value: FALSE


The “session-id” property

  “session-id”               gchar *

A unique session identifier used throughout all communication.

Flags: Read / Write / Construct Only

Default value: NULL


The “state” property

  “state”                    guint

The current state that the session is in.

Flags: Read / Write

Default value: 0

Signal Details

The “about-to-initiate” signal

void
user_function (WockyJingleSession *wockyjinglesession,
               gpointer            user_data)

Flags: Run Last


The “content-rejected” signal

void
user_function (WockyJingleSession *wockyjinglesession,
               GObject            *arg1,
               guint               arg2,
               gchar              *arg3,
               gpointer            user_data)

Flags: Run Last


The “new-content” signal

void
user_function (WockyJingleSession *wockyjinglesession,
               GObject            *arg1,
               gpointer            user_data)

Flags: Run Last


The “query-cap” signal

gboolean
user_function (WockyJingleSession *wockyjinglesession,
               WockyContact       *arg1,
               gchar              *arg2,
               gpointer            user_data)

Flags: Run Last


The “remote-state-changed” signal

void
user_function (WockyJingleSession *wockyjinglesession,
               gpointer            user_data)

Flags: Run Last


The “terminated” signal

void
user_function (WockyJingleSession *session,
               gboolean            locally_terminated,
               guint               reason,
               gchar              *text,
               gpointer            user_data)

Emitted when the session ends, just after “state” moves to WOCKY_JINGLE_STATE_ENDED.

Parameters

session

the session

 

locally_terminated

TRUE if the session ended due to a call to wocky_jingle_session_terminate(); FALSE if the peer ended the session.

 

reason

a WockyJingleReason describing why the session terminated

 

text

a possibly-NULL human-readable string describing why the session terminated

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last