-
Notifications
You must be signed in to change notification settings - Fork 6
/
nearfieldtargetinfo.h
63 lines (52 loc) · 1.76 KB
/
nearfieldtargetinfo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/****************************************************************************
**
** Copyright (C) 2012-2013 Andreas Jakl.
** All rights reserved.
** Contact: Andreas Jakl ([email protected])
**
** This file may be used under the terms of the GNU General
** Public License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE included in the packaging of this
** file. Please review the following information to ensure the GNU General
** Public License version 3.0 requirements will be met:
** http://www.gnu.org/copyleft/gpl.html.
**
****************************************************************************/
#ifndef NEARFIELDTARGETINFO_H
#define NEARFIELDTARGETINFO_H
#include <QDebug>
/*!
\brief Stores additional information about a QNearFieldTarget.
*/
class NearFieldTargetInfo
{
public:
NearFieldTargetInfo();
void resetInfo();
enum NfcTagAccessStatus {
NfcAccessUnknown,
NfcAccessAllowed,
NfcAccessForbidden
};
enum NfcTagMemoryType {
NfcMemoryUnknown,
NfcMemoryStatic,
NfcMemoryDynamic
};
NearFieldTargetInfo::NfcTagAccessStatus combinedReadAccess() const;
NearFieldTargetInfo::NfcTagAccessStatus combinedWriteAccess() const;
private:
NearFieldTargetInfo::NfcTagAccessStatus combineAccess(const NfcTagAccessStatus accessCC, const NfcTagAccessStatus accessLockBits) const;
public:
QString tagTypeName;
int tagMajorVersion;
int tagMinorVersion;
int tagMemorySize;
int tagWritableSize;
NfcTagAccessStatus tagReadAccessCC;
NfcTagAccessStatus tagWriteAccessCC;
NfcTagAccessStatus tagReadAccessLockBits;
NfcTagAccessStatus tagWriteAccessLockBits;
NfcTagMemoryType tagMemoryType;
};
#endif // NEARFIELDTARGETINFO_H