Discussion Board
Cannot delete messaging folder!
2005-07-27, 07:37
#1
Registered User
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?
Registered User
Re: Cannot delete messaging folder!
2005-09-14, 12:29
#3
Regular Contributor
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!
Re: Cannot delete messaging folder!
2005-09-14, 12:56
#4
Registered User
Hello, it's not defined anywhere. I just found it's value by myself and it's value is equal to 0x1008
Re: Cannot delete messaging folder!
2005-09-14, 17:22
#5
Regular Contributor
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!
Re: Cannot delete messaging folder!
2005-09-14, 17:45
#6
Registered User
Unfortunately I couldn't solve this problem yet
Please contact me if you'll do this
Re: Cannot delete messaging folder!
2005-09-14, 18:55
#7
Regular Contributor
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 .
Re: Cannot delete messaging folder!
2005-09-15, 06:48
#8
Registered User
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules