CPresenceDataCache Class Reference

class CPresenceDataCache : public CBase

PSC Presence Data Cache implementation.

Since
S60 v3.2

Inherits from

Public Member Functions
~CPresenceDataCache ()
IMPORT_C CBlockListSubscriptionItem & BlockListSubscriptionItemLC ()
IMPORT_C void CleanExpired ()
IMPORT_C void CleanResources ( MXIMPPscContext &)
IMPORT_C CGrantRequestListSubscriptionItem & GrantRequestListSubscriptionItemLC ()
IMPORT_C TBool GroupContentSubscriptionItemExists (const CXIMPIdentityImp &)
IMPORT_C CGroupContentSubscriptionItem & GroupContentSubscriptionItemLC (const CXIMPIdentityImp &)
IMPORT_C CGroupListSubscriptionItem & GroupListSubscriptionItemLC ()
IMPORT_C CGroupMembersPresenceConfigurationItem & GroupMembersPresenceConfigurationItemLC (const CXIMPIdentityImp &)
IMPORT_C CPresenceDataCache * NewL ( MXIMPHost &)
IMPORT_C const MXIMPDataSubscriptionState & OwnPresenceDataSubscriptionState ()
IMPORT_C COwnPresenceSubscriptionItem & OwnPresenceSubscriptionItemLC ()
HBufC8 * PackGroupIdLC (const MXIMPIdentity &)
IMPORT_C const MXIMPDataSubscriptionState & PresenceBlockDataSubscriptionState ()
IMPORT_C CPresenceConfigurationItem & PresenceConfigurationItemLC (const CXIMPIdentityImp &)
IMPORT_C const MXIMPDataSubscriptionState & PresenceGrantRequestDataSubscriptionState ()
IMPORT_C CPresenceToEveryoneConfigurationItem & PresenceToEveryoneConfigurationItemLC ()
IMPORT_C const MXIMPDataSubscriptionState & PresenceWatcherListDataSubscriptionState ()
IMPORT_C const MXIMPDataSubscriptionState & PresentityGroupContentDataSubscriptionState (const MXIMPIdentity &)
IMPORT_C const MXIMPDataSubscriptionState & PresentityGroupListDataSubscriptionState ()
IMPORT_C CPresentityGroupMembersPresenceSubscriptionItem & PresentityGroupMembersPresenceSubscriptionItemLC (const CXIMPIdentityImp &)
IMPORT_C const MXIMPDataSubscriptionState & PresentityPresenceDataSubscriptionState (const MXIMPIdentity &)
IMPORT_C CPresentityPresenceSubscriptionItem & PresentityPresenceSubscriptionItemLC (const CXIMPIdentityImp &)
IMPORT_C CWatcherListSubscriptionItem & WatcherListSubscriptionItemLC ()
Private Member Functions
CPresenceDataCache ( MXIMPHost &)
void ActivatePresentityPresenceSubscriberL (const CXIMPIdentityImp &, CXIMPSubscriptionItemBase *)
void AddEventL ( CXIMPApiEventBase &, MXIMPPscContext *)
void AddPresenceConfiguratorL (const CXIMPIdentityImp &, CXIMPConfigurationItemBase *)
void AddPresentityPresenceSubscriberL (const CXIMPIdentityImp &, CXIMPSubscriptionItemBase *, CXIMPIdentityImp *)
Type & ArrayItemLC ( RPointerArray < Type > &, const CXIMPIdentityImp &)
Type & ArrayItemLC ( RPointerArray < Type > &, RPointerArray < ContentType > &, const CXIMPIdentityImp &)
void ConstructL ()
const MXIMPDataSubscriptionState & DataSubscriptionState (Type *)
const MXIMPDataSubscriptionState & DataSubscriptionState (const RPointerArray < Type > &, const MXIMPIdentity &)
MPresenceCacheWriter * ExternalCache ()
TAny * GetInterface ( TInt )
Type & ItemLC (Type *&)
TInt32 ProtocolUID ()
void RegisterExpiringItemL ( CXIMPSubscriptionItemBase *)
void RemoveMe ( COwnPresenceSubscriptionItem *)
void RemoveMe ( CGroupListSubscriptionItem *)
void RemoveMe ( CGroupContentSubscriptionItem *)
void RemoveMe ( CPresentityPresenceSubscriptionItem *)
void RemoveMe ( CWatcherListSubscriptionItem *)
void RemoveMe ( CPresentityGroupMembersPresenceSubscriptionItem *)
void RemoveMe ( CGrantRequestListSubscriptionItem *)
void RemoveMe ( CBlockListSubscriptionItem *)
void RemoveMe ( CPresenceConfigurationItem *)
void RemoveMe ( CPresenceToEveryoneConfigurationItem *)
void RemoveMe ( CGroupMembersPresenceConfigurationItem *)
IMPORT_C void RemoveMe (Type *&, Type *)
void RemoveMeFromArray ( RPointerArray < Type > &, Type *)
void RemovePresenceConfigurator (const CXIMPIdentityImp &, CXIMPConfigurationItemBase *)
void RemovePresentityPresenceSubscriber (const CXIMPIdentityImp &, CXIMPSubscriptionItemBase *)
void SynthesisePresentityPresenceSubscriptionEventToL (const CXIMPIdentityImp &, MXIMPPscContext *, TBool )
void UnregisterExpiringItem ( CXIMPSubscriptionItemBase *)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
CBlockListSubscriptionItem * iBlockListSubscriptionItem
CXIMPDataSubscriptionStateImp * iEmptySubscriptionState
RPointerArray < CXIMPSubscriptionItemBase > iExpiringSubscriptionItems
MPresenceCacheWriter * iExtPresenceCache
CGrantRequestListSubscriptionItem * iGrantRequestListSubscriptionItem
RPointerArray < CGroupContentSubscriptionItem > iGroupContentSubscriptionItems
CGroupListSubscriptionItem * iGroupListSubscriptionItem
RPointerArray < CGroupMembersPresenceConfigurationItem > iGroupMembersPresenceConfigurationItems
RPointerArray < CPresentityGroupMembersPresenceSubscriptionItem > iGroupMembersPresenceSubscriptionItems
MXIMPHost & iHost
COwnPresenceSubscriptionItem * iOwnSubscriptionItem
RPointerArray < CPresenceConfigurationItem > iPresenceConfigurationItems
CPresenceToEveryoneConfigurationItem * iPresenceToEveryoneConfigurationItem
RPointerArray < CPresentityPresenceSubscriptionItem > iPresentityPresenceSubscriptionItems
CWatcherListSubscriptionItem * iWatcherListSubscriptionItem

