Merge lp:~michihenning/storage-framework/separate-header-for-item into lp:storage-framework/devel

Proposed by Michi Henning
Status: Merged
Approved by: Michi Henning
Approved revision: 116
Merged at revision: 115
Proposed branch: lp:~michihenning/storage-framework/separate-header-for-item
Merge into: lp:storage-framework/devel
Prerequisite: lp:~michihenning/storage-framework/local-provider
Diff against target: 104 lines (+55/-17)
3 files modified
include/unity/storage/provider/Item.h (+54/-0)
include/unity/storage/provider/ProviderBase.h (+1/-16)
src/local-provider/LocalUploadJob.cpp (+0/-1)
To merge this branch: bzr merge lp:~michihenning/storage-framework/separate-header-for-item
Reviewer Review Type Date Requested Status
James Henstridge Approve
unity-api-1-bot continuous-integration Approve
Review via email: mp+320009@code.launchpad.net

Commit message

Move provider::Item definition into its own header file.

Description of the change

Move provider::Item definition into its own header file.

To post a comment you must log in.
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

FAILED: Continuous integration, rev:115
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/256/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build/1787/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1794
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1570
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1570/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1570/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1570
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1570/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1570/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1570
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1570/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1570/console

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/256/rebuild

review: Needs Fixing (continuous-integration)
116. By Michi Henning

Added missing #include.

Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:116
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/261/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/1804
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1811
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1587
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1587/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1587
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1587/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1587
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1587/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1587
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1587/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1587
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1587/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1587
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1587/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/261/rebuild

review: Approve (continuous-integration)
Revision history for this message
James Henstridge (jamesh) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'include/unity/storage/provider/Item.h'
2--- include/unity/storage/provider/Item.h 1970-01-01 00:00:00 +0000
3+++ include/unity/storage/provider/Item.h 2017-03-17 02:54:00 +0000
4@@ -0,0 +1,54 @@
5+/*
6+ * Copyright (C) 2016 Canonical Ltd
7+ *
8+ * This program is free software: you can redistribute it and/or modify
9+ * it under the terms of the GNU Lesser General Public License version 3 as
10+ * published by the Free Software Foundation.
11+ *
12+ * This program is distributed in the hope that it will be useful,
13+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+ * GNU Lesser General Public License for more details.
16+ *
17+ * You should have received a copy of the GNU Lesser General Public License
18+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
19+ *
20+ * Authors: James Henstridge <james.henstridge@canonical.com>
21+ */
22+
23+#pragma once
24+
25+#include <unity/storage/common.h>
26+#include <unity/storage/visibility.h>
27+
28+#include <boost/variant.hpp>
29+
30+#include <map>
31+#include <vector>
32+
33+namespace unity
34+{
35+namespace storage
36+{
37+namespace provider
38+{
39+
40+// Note: When growing the set of supported variant types, add new types
41+// to the *end* of the list, and update the marshaling code in dbusmarshal.cpp.
42+typedef boost::variant<std::string, int64_t> MetadataValue;
43+
44+struct UNITY_STORAGE_EXPORT Item
45+{
46+ std::string item_id;
47+ std::vector<std::string> parent_ids;
48+ std::string name;
49+ std::string etag;
50+ unity::storage::ItemType type;
51+ std::map<std::string, MetadataValue> metadata;
52+};
53+
54+typedef std::vector<Item> ItemList;
55+
56+}
57+}
58+}
59
60=== modified file 'include/unity/storage/provider/ProviderBase.h'
61--- include/unity/storage/provider/ProviderBase.h 2016-11-03 02:43:43 +0000
62+++ include/unity/storage/provider/ProviderBase.h 2017-03-17 02:54:00 +0000
63@@ -21,6 +21,7 @@
64 #include <unity/storage/common.h>
65 #include <unity/storage/visibility.h>
66 #include <unity/storage/provider/Credentials.h>
67+#include <unity/storage/provider/Item.h>
68
69 #include <boost/thread/future.hpp>
70 #include <boost/variant.hpp>
71@@ -50,22 +51,6 @@
72 Credentials credentials;
73 };
74
75-// Note: When growing the set of supported variant types, add new types
76-// to the *end* of the list, and update the marshaling code in dbusmarshal.cpp.
77-typedef boost::variant<std::string, int64_t> MetadataValue;
78-
79-struct UNITY_STORAGE_EXPORT Item
80-{
81- std::string item_id;
82- std::vector<std::string> parent_ids;
83- std::string name;
84- std::string etag;
85- unity::storage::ItemType type;
86- std::map<std::string, MetadataValue> metadata;
87-};
88-
89-typedef std::vector<Item> ItemList;
90-
91 class UNITY_STORAGE_EXPORT ProviderBase : public std::enable_shared_from_this<ProviderBase>
92 {
93 public:
94
95=== modified file 'src/local-provider/LocalUploadJob.cpp'
96--- src/local-provider/LocalUploadJob.cpp 2017-03-17 02:54:00 +0000
97+++ src/local-provider/LocalUploadJob.cpp 2017-03-17 02:54:00 +0000
98@@ -22,7 +22,6 @@
99 #include "utils.h"
100 #include <unity/storage/internal/safe_strerror.h>
101 #include <unity/storage/provider/Exceptions.h>
102-#include <unity/storage/provider/ProviderBase.h> // TODO: Should not be needed
103
104 #include <fcntl.h>
105

Subscribers

People subscribed via source and target branches

to all changes: