×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    197

    Smile How to move message of Inbox to new folder?

    Thanks first.

    Here is the code to move a new received message in Inbox
    to a new folder under "My folder" folder,
    but it did not work as I expected.

    //======================================code start=============================
    void CMySMSHandler::MoveToFolderL( TMsvId aMessageId, TMsvId aFolder )
    {
    iSmsMtm->SwitchCurrentEntryL( aMessageId );
    TMsvSelectionOrdering selection;
    selection.SetShowInvisibleEntries(ETrue);
    CMsvEntry* parentEntry = CMsvEntry::NewL( iSmsMtm->Session(),
    iSmsMtm->Entry().Entry().Parent(), selection );
    CleanupStack::PushL(parentEntry);
    // Move the message
    parentEntry->MoveL( aMessageId, aFolder );
    CleanupStack::PopAndDestroy(parentEntry); // parentEntry
    }

    //======================================code end=============================


    When it comes to execute the following line,

    parentEntry->MoveL( aMessageId, aFolder );

    it returns immediately to
    void CMySMSHandler::HandleSessionEventL(TMsvSessionEvent aEvent,
    TAny* aArg1,
    TAny* aArg2,
    TAny* aArg3);

    with an error code(just some integer,I don't remember it).

    What is wrong with my code?
    Or what is wrong?

    Would any guy help?

    Thank you a lot.
    I will be back next Monday.

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: How to move message of Inbox to new folder?

    You should add the error code here, it would propably give a good hint on what is going wrong in there..

  3. #3
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    197

    Smile Re: How to move message of Inbox to new folder?

    Quote Originally Posted by symbianyucca View Post
    You should add the error code here, it would propably give a good hint on what is going wrong in there..
    Here is how I get the error code,

    TInt errCode = TInt(aArg1);

    and error code is 4209580.


    Anything,would you please figure it out?

    Thank you.

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: How to move message of Inbox to new folder?

    what makes you think that the aArg1 contains an error code in this case ?

    Also what are the other values, for example what is the event ?

    And what additional stuff are you doing inside the HandleSessionEventL funciton ?

  5. #5
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    197

    Smile Re: How to move message of Inbox to new folder?

    Quote Originally Posted by symbianyucca View Post
    what makes you think that the aArg1 contains an error code in this case ?

    Also what are the other values, for example what is the event ?

    And what additional stuff are you doing inside the HandleSessionEventL funciton ?

    Thank you.

    As the following snippet from SDK states,so I did as I mentioned, and I got the error code.
    Maybe the way I got the error code is wrong,if true,please help.

    /** Something has happening in the server, but this client was unable to retrieve
    the information.

    aArg1 points to the error code.

    This is not used after v5. */
    EMsvGeneralError,

    Inside HandleSessionEventL,I just observe Inbox,if a new message arrives,then I track it,
    if it is the message I need,I just move it to the new folder I create. It is just what I need
    to achieve, but I still fail to do so.

    Thank you very much.

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: How to move message of Inbox to new folder?

    "This is not used after v5.", thus it was the good old ER5 where that one was used last time. Instead just check what the TMsvSessionEvent is and then see what kind of values you should be expecting in there.

  7. #7
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    197

    Smile Re: How to move message of Inbox to new folder?

    Quote Originally Posted by symbianyucca View Post
    "This is not used after v5.", thus it was the good old ER5 where that one was used last time.
    What do you mean? I cannot get it.


    Quote Originally Posted by symbianyucca View Post
    Instead just check what the TMsvSessionEvent is and then see what kind of values you should be expecting in there.
    I've checked it, the event is EMsvGeneralError,I don't expect any values after I just called IMPORT_C void MoveL(TMsvId aMsvId, TMsvId aTargetId); of class CMsvEntry.

    After I called this function, function void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); immediately is called, and so I got the error code.

    I am really lost.

    Thank you.

  8. #8
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    197

    Smile Re: How to move message of Inbox to new folder?

    Finally,I found the reason, it is the capabilities of my app that causes those problems I met.

    Thank those guys who have been helping.

    Thank you.

Similar Threads

  1. receiving a message both in Inbox and my midlet
    By vinhtung in forum General Messaging
    Replies: 0
    Last Post: 2009-03-18, 03:11
  2. creating and saving message in IMAP4 folder
    By V_Nemkov in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2007-10-13, 09:37
  3. Get the message sending state in outbox folder (S60 3rd phone)
    By Wah in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2007-07-30, 09:07
  4. How to create a message, and put it into inbox
    By zhoulala in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2007-04-24, 10:00
  5. composing mms message and move the mms to Nokia 7650
    By yhuda in forum General Messaging
    Replies: 1
    Last Post: 2002-12-04, 06:32

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×