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
=== modified file 'import/Ubuntu/Content/contenttype.cpp'
--- import/Ubuntu/Content/contenttype.cpp 2013-10-21 16:36:02 +0000
+++ import/Ubuntu/Content/contenttype.cpp 2013-12-10 16:01:22 +0000
@@ -42,6 +42,9 @@
42 \row42 \row
43 \li ContentType.Music43 \li ContentType.Music
44 \li Music44 \li Music
45 \row
46 \li ContentType.Contacts
47 \li Music
45 \endtable48 \endtable
46 */49 */
4750
@@ -78,6 +81,7 @@
78 case Documents: return cuc::Type::Known::documents();81 case Documents: return cuc::Type::Known::documents();
79 case Pictures: return cuc::Type::Known::pictures();82 case Pictures: return cuc::Type::Known::pictures();
80 case Music: return cuc::Type::Known::music();83 case Music: return cuc::Type::Known::music();
84 case Contacts: return cuc::Type::Known::contacts();
81 default: return cuc::Type::unknown();85 default: return cuc::Type::unknown();
82 }86 }
83}87}
8488
=== modified file 'import/Ubuntu/Content/contenttype.h'
--- import/Ubuntu/Content/contenttype.h 2013-10-21 17:16:57 +0000
+++ import/Ubuntu/Content/contenttype.h 2013-12-10 16:01:22 +0000
@@ -32,7 +32,8 @@
32 Unknown = 0,32 Unknown = 0,
33 Documents = 1,33 Documents = 1,
34 Pictures = 2,34 Pictures = 2,
35 Music = 335 Music = 3,
36 Contacts = 4
36 };37 };
3738
38 ContentType(QObject *parent = nullptr);39 ContentType(QObject *parent = nullptr);
3940
=== modified file 'include/com/ubuntu/content/type.h'
--- include/com/ubuntu/content/type.h 2013-07-16 11:04:48 +0000
+++ include/com/ubuntu/content/type.h 2013-12-10 16:01:22 +0000
@@ -44,6 +44,7 @@
44 static const Type& documents();44 static const Type& documents();
45 static const Type& pictures();45 static const Type& pictures();
46 static const Type& music();46 static const Type& music();
47 static const Type& contacts();
47 };48 };
4849
49 virtual ~Type();50 virtual ~Type();
5051
=== modified file 'src/com/ubuntu/content/service/com.ubuntu.content.hub.gschema.xml'
--- src/com/ubuntu/content/service/com.ubuntu.content.hub.gschema.xml 2013-09-10 19:51:00 +0000
+++ src/com/ubuntu/content/service/com.ubuntu.content.hub.gschema.xml 2013-12-10 16:01:22 +0000
@@ -10,6 +10,9 @@
10 <key name="documents" type="s">10 <key name="documents" type="s">
11 <default>"notes-app"</default>11 <default>"notes-app"</default>
12 </key>12 </key>
13 <key name="contacts" type="s">
14 <default>"address-book-app"</default>
15 </key>
13 </schema>16 </schema>
14 <schema id="com.ubuntu.content.hub.all" path="/com/ubuntu/content/hub/peers/">17 <schema id="com.ubuntu.content.hub.all" path="/com/ubuntu/content/hub/peers/">
15 <key name="pictures" type="as">18 <key name="pictures" type="as">
@@ -21,5 +24,8 @@
21 <key name="documents" type="as">24 <key name="documents" type="as">
22 <default>[]</default>25 <default>[]</default>
23 </key>26 </key>
27 <key name="contacts" type="as">
28 <default>[]</default>
29 </key>
24 </schema>30 </schema>
25</schemalist>31</schemalist>
2632
=== modified file 'src/com/ubuntu/content/service/hook.cpp'
--- src/com/ubuntu/content/service/hook.cpp 2013-09-25 03:14:53 +0000
+++ src/com/ubuntu/content/service/hook.cpp 2013-12-10 16:01:22 +0000
@@ -128,6 +128,11 @@
128 if (not registry->install_peer_for_type(cuc::Type::Known::documents(), peer))128 if (not registry->install_peer_for_type(cuc::Type::Known::documents(), peer))
129 qWarning() << "Failed to install peer for" << source;129 qWarning() << "Failed to install peer for" << source;
130 }130 }
131 else if (source == "contacts")
132 {
133 if (not registry->install_peer_for_type(cuc::Type::Known::contacts(), peer))
134 qWarning() << "Failed to install peer for" << source;
135 }
131 }136 }
132 return true;137 return true;
133}138}
134139
=== modified file 'src/com/ubuntu/content/type.cpp'
--- src/com/ubuntu/content/type.cpp 2013-07-15 11:07:50 +0000
+++ src/com/ubuntu/content/type.cpp 2013-12-10 16:01:22 +0000
@@ -86,3 +86,9 @@
86 static cuc::Type t("music", nullptr);86 static cuc::Type t("music", nullptr);
87 return t;87 return t;
88}88}
89
90const cuc::Type& cuc::Type::Known::contacts()
91{
92 static cuc::Type t("contacts", nullptr);
93 return t;
94}

Subscribers

People subscribed via source and target branches