Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User symsym's Avatar
    Join Date
    Dec 2004
    Posts
    15
    Here is a code, how I create the folder on My Folders:

    TMsvSelectionOrdering ordering;
    CMsvEntry* iMsvEntry = CMsvEntry::NewL(*iSession,
    KMsvMyFoldersEntryIdValue, ordering);

    TTime date;
    date.HomeTime();
    _LIT(folderName, "Folder 2");

    TMsvEntry folderentry;
    folderentry.iType = KUidMsvFolderEntry;
    folderentry.iMtm = KUidMsvLocalServiceMtm;
    folderentry.iDetails.Set(folderName);
    folderentry.iDescription.Set(folderName);
    folderentry.iServiceId = iSmsMtm->ServiceId();
    folderentry.iSize = sizeof(folderentry);
    folderentry.iDate = date;
    folderentry.SetStandardFolder(ETrue);
    folderentry.SetVisible(ETrue);

    iMsvEntry->CreateL(folderentry);
    delete iMsvEntry;

    The folder creates Ok, but when I try to delete this folder on messaging app, it cannot be deleted, there's access denied error. What is the problem? What I'm doing wrong? What should I add to my code?

  2. #2
    Registered User symsym's Avatar
    Join Date
    Dec 2004
    Posts
    15
    Up

  3. #3
    Regular Contributor akerfeldt's Avatar
    Join Date
    Sep 2003
    Posts
    61
    Hi! Just one question, does the "KMsvMyFoldersEntryIdValue" constant exist?? If yes, where is it defined? I'm searching in headers of all Series 60 SDK's, and it doesn't appear.

    Thnx!

  4. #4
    Registered User symsym's Avatar
    Join Date
    Dec 2004
    Posts
    15
    Hello, it's not defined anywhere. I just found it's value by myself and it's value is equal to 0x1008

  5. #5
    Regular Contributor akerfeldt's Avatar
    Join Date
    Sep 2003
    Posts
    61
    Thnx for your fast reply. Just anything more, I'm facing the same problem you told on first post, once the folder is created, I can't modify or delete it from messaging application. How, did you solve this?

    Bye!

  6. #6
    Registered User symsym's Avatar
    Join Date
    Dec 2004
    Posts
    15
    Unfortunately I couldn't solve this problem yet
    Please contact me if you'll do this

  7. #7
    Regular Contributor akerfeldt's Avatar
    Join Date
    Sep 2003
    Posts
    61
    Hi again! I have it. Finally I tried the same code used to create a message entry, just changing the kind of entry and its parent folder.

    TMsvId msvServId;
    CMsvEntry *entry = NULL;
    CMsvEntry * rootEntry = NULL;
    CMsvEntry *entryRootService = NULL;
    CMsvEntrySelection * entrySelectionP = NULL;
    TInt newFldrID = 0;
    _LIT(KFolderName,"TEST");

    //Get the entry (whatever is passed in)
    entry = iMsvSession->GetEntryL(KMsvMyFoldersEntryIdValue);
    CleanupStack::PushL(entry);

    if (entry)
    {
    msvServId = entry->OwningService();

    entryRootService = iMsvSession->GetEntryL(msvServId);
    CleanupStack::PushL(entryRootService);

    rootEntry = iMsvSession->GetEntryL(msvServId);
    CleanupStack::PushL(rootEntry);

    rootEntry->SetEntryL(KMsvMyFoldersEntryIdValue); // set to parent

    TMsvEntry newServiceEntry;
    TTime ttime;
    ttime.HomeTime();
    newServiceEntry.iDate = ttime;
    newServiceEntry.iSize = 0;
    newServiceEntry.iType = KUidMsvFolderEntry;
    newServiceEntry.iMtm = KUidMsvLocalServiceMtm;
    newServiceEntry.iServiceId = KUidMsvLocalServiceMtmValue;
    newServiceEntry.iDetails.Set(KFolderName);
    newServiceEntry.iDescription.Set(KNullDesC);

    rootEntry->CreateL(newServiceEntry);
    newFldrID = newServiceEntry.Id();

    CleanupStack::PopAndDestroy();
    CleanupStack::PopAndDestroy();
    }
    CleanupStack::PopAndDestroy(); // entry


    Hope it helps.

    Bye!!

    P.D. I'll post the link where I found the code shown above, there could be more usefull information for you:
    http://discussion.forum.nokia.com/fo...ssaging+folder
    Last edited by akerfeldt; 2005-09-14 at 19:06.

  8. #8
    Registered User symsym's Avatar
    Join Date
    Dec 2004
    Posts
    15
    Thank you very much!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved