forked from andijakl/nfcinteractor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnearfieldtargetinfo.h
58 lines (48 loc) · 1.57 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
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Andreas Jakl ([email protected])
**
** Released under Nokia Example Code License.
** See license.txt in the main project folder.
**
****************************************************************************/
#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