~ubuntu-branches/debian/jessie/attica-kf5/jessie

« back to all changes in this revision

Viewing changes to src/remoteaccount.cpp

  • Committer: Package Import Robot
  • Author(s): Maximiliano Curia
  • Date: 2014-07-15 10:53:09 UTC
  • Revision ID: package-import@ubuntu.com-20140715105309-nnjxenwcs6h4qznf
Tags: upstream-5.0.0
Import upstream version 5.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    This file is part of KDE.
 
3
 
 
4
    Copyright 2010 Sebastian Kügler <sebas@kde.org>
 
5
 
 
6
    This library is free software; you can redistribute it and/or
 
7
    modify it under the terms of the GNU Lesser General Public
 
8
    License as published by the Free Software Foundation; either
 
9
    version 2.1 of the License, or (at your option) version 3, or any
 
10
    later version accepted by the membership of KDE e.V. (or its
 
11
    successor approved by the membership of KDE e.V.), which shall
 
12
    act as a proxy defined in Section 6 of version 3 of the license.
 
13
 
 
14
    This library is distributed in the hope that it will be useful,
 
15
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
17
    Lesser General Public License for more details.
 
18
 
 
19
    You should have received a copy of the GNU Lesser General Public
 
20
    License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 
21
 
 
22
*/
 
23
 
 
24
#include "remoteaccount.h"
 
25
 
 
26
using namespace Attica;
 
27
 
 
28
class RemoteAccount::Private : public QSharedData
 
29
{
 
30
public:
 
31
    QString id;
 
32
    QString type;
 
33
    QString remoteServiceId;
 
34
    QString data;
 
35
    QString login;
 
36
    QString password;
 
37
 
 
38
    Private()
 
39
    {
 
40
    }
 
41
};
 
42
 
 
43
RemoteAccount::RemoteAccount()
 
44
    : d(new Private)
 
45
{
 
46
}
 
47
 
 
48
RemoteAccount::RemoteAccount(const RemoteAccount &other)
 
49
    : d(other.d)
 
50
{
 
51
}
 
52
 
 
53
RemoteAccount &RemoteAccount::operator=(const Attica::RemoteAccount &other)
 
54
{
 
55
    d = other.d;
 
56
    return *this;
 
57
}
 
58
 
 
59
RemoteAccount::~RemoteAccount()
 
60
{
 
61
}
 
62
 
 
63
void RemoteAccount::setId(const QString &u)
 
64
{
 
65
    d->id = u;
 
66
}
 
67
 
 
68
QString RemoteAccount::id() const
 
69
{
 
70
    return d->id;
 
71
}
 
72
 
 
73
void RemoteAccount::setType(const QString &arg)
 
74
{
 
75
    d->type = arg;
 
76
}
 
77
 
 
78
QString RemoteAccount::type() const
 
79
{
 
80
    return d->type;
 
81
}
 
82
 
 
83
void RemoteAccount::setRemoteServiceId(const QString &arg)
 
84
{
 
85
    d->remoteServiceId = arg;
 
86
}
 
87
 
 
88
QString RemoteAccount::remoteServiceId() const
 
89
{
 
90
    return d->remoteServiceId;
 
91
}
 
92
 
 
93
void RemoteAccount::setData(const QString &arg)
 
94
{
 
95
    d->data = arg;
 
96
}
 
97
 
 
98
QString RemoteAccount::data() const
 
99
{
 
100
    return d->data;
 
101
}
 
102
 
 
103
void RemoteAccount::setLogin(const QString &arg)
 
104
{
 
105
    d->login = arg;
 
106
}
 
107
 
 
108
QString RemoteAccount::login() const
 
109
{
 
110
    return d->login;
 
111
}
 
112
 
 
113
void RemoteAccount::setPassword(const QString &arg)
 
114
{
 
115
    d->password = arg;
 
116
}
 
117
 
 
118
QString RemoteAccount::password() const
 
119
{
 
120
    return d->password;
 
121
}
 
122
 
 
123
bool RemoteAccount::isValid() const
 
124
{
 
125
    return !(d->id.isEmpty());
 
126
}