RCbsTopicMessages Class Reference
class RCbsTopicMessages : public RSubSessionBase |
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 |
Constructor & Destructor Documentation
Member Functions Documentation
DeleteMessage(const TCbsMessageHandle &)
Deletes an existing message.
Note that it does not care a lot about the status of the message.
Check also the description of LockMessage method.
FindMessageByHandle(const TCbsMessageHandle &, TCbsMessage &)
Finds a message by given handle.
GetMessage(TCbsTopicNumber, TInt, TCbsMessage &)
Returns message information.
GetMessageContents(const TCbsMessageHandle &, TDes &)
Returns the message contents.
Parameters
const TCbsMessageHandle & aHandle | It is handle to the message. |
TDes & aBuffer | It will contain the contents (as much as it fits). |
GetMessageCount(TCbsTopicNumber, TInt &)
Returns the total amount of messages the topic contains.
Parameters
TCbsTopicNumber aNumber | Topic number. |
TInt & aCount | It will contain the total amount of messages. |
GetMessageIndexByHandle(const TCbsMessageHandle &, TInt &)
Returns the index of a message with given handle in topic.
Result code KErrNotFound indicates that no message was found with the given handle.
Parameters
const TCbsMessageHandle & aHandle | Handle of the message |
TInt & aIndex | Return: index of the message in message topic |
GetNextAndPrevMessageHandle(const TCbsMessageHandle &, TCbsMessageHandle &, TCbsMessageHandle &, TInt &)
Returns the handles of messages that precede and succeed the given message in server-side list of topic messages.
Topic is resolved from the given message handle
If the given handle specifies the first message in topic, aPosition has ECbsHead bit up. If the given handle specifies the last message in topic, aPosition has ECbsTail bit up.
Return code values: KErrNone aPrevMsgHandle, aNextMsgHandle and aPosition contain valid values. KErrNotFound aCurrentMsgHandle specified a message that was not found.
Parameters
const TCbsMessageHandle & aCurrentMsgHandle | Handle that specifies the message whose surroundings are returned |
TCbsMessageHandle & aPrevMsgHandle | Returns: handle of message preceding the given message |
TCbsMessageHandle & aNextMsgHandle | Returns: handle of message succeeding the given topic |
TInt & aPosition | Returns: position of current topic in list |
LockMessage(const TCbsMessageHandle &)
Locks the message.
Note that a single topic messages subsession can have at most one locked message.
Message can be unlocked by trying to lock a null message. Locked message will also be automatically unlocked when subsession is closed. If a message is locked, then it will not be deleted from the database. Thus, deleting a message or trying to delete a topic that contains such a message will fail.
Locking a message does not prevent to save the message nor read the message.
Open(RCbs &)
Creates a subsession to the server. Before using any other method it must be called.
Parameters
RCbs & aServer | It is the cbs server. |
ReadMessage(const TCbsMessageHandle &)
Sets the message as read.
SaveMessage(const TCbsMessageHandle &)
Saves a message (i.e., the saved message won't be deleted to make room for new messages).
Return codes: KErrNone Message is saved. KErrGeneral Message not saved -- total maximum of saved messages reached.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.