Constructor & Destructor Documentation

CPresenceDataCache(MXIMPHost &)

CPresenceDataCache ( MXIMPHost & aHost ) [private]

Parameters

MXIMPHost & aHost

~CPresenceDataCache()

~CPresenceDataCache ( ) [virtual]

Destruction

Member Functions Documentation

ActivatePresentityPresenceSubscriberL(const CXIMPIdentityImp &, CXIMPSubscriptionItemBase *)

void ActivatePresentityPresenceSubscriberL ( const CXIMPIdentityImp & aIdentity,
CXIMPSubscriptionItemBase * aItem
) [private]

Parameters

const CXIMPIdentityImp & aIdentity
CXIMPSubscriptionItemBase * aItem

AddEventL(CXIMPApiEventBase &, MXIMPPscContext *)

void AddEventL ( CXIMPApiEventBase & aEvent,
MXIMPPscContext * aContext
) [private]

Parameters

CXIMPApiEventBase & aEvent
MXIMPPscContext * aContext

AddPresenceConfiguratorL(const CXIMPIdentityImp &, CXIMPConfigurationItemBase *)

void AddPresenceConfiguratorL ( const CXIMPIdentityImp & aIdentity,
CXIMPConfigurationItemBase * aItem
) [private]

Parameters

const CXIMPIdentityImp & aIdentity
CXIMPConfigurationItemBase * aItem

AddPresentityPresenceSubscriberL(const CXIMPIdentityImp &, CXIMPSubscriptionItemBase *, CXIMPIdentityImp *)

void AddPresentityPresenceSubscriberL ( const CXIMPIdentityImp & aIdentity,
CXIMPSubscriptionItemBase * aItem,
CXIMPIdentityImp * aGroup = NULL
) [private]

Parameters

const CXIMPIdentityImp & aIdentity
CXIMPSubscriptionItemBase * aItem
CXIMPIdentityImp * aGroup = NULL

ArrayItemLC(RPointerArray< Type > &, const CXIMPIdentityImp &)

Type & ArrayItemLC ( RPointerArray < Type > & aItemArray,
const CXIMPIdentityImp & aIdentity
) [private]

Templated item instance creation. If item is not found it is created.

Parameters

RPointerArray < Type > & aItemArray Array of items where new item should be created.
const CXIMPIdentityImp & aIdentity

ArrayItemLC(RPointerArray< Type > &, RPointerArray< ContentType > &, const CXIMPIdentityImp &)

