Merge lp:~ken-vandine/content-hub/add_contacts into lp:content-hub

Proposed by Ken VanDine
Status: Merged
Approved by: Renato Araujo Oliveira Filho
Approved revision: 71
Merged at revision: 71
Proposed branch: lp:~ken-vandine/content-hub/add_contacts
Merge into: lp:content-hub
Diff against target: 100 lines (+24/-1)
6 files modified
import/Ubuntu/Content/contenttype.cpp (+4/-0)
import/Ubuntu/Content/contenttype.h (+2/-1)
include/com/ubuntu/content/type.h (+1/-0)
src/com/ubuntu/content/service/com.ubuntu.content.hub.gschema.xml (+6/-0)
src/com/ubuntu/content/service/hook.cpp (+5/-0)
src/com/ubuntu/content/type.cpp (+6/-0)
To merge this branch: bzr merge lp:~ken-vandine/content-hub/add_contacts
Reviewer Review Type Date Requested Status
Renato Araujo Oliveira Filho (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+198428@code.launchpad.net

Commit message

Added Type::Known::contacts. Note: there is no associated default
store for contacts under any scope. Data for contacts doesn't persist.

Description of the change

Added Type::Known::contacts. Note: there is no associated default
store for contacts under any scope. Data for contacts doesn't persist.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

works fine.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'import/Ubuntu/Content/contenttype.cpp'
2--- import/Ubuntu/Content/contenttype.cpp 2013-10-21 16:36:02 +0000
3+++ import/Ubuntu/Content/contenttype.cpp 2013-12-10 16:01:22 +0000
4@@ -42,6 +42,9 @@
5 \row
6 \li ContentType.Music
7 \li Music
8+ \row
9+ \li ContentType.Contacts
10+ \li Music
11 \endtable
12 */
13
14@@ -78,6 +81,7 @@
15 case Documents: return cuc::Type::Known::documents();
16 case Pictures: return cuc::Type::Known::pictures();
17 case Music: return cuc::Type::Known::music();
18+ case Contacts: return cuc::Type::Known::contacts();
19 default: return cuc::Type::unknown();
20 }
21 }
22
23=== modified file 'import/Ubuntu/Content/contenttype.h'
24--- import/Ubuntu/Content/contenttype.h 2013-10-21 17:16:57 +0000
25+++ import/Ubuntu/Content/contenttype.h 2013-12-10 16:01:22 +0000
26@@ -32,7 +32,8 @@
27 Unknown = 0,
28 Documents = 1,
29 Pictures = 2,
30- Music = 3
31+ Music = 3,
32+ Contacts = 4
33 };
34
35 ContentType(QObject *parent = nullptr);
36
37=== modified file 'include/com/ubuntu/content/type.h'
38--- include/com/ubuntu/content/type.h 2013-07-16 11:04:48 +0000
39+++ include/com/ubuntu/content/type.h 2013-12-10 16:01:22 +0000
40@@ -44,6 +44,7 @@
41 static const Type& documents();
42 static const Type& pictures();
43 static const Type& music();
44+ static const Type& contacts();
45 };
46
47 virtual ~Type();
48
49=== modified file 'src/com/ubuntu/content/service/com.ubuntu.content.hub.gschema.xml'
50--- src/com/ubuntu/content/service/com.ubuntu.content.hub.gschema.xml 2013-09-10 19:51:00 +0000
51+++ src/com/ubuntu/content/service/com.ubuntu.content.hub.gschema.xml 2013-12-10 16:01:22 +0000
52@@ -10,6 +10,9 @@
53 <key name="documents" type="s">
54 <default>"notes-app"</default>
55 </key>
56+ <key name="contacts" type="s">
57+ <default>"address-book-app"</default>
58+ </key>
59 </schema>
60 <schema id="com.ubuntu.content.hub.all" path="/com/ubuntu/content/hub/peers/">
61 <key name="pictures" type="as">
62@@ -21,5 +24,8 @@
63 <key name="documents" type="as">
64 <default>[]</default>
65 </key>
66+ <key name="contacts" type="as">
67+ <default>[]</default>
68+ </key>
69 </schema>
70 </schemalist>
71
72=== modified file 'src/com/ubuntu/content/service/hook.cpp'
73--- src/com/ubuntu/content/service/hook.cpp 2013-09-25 03:14:53 +0000
74+++ src/com/ubuntu/content/service/hook.cpp 2013-12-10 16:01:22 +0000
75@@ -128,6 +128,11 @@
76 if (not registry->install_peer_for_type(cuc::Type::Known::documents(), peer))
77 qWarning() << "Failed to install peer for" << source;
78 }
79+ else if (source == "contacts")
80+ {
81+ if (not registry->install_peer_for_type(cuc::Type::Known::contacts(), peer))
82+ qWarning() << "Failed to install peer for" << source;
83+ }
84 }
85 return true;
86 }
87
88=== modified file 'src/com/ubuntu/content/type.cpp'
89--- src/com/ubuntu/content/type.cpp 2013-07-15 11:07:50 +0000
90+++ src/com/ubuntu/content/type.cpp 2013-12-10 16:01:22 +0000
91@@ -86,3 +86,9 @@
92 static cuc::Type t("music", nullptr);
93 return t;
94 }
95+
96+const cuc::Type& cuc::Type::Known::contacts()
97+{
98+ static cuc::Type t("contacts", nullptr);
99+ return t;
100+}

Subscribers

People subscribed via source and target branches