#include <mw/nfctag.h>
class MNfcTag |
Public Member Functions | |
---|---|
virtual | ~MNfcTag() |
pure virtual void | CloseConnection(MNfcConnection &) |
pure virtual TInt | GetConnectionModes(RArray< TNfcConnectionInfo::TNfcConnectionMode > &) |
pure virtual TBool | HasConnectionMode(const TNfcConnectionInfo::TNfcConnectionMode &) |
pure virtual TBool | IsInNearField() |
pure virtual TInt | OpenConnection(MNfcConnection &) |
pure virtual const TDesC8 & | Uid() |
This interface provides access to discovered contactless tag. Via this interface client can open different connection modes to the tag.
void | CloseConnection | ( | MNfcConnection & | aNfcConnection | ) | [pure virtual] |
Closes given NFC connection object.
TInt | GetConnectionModes | ( | RArray< TNfcConnectionInfo::TNfcConnectionMode > & | aArray | ) | const [pure virtual] |
Returns all supported connection modes.
Parameters | |
---|---|
aArray | Array for connection modes |
TBool | HasConnectionMode | ( | const TNfcConnectionInfo::TNfcConnectionMode & | aMode | ) | const [pure virtual] |
Checks whether detected tag has specified connection mode or not.
Parameters | |
---|---|
aMode | Connection mode |
EFalse | Discovered tag doesn't support specified connection mode |
ETrue | Discovered tag supports specified connection mode |
TBool | IsInNearField | ( | ) | const [pure virtual] |
Checks whether discovered tag is in near field or not.
EFalse | Tag is not in the near field |
ETrue | Tag is in near field |
TInt | OpenConnection | ( | MNfcConnection & | aNfcConnection | ) | [pure virtual] |
Opens a new connection to target tag. Only one connection can be opened to target tag at a time.
Parameters | |
---|---|
aNfcConnection | Connection to be opened |
KErrInUse | Connection mode to the tag is already open |
KErrNone | Connection mode is successfully opened |
KErrNotSupported | Connection to the tag is not supported |
const TDesC8 & | Uid | ( | ) | const [pure virtual] |
Gets UID of detected tag.
Zero length descriptor is returned when tag is not in the near field.