RCbsTopicList Class Reference

class RCbsTopicList : public RSubSessionBase

This class represents the client-side subsession to handle topic lists.

Inherits from

Public Member Functions
RCbsTopicList()
TInt AddTopic(TCbsTopic &)
TInt ChangeTopicHotmarkStatus(TCbsTopicNumber, TBool)
TInt ChangeTopicNameAndNumber(TCbsTopicNumber, TCbsTopicNumber, const TCbsTopicName &)
TInt ChangeTopicSubscriptionStatus(TCbsTopicNumber, TBool)
TInt Close()
TInt DeleteAllTopics()
TInt DeleteTopic(TCbsTopicNumber)
TInt FindTopicByNumber(TCbsTopicNumber, TCbsTopic &)
voidGetHotmarkedMessageHandle(TCbsMessageHandle &)
TInt GetLatestTopicNumber(TCbsTopicNumber &)
TInt GetNewTopicsCount(TInt &)
TInt GetNextAndPrevTopicNumber(const TCbsTopicNumber &, TCbsTopicNumber &, TCbsTopicNumber &, TInt &)
TInt GetTopic(const TInt, TCbsTopic &)
voidGetTopicCount(TInt &)
voidGetUnreadMessageCount(TInt &)
voidNotifyOnEvent(TRequestStatus &, const TInt, TCbsTopicListEvent &, TCbsTopicNumber &)
voidNotifyOnEventCancel()
TInt NumberOfUnreadHotmarkedMessages()
TInt Open(RCbs &)
Private Member Functions
RCbsTopicList(const RCbsTopicList &)
RCbsTopicList &operator=(const RCbsTopicList &)
Inherited Functions
RSubSessionBase::CloseSubSession(TInt)
RSubSessionBase::CreateAutoCloseSubSession(RSessionBase &,TInt,const TIpcArgs &)
RSubSessionBase::CreateSubSession(const RSessionBase &,TInt)
RSubSessionBase::CreateSubSession(const RSessionBase &,TInt,const TIpcArgs &)
RSubSessionBase::RSubSessionBase()
RSubSessionBase::Send(TInt)const
RSubSessionBase::Send(TInt,const TIpcArgs &)const
RSubSessionBase::SendReceive(TInt)const
RSubSessionBase::SendReceive(TInt,TRequestStatus &)const
RSubSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSubSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSubSessionBase::Session()const
RSubSessionBase::SubSessionHandle()const
Private Attributes
TPtr8 iNotifyEventPtr
TPtr8 iNotifyHandlePtr

Constructor & Destructor Documentation

RCbsTopicList()

RCbsTopicList()

Constructor.

RCbsTopicList(const RCbsTopicList &)

RCbsTopicList(const RCbsTopicList &)[private]

Parameters

const RCbsTopicList &

Member Functions Documentation

AddTopic(TCbsTopic &)

TInt AddTopic(TCbsTopic &aTopic)

Adds a new topic.

Note that the number of the new topic must be unused.

Parameters

TCbsTopic & aTopicIt contains the information of the new topic.

ChangeTopicHotmarkStatus(TCbsTopicNumber, TBool)

TInt ChangeTopicHotmarkStatus(TCbsTopicNumberaNumber,
TBoolaNewStatus
)

Changes topic hotmark status.

Parameters

TCbsTopicNumber aNumberNumber of the topic
TBool aNewStatusIt is the new hotmark status.

ChangeTopicNameAndNumber(TCbsTopicNumber, TCbsTopicNumber, const TCbsTopicName &)

TInt ChangeTopicNameAndNumber(TCbsTopicNumberaOldNumber,
TCbsTopicNumberaNewNumber,
const TCbsTopicName &aName
)

Changes the name and number of the existing topic.

Note that the changing fails in case there is another topic with the new topic number. It also fails if the topic is protected.

Parameters

TCbsTopicNumber aOldNumberOld topic number
TCbsTopicNumber aNewNumberNew topic number
const TCbsTopicName & aNameIt is the new name of the topic.

ChangeTopicSubscriptionStatus(TCbsTopicNumber, TBool)

TInt ChangeTopicSubscriptionStatus(TCbsTopicNumberaNumber,
TBoolaNewStatus
)

Changes topic subscription status.

Parameters

TCbsTopicNumber aNumberNumber of the topic
TBool aNewStatusIt is the new subscription status.

Close()

TInt Close()

Closes the subsession and connection to the server.

DeleteAllTopics()

TInt DeleteAllTopics()

Delete all topics.

DeleteTopic(TCbsTopicNumber)

TInt DeleteTopic(TCbsTopicNumberaNumber)

Deletes an existing topic.

Note that the topic must exists.

Parameters

TCbsTopicNumber aNumberIt is the handle to the topic to be deleted.

