#include <mw/ndefconnection.h>
Link against: ndefaccess.lib
| class CNdefConnection : public CActive, public MNfcConnection |
| Public Member Functions | |
|---|---|
| ~CNdefConnection() | |
| virtual IMPORT_C TInt | Activate(TInt) |
| virtual IMPORT_C void | CancelRawModeAccess() |
| IMPORT_C void | CancelRead() |
| IMPORT_C void | CancelWrite() |
| virtual IMPORT_C TNfcConnectionInfo::TNfcConnectionMode | ConnectionMode() |
| virtual IMPORT_C void | Deactivate() |
| virtual IMPORT_C TBool | IsActivated() |
| IMPORT_C TBool | IsEmptyL() |
| IMPORT_C TInt32 | NdefMemorySize() |
| IMPORT_C CNdefConnection * | NewL(RNfcServer &, MNdefHandler &) |
| IMPORT_C CNdefConnection * | NewLC(RNfcServer &, MNdefHandler &) |
| virtual IMPORT_C void | RawModeAccess(TRequestStatus &, const TDesC8 &, TDes8 &, TTimeIntervalMicroSeconds32 &) |
| IMPORT_C TInt | ReadMessage() |
| IMPORT_C TInt | ReadMessages() |
| IMPORT_C TInt | ReadRecord() |
| IMPORT_C TInt | WriteMessage(const CNdefMessage &) |
| IMPORT_C TInt | WriteMessages(const RPointerArray< CNdefMessage > &) |
| Inherited Attributes | |
|---|---|
| CActive::iStatus | |
| Inherited Enumerations | |
|---|---|
| CActive:TPriority | |
CNdefConnection interface provides the basic functionality for exchanging NFC Forum formatted data with contactless targets.
Before NDEF data exchange NDEF connection must be opened. Usually NDEF connection is opened with a tag. This requires tag subscription and listening of tag connection. NDEF connection is opened by giving CNdefConnection object to MNfcTag::OpenConnection as a parameter.
| IMPORT_C void | CancelRawModeAccess | ( | ) | [virtual] |
Reimplemented from MNfcConnection::CancelRawModeAccess()
Not supported.
| IMPORT_C TNfcConnectionInfo::TNfcConnectionMode | ConnectionMode | ( | ) | [virtual] |
Reimplemented from MNfcConnection::ConnectionMode()
See also: MNfcConnection::ConnectionMode
| IMPORT_C void | Deactivate | ( | ) | [virtual] |
Reimplemented from MNfcConnection::Deactivate()
See also: MNfcConnection::Deactivate
| IMPORT_C TBool | IsActivated | ( | ) | [virtual] |
Reimplemented from MNfcConnection::IsActivated()
See also: MNfcConnection::IsActivated
| IMPORT_C TBool | IsEmptyL | ( | ) |
Check whether NDEF connection is empty or not. Usually NDEF connection is a tag. So this checks if tag is empty.
May leave with system wide error code.
| EFalse | if NDEF connection isn't empty. |
| ETrue | If NDEF connection is empty. |
| IMPORT_C TInt32 | NdefMemorySize | ( | ) |
Gets NDEF memory size.
| IMPORT_C CNdefConnection * | NewL | ( | RNfcServer & | aNfcServer, |
| MNdefHandler & | aHandler | |||
| ) | [static] | |||
Creates a new instance of this class.
May leave with one of the system wide error codes.
| Parameters | |
|---|---|
| aNfcServer | reference to NFC Server. |
| aHandler | Handler for callbacks. |
| IMPORT_C CNdefConnection * | NewLC | ( | RNfcServer & | aNfcServer, |
| MNdefHandler & | aHandler | |||
| ) | [static] | |||
Creates a new instance of this class.
May leave with one of the system wide error codes.
| Parameters | |
|---|---|
| aNfcServer | reference to NFC Server. |
| aHandler | Handler for callbacks. |
| IMPORT_C void | RawModeAccess | ( | TRequestStatus & | aStatus, |
| const TDesC8 & | aCommand, | |||
| TDes8 & | aResponse, | |||
| TTimeIntervalMicroSeconds32 & | aTimeout | |||
| ) | [virtual] | |||
Reimplemented from MNfcConnection::RawModeAccess(TRequestStatus &,const TDesC8 &,TDes8 &,TTimeIntervalMicroSeconds32 &)
Not supported.
| IMPORT_C TInt | ReadMessage | ( | ) |
Asynchronous read which attempts to read a NDEF Message from the target device. When read is complete MNdefHandler::ReadComplete( CNdefMessage* aMessage ) will be called. If an error occurs MNdefHandler::HandleError() will be called.
May return one of the system wide error codes.
| KErrInUse | Previous request pending. |
| KErrNone | Request ok. |
| IMPORT_C TInt | ReadMessages | ( | ) |
Asynchronous read which attempts to read all NDEF Messages from the target device. When read is complete MNdefHandler::ReadComplete( const RPointerArray<CNdefMessage>& aMessages ) will be called. If an error occurs MNdefHandler::HandleError() will be called.
May return one of the system wide error codes.
| KErrInUse | Previous request pending. |
| KErrNone | Request ok. |
| IMPORT_C TInt | ReadRecord | ( | ) |
Asynchronous read which attempts to read a NDEF Record from the target device. When read is complete MNdefHandler::ReadComplete( CNdefRecord* aRecord, CNdefRecord::TNdefMessagePart aPart ) will be called. If an error occures MNdefHandler::HandleError() will be called.
May return one of the system wide error codes.
| KErrInUse | Previous request pending. |
| KErrNone | Request ok. |
| IMPORT_C TInt | WriteMessage | ( | const CNdefMessage & | aMessage | ) |
Asynchronous write which attempts to write a NDEF Message to the target device. When writing has been completed MNdefHandler::WriteComplete() will be called. If an error occures MNdefHandler::HandleError() will be called.
May return one of the system wide error codes.
| Parameters | |
|---|---|
| aMessage | Message to write. |
| KErrInUse | Previous request pending. |
| KErrNone | Request ok. |
| IMPORT_C TInt | WriteMessages | ( | const RPointerArray< CNdefMessage > & | aMessages | ) |
Asynchronous write which attempts to write several NDEF Messages to the target device. When writing has been completed MNdefHandler::WriteComplete() will be called. If an error occurs MNdefHandler::HandleError() will be called.
May return one of the system wide error codes.
| KErrInUse | Previous request pending. |
| KErrNone | Request ok. |