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

Proposed by Ken VanDine
Status: Needs review
Proposed branch: lp:~ken-vandine/content-hub/application_type
Merge into: lp:content-hub
Diff against target: 182 lines (+43/-4)
10 files modified
import/Ubuntu/Content/contenttype.cpp (+9/-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 (+12/-0)
src/com/ubuntu/content/service/hook.cpp (+1/-1)
src/com/ubuntu/content/type.cpp (+6/-0)
src/com/ubuntu/content/utils.cpp (+1/-0)
tests/acceptance-tests/test_types.cpp (+5/-0)
tests/peers/importer/content-hub-test-importer.json (+3/-1)
tests/peers/sharer/content-hub-test-sharer.json (+3/-1)
To merge this branch: bzr merge lp:~ken-vandine/content-hub/application_type
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Needs Fixing
PS Jenkins bot continuous-integration Pending
Ubuntu Phablet Team Pending
Review via email: mp+296566@code.launchpad.net

Commit message

Added well known type ContentType.Application

Description of the change

Added well known type ContentType.Application

To post a comment you must log in.
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

276. By Ken VanDine

Added well known type ContentType.Application

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 2015-06-24 20:22:45 +0000
3+++ import/Ubuntu/Content/contenttype.cpp 2016-06-06 15:25:52 +0000
4@@ -58,6 +58,12 @@
5 \li ContentType.Text
6 \li Text
7 \row
8+ \li ContentType.Events
9+ \li Events
10+ \row
11+ \li ContentType.Application
12+ \li Application
13+ \row
14 \li ContentType.All
15 \li Any of the above content types
16 \endtable
17@@ -102,6 +108,7 @@
18 case EBooks: return cuc::Type::Known::ebooks();
19 case Text: return cuc::Type::Known::text();
20 case Events: return cuc::Type::Known::events();
21+ case Application: return cuc::Type::Known::application();
22 default: return cuc::Type::unknown();
23 }
24 }
25@@ -131,6 +138,8 @@
26 return Text;
27 else if (type == cuc::Type::Known::events().id())
28 return Events;
29+ else if (type == cuc::Type::Known::application().id())
30+ return Application;
31 else
32 return Unknown;
33 }
34
35=== modified file 'import/Ubuntu/Content/contenttype.h'
36--- import/Ubuntu/Content/contenttype.h 2015-09-02 12:43:49 +0000
37+++ import/Ubuntu/Content/contenttype.h 2016-06-06 15:25:52 +0000
38@@ -40,7 +40,8 @@
39 Links = 6,
40 EBooks = 7,
41 Text = 8,
42- Events = 9
43+ Events = 9,
44+ Application = 10
45 };
46
47 ContentType(QObject *parent = nullptr);
48
49=== modified file 'include/com/ubuntu/content/type.h'
50--- include/com/ubuntu/content/type.h 2015-06-24 20:22:45 +0000
51+++ include/com/ubuntu/content/type.h 2016-06-06 15:25:52 +0000
52@@ -52,6 +52,7 @@
53 static const Type& ebooks();
54 static const Type& text();
55 static const Type& events();
56+ static const Type& application();
57 };
58
59 virtual ~Type();
60
61=== modified file 'src/com/ubuntu/content/service/com.ubuntu.content.hub.gschema.xml'
62--- src/com/ubuntu/content/service/com.ubuntu.content.hub.gschema.xml 2015-06-24 20:22:45 +0000
63+++ src/com/ubuntu/content/service/com.ubuntu.content.hub.gschema.xml 2016-06-06 15:25:52 +0000
64@@ -28,6 +28,9 @@
65 <key name="events" type="as">
66 <default>[]</default>
67 </key>
68+ <key name="application" type="as">
69+ <default>[]</default>
70+ </key>
71 </schema>
72 <schema id="com.ubuntu.content.hub.source" path="/com/ubuntu/content/hub/source/">
73 <key name="all" type="as">
74@@ -60,6 +63,9 @@
75 <key name="events" type="as">
76 <default>[]</default>
77 </key>
78+ <key name="application" type="as">
79+ <default>[]</default>
80+ </key>
81 </schema>
82 <schema id="com.ubuntu.content.hub.destination" path="/com/ubuntu/content/hub/destination/">
83 <key name="all" type="as">
84@@ -92,6 +98,9 @@
85 <key name="events" type="as">
86 <default>[]</default>
87 </key>
88+ <key name="application" type="as">
89+ <default>[]</default>
90+ </key>
91 </schema>
92 <schema id="com.ubuntu.content.hub.share" path="/com/ubuntu/content/hub/share/">
93 <key name="pictures" type="as">
94@@ -121,5 +130,8 @@
95 <key name="events" type="as">
96 <default>[]</default>
97 </key>
98+ <key name="application" type="as">
99+ <default>[]</default>
100+ </key>
101 </schema>
102 </schemalist>
103
104=== modified file 'src/com/ubuntu/content/service/hook.cpp'
105--- src/com/ubuntu/content/service/hook.cpp 2015-06-24 20:22:45 +0000
106+++ src/com/ubuntu/content/service/hook.cpp 2016-06-06 15:25:52 +0000
107@@ -126,7 +126,7 @@
108 TRACE() << Q_FUNC_INFO << "Hook:" << result.filePath();
109
110 QStringList knownTypes;
111- knownTypes << "all" << "pictures" << "music" << "contacts" << "documents" << "videos" << "links" << "ebooks" << "text" << "events";
112+ knownTypes << "all" << "pictures" << "music" << "contacts" << "documents" << "videos" << "links" << "ebooks" << "text" << "events" << "application";
113 QString app_id = result.fileName();
114 auto peer = cuc::Peer(app_id);
115
116
117=== modified file 'src/com/ubuntu/content/type.cpp'
118--- src/com/ubuntu/content/type.cpp 2015-06-24 20:22:45 +0000
119+++ src/com/ubuntu/content/type.cpp 2016-06-06 15:25:52 +0000
120@@ -136,3 +136,9 @@
121 static cuc::Type t("events", nullptr);
122 return t;
123 }
124+
125+const cuc::Type& cuc::Type::Known::application()
126+{
127+ static cuc::Type t("application", nullptr);
128+ return t;
129+}
130
131=== modified file 'src/com/ubuntu/content/utils.cpp'
132--- src/com/ubuntu/content/utils.cpp 2015-10-23 15:12:48 +0000
133+++ src/com/ubuntu/content/utils.cpp 2016-06-06 15:25:52 +0000
134@@ -55,6 +55,7 @@
135 types << cuc::Type::Known::ebooks();
136 types << cuc::Type::Known::text();
137 types << cuc::Type::Known::events();
138+ types << cuc::Type::Known::application();
139 return types;
140 }
141
142
143=== modified file 'tests/acceptance-tests/test_types.cpp'
144--- tests/acceptance-tests/test_types.cpp 2015-07-01 13:49:26 +0000
145+++ tests/acceptance-tests/test_types.cpp 2016-06-06 15:25:52 +0000
146@@ -66,3 +66,8 @@
147 {
148 EXPECT_EQ(cuc::Type::Known::events().id(), "events");
149 }
150+
151+TEST(Types, id_application)
152+{
153+ EXPECT_EQ(cuc::Type::Known::application().id(), "application");
154+}
155
156=== modified file 'tests/peers/importer/content-hub-test-importer.json'
157--- tests/peers/importer/content-hub-test-importer.json 2015-03-10 19:00:08 +0000
158+++ tests/peers/importer/content-hub-test-importer.json 2016-06-06 15:25:52 +0000
159@@ -7,6 +7,8 @@
160 "contacts",
161 "links",
162 "ebooks",
163- "text"
164+ "text",
165+ "events",
166+ "application"
167 ]
168 }
169
170=== modified file 'tests/peers/sharer/content-hub-test-sharer.json'
171--- tests/peers/sharer/content-hub-test-sharer.json 2015-03-10 19:00:08 +0000
172+++ tests/peers/sharer/content-hub-test-sharer.json 2016-06-06 15:25:52 +0000
173@@ -7,6 +7,8 @@
174 "contacts",
175 "links",
176 "ebooks",
177- "text"
178+ "text",
179+ "events",
180+ "application"
181 ]
182 }

Subscribers

People subscribed via source and target branches