void CMMAAudioRecorderFactory::GetSupportedContentTypesL( const TDesC& aProtocol, CDesC16Array& aMimeTypeArray) { // protocol is empty string all types must be returned. if (IsSupportedProtocolL(aProtocol) || (aProtocol == KNullDesC)) { // get supported types from MMF CMMAMMFPlayerFactory::GetSupportedContentTypesL(aProtocol, aMimeTypeArray); // "audio/mp4" content type must not be supported // for capture protocol if (aProtocol == KCaptureProtocol) { TInt position(0); TInt err = aMimeTypeArray.Find(KContentTypeAudioMp4NotIncluded, position); if (err == KErrNone) { aMimeTypeArray.Delete(position); aMimeTypeArray.Compress(); } } } }
void CTTGPSLoggerSelectMemorySettingItem::EditItemL(TBool aCalledFromMenu) // edit text { CDesC16Array *itemArray = CCoeEnv::Static()->ReadDesCArrayResourceL(R_TTGP_ARRAY_DIALOG_MEMORY1); CleanupStack::PushL(itemArray); if(!TTGPSLoggerCommon::CheckDiskL(EDriveF, EFalse)) itemArray->Delete(3); if(!TTGPSLoggerCommon::CheckDiskL(EDriveE, EFalse)) itemArray->Delete(2); if(!TTGPSLoggerCommon::CheckDiskL(EDriveC, EFalse)) itemArray->Delete(1); TInt selectIndex; selectIndex=iMemory; HBufC* title = NULL; title = CEikonEnv::Static()->AllocReadResourceLC(R_TTGP_TBUF32_DIALOG_MEMORY_TITLE); CAknListQueryDialog* dialog = new (ELeave) CAknListQueryDialog(&selectIndex); dialog->PrepareLC(R_TTGP_DIALOG_LISTQUERY); dialog->QueryHeading()->SetTextL(*title); dialog->SetItemTextArray(itemArray); dialog->SetOwnershipType(ELbmDoesNotOwnItemArray); TInt answer = dialog->RunLD(); CleanupStack::PopAndDestroy(); // title if (answer) switch (selectIndex) { case 0: // (Drive info) { // drive info TTGPSLoggerCommon::CheckDiskL(-1, ETrue); break; } case 1: // Phone Memory if(TTGPSLoggerCommon::CheckDiskL(EDriveC, ETrue)) iMemory=selectIndex; break; case 2: // Memory Card if(TTGPSLoggerCommon::CheckDiskL(EDriveE, ETrue)) iMemory=selectIndex; break; case 3: // Mass Memory if(TTGPSLoggerCommon::CheckDiskL(EDriveF, ETrue)) iMemory=selectIndex; break; } UpdateListBoxTextL(); CleanupStack::PopAndDestroy(); // itemArray }
void CSmsStatusReplierImpl::SetStatus(const TDesC& aName, const TDesC& aValue) { TInt pos; if (iNames->Find(aName, pos) == 0) { iValues->Delete(pos); iValues->InsertL(pos, aValue); } else { iNames->AppendL(aName); iValues->AppendL(aValue); } }