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

kleopatra

  • sources
  • kde-4.12
  • kdepim
  • kleopatra
  • smartcard
readerstatus.h
Go to the documentation of this file.
1 /* -*- mode: c++; c-basic-offset:4 -*-
2  smartcard/readerstatus.h
3 
4  This file is part of Kleopatra, the KDE keymanager
5  Copyright (c) 2009 Klarälvdalens Datakonsult AB
6 
7  Kleopatra is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  Kleopatra is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 
21  In addition, as a special exception, the copyright holders give
22  permission to link the code of this program with any edition of
23  the Qt library by Trolltech AS, Norway (or with modified versions
24  of Qt that use the same license as Qt), and distribute linked
25  combinations including the two. You must obey the GNU General
26  Public License in all respects for all of the code used other than
27  Qt. If you modify this file, you may extend this exception to
28  your version of the file, but you are not obligated to do so. If
29  you do not wish to do so, delete this exception statement from
30  your version.
31 */
32 
33 #ifndef __KLEOPATRA__SMARTCARD__READERSTATUS_H___
34 #define __KLEOPATRA__SMARTCARD__READERSTATUS_H___
35 
36 #include <QObject>
37 #include <QMetaType>
38 
39 #include <utils/pimpl_ptr.h>
40 
41 #include <vector>
42 
43 namespace Kleo {
44 namespace SmartCard {
45 
46  class ReaderStatus : public QObject {
47  Q_OBJECT
48  public:
49  explicit ReaderStatus( QObject * parent=0 );
50  ~ReaderStatus();
51 
52  static const ReaderStatus * instance();
53  static ReaderStatus * mutableInstance();
54 
55  void startSimpleTransaction( const QByteArray & cmd, QObject * receiver, const char * slot );
56 
57  enum AppType {
58  UnknownApplication,
59  OpenPGPApplication,
60  NksApplication,
61  P15Application,
62  DinSigApplication,
63  GeldkarteApplication,
64 
65  NumAppTypes
66  };
67 
68  enum PinState {
69  UnknownPinState,
70  NullPin,
71  PinBlocked,
72  NoPin,
73  PinOk,
74 
75  NumPinStates
76  };
77 
78  enum Status {
79  NoCard,
80  CardPresent,
81  CardActive,
82  CardUsable,
83 
84  _NumScdStates,
85 
86  CardCanLearnKeys = _NumScdStates,
87  CardHasNullPin,
88 
89  CardError,
90 
91  NumStates
92  };
93 
94  Status cardStatus( unsigned int slot ) const;
95  bool anyCardHasNullPin() const;
96  bool anyCardCanLearnKeys() const;
97 
98  std::vector<PinState> pinStates( unsigned int slot ) const;
99 
100  public Q_SLOTS:
101  void updateStatus();
102  void startMonitoring();
103 
104  Q_SIGNALS:
105  void anyCardHasNullPinChanged( bool );
106  void anyCardCanLearnKeysChanged( bool );
107  void cardStatusChanged( unsigned int slot, Kleo::SmartCard::ReaderStatus::Status status );
108 
109  private:
110  class Private;
111  kdtools::pimpl_ptr<Private> d;
112  };
113 
114 
115 } // namespace SmartCard
116 } // namespace Kleo
117 
118 Q_DECLARE_METATYPE( Kleo::SmartCard::ReaderStatus::Status )
119 
120 #endif /* __KLEOPATRA__SMARTCARD__READERSTATUS_H___ */
Kleo::SmartCard::ReaderStatus::_NumScdStates
Definition: readerstatus.h:84
Kleo::SmartCard::ReaderStatus::CardError
Definition: readerstatus.h:89
Kleo::SmartCard::ReaderStatus::updateStatus
void updateStatus()
Definition: readerstatus.cpp:770
Kleo::SmartCard::ReaderStatus::OpenPGPApplication
Definition: readerstatus.h:59
kdtools::pimpl_ptr< Private >
pimpl_ptr.h
Kleo::SmartCard::ReaderStatus::CardUsable
Definition: readerstatus.h:82
Kleo::SmartCard::ReaderStatus::NumStates
Definition: readerstatus.h:91
Kleo::SmartCard::ReaderStatus::mutableInstance
static ReaderStatus * mutableInstance()
Definition: readerstatus.cpp:736
Kleo::SmartCard::ReaderStatus::anyCardCanLearnKeysChanged
void anyCardCanLearnKeysChanged(bool)
Kleo::SmartCard::ReaderStatus::UnknownApplication
Definition: readerstatus.h:58
Kleo::SmartCard::ReaderStatus::startMonitoring
void startMonitoring()
Definition: readerstatus.cpp:731
Kleo::SmartCard::ReaderStatus::NoPin
Definition: readerstatus.h:72
Kleo::SmartCard::ReaderStatus::PinBlocked
Definition: readerstatus.h:71
Kleo::SmartCard::ReaderStatus::AppType
AppType
Definition: readerstatus.h:57
Kleo::SmartCard::ReaderStatus::CardPresent
Definition: readerstatus.h:80
Kleo::SmartCard::ReaderStatus::NumPinStates
Definition: readerstatus.h:75
Kleo::SmartCard::ReaderStatus::NullPin
Definition: readerstatus.h:70
Kleo::SmartCard::ReaderStatus::P15Application
Definition: readerstatus.h:61
Kleo::SmartCard::ReaderStatus::ReaderStatus
ReaderStatus(QObject *parent=0)
Definition: readerstatus.cpp:722
Kleo::SmartCard::ReaderStatus::NumAppTypes
Definition: readerstatus.h:65
status
VerifyChecksumsDialog::Status status
Definition: verifychecksumscontroller.cpp:512
d
#define d
Definition: adduseridcommand.cpp:90
Kleo::SmartCard::ReaderStatus::anyCardCanLearnKeys
bool anyCardCanLearnKeys() const
Definition: readerstatus.cpp:753
Kleo::SmartCard::ReaderStatus::DinSigApplication
Definition: readerstatus.h:62
Kleo::SmartCard::ReaderStatus::GeldkarteApplication
Definition: readerstatus.h:63
Kleo::SmartCard::ReaderStatus::CardActive
Definition: readerstatus.h:81
Kleo::SmartCard::ReaderStatus::startSimpleTransaction
void startSimpleTransaction(const QByteArray &cmd, QObject *receiver, const char *slot)
Definition: readerstatus.cpp:765
Kleo::SmartCard::ReaderStatus::Status
Status
Definition: readerstatus.h:78
Kleo::SmartCard::ReaderStatus::cardStatus
Status cardStatus(unsigned int slot) const
Definition: readerstatus.cpp:745
Kleo::SmartCard::ReaderStatus::instance
static const ReaderStatus * instance()
Definition: readerstatus.cpp:741
Kleo::SmartCard::ReaderStatus::CardHasNullPin
Definition: readerstatus.h:87
Kleo::SmartCard::ReaderStatus
Definition: readerstatus.h:46
Kleo::SmartCard::ReaderStatus::anyCardHasNullPin
bool anyCardHasNullPin() const
Definition: readerstatus.cpp:749
Kleo::SmartCard::ReaderStatus::CardCanLearnKeys
Definition: readerstatus.h:86
Kleo::SmartCard::ReaderStatus::~ReaderStatus
~ReaderStatus()
Definition: readerstatus.cpp:728
Kleo::SmartCard::ReaderStatus::PinState
PinState
Definition: readerstatus.h:68
Kleo::SmartCard::ReaderStatus::NoCard
Definition: readerstatus.h:79
Kleo::SmartCard::ReaderStatus::anyCardHasNullPinChanged
void anyCardHasNullPinChanged(bool)
Kleo::SmartCard::ReaderStatus::PinOk
Definition: readerstatus.h:73
Kleo::SmartCard::ReaderStatus::cardStatusChanged
void cardStatusChanged(unsigned int slot, Kleo::SmartCard::ReaderStatus::Status status)
Kleo::SmartCard::ReaderStatus::NksApplication
Definition: readerstatus.h:60
slot
const char * slot
Definition: keytreeview.cpp:360
Kleo::SmartCard::ReaderStatus::pinStates
std::vector< PinState > pinStates(unsigned int slot) const
Definition: readerstatus.cpp:757
Kleo::SmartCard::ReaderStatus::UnknownPinState
Definition: readerstatus.h:69
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:56:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kleopatra

Skip menu "kleopatra"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

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