Bug 62572 - JingleSession::terminated should use a GError
Summary: JingleSession::terminated should use a GError
Status: NEW
Alias: None
Product: Wocky
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-20 19:49 UTC by Will Thompson
Modified: 2013-03-20 19:49 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Will Thompson 2013-03-20 19:49:11 UTC
Right now, the WockyJingleSession::terminated has three arguments, two of which are a member of the WockyJingleReason enum and a human-readable string.

Meanwhile, _on_initiate_reply() passes NULL as the GError parameter for wocky_porter_send_iq_finish() and wocky_stanza_extract_errors(), and ends the session with REASON_UNKNOWN if either of them fails. It would be nice if the application could (optionally) get more details about what happened.

So I suggest:

* Create a GError domain for WockyJingleReason (not sure what name the quark macro should have. WOCKY_JINGLE_REASON would work but might be confusing since WOCKY_TYPE_JINGLE_REASON also exists but WOCKY_JINGLE_REASON is not a cast macro);
* Make ::terminated include a GError *, which may be NULL;
* Make the current cases where UNKNOWN is used in place of a better error use that error, and the cases where it is used to mean "no error" use NULL for the GError *.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.