• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Plasma

  • sources
  • kde-4.12
  • kdelibs
  • plasma
  • remote
credentials.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2009 Rob Scheepmaker <r.scheepmaker@student.utwente.nl>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Library General Public License version 2 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 General Public License for more details
12  *
13  * You should have received a copy of the GNU Library General Public
14  * License along with this program; if not, write to the
15  * Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  */
18 
19 #ifndef CREDENTIALS_H
20 #define CREDENTIALS_H
21 
22 #include "plasma.h"
23 
24 #include <QtCore/QObject>
25 #include <QtCore/QDataStream>
26 #include <QtCore/QMetaType>
27 
28 namespace Plasma {
29 
30 class CredentialsPrivate;
31 
42 class Credentials
43 {
44 public:
48  Credentials();
49 
53  Credentials(const Credentials &other);
54 
55  ~Credentials();
56 
57  Credentials &operator=(const Credentials &other);
58 
62  static Credentials createCredentials(const QString &name);
63 
71  TrustLevel trustLevel() const;
72 
77  bool isValid() const;
78 
84  QString name() const;
85 
90  QString id() const;
91 
95  bool isValidSignature(const QByteArray &signature, const QByteArray &message);
96 
101  bool canSign() const;
102 
106  QByteArray signMessage(const QByteArray &message);
107 
112  Credentials toPublicCredentials() const;
113 
114  friend QDataStream &operator<<(QDataStream &, const Credentials &);
115  friend QDataStream &operator>>(QDataStream &, Credentials &);
116 
117 private:
118  Credentials(const QString &id, const QString &name, const QString &key,
119  bool privateKey = false);
120 
121  CredentialsPrivate *const d;
122 
123  friend class AuthorizationManagerPrivate;
124  friend class CredentialsPrivate;
125 };
126 
130 QDataStream &operator<<(QDataStream &, const Credentials &);
131 QDataStream &operator>>(QDataStream &, Credentials &);
132 
133 }
134 
135 #endif // IDENTITY_H
Plasma::Credentials::createCredentials
static Credentials createCredentials(const QString &name)
Create a new identity with a new set of random public/private keys.
Definition: credentials.cpp:104
Plasma::Credentials::operator>>
friend QDataStream & operator>>(QDataStream &, Credentials &)
Definition: credentials.cpp:262
Plasma::Credentials::isValid
bool isValid() const
Definition: credentials.cpp:138
Plasma::Credentials::name
QString name() const
Definition: credentials.cpp:158
Plasma::Credentials::id
QString id() const
Definition: credentials.cpp:163
Plasma::Credentials::CredentialsPrivate
friend class CredentialsPrivate
Definition: credentials.h:124
Plasma::Credentials::operator=
Credentials & operator=(const Credentials &other)
Definition: credentials.cpp:98
Plasma::Credentials::~Credentials
~Credentials()
Definition: credentials.cpp:93
Plasma::TrustLevel
TrustLevel
Definition: plasma.h:271
Plasma::Credentials::AuthorizationManagerPrivate
friend class AuthorizationManagerPrivate
Definition: credentials.h:123
Plasma::operator<<
QDataStream & operator<<(QDataStream &out, const Credentials &myObj)
Streaming operators for sending/storing identities.
Definition: credentials.cpp:238
Plasma::Credentials::isValidSignature
bool isValidSignature(const QByteArray &signature, const QByteArray &message)
Definition: credentials.cpp:168
plasma.h
Plasma::Credentials::operator<<
friend QDataStream & operator<<(QDataStream &, const Credentials &)
Streaming operators for sending/storing identities.
Definition: credentials.cpp:238
Plasma::Credentials::toPublicCredentials
Credentials toPublicCredentials() const
Definition: credentials.cpp:227
Plasma::Credentials::trustLevel
TrustLevel trustLevel() const
Definition: credentials.cpp:122
Plasma::operator>>
QDataStream & operator>>(QDataStream &in, Credentials &myObj)
Definition: credentials.cpp:262
Plasma::Credentials
This class encapsules someone's identity.
Definition: credentials.h:42
Plasma::Credentials::signMessage
QByteArray signMessage(const QByteArray &message)
Definition: credentials.cpp:207
Plasma::Credentials::Credentials
Credentials()
Default constructor.
Definition: credentials.cpp:82
Plasma::Credentials::canSign
bool canSign() const
Definition: credentials.cpp:193
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:33 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal