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

Subscribers

People subscribed via source and target branches

to all changes: