CNdefDiscovery Class Reference

#include <mw/ndefdiscovery.h>

Link against: nfcdiscoveryservice.lib

class CNdefDiscovery : public CActive

Inherits from

Detailed Description

CNdefDiscovery provides the mechanism to discover NDEF messages, which are read from the NFC tags.

Since
S60 ?S60_version

Constructor & Destructor Documentation

~CNdefDiscovery ( )

IMPORT_C~CNdefDiscovery()

Destructor.

Member Function Documentation

AddNdefMessageListener ( MNdefMessageListener & )

IMPORT_C TIntAddNdefMessageListener(MNdefMessageListener &aListener)

Adds a new MNdefMessageListener object to listen received NDEF-message actions. Only one listener can be added at the time. MNfcNdefListener must be added before calling any other method of this interface.

See also: ndefmessagelistener.h

Parameters
aListenerListener to be added.

Return Values

KErrAlreadyExists If listener already exists.
KErrNone If successful, otherwise one of the system-wide errcodes.

AddNdefSubscription ( const CNdefRecord::TNdefRecordTnf, const TDesC8 & )

IMPORT_C TIntAddNdefSubscription(const CNdefRecord::TNdefRecordTnfaTnf,
const TDesC8 &aType
)

Adds NDEF-subscription to NFC server.

Parameters
aTnfTNF of the message the application is interested in.
aTypeType of the message the application is interested in.

Return Values

KErrBadHandle If MNdefMessageListener isn't added.
KErrNone If successful, otherwise one of the system-wide errcodes.

DoCancel ( )

voidDoCancel()[protected, virtual]

Reimplemented from CActive::DoCancel()

See also: CActive

NewL ( RNfcServer & )

IMPORT_C CNdefDiscovery *NewL(RNfcServer &aNfcServer)[static]

Creates a new instance of this class.

Parameters
aNfcServerReference to NFC server.
Return Value
Pointer to the newly created instance.

NewLC ( RNfcServer & )

IMPORT_C CNdefDiscovery *NewLC(RNfcServer &aNfcServer)[static]

Creates a new instance of this class.

Parameters
aNfcServerReference to NFC server.
Return Value
Pointer to the newly created instance.

RemoveAllNdefSubscription ( )

IMPORT_C voidRemoveAllNdefSubscription()

Removes all NDEF subscription from the NFC server.

RemoveNdefMessageListener ( )

IMPORT_C voidRemoveNdefMessageListener()

Removes MNdefMessageListener object. After calling this method, all actions related to this listener will be canceled.

RemoveNdefSubscription ( const CNdefRecord::TNdefRecordTnf, const TDesC8 & )

IMPORT_C voidRemoveNdefSubscription(const CNdefRecord::TNdefRecordTnfaTnf,
const TDesC8 &aType
)

Removes NDEF-subscription from the NFC server. If specified NDEF-subscription is not found, this method returns silently without any actions.

Parameters
aTnfTNF of the message.
aTypeType of the message.

RunError ( TInt )

TInt RunError(TIntaError)[protected, virtual]

Reimplemented from CActive::RunError(TInt)

See also: CActive

RunL ( )

voidRunL()[protected, virtual]

Reimplemented from CActive::RunL()

See also: CActive

SendNdefMessageL ( const CNdefMessage & )

IMPORT_C voidSendNdefMessageL(const CNdefMessage &aMessage)

Sends NDEF message to NFC server to handle it. If contain of given message is unknown for NFC server confirmation query with warning message will be launched.

Parameters
aMessagePointer to CNdefMessage, which will be handled in NFC server.