FindTopicByNumber(TCbsTopicNumber, TCbsTopic &)

TInt FindTopicByNumber(TCbsTopicNumberaNumber,
TCbsTopic &aTopic
)

Finds the topic by given number.

Parameters

TCbsTopicNumber aNumberIt is the number of the topic.
TCbsTopic & aTopicIt will contain the topic information.

GetHotmarkedMessageHandle(TCbsMessageHandle &)

voidGetHotmarkedMessageHandle(TCbsMessageHandle &aMessage)

Returns the handle to the latest hotmarked message that has been received after the system has started up.

Parameters

TCbsMessageHandle & aMessageIt is handle to the message.

GetLatestTopicNumber(TCbsTopicNumber &)

TInt GetLatestTopicNumber(TCbsTopicNumber &aNumber)

Returns the latest topic's number.

Parameters

TCbsTopicNumber & aNumberNumber of the topic

GetNewTopicsCount(TInt &)

TInt GetNewTopicsCount(TInt &aCount)

Returns the number of session-specific new topics and resets the counter. New topics are added by the topic detection feature in absence of CBS UI Application.

Parameters

TInt & aCountOn return contains the amount of new topics.

GetNextAndPrevTopicNumber(const TCbsTopicNumber &, TCbsTopicNumber &, TCbsTopicNumber &, TInt &)

TInt GetNextAndPrevTopicNumber(const TCbsTopicNumber &aCurrentTopicNumber,
TCbsTopicNumber &aPrevTopicNumber,
TCbsTopicNumber &aNextTopicNumber,
TInt &aPosition
)

Returns the numbers of topics that precede and succeed the given topic in server-side topic list.

If the given topic is the first topic in list, aPosition has ECbsHead bit up. If the given topic is the last topic in list, aPosition has ECbsTail bit up.

Return code values: KErrNone aPrevTopicNumber, aNextTopicNumber and aPosition contain valid values. KErrNotFound aCurrentTopicNumber specified a topic that was not on topic list.

Parameters

const TCbsTopicNumber & aCurrentTopicNumberNumber that specifies the topic whose surroundings are returned
TCbsTopicNumber & aPrevTopicNumberReturns: number of topic preceding the given topic
TCbsTopicNumber & aNextTopicNumberReturns: number of topic succeeding the given topic
TInt & aPositionReturns: position of current topic in list.

GetTopic(const TInt, TCbsTopic &)

TInt GetTopic(const TIntaIndex,
TCbsTopic &aTopic
)

Returns information about a topic from the topic list.

Parameters

const TInt aIndexIt is the index to the topic.
TCbsTopic & aTopicIt will contain the topic information.

GetTopicCount(TInt &)

voidGetTopicCount(TInt &aCount)

Returns the total amount of topics the topic list contains.

Parameters

TInt & aCountIt will contain the total amount of topics.

GetUnreadMessageCount(TInt &)

voidGetUnreadMessageCount(TInt &aCount)

Returns the total amount of unread messages.

Parameters

TInt & aCountIt will contain the amount of unread messages.

NotifyOnEvent(TRequestStatus &, const TInt, TCbsTopicListEvent &, TCbsTopicNumber &)

voidNotifyOnEvent(TRequestStatus &aStatus,
const TIntaRequested,
TCbsTopicListEvent &aEvent,
TCbsTopicNumber &aNumber
)

Requests the server to notify the client whenever an event occurs that changes the information of the topics.

Note that the client may select what kind of events it is interested in. Note also that there can be at most one pending request per instance of the class.

Parameters

TRequestStatus & aStatusIt is the variable that the server will modify whenever an event occurs.
const TInt aRequestedIt contains the events the client is listening to.
TCbsTopicListEvent & aEventIt will contain the event that occurred.
TCbsTopicNumber & aNumberNumber of topic

NotifyOnEventCancel()

voidNotifyOnEventCancel()

Cancels the pending notify request.

NumberOfUnreadHotmarkedMessages()

TInt NumberOfUnreadHotmarkedMessages()

Returns the number of unread messages in hotmarked topics.

This function is to used by the client when deciding whether the message or topic list view should be opened to display a hotmarked message(s).

Open(RCbs &)

TInt Open(RCbs &aServer)

Creates a subsession to the server. Before using any other method it must be called.

Parameters

RCbs & aServerIt is the cbs server.

operator=(const RCbsTopicList &)

RCbsTopicList &operator=(const RCbsTopicList &)[private]

Parameters

const RCbsTopicList &

Member Data Documentation

TPtr8 iNotifyEventPtr

TPtr8 iNotifyEventPtr[private]

TPtr8 iNotifyHandlePtr

TPtr8 iNotifyHandlePtr[private]