Merge lp:~michael-sheldon/content-hub/fix-1383732-rtm into lp:content-hub/rtm-14.09

Proposed by Michael Sheldon on 2015-01-19
Status: Merged
Approved by: Ken VanDine on 2015-01-21
Approved revision: 139
Merged at revision: 139
Proposed branch: lp:~michael-sheldon/content-hub/fix-1383732-rtm
Merge into: lp:content-hub/rtm-14.09
Diff against target: 138 lines (+29/-2)
7 files modified
import/Ubuntu/Content/contentpeermodel.cpp (+1/-0)
import/Ubuntu/Content/contenttype.cpp (+6/-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)
To merge this branch: bzr merge lp:~michael-sheldon/content-hub/fix-1383732-rtm
Reviewer Review Type Date Requested Status
Ken VanDine 2015-01-19 Approve on 2015-01-21
PS Jenkins bot continuous-integration Approve on 2015-01-19
Review via email: mp+246885@code.launchpad.net

Commit message

Add support for EBook content type

Description of the change

Add support for EBook content type

To post a comment you must log in.
Michael Sheldon (michael-sheldon) wrote :

Are there any related MPs required for this MP to build/function as expected? Please list.

 * No

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)

 * Yes (in sync with RTM branch)

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?

 * Yes

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/content-hub) on device or emulator?

 * Yes

If you changed the UI, was the change specified/approved by design?

 * No change

If you changed UI labels, did you update the pot file?

 * No change

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?

 * No change

Michael Sheldon (michael-sheldon) wrote :

There aren't currently any applications that can receive EBooks, so for testing purposes this click can be used to receive ebooks downloaded from the browser: http://mikeasoft.com/~mike/content-hub/com.ubuntu.developer.ken-vandine.hub-importer_0.2_all.click

Ken VanDine (ken-vandine) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?

 * Yes