Type & ArrayItemLC ( RPointerArray < Type > & aItemArray,
RPointerArray < ContentType > & aContentArray,
const CXIMPIdentityImp & aIdentity
) [private]

Templated item instance creation. If item is not found it is created.

Parameters

RPointerArray < Type > & aItemArray Array of items where new item should be created.
RPointerArray < ContentType > & aContentArray
const CXIMPIdentityImp & aIdentity

BlockListSubscriptionItemLC()

IMPORT_C CBlockListSubscriptionItem & BlockListSubscriptionItemLC ( )

CleanExpired()

IMPORT_C void CleanExpired ( )

CleanResources(MXIMPPscContext &)

IMPORT_C void CleanResources ( MXIMPPscContext & aContext )

Clean resources concerning context.

Parameters

MXIMPPscContext & aContext

ConstructL()

void ConstructL ( ) [private]

DataSubscriptionState(Type *)

const MXIMPDataSubscriptionState & DataSubscriptionState ( Type * aItem ) const [private]

Get data subscription state for item.

Parameters

Type * aItem Item which data subscription state should be found.

DataSubscriptionState(const RPointerArray< Type > &, const MXIMPIdentity &)

const MXIMPDataSubscriptionState & DataSubscriptionState ( const RPointerArray < Type > & aItemArray,
const MXIMPIdentity & aIdentity
) const [private]

Get data subscription state for item.

Parameters

const RPointerArray < Type > & aItemArray Item array where item should be found. Key for finding right item.
const MXIMPIdentity & aIdentity

ExternalCache()

MPresenceCacheWriter * ExternalCache ( ) [private]

GetInterface(TInt)

TAny * GetInterface ( TInt aInterfaceId ) [private]

Parameters

TInt aInterfaceId

GrantRequestListSubscriptionItemLC()

IMPORT_C CGrantRequestListSubscriptionItem & GrantRequestListSubscriptionItemLC ( )

GroupContentSubscriptionItemExists(const CXIMPIdentityImp &)

IMPORT_C TBool GroupContentSubscriptionItemExists ( const CXIMPIdentityImp & aGroupId )

Checks if group content subscription item with given group id is found.

Parameters

const CXIMPIdentityImp & aGroupId

GroupContentSubscriptionItemLC(const CXIMPIdentityImp &)

IMPORT_C CGroupContentSubscriptionItem & GroupContentSubscriptionItemLC ( const CXIMPIdentityImp & aGroupId )

Parameters

const CXIMPIdentityImp & aGroupId

GroupListSubscriptionItemLC()

IMPORT_C CGroupListSubscriptionItem & GroupListSubscriptionItemLC ( )

GroupMembersPresenceConfigurationItemLC(const CXIMPIdentityImp &)

IMPORT_C CGroupMembersPresenceConfigurationItem & GroupMembersPresenceConfigurationItemLC ( const CXIMPIdentityImp & aGroupId )

Parameters

const CXIMPIdentityImp & aGroupId

ItemLC(Type *&)

Type & ItemLC ( Type *& aItem ) [private]

Templated item instance creation. If item is not found it is created.

Parameters

Type *& aItem Reference to pointer where new item should be saved.

NewL(MXIMPHost &)

IMPORT_C CPresenceDataCache * NewL ( MXIMPHost & aHost ) [static]

Construction

Parameters

MXIMPHost & aHost

OwnPresenceDataSubscriptionState()

IMPORT_C const MXIMPDataSubscriptionState & OwnPresenceDataSubscriptionState ( ) const

OwnPresenceSubscriptionItemLC()

IMPORT_C COwnPresenceSubscriptionItem & OwnPresenceSubscriptionItemLC ( )
  • If OwnPresenceSubscriptionItem is not found, data cache initializes new one and returns ownership to caller

  • If OwnPresenceSubscriptionItem is found, data cache increases refcount by one, and returns the old object

PackGroupIdLC(const MXIMPIdentity &)

HBufC8 * PackGroupIdLC ( const MXIMPIdentity & aGroupId )

Helper method to pack group id.

Parameters

const MXIMPIdentity & aGroupId The group id to be packed.

PresenceBlockDataSubscriptionState()

IMPORT_C const MXIMPDataSubscriptionState & PresenceBlockDataSubscriptionState ( ) const

PresenceConfigurationItemLC(const CXIMPIdentityImp &)

IMPORT_C CPresenceConfigurationItem & PresenceConfigurationItemLC ( const CXIMPIdentityImp & aIdentity )

Parameters

const CXIMPIdentityImp & aIdentity

PresenceGrantRequestDataSubscriptionState()

IMPORT_C const MXIMPDataSubscriptionState & PresenceGrantRequestDataSubscriptionState ( ) const

PresenceToEveryoneConfigurationItemLC()

IMPORT_C CPresenceToEveryoneConfigurationItem & PresenceToEveryoneConfigurationItemLC ( )

PresenceWatcherListDataSubscriptionState()

IMPORT_C const MXIMPDataSubscriptionState & PresenceWatcherListDataSubscriptionState ( ) const

PresentityGroupContentDataSubscriptionState(const MXIMPIdentity &)

IMPORT_C const MXIMPDataSubscriptionState & PresentityGroupContentDataSubscriptionState ( const MXIMPIdentity & aGroupId ) const

Parameters

const MXIMPIdentity & aGroupId

PresentityGroupListDataSubscriptionState()

IMPORT_C const MXIMPDataSubscriptionState & PresentityGroupListDataSubscriptionState ( ) const

PresentityGroupMembersPresenceSubscriptionItemLC(const CXIMPIdentityImp &)

IMPORT_C CPresentityGroupMembersPresenceSubscriptionItem & PresentityGroupMembersPresenceSubscriptionItemLC ( const CXIMPIdentityImp & aIdentity )

Parameters

const CXIMPIdentityImp & aIdentity

PresentityPresenceDataSubscriptionState(const MXIMPIdentity &)

IMPORT_C const MXIMPDataSubscriptionState & PresentityPresenceDataSubscriptionState ( const MXIMPIdentity & aPresentityId ) const

Parameters

const MXIMPIdentity & aPresentityId

PresentityPresenceSubscriptionItemLC(const CXIMPIdentityImp &)

IMPORT_C CPresentityPresenceSubscriptionItem & PresentityPresenceSubscriptionItemLC ( const CXIMPIdentityImp & aIdentity )

Parameters

const CXIMPIdentityImp & aIdentity

ProtocolUID()

TInt32 ProtocolUID ( ) [private]

RegisterExpiringItemL(CXIMPSubscriptionItemBase *)

void RegisterExpiringItemL ( CXIMPSubscriptionItemBase * aExpireItem ) [private]

Parameters

CXIMPSubscriptionItemBase * aExpireItem

RemoveMe(COwnPresenceSubscriptionItem *)

void RemoveMe ( COwnPresenceSubscriptionItem * aChild ) [private]

Parameters

COwnPresenceSubscriptionItem * aChild

RemoveMe(CGroupListSubscriptionItem *)

void RemoveMe ( CGroupListSubscriptionItem * aChild ) [private]

Parameters

CGroupListSubscriptionItem * aChild

RemoveMe(CGroupContentSubscriptionItem *)

void RemoveMe ( CGroupContentSubscriptionItem * aChild ) [private]

RemoveMe(CPresentityPresenceSubscriptionItem *)

void RemoveMe ( CPresentityPresenceSubscriptionItem * aChild ) [private]

RemoveMe(CWatcherListSubscriptionItem *)

void RemoveMe ( CWatcherListSubscriptionItem * aChild ) [private]

Parameters

CWatcherListSubscriptionItem * aChild

RemoveMe(CPresentityGroupMembersPresenceSubscriptionItem *)

void RemoveMe ( CPresentityGroupMembersPresenceSubscriptionItem * aChild ) [private]

RemoveMe(CGrantRequestListSubscriptionItem *)

void RemoveMe ( CGrantRequestListSubscriptionItem * aChild ) [private]

RemoveMe(CBlockListSubscriptionItem *)

void RemoveMe ( CBlockListSubscriptionItem * aChild ) [private]

Parameters

CBlockListSubscriptionItem * aChild

RemoveMe(CPresenceConfigurationItem *)

void RemoveMe ( CPresenceConfigurationItem * aChild ) [private]

Parameters

CPresenceConfigurationItem * aChild

RemoveMe(CPresenceToEveryoneConfigurationItem *)

void RemoveMe ( CPresenceToEveryoneConfigurationItem * aChild ) [private]

RemoveMe(CGroupMembersPresenceConfigurationItem *)

void RemoveMe ( CGroupMembersPresenceConfigurationItem * aChild ) [private]

RemoveMe(Type *&, Type *)

IMPORT_C void RemoveMe ( Type *& aItem,
Type * aChild
) [private, static]

Template method for removeMe when one subscription item is target.

Parameters

Type *& aItem Reference to subscription item pointer to remove.
Type * aChild

RemoveMeFromArray(RPointerArray< Type > &, Type *)

void RemoveMeFromArray ( RPointerArray < Type > & aItemArray,
Type * aChild
) [private]

