~ci-train-bot/ubuntu-system-settings/ubuntu-system-settings-ubuntu-yakkety-landing-027

« back to all changes in this revision

Viewing changes to plugins/system-update/click/sessiontoken_impl.h

  • Committer: Bileto Bot
  • Author(s): jonas-drange
  • Date: 2016-08-17 11:18:05 UTC
  • mfrom: (1631.6.245 updates-rewrite)
  • Revision ID: ci-train-bot@canonical.com-20160817111805-moyvik9wloy79ul3
rewrite the system update panel

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of system-settings
 
3
 *
 
4
 * Copyright (C) 2016 Canonical Ltd.
 
5
 *
 
6
 * This program is free software: you can redistribute it and/or modify it
 
7
 * under the terms of the GNU General Public License version 3, as published
 
8
 * by the Free Software Foundation.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful, but
 
11
 * WITHOUT ANY WARRANTY; without even the implied warranties of
 
12
 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
13
 * PURPOSE.  See the GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License along
 
16
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 
17
 */
 
18
 
 
19
#ifndef CLICK_SESSIONTOKEN_IMPL_H
 
20
#define CLICK_SESSIONTOKEN_IMPL_H
 
21
 
 
22
#include "sessiontoken.h"
 
23
 
 
24
#include <token.h>
 
25
 
 
26
namespace UpdatePlugin
 
27
{
 
28
namespace Click
 
29
{
 
30
class SessionTokenImpl : public SessionToken
 
31
{
 
32
public:
 
33
    // Creates an invalid SessionToken.
 
34
    explicit SessionTokenImpl();
 
35
    // Creates a SessionToken using a UbuntuOne Token.
 
36
    explicit SessionTokenImpl(const UbuntuOne::Token &token);
 
37
    virtual ~SessionTokenImpl() {};
 
38
    virtual bool isValid() const override;
 
39
    virtual QString signUrl(const QString url,
 
40
                            const QString method,
 
41
                            bool asQuery = false) const override;
 
42
private:
 
43
    UbuntuOne::Token m_token;
 
44
};
 
45
} // Click
 
46
} // UpdatePlugin
 
47
 
 
48
#endif // CLICK_SESSIONTOKEN_IMPL_H