Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qpcsc_p.h
Go to the documentation of this file.
1
// Copyright (C) 2022 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
#
ifndef
QPCSC_P_H
5
#
define
QPCSC_P_H
6
7
//
8
// W A R N I N G
9
// -------------
10
//
11
// This file is not part of the Qt API. It exists purely as an
12
// implementation detail. This header file may change from version to
13
// version without notice, or even be removed.
14
//
15
// We mean it.
16
//
17
18
#
ifdef
Q_OS_WIN
19
#
include
<
qt_windows
.
h
>
20
#
endif
21
#
include
<
QtCore
/
QtGlobal
>
22
#
ifdef
Q_OS_DARWIN
23
#
include
<
PCSC
/
winscard
.
h
>
24
#
include
<
PCSC
/
wintypes
.
h
>
25
#
else
26
#
include
<
winscard
.
h
>
27
#
endif
28
#
include
<
QtCore
/
QByteArray
>
29
#
include
<
QtCore
/
qhashfunctions
.
h
>
30
#
include
<
QtCore
/
QString
>
31
32
QT_BEGIN_NAMESPACE
33
34
namespace
QPcsc
{
35
struct
RawCommandResult
36
{
37
LONG
ret
=
SCARD_E_READER_UNAVAILABLE
;
38
QByteArray
response
;
39
40
bool
isOk
()
const
{
return
ret == SCARD_S_SUCCESS; }
41
};
42
43
QString
errorMessage
(LONG error);
44
45
}
// namespace QPcsc
46
47
using
QPcscSlotNameBase =
48
#
ifdef
Q_OS_WIN
49
QString
50
#
else
51
QByteArray
52
#
endif
53
;
54
55
class
QPcscSlotName
:
public
QPcscSlotNameBase
56
{
57
public
:
58
#
ifdef
Q_OS_WIN
59
using
CPtr
=
LPCWSTR
;
60
using
Ptr
=
LPWSTR
;
61
explicit
QPcscSlotName
(
CPtr
p
) :
QString
(
reinterpret_cast
<
const
QChar
*>(
p
)) { }
62
#
else
63
using
CPtr
=
LPCSTR
;
64
using
Ptr
=
LPSTR
;
65
explicit
QPcscSlotName
(CPtr p) :
QByteArray
(
p
) { }
66
#
endif
67
68
CPtr
ptr
()
const
noexcept
{
return
reinterpret_cast
<CPtr>(constData()); }
69
Ptr
ptr
() {
return
reinterpret_cast
<Ptr>(data()); }
70
71
static
qsizetype
nameSize
(CPtr p);
72
73
friend
size_t
qHash
(
const
QPcscSlotName
&key, size_t seed = 0)
noexcept
74
{
75
const
QPcscSlotNameBase &base = key;
76
return
qHash(base, seed);
77
}
78
};
79
80
QT_END_NAMESPACE
81
82
#
endif
// QPCSC_P_H
QPcscSlotName
Definition
qpcsc_p.h:56
QPcscSlotName::ptr
Ptr ptr()
Definition
qpcsc_p.h:69
QPcscSlotName::qHash
friend size_t qHash(const QPcscSlotName &key, size_t seed=0) noexcept
Definition
qpcsc_p.h:73
QPcscSlotName::QPcscSlotName
QPcscSlotName(CPtr p)
Definition
qpcsc_p.h:65
QPcscSlotName::ptr
CPtr ptr() const noexcept
Definition
qpcsc_p.h:68
QPcscSlotName::nameSize
static qsizetype nameSize(CPtr p)
Definition
qpcsc.cpp:23
QPcsc
Definition
qpcsc.cpp:10
QPcsc::errorMessage
QString errorMessage(LONG error)
Definition
qpcsc.cpp:12
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QPcsc::RawCommandResult
Definition
qpcsc_p.h:36
QPcsc::RawCommandResult::isOk
bool isOk() const
Definition
qpcsc_p.h:40
QPcsc::RawCommandResult::response
QByteArray response
Definition
qpcsc_p.h:38
QPcsc::RawCommandResult::ret
LONG ret
Definition
qpcsc_p.h:37
qtconnectivity
src
nfc
pcsc
qpcsc_p.h
Generated on
for Qt by
1.18.0