MPresenceCacheReader2 Class Reference

class MPresenceCacheReader2

Interface for presence cache reader API. This interface is implemented by the Presence Cache client. Notice that an xsp id is in the form ovi: mailto:xyz@example.com

Since
S60 v5.1

Constructor & Destructor Documentation

~MPresenceCacheReader2()

~MPresenceCacheReader2 ( ) [inline, virtual]

Public destructor. Objects can be deleted through this interface.

Member Functions Documentation

AllBuddiesPresenceInService(const TDesC &, MPresenceCacheReadHandler2 *)

TInt AllBuddiesPresenceInService ( const TDesC & aServiceName,
MPresenceCacheReadHandler2 * aHandler
) [pure virtual]

Reads all presence info from cache for a given service. Returns in MPresenceCacheReadHandler2's HandlePresenceReadL.

Parameters

const TDesC & aServiceName Service name to search from
MPresenceCacheReadHandler2 * aHandler to handle async. callback

BuddyCountInAllServices()

TInt BuddyCountInAllServices ( ) [pure virtual]

Returns total number of buddies stored in presence cache. It includes all services, probably useful while deciding performance overheads or informing to the user.

BuddyCountInService(const TDesC &)

TInt BuddyCountInService ( const TDesC & aServiceName ) [pure virtual]

Returns total number of buddies (presence infos) stored in a specific service in presence cache. It includes only the given service.

Parameters

const TDesC & aServiceName as in device's service table

CancelRead()

TInt CancelRead ( ) [pure virtual]

Cancels any async. read operation going on. After calling this method no callback will be received from asycn read method.

CreateReaderL()

IMPORT_C MPresenceCacheReader2 * CreateReaderL ( ) [static]

Factory method to instantiate MPresenceCacheReader.

PresenceInfoLC(const TDesC &)

MPresenceBuddyInfo2 * PresenceInfoLC ( const TDesC & aIdentity ) [pure virtual]

Reads presence info from cache for a given identity, returns immediately.

Parameters

const TDesC & aIdentity buddy id, identity must be in xsp id format

ServicesCount()

TInt ServicesCount ( ) [pure virtual]

Returns total number services in presence cache.

SetObserverForSubscribedNotifications(MPresenceCacheReadHandler2 *)

TInt SetObserverForSubscribedNotifications ( MPresenceCacheReadHandler2 * aHandler ) [pure virtual]

Sets the observer to receive Presence Buddy Change notifications. Observer must be set before using SubscribePresenceBuddyChangeL. If client changes the observer using this method, all the notifications related to existing and new subscriptions will be delivered to the new observer.

Parameters

MPresenceCacheReadHandler2 * aHandler

SubscribePresenceBuddyChangeL(const TDesC &)

TInt SubscribePresenceBuddyChangeL ( const TDesC & aIdentity ) [pure virtual]

Subscribe for given presence buddy's change in presence. An observer must be set before using this method by SetObserverForSubscribedNotifications. Notifcations are delivered through MPresenceCacheReadHandler2's HandlePresenceNotificationL

leave
Only in system error cases e.g. if failed to allocate memory.

Parameters

const TDesC & aIdentity buddy id, identity must be in xsp id format

UnSubscribePresenceBuddyChangeL(const TDesC &)

void UnSubscribePresenceBuddyChangeL ( const TDesC & aIdentity ) [pure virtual]

Unsubscribe for given presence buddy's change in presence. The request is ignored if invalid.

leave
Only in system error cases e.g. if failed to allocate memory.

Parameters

const TDesC & aIdentity buddy id, identity must be in xsp id format