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 &)
void GetHotmarkedMessageHandle ( TCbsMessageHandle &)
TInt GetLatestTopicNumber ( TCbsTopicNumber &)
TInt GetNewTopicsCount ( TInt &)
TInt GetNextAndPrevTopicNumber (const TCbsTopicNumber &, TCbsTopicNumber &, TCbsTopicNumber &, TInt &)
TInt GetTopic (const TInt , TCbsTopic &)
void GetTopicCount ( TInt &)
void GetUnreadMessageCount ( TInt &)
void NotifyOnEvent ( TRequestStatus &, const TInt , TCbsTopicListEvent &, TCbsTopicNumber &)
void NotifyOnEventCancel ()
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 & aTopic It contains the information of the new topic.

ChangeTopicHotmarkStatus(TCbsTopicNumber, TBool)

TInt ChangeTopicHotmarkStatus ( TCbsTopicNumber aNumber,
TBool aNewStatus
)

Changes topic hotmark status.

Parameters

TCbsTopicNumber aNumber Number of the topic
TBool aNewStatus It is the new hotmark status.

ChangeTopicNameAndNumber(TCbsTopicNumber, TCbsTopicNumber, const TCbsTopicName &)

TInt ChangeTopicNameAndNumber ( TCbsTopicNumber aOldNumber,
TCbsTopicNumber aNewNumber,
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 aOldNumber Old topic number
TCbsTopicNumber aNewNumber New topic number
const TCbsTopicName & aName It is the new name of the topic.

ChangeTopicSubscriptionStatus(TCbsTopicNumber, TBool)

TInt ChangeTopicSubscriptionStatus ( TCbsTopicNumber aNumber,
TBool aNewStatus
)

Changes topic subscription status.

Parameters

TCbsTopicNumber aNumber Number of the topic
TBool aNewStatus It 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 ( TCbsTopicNumber aNumber )

Deletes an existing topic.

Note that the topic must exists.

Parameters

TCbsTopicNumber aNumber It is the handle to the topic to be deleted.

FindTopicByNumber(TCbsTopicNumber, TCbsTopic &)

TInt FindTopicByNumber ( TCbsTopicNumber aNumber,
TCbsTopic & aTopic
)

Finds the topic by given number.

Parameters

TCbsTopicNumber aNumber It is the number of the topic.
TCbsTopic & aTopic It will contain the topic information.

GetHotmarkedMessageHandle(TCbsMessageHandle &)

void GetHotmarkedMessageHandle ( TCbsMessageHandle & aMessage )

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

Parameters

TCbsMessageHandle & aMessage It is handle to the message.

GetLatestTopicNumber(TCbsTopicNumber &)

TInt GetLatestTopicNumber ( TCbsTopicNumber & aNumber )

Returns the latest topic's number.

Parameters

TCbsTopicNumber & aNumber Number 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 & aCount On 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 & aCurrentTopicNumber Number that specifies the topic whose surroundings are returned
TCbsTopicNumber & aPrevTopicNumber Returns: number of topic preceding the given topic
TCbsTopicNumber & aNextTopicNumber Returns: number of topic succeeding the given topic
TInt & aPosition Returns: position of current topic in list.

GetTopic(const TInt, TCbsTopic &)

TInt GetTopic ( const TInt aIndex,
TCbsTopic & aTopic
)

Returns information about a topic from the topic list.

Parameters

const TInt aIndex It is the index to the topic.
TCbsTopic & aTopic It will contain the topic information.

GetTopicCount(TInt &)

void GetTopicCount ( TInt & aCount )

Returns the total amount of topics the topic list contains.

Parameters

TInt & aCount It will contain the total amount of topics.

GetUnreadMessageCount(TInt &)

void GetUnreadMessageCount ( TInt & aCount )

Returns the total amount of unread messages.

Parameters

TInt & aCount It will contain the amount of unread messages.

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

void NotifyOnEvent ( TRequestStatus & aStatus,
const TInt aRequested,
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 & aStatus It is the variable that the server will modify whenever an event occurs.
const TInt aRequested It contains the events the client is listening to.
TCbsTopicListEvent & aEvent It will contain the event that occurred.
TCbsTopicNumber & aNumber Number of topic

NotifyOnEventCancel()

void NotifyOnEventCancel ( )

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 & aServer It 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]