1/*
2 Copyright (c) 2010 Laurent Montel <montel@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef IDENTITY_H
21#define IDENTITY_H
22
23#include "setupobject.h"
24
25class Transport;
26
27namespace KPIMIdentities {
28 class Identity;
29 class IdentityManager;
30}
31
32class Identity : public SetupObject
33{
34 Q_OBJECT
35 public:
36 explicit Identity( QObject *parent = 0 );
37 ~Identity();
38 void create();
39 void destroy();
40
41 public slots:
42 Q_SCRIPTABLE void setIdentityName( const QString &name );
43 Q_SCRIPTABLE void setRealName( const QString & name );
44 Q_SCRIPTABLE void setEmail( const QString &email );
45 Q_SCRIPTABLE void setOrganization( const QString &org );
46 Q_SCRIPTABLE void setSignature( const QString &sig );
47 Q_SCRIPTABLE uint uoid() const;
48 Q_SCRIPTABLE void setTransport( QObject* transport );
49 Q_SCRIPTABLE void setPreferredCryptoMessageFormat( const QString &format );
50 Q_SCRIPTABLE void setXFace( const QString &xface );
51
52 protected:
53 QString identityName() const;
54
55 private:
56 QString m_identityName;
57 QString m_realName;
58 QString m_email;
59 QString m_organization;
60 QString m_signature;
61 QString m_prefCryptoFormat;
62 QString m_xface;
63 Transport *m_transport;
64 KPIMIdentities::IdentityManager *m_manager;
65 KPIMIdentities::Identity *m_identity;
66};
67
68#endif
69