Did CI run pass? If not, please explain why.

 * Yes

Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?

 * Yes

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/contentpeermodel.cpp'
2--- import/Ubuntu/Content/contentpeermodel.cpp 2014-08-05 21:01:22 +0000
3+++ import/Ubuntu/Content/contentpeermodel.cpp 2015-01-19 12:28:24 +0000
4@@ -103,6 +103,7 @@
5 appendPeersForContentType(ContentType::Contacts);
6 appendPeersForContentType(ContentType::Videos);
7 appendPeersForContentType(ContentType::Links);
8+ appendPeersForContentType(ContentType::EBooks);
9 } else {
10 appendPeersForContentType(m_contentType);
11 }
12
13=== modified file 'import/Ubuntu/Content/contenttype.cpp'
14--- import/Ubuntu/Content/contenttype.cpp 2014-08-04 17:57:26 +0000
15+++ import/Ubuntu/Content/contenttype.cpp 2015-01-19 12:28:24 +0000
16@@ -52,6 +52,9 @@
17 \li ContentType.Links
18 \li Links
19 \row
20+ \li ContentType.EBooks
21+ \li EBooks
22+ \row
23 \li ContentType.All
24 \li Any of the above content types
25 \endtable
26@@ -93,6 +96,7 @@
27 case Contacts: return cuc::Type::Known::contacts();
28 case Videos: return cuc::Type::Known::videos();
29 case Links: return cuc::Type::Known::links();
30+ case EBooks: return cuc::Type::Known::ebooks();
31 default: return cuc::Type::unknown();
32 }
33 }
34@@ -116,6 +120,8 @@
35 return Videos;
36 else if (type == cuc::Type::Known::links().id())
37 return Links;
38+ else if (type == cuc::Type::Known::ebooks().id())
39+ return EBooks;
40 else
41 return Unknown;
42 }
43
44=== modified file 'import/Ubuntu/Content/contenttype.h'
45--- import/Ubuntu/Content/contenttype.h 2014-08-04 17:57:26 +0000
46+++ import/Ubuntu/Content/contenttype.h 2015-01-19 12:28:24 +0000
47@@ -36,7 +36,8 @@
48 Music = 3,
49 Contacts = 4,
50 Videos = 5,
51- Links = 6
52+ Links = 6,
53+ EBooks = 7
54 };
55
56 ContentType(QObject *parent = nullptr);
57
58=== modified file 'include/com/ubuntu/content/type.h'
59--- include/com/ubuntu/content/type.h 2014-05-21 15:40:50 +0000
60+++ include/com/ubuntu/content/type.h 2015-01-19 12:28:24 +0000
61@@ -48,6 +48,7 @@
62 static const Type& contacts();
63 static const Type& videos();
64 static const Type& links();
65+ static const Type& ebooks();
66 };
67
68 virtual ~Type();
69
70=== modified file 'src/com/ubuntu/content/service/com.ubuntu.content.hub.gschema.xml'
71--- src/com/ubuntu/content/service/com.ubuntu.content.hub.gschema.xml 2014-05-22 07:30:54 +0000
72+++ src/com/ubuntu/content/service/com.ubuntu.content.hub.gschema.xml 2015-01-19 12:28:24 +0000
73@@ -19,6 +19,9 @@
74 <key name="links" type="as">
75 <default>[]</default>
76 </key>
77+ <key name="ebooks" type="as">
78+ <default>[]</default>
79+ </key>
80 </schema>
81 <schema id="com.ubuntu.content.hub.source" path="/com/ubuntu/content/hub/source/">
82 <key name="pictures" type="as">
83@@ -39,6 +42,9 @@
84 <key name="links" type="as">
85 <default>[]</default>
86 </key>
87+ <key name="ebooks" type="as">
88+ <default>[]</default>
89+ </key>
90 </schema>
91 <schema id="com.ubuntu.content.hub.destination" path="/com/ubuntu/content/hub/destination/">
92 <key name="pictures" type="as">
93@@ -59,6 +65,9 @@
94 <key name="links" type="as">
95 <default>[]</default>
96 </key>
97+ <key name="ebooks" type="as">
98+ <default>[]</default>
99+ </key>
100 </schema>
101 <schema id="com.ubuntu.content.hub.share" path="/com/ubuntu/content/hub/share/">
102 <key name="pictures" type="as">
103@@ -79,5 +88,8 @@
104 <key name="links" type="as">
105 <default>[]</default>
106 </key>
107+ <key name="ebooks" type="as">
108+ <default>[]</default>
109+ </key>
110 </schema>
111 </schemalist>
112
113=== modified file 'src/com/ubuntu/content/service/hook.cpp'
114--- src/com/ubuntu/content/service/hook.cpp 2014-06-25 15:52:56 +0000
115+++ src/com/ubuntu/content/service/hook.cpp 2015-01-19 12:28:24 +0000
116@@ -126,7 +126,7 @@
117 TRACE() << Q_FUNC_INFO << "Hook:" << result.filePath();
118
119 QStringList knownTypes;
120- knownTypes << "pictures" << "music" << "contacts" << "documents" << "videos" << "links";
121+ knownTypes << "pictures" << "music" << "contacts" << "documents" << "videos" << "links" << "ebooks";
122 QString app_id = result.fileName();
123 auto peer = cuc::Peer(app_id);
124
125
126=== modified file 'src/com/ubuntu/content/type.cpp'
127--- src/com/ubuntu/content/type.cpp 2014-05-21 15:40:50 +0000
128+++ src/com/ubuntu/content/type.cpp 2015-01-19 12:28:24 +0000
129@@ -104,3 +104,9 @@
130 static cuc::Type t("links", nullptr);
131 return t;
132 }
133+
134+const cuc::Type& cuc::Type::Known::ebooks()
135+{
136+ static cuc::Type t("ebooks", nullptr);
137+ return t;
138+}

Subscribers

People subscribed via source and target branches