当前位置: 首页>>代码示例>>C++>>正文


C++ TMsvEntry::SetStandardFolder方法代码示例

本文整理汇总了C++中TMsvEntry::SetStandardFolder方法的典型用法代码示例。如果您正苦于以下问题:C++ TMsvEntry::SetStandardFolder方法的具体用法?C++ TMsvEntry::SetStandardFolder怎么用?C++ TMsvEntry::SetStandardFolder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TMsvEntry的用法示例。


在下文中一共展示了TMsvEntry::SetStandardFolder方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: DoLocalCopyTestL

void CPopsTestHarness::DoLocalCopyTestL()
// Test copying a message locally.  ie create a message in the Drafts folder
// and copy it to a local sub folder
	{
	// Create the Message in the Drafts Folder
	iTestUtils->CreateMessageL(KTestMsgPath, KMsvDraftEntryId, KMsvDraftEntryId);
	CMsvServerEntry* serverEntry = iTestUtils->iServerEntry;
	serverEntry->SetEntry(KMsvDraftEntryId);
	CMsvEntrySelection* newMessageList = new (ELeave)CMsvEntrySelection();
	CleanupStack::PushL(newMessageList);
	serverEntry->GetChildren(*newMessageList);
	TMsvId newMessageId = (*newMessageList)[0];

	// Create  a local folder under the Drafts folder
	TMsvEntry parentEntry = serverEntry->Entry();
	TMsvEntry newFolder;
	newFolder.SetStandardFolder(ETrue);
	newFolder.iDetails.Set(KSubFolder);
	newFolder.iType.iUid=KUidMsvFolderEntryValue;
	newFolder.iMtm=parentEntry.iMtm;
	newFolder.iServiceId = parentEntry.iServiceId;
	serverEntry->CreateEntry(newFolder);

	// Fill the Disk Space and attempt to do the Copy
	FillDiskL();

	// Copy the message into the new LOCAL Sub-Folder
	CTestActive* active = new(ELeave) CTestActive;
	CleanupStack::PushL(active);
	serverEntry->CopyEntryL(newMessageId, newFolder.Id(), active->iStatus);
	active->StartL();
	CActiveScheduler::Start();

	CleanupStack::PopAndDestroy(2); // newMessageList, active
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:35,代码来源:T_PopFullDsk.cpp

示例2: AddUserFolderL

// -----------------------------------------------------------------------------
// CMmsAdapterMsvApi::AddUserFolderL
// Creates new user folder
// -----------------------------------------------------------------------------        
TInt CMmsAdapterMsvApi::AddUserFolderL( TMsvId& aFolder, const TDesC& aName )
    {
    TRACE_FUNC_ENTRY;
    LOGGER_WRITE_1( "aName: %S", &aName );
        
    // Make sure that we are not going to add same folder twise
    TBool found( EFalse );
    found = FindUserFolderL( aName, aFolder );
    if ( found )
        {
        LOGGER_WRITE( "Folder already exists" );
        LOGGER_LEAVEFN( "CMmsAdapterMsvApi::AddUserFolderL" );
        return KErrNone;
        } 
        
    CMsvEntry* entry = iSession.GetEntryL(KMsvMyFoldersEntryIdValue);
    CleanupStack::PushL( entry );
    
    TTime date;
    date.UniversalTime();    
    
    TMsvEntry folderEntry;
    folderEntry.iType = KUidMsvFolderEntry;
    folderEntry.iMtm = KUidMsvLocalServiceMtm;
    folderEntry.iDetails.Set( aName );   
    folderEntry.iServiceId = KMsvLocalServiceIndexEntryIdValue;
    folderEntry.iSize = sizeof( folderEntry );
    folderEntry.iDate = date;
    folderEntry.SetStandardFolder( EFalse );
    folderEntry.SetVisible( ETrue );
    folderEntry.SetComplete( ETrue );
    folderEntry.SetInPreparation( EFalse ); 
    folderEntry.SetReadOnly( EFalse );
    
    entry->CreateL( folderEntry );
    CleanupStack::PopAndDestroy( entry );
    
    aFolder = folderEntry.Id();
    
    TRACE_FUNC_EXIT;
    return KErrNone;
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:46,代码来源:mmsadaptermsvapi.cpp


注:本文中的TMsvEntry::SetStandardFolder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。