Top | ![]() |
![]() |
![]() |
![]() |
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 |
void | about-to-initiate | Run Last |
void | content-rejected | Run Last |
void | new-content | Run Last |
gboolean | query-cap | Run Last |
void | remote-state-changed | Run Last |
void | terminated | Run Last |
WockyJingleSession * wocky_jingle_session_new (WockyJingleFactory *factory
,WockyPorter *porter
,const gchar *session_id
,gboolean local_initiator
,WockyContact *peer
,WockyJingleDialect dialect
,gboolean local_hold
);
const gchar * wocky_jingle_session_detect (WockyStanza *stanza
,WockyJingleAction *action
,WockyJingleDialect *dialect
);
gboolean wocky_jingle_session_parse (WockyJingleSession *sess
,WockyJingleAction action
,WockyStanza *stanza
,GError **error
);
WockyStanza * wocky_jingle_session_new_message (WockyJingleSession *sess
,WockyJingleAction action
,WockyNode **sess_node
);
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.
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.
void wocky_jingle_session_remove_content (WockyJingleSession *sess
,WockyJingleContent *c
);
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.
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 |
GType
wocky_jingle_session_get_content_type (WockyJingleSession *Param1
);
GList *
wocky_jingle_session_get_contents (WockyJingleSession *sess
);
const gchar *
wocky_jingle_session_get_peer_resource
(WockyJingleSession *sess
);
const gchar *
wocky_jingle_session_get_initiator (WockyJingleSession *sess
);
const gchar *
wocky_jingle_session_get_sid (WockyJingleSession *sess
);
WockyJingleDialect
wocky_jingle_session_get_dialect (WockyJingleSession *sess
);
gboolean
wocky_jingle_session_can_modify_contents
(WockyJingleSession *sess
);
gboolean wocky_jingle_session_peer_has_cap (WockyJingleSession *self
,const gchar *cap_or_quirk
);
void wocky_jingle_session_send (WockyJingleSession *sess
,WockyStanza *stanza
);
A shorthand for sending a Jingle IQ without waiting for the reply.
void wocky_jingle_session_set_local_hold (WockyJingleSession *sess
,gboolean held
);
gboolean
wocky_jingle_session_get_remote_hold (WockyJingleSession *sess
);
gboolean
wocky_jingle_session_get_remote_ringing
(WockyJingleSession *sess
);
gboolean wocky_jingle_session_defines_action (WockyJingleSession *sess
,WockyJingleAction action
);
WockyContact *
wocky_jingle_session_get_peer_contact (WockyJingleSession *self
);
const gchar *
wocky_jingle_session_get_peer_jid (WockyJingleSession *sess
);
const gchar *
wocky_jingle_session_get_reason_name (WockyJingleReason reason
);
WockyJingleFactory *
wocky_jingle_session_get_factory (WockyJingleSession *self
);
WockyPorter *
wocky_jingle_session_get_porter (WockyJingleSession *self
);
void wocky_jingle_session_acknowledge_iq (WockyJingleSession *self
,WockyStanza *stanza
);
“dialect”
property“dialect” guint
Jingle dialect used for this session.
Flags: Read / Write
Default value: 0
“jingle-factory”
property“jingle-factory” WockyJingleFactory *
The Jingle factory which created this session.
Flags: Read / Write / Construct Only
“local-hold”
property“local-hold” gboolean
TRUE if we've placed the peer on hold.
Flags: Read / Write
Default value: FALSE
“local-initiator”
property“local-initiator” gboolean
Specifies if local end initiated the session.
Flags: Read / Write / Construct Only
Default value: TRUE
“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
“porter”
property“porter” WockyPorter *
The WockyPorter for the current connection.
Flags: Read / Write / Construct Only
“remote-hold”
property“remote-hold” gboolean
TRUE if the peer has placed us on hold.
Flags: Read
Default value: FALSE
“remote-ringing”
property“remote-ringing” gboolean
TRUE if the peer's client is ringing.
Flags: Read
Default value: FALSE
“session-id”
property“session-id” gchar *
A unique session identifier used throughout all communication.
Flags: Read / Write / Construct Only
Default value: NULL
“state”
property“state” guint
The current state that the session is in.
Flags: Read / Write
Default value: 0
“about-to-initiate”
signalvoid user_function (WockyJingleSession *wockyjinglesession, gpointer user_data)
Flags: Run Last
“content-rejected”
signalvoid user_function (WockyJingleSession *wockyjinglesession, GObject *arg1, guint arg2, gchar *arg3, gpointer user_data)
Flags: Run Last
“new-content”
signalvoid user_function (WockyJingleSession *wockyjinglesession, GObject *arg1, gpointer user_data)
Flags: Run Last
“query-cap”
signalgboolean user_function (WockyJingleSession *wockyjinglesession, WockyContact *arg1, gchar *arg2, gpointer user_data)
Flags: Run Last
“remote-state-changed”
signalvoid user_function (WockyJingleSession *wockyjinglesession, gpointer user_data)
Flags: Run Last
“terminated”
signalvoid 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.
session |
the session |
|
locally_terminated |
|
|
reason |
a WockyJingleReason describing why the session terminated |
|
text |
a possibly- |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last