~ci-train-bot/mcloud/mcloud-ubuntu-artful-2884

« back to all changes in this revision

Viewing changes to include/mcloud/api/config.h

  • Committer: Gary.Wang
  • Date: 2016-04-20 04:19:28 UTC
  • Revision ID: gary.wang@canonical.com-20160420041928-kdie1pmxxopre8qi
1.remove owner id filed for upload since it's cloud owner if it's empty
2.access token fetched work-flow in compliance with mcloud qml plugin(using refresh token)
3.throw except(domain error) when net error occurs during  http stream upload and download
4.add debian files

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2016 Canonical, Ltd.
3
 
 *
4
 
 * This library is free software; you can redistribute it and/or modify it under
5
 
 * the terms of version 3 of the GNU Lesser General Public License as published
6
 
 * by the Free Software Foundation.
7
 
 *
8
 
 * This library is distributed in the hope that it will be useful, but WITHOUT
9
 
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10
 
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11
 
 * 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
 
 * Author: Gary Wang <gary.wang@canonical.com>
17
 
 */
18
 
 
19
 
#ifndef MCLOUD_API_CONFIG_H_
20
 
#define MCLOUD_API_CONFIG_H_
21
 
 
22
 
#include <memory>
23
 
#include <string>
24
 
 
25
 
namespace youtube {
26
 
namespace api {
27
 
 
28
 
struct Config {
29
 
    typedef std::shared_ptr<Config> Ptr;
30
 
 
31
 
    /*
32
 
     * The access token provided at instantiation
33
 
     */
34
 
    std::string access_token { };
35
 
 
36
 
    /*
37
 
     * The client id provided at instantiation
38
 
     */
39
 
    std::string client_id { "APP1ZtqoN3R0002" };
40
 
 
41
 
    /*
42
 
     * The secret provided at instantiation
43
 
     */
44
 
    std::string client_secret { "A70EFCDC91456349E7FDECF0A33574AC" };
45
 
 
46
 
    /*
47
 
     * API key for unauthenticated access
48
 
     */
49
 
    std::string api_key { };
50
 
 
51
 
    /*
52
 
     * The root of all API request URLs
53
 
     */
54
 
    std::string apiroot {"https://ose.caiyun.feixin.10086.cn"};
55
 
 
56
 
    /*
57
 
     * The custom HTTP user agent string for this library
58
 
     */
59
 
    std::string user_agent {"mcloud 1.0"};
60
 
 
61
 
    /*
62
 
     * Have we got access to private APIs?
63
 
     */
64
 
    bool authenticated = false;
65
 
};
66
 
 
67
 
}
68
 
}
69
 
 
70
 
#endif /* MCLOUD_API_CONFIG_H_ */