Template method for removeme if target subscription item is in array.

Parameters

RPointerArray < Type > & aItemArray Array of subscription items where aChild should exists.
Type * aChild

RemovePresenceConfigurator(const CXIMPIdentityImp &, CXIMPConfigurationItemBase *)

void RemovePresenceConfigurator ( const CXIMPIdentityImp & aIdentity,
CXIMPConfigurationItemBase * aItem
) [private]

Parameters

const CXIMPIdentityImp & aIdentity
CXIMPConfigurationItemBase * aItem

RemovePresentityPresenceSubscriber(const CXIMPIdentityImp &, CXIMPSubscriptionItemBase *)

void RemovePresentityPresenceSubscriber ( const CXIMPIdentityImp & aIdentity,
CXIMPSubscriptionItemBase * aItem
) [private]

Parameters

const CXIMPIdentityImp & aIdentity
CXIMPSubscriptionItemBase * aItem

SynthesisePresentityPresenceSubscriptionEventToL(const CXIMPIdentityImp &, MXIMPPscContext *, TBool)

void SynthesisePresentityPresenceSubscriptionEventToL ( const CXIMPIdentityImp & aIdentity,
MXIMPPscContext * aContext,
TBool aForceEvent
) [private]

Parameters

const CXIMPIdentityImp & aIdentity
MXIMPPscContext * aContext
TBool aForceEvent

UnregisterExpiringItem(CXIMPSubscriptionItemBase *)

void UnregisterExpiringItem ( CXIMPSubscriptionItemBase * aExpireItem ) [private]

Parameters

CXIMPSubscriptionItemBase * aExpireItem

WatcherListSubscriptionItemLC()

IMPORT_C CWatcherListSubscriptionItem & WatcherListSubscriptionItemLC ( )

Member Data Documentation

CBlockListSubscriptionItem * iBlockListSubscriptionItem

CBlockListSubscriptionItem * iBlockListSubscriptionItem [private]

CXIMPDataSubscriptionStateImp * iEmptySubscriptionState

CXIMPDataSubscriptionStateImp * iEmptySubscriptionState [private]

Empty subscription state to pass adaptation exists request is subscription item does not exists.

RPointerArray< CXIMPSubscriptionItemBase > iExpiringSubscriptionItems

RPointerArray < CXIMPSubscriptionItemBase > iExpiringSubscriptionItems [private]

MPresenceCacheWriter * iExtPresenceCache

MPresenceCacheWriter * iExtPresenceCache [private]

CGrantRequestListSubscriptionItem * iGrantRequestListSubscriptionItem

CGrantRequestListSubscriptionItem * iGrantRequestListSubscriptionItem [private]

RPointerArray< CGroupContentSubscriptionItem > iGroupContentSubscriptionItems

RPointerArray < CGroupContentSubscriptionItem > iGroupContentSubscriptionItems [private]

CGroupListSubscriptionItem * iGroupListSubscriptionItem

CGroupListSubscriptionItem * iGroupListSubscriptionItem [private]

RPointerArray< CGroupMembersPresenceConfigurationItem > iGroupMembersPresenceConfigurationItems

RPointerArray < CGroupMembersPresenceConfigurationItem > iGroupMembersPresenceConfigurationItems [private]

RPointerArray< CPresentityGroupMembersPresenceSubscriptionItem > iGroupMembersPresenceSubscriptionItems

RPointerArray < CPresentityGroupMembersPresenceSubscriptionItem > iGroupMembersPresenceSubscriptionItems [private]

MXIMPHost & iHost

MXIMPHost & iHost [private]

Access to host.

COwnPresenceSubscriptionItem * iOwnSubscriptionItem

COwnPresenceSubscriptionItem * iOwnSubscriptionItem [private]

Does not own. Removed when RemoveMe called.

RPointerArray< CPresenceConfigurationItem > iPresenceConfigurationItems

RPointerArray < CPresenceConfigurationItem > iPresenceConfigurationItems [private]

CPresenceToEveryoneConfigurationItem * iPresenceToEveryoneConfigurationItem

CPresenceToEveryoneConfigurationItem * iPresenceToEveryoneConfigurationItem [private]

RPointerArray< CPresentityPresenceSubscriptionItem > iPresentityPresenceSubscriptionItems

RPointerArray < CPresentityPresenceSubscriptionItem > iPresentityPresenceSubscriptionItems [private]

CWatcherListSubscriptionItem * iWatcherListSubscriptionItem

CWatcherListSubscriptionItem * iWatcherListSubscriptionItem [private]