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

Plasma

  • 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
28namespace Plasma {
29
30class CredentialsPrivate;
31
42class Credentials
43{
44public:
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
117private:
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
130QDataStream &operator<<(QDataStream &, const Credentials &);
131QDataStream &operator>>(QDataStream &, Credentials &);
132
133}
134
135#endif // IDENTITY_H
Plasma::Credentials
This class encapsules someone's identity.
Definition: credentials.h:43
Plasma::Credentials::canSign
bool canSign() const
Definition: credentials.cpp:193
Plasma::Credentials::name
QString name() const
Definition: credentials.cpp:158
Plasma::Credentials::signMessage
QByteArray signMessage(const QByteArray &message)
Definition: credentials.cpp:207
Plasma::Credentials::Credentials
Credentials()
Default constructor.
Definition: credentials.cpp:82
Plasma::Credentials::trustLevel
TrustLevel trustLevel() const
Definition: credentials.cpp:122
Plasma::Credentials::isValid
bool isValid() const
Definition: credentials.cpp:138
Plasma::Credentials::operator=
Credentials & operator=(const Credentials &other)
Definition: credentials.cpp:98
Plasma::Credentials::isValidSignature
bool isValidSignature(const QByteArray &signature, const QByteArray &message)
Definition: credentials.cpp:168
Plasma::Credentials::CredentialsPrivate
friend class CredentialsPrivate
Definition: credentials.h:124
Plasma::Credentials::toPublicCredentials
Credentials toPublicCredentials() const
Definition: credentials.cpp:227
Plasma::Credentials::~Credentials
~Credentials()
Definition: credentials.cpp:93
Plasma::Credentials::operator<<
friend QDataStream & operator<<(QDataStream &, const Credentials &)
Streaming operators for sending/storing identities.
Definition: credentials.cpp:238
Plasma::Credentials::AuthorizationManagerPrivate
friend class AuthorizationManagerPrivate
Definition: credentials.h:123
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::id
QString id() const
Definition: credentials.cpp:163
Plasma
Namespace for everything in libplasma.
Definition: abstractdialogmanager.cpp:25
Plasma::TrustLevel
TrustLevel
Definition: plasma.h:271
Plasma::operator<<
QDataStream & operator<<(QDataStream &out, const Credentials &myObj)
Streaming operators for sending/storing identities.
Definition: credentials.cpp:238
Plasma::operator>>
QDataStream & operator>>(QDataStream &in, Credentials &myObj)
Definition: credentials.cpp:262
plasma.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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