Merge lp:~shnatsel/granite/better-contractor-documentation into lp:~elementary-pantheon/granite/granite

Proposed by Sergey "Shnatsel" Davidoff
Status: Merged
Approved by: Victor Martinez
Approved revision: 712
Merged at revision: 710
Proposed branch: lp:~shnatsel/granite/better-contractor-documentation
Merge into: lp:~elementary-pantheon/granite/granite
Diff against target: 52 lines (+14/-3)
2 files modified
lib/Services/Contractor.vala (+1/-3)
lib/Services/ContractorProxy.vala (+13/-0)
To merge this branch: bzr merge lp:~shnatsel/granite/better-contractor-documentation
Reviewer Review Type Date Requested Status
Victor Martinez (community) Approve
Review via email: mp+214364@code.launchpad.net

Commit message

ContractorProxy: Improve documentation.

Description of the change

Document Contractor-related stuff better.

To post a comment you must log in.
Revision history for this message
Victor Martinez (victored) wrote :

Looks good!

I'm not sure about this line:

"Provides an easy way to interface with Contractor API from Vala"...

...since it also makes it easy to interface with C code. What about:

"Provides an easy way to interface with Contractor's DBus API" ?

712. By Sergey "Shnatsel" Davidoff

Clarify ContractorProxy description, the API is not exclusive to Vala (hopefully)

Revision history for this message
Victor Martinez (victored) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/Services/Contractor.vala'
2--- lib/Services/Contractor.vala 2013-04-23 04:40:58 +0000
3+++ lib/Services/Contractor.vala 2014-04-05 03:51:14 +0000
4@@ -25,9 +25,7 @@
5 }
6
7 /**
8- * A way to handle contractor, a way to communicate between apps.
9- *
10- * /!\ Highly unstable API
11+ * Wrapper around a long-obsolete and unused revision of Contractor API
12 */
13 [Deprecated (replacement = "Granite.Services.ContractorProxy", since = "0.2")]
14 public class Contractor : Object {
15
16=== modified file 'lib/Services/ContractorProxy.vala'
17--- lib/Services/ContractorProxy.vala 2013-10-04 12:04:45 +0000
18+++ lib/Services/ContractorProxy.vala 2014-04-05 03:51:14 +0000
19@@ -28,6 +28,9 @@
20 public abstract void execute_with_files (File[] files) throws Error;
21 }
22
23+ /**
24+ * thrown by {@link Granite.Services.ContractorProxy}
25+ */
26 public errordomain ContractorError {
27 SERVICE_NOT_AVAILABLE
28 }
29@@ -50,6 +53,9 @@
30 public abstract void execute_with_uri_list (string id, string[] uri) throws Error;
31 }
32
33+ /**
34+ * Provides a convenient GObject wrapper around Contractor's D-bus API
35+ */
36 public class ContractorProxy : Object {
37 private class GenericContract : Object, Contract {
38 public string id { get; private set; }
39@@ -109,6 +115,13 @@
40 }
41 }
42
43+ /**
44+ * Emitted when the list of actions available to Contractor changes.
45+ * Application should generally request the updated list of actions upon receiving this signal.
46+ *
47+ * This is not obligatory for frequently updated lists (e.g. in context menus),
48+ * but essential for applications that display action lists without re-requesting them.
49+ */
50 public signal void contracts_changed ();
51
52 private static ContractorDBusAPI contractor_dbus;

Subscribers

People subscribed via source and target branches