Sms inbox missing data
| Wed, 2005-08-10 12:20 | |
|
Hi have have done a small function to get the data from the inbox all works fine exept
i only get 32 first bit why? the documatation doent say any thing Code: CMsvEntry *pMsvEntry = iMsvSession->GetEntryL(KMsvGlobalInBoxIndexEntryId); size.Copy(_L("SMS Sent: ")); size.AppendNum( pMsvEntry->Count()); for(int i= 0; i < pMsvEntry->Count(); i++) { iDetailstemp.Copy((*pMsvEntry)[i].iDetails); iClient->IssueWrite(iDetailstemp); iDescriptiontemp.Copy((*pMsvEntry)[i].iDescription); iClient->IssueWrite(iDescriptiontemp); } *pMsvEntry)[i].iDetails *pMsvEntry)[i].iDescription cant take more that 32 ´letters why? what have i missed tnx in advance |
|






Forum posts: 142
yucca
Forum posts: 12
The function
 CClientMtmRegistry *iMtmRegistry = CClientMtmRegistry::NewL(*iMsvSession);
 CSmsClientMtm* ptrSmsMtm = static_cast<CSmsClientMtm *> (iMtmRegistry->NewMtmL(KUidMsgTypeSMS));///// it dies Here !!! any WHY
 ptrSmsMtm ->SwitchCurrentEntryL(msvEntry.Id());
 ptrSmsMtm ->LoadMessageL(); Â
 CRichText &body = ptrSmsMtm->Body();
.h file
private:
CMsvSession* iMsvSession; // Message session
public:
.
.
.
private: // from MMsvSessionObserver
void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
in the .cpp
void CTimeMContainer::ConstructL(const TRect& aRect)
{
iMsvSession = CMsvSession::OpenAsyncL(*this);
...
}
.
.
.
.
void CTimeMContainer::HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3)
{
// If various server error conditions occur, set an error flag
if (
(aEvent==EMsvGeneralError) // Something has happening in the server, but this client was unable to retrieve the information. aArg1 points to the error code.
|| (aEvent==EMsvCloseSession) // The client should immediately close the session with the Message Server.
|| (aEvent==EMsvServerFailedToStart) // Received after a client has used CMsvSession::OpenAsyncL() to create a session. The server could not be started, and aArg1 points to the error code.
|| (aEvent==EMsvServerTerminated) // The Message Server has been terminated. All clients must close their sessions immediately.
)
iErrFlag=EFalse;
}
please Help me any one
Forum posts: 58
CRichText* richText = CRichText::NewL(CEikonEnv::Static()->SystemParaFormatLayerL(), CEikonEnv::Static()->SystemCharFormatLayerL());
CleanupStack::PushL(richText);
CSmsHeader* mySmsHeader=CSmsHeader::NewL(CSmsPDU::ESmsSubmit,*richText);
CleanupStack::PushL(mySmsHeader);
CMsvEntry* tmpEntry = iSession->GetEntryL(aMessageId);
CleanupStack::PushL(tmpEntry);
if(tmpEntry->HasStoreL())
{
CMsvStore* store = tmpEntry->ReadStoreL();
CleanupStack::PushL(store);
mySmsHeader->RestoreL(*store);
store->RestoreBodyTextL(*richText);
CleanupStack::PopAndDestroy(store);
}
TInt messageLength = mySmsHeader->Message().Buffer().Length();
mySmsHeader->Message().Buffer().Extract(smsBody, 0, messageLength);
//tale care of cleaning up the stack.
Regards,
Peri