Blocking Outgoing SMS

Login to reply to this topic.
Thu, 2008-06-12 17:00
Joined: 2008-06-07
Forum posts: 8

Hi,

I need to block and delete all outgoing message. Can Yogesh or somebody help what is wrong with this code. If I delete, it works but I get system error. If I do not delete, message goes normal after waiting for some time in outbox. What I really need is to block outgoing messages and delete it. As mentioned in other threads here, I tried changing state using SendingState (KMsvSendStateSuspended, failed, sent etc) but nothing helps.

void CMySmsHandler::HandleSessionEventL( TMsvSessionEvent aEvent,
TAny* aArg1, TAny* aArg2, TAny* /*aArg3*/)

case EMsvEntriesMoved:
{

TMsvId* entryId = static_cast( aArg2 );


if (*entryId != KMsvGlobalOutBoxIndexEntryId
{
break;
}

CMsvEntrySelection* newEntries = static_cast( aArg1 );

TMsvId folder2;
TMsvEntry entry;
TInt currSendingState;
TBuf<64> mySmsNumber;

User::LeaveIfError( iSession->GetEntry( newEntries->At( 0 ), folder2, entry ) );


//first block the entry
iSmsMtm->SwitchCurrentEntryL( entry.Id() );
iSmsMtm->LoadMessageL();
TMsvEntry indexEntry = iSmsMtm->Entry().Entry();
currSendingState = indexEntry.SendingState();

// Set in-preparation flag
indexEntry.SetInPreparation(ETrue);

// Sets the sending state
//indexEntry.SetSendingState(KMsvSendStateSent);
indexEntry.SetSendingState(KMsvSendStateSuspended);
iSmsMtm->Entry().ChangeL(indexEntry);
//iSmsMtm->Entry().DeleteL(indexEntry.Id());
break;


Sat, 2008-06-14 05:49
Joined: 2008-06-07
Forum posts: 8
Re: Blocking Outgoing SMS

pls help

  • Login to reply to this topic.