Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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
/
QString
>
30
31
QT_BEGIN_NAMESPACE
32
33
namespace
QPcsc
{
34
struct
RawCommandResult
35
{
36
LONG
ret
=
SCARD_E_READER_UNAVAILABLE
;
37
QByteArray
response
;
38
39
bool
isOk
()
const
{
return
ret == SCARD_S_SUCCESS; }
40
};
41
42
QString
errorMessage
(LONG error);
43
44
}
// namespace QPcsc
45
46
class
QPcscSlotName
:
public
47
#
ifdef
Q_OS_WIN
48
QString
49
#
else
50
QByteArray
51
#
endif
52
{
53
public
:
54
#
ifdef
Q_OS_WIN
55
using
CPtr
=
LPCWSTR
;
56
using
Ptr
=
LPWSTR
;
57
explicit
QPcscSlotName
(
CPtr
p
) :
QString
(
reinterpret_cast
<
const
QChar
*>(
p
)) { }
58
#
else
59
using
CPtr
=
LPCSTR
;
60
using
Ptr
=
LPSTR
;
61
explicit
QPcscSlotName
(CPtr p) :
QByteArray
(
p
) { }
62
#
endif
63
64
CPtr
ptr
()
const
noexcept
{
return
reinterpret_cast
<CPtr>(constData()); }
65
Ptr
ptr
() {
return
reinterpret_cast
<Ptr>(data()); }
66
67
static
qsizetype
nameSize
(CPtr p);
68
};
69
70
QT_END_NAMESPACE
71
72
#
endif
// QPCSC_P_H
QPcscSlotName
Definition
qpcsc_p.h:52
QPcscSlotName::ptr
Ptr ptr()
Definition
qpcsc_p.h:65
QPcscSlotName::QPcscSlotName
QPcscSlotName(CPtr p)
Definition
qpcsc_p.h:61
QPcscSlotName::ptr
CPtr ptr() const noexcept
Definition
qpcsc_p.h:64
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
QPlatformGraphicsBufferHelper
\inmodule QtGui
QPcsc::RawCommandResult
Definition
qpcsc_p.h:35
QPcsc::RawCommandResult::isOk
bool isOk() const
Definition
qpcsc_p.h:39
QPcsc::RawCommandResult::response
QByteArray response
Definition
qpcsc_p.h:37
QPcsc::RawCommandResult::ret
LONG ret
Definition
qpcsc_p.h:36
qtconnectivity
src
nfc
pcsc
qpcsc_p.h
Generated on
for Qt by
1.14.0