Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(788)

Side by Side Diff: device/nfc/nfc_tag_technology.h

Issue 1542163002: Switch to standard integer types in device/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/nfc/nfc_tag_chromeos.h ('k') | device/nfc/nfc_tag_technology_chromeos.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_NFC_NFC_TAG_TECHNOLOGY_H_ 5 #ifndef DEVICE_NFC_NFC_TAG_TECHNOLOGY_H_
6 #define DEVICE_NFC_NFC_TAG_TECHNOLOGY_H_ 6 #define DEVICE_NFC_NFC_TAG_TECHNOLOGY_H_
7 7
8 #include <stdint.h>
9
8 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h"
9 #include "device/nfc/nfc_ndef_record.h" 12 #include "device/nfc/nfc_ndef_record.h"
10 13
11 namespace device { 14 namespace device {
12 15
13 class NfcTag; 16 class NfcTag;
14 17
15 // NfcTagTechnology represents an NFC technology that allows a certain type of 18 // NfcTagTechnology represents an NFC technology that allows a certain type of
16 // I/O operation on an NFC tag. NFC tags can support a wide array of protocols. 19 // I/O operation on an NFC tag. NFC tags can support a wide array of protocols.
17 // The NfcTagTechnology hierarchy allows both raw and high-level I/O operations 20 // The NfcTagTechnology hierarchy allows both raw and high-level I/O operations
18 // on NFC tags. Do not create instances of these objects directly. Instead, 21 // on NFC tags. Do not create instances of these objects directly. Instead,
19 // obtain a handle directly from an NfcTag object. 22 // obtain a handle directly from an NfcTag object.
20 class NfcTagTechnology { 23 class NfcTagTechnology {
21 public: 24 public:
22 // The various I/O technologies that an NFC tag can support. 25 // The various I/O technologies that an NFC tag can support.
23 enum TechnologyType { 26 enum TechnologyType {
24 kTechnologyTypeNfcA = 1 << 0, 27 kTechnologyTypeNfcA = 1 << 0,
25 kTechnologyTypeNfcB = 1 << 1, 28 kTechnologyTypeNfcB = 1 << 1,
26 kTechnologyTypeNfcF = 1 << 2, 29 kTechnologyTypeNfcF = 1 << 2,
27 kTechnologyTypeNfcV = 1 << 3, 30 kTechnologyTypeNfcV = 1 << 3,
28 kTechnologyTypeIsoDep = 1 << 4, 31 kTechnologyTypeIsoDep = 1 << 4,
29 kTechnologyTypeNdef = 1 << 5 32 kTechnologyTypeNdef = 1 << 5
30 }; 33 };
31 typedef uint32 TechnologyTypeMask; 34 typedef uint32_t TechnologyTypeMask;
32 35
33 virtual ~NfcTagTechnology(); 36 virtual ~NfcTagTechnology();
34 37
35 // Returns true, if the underlying tag supports the NFC tag technology that 38 // Returns true, if the underlying tag supports the NFC tag technology that
36 // this instance represents. 39 // this instance represents.
37 virtual bool IsSupportedByTag() const = 0; 40 virtual bool IsSupportedByTag() const = 0;
38 41
39 // Returns a pointer to the associated NfcTag instance. 42 // Returns a pointer to the associated NfcTag instance.
40 NfcTag* tag() const { return tag_; } 43 NfcTag* tag() const { return tag_; }
41 44
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // Constructs a technology instance, where |tag| is the NFC tag that this 117 // Constructs a technology instance, where |tag| is the NFC tag that this
115 // instance will operate on. 118 // instance will operate on.
116 explicit NfcNdefTagTechnology(NfcTag* tag); 119 explicit NfcNdefTagTechnology(NfcTag* tag);
117 120
118 DISALLOW_COPY_AND_ASSIGN(NfcNdefTagTechnology); 121 DISALLOW_COPY_AND_ASSIGN(NfcNdefTagTechnology);
119 }; 122 };
120 123
121 } // namespace device 124 } // namespace device
122 125
123 #endif // DEVICE_NFC_NFC_TAG_TECHNOLOGY_H_ 126 #endif // DEVICE_NFC_NFC_TAG_TECHNOLOGY_H_
OLDNEW
« no previous file with comments | « device/nfc/nfc_tag_chromeos.h ('k') | device/nfc/nfc_tag_technology_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698