#include <mw/ndefconnection.h>
class CNdefConnection : public CActive |
Public Member Functions | |
---|---|
~CNdefConnection() | |
IMPORT_C TInt | Activate(TInt) |
IMPORT_C void | CancelRawModeAccess() |
IMPORT_C void | CancelRead() |
IMPORT_C void | CancelWrite() |
IMPORT_C TNfcConnectionInfo::TNfcConnectionMode | ConnectionMode() |
IMPORT_C void | Deactivate() |
IMPORT_C TBool | IsActivated() |
IMPORT_C TBool | IsEmptyL() |
IMPORT_C TInt32 | NdefMemorySize() |
IMPORT_C CNdefConnection * | NewL(RNfcServer &, MNdefHandler &) |
IMPORT_C CNdefConnection * | NewLC(RNfcServer &, MNdefHandler &) |
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 TNfcConnectionInfo::TNfcConnectionMode | ConnectionMode | ( | ) |
See also: MNfcConnection::ConnectionMode
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.
Returns: Represent NDEF memory size in bytes when return value is positive. Negative value represent system wide error code.
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.
Parameter | Description |
---|---|
aNfcServer | reference to NFC Server. |
aHandler | Handler for callbacks. |
Returns: Pointer to the newly created instance.
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.
Parameter | Description |
---|---|
aNfcServer | reference to NFC Server. |
aHandler | Handler for callbacks. |
Returns: Pointer to the newly created instance.
IMPORT_C void | RawModeAccess | ( | TRequestStatus & | aStatus, |
const TDesC8 & | aCommand, | |||
TDes8 & | aResponse, | |||
TTimeIntervalMicroSeconds32 & | aTimeout | |||
) |
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.
Parameter | Description |
---|---|
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. |