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 CSmsStatusReplierImpl::SendStatus(const TDesC& aTo)
{

	TBuf<50> author;
	Settings().GetSettingL(SETTING_PUBLISH_AUTHOR, author);
	SetStatus(_L("authorname"), author);

	TInt count=iNames->Count(), size=30;

	TInt i=0;
	for (i=0; i<count; i++) {
		size += iNames->MdcaPoint(i).Length();
		size += iValues->MdcaPoint(i).Length();
		size += 4;
	}
	if (size > iBuf->Des().MaxLength() ) {
		iBuf=iBuf->ReAllocL(size);
	}
	iBuf->Des()=_L("status at ");
	TBBTime t(KTime); t()=GetTime();
	TPtr p=iBuf->Des();
	t.IntoStringL(p);
	iBuf->Des().Append(_L("\n"));

	for (i=0; i<count; i++) {
		iBuf->Des().Append(iNames->MdcaPoint(i));
		iBuf->Des().Append(_L(": "));
		iBuf->Des().Append(iValues->MdcaPoint(i));
		iBuf->Des().Append(_L("\n"));
	}

	iSms->send_message(aTo, *iBuf, false);
}
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);
	}
}
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 CMMAAudioRecorderFactory::GetSupportedProtocolsL(
    const TDesC& aContentType,
    CDesC16Array& aProtocolArray)
{
    // Support for MP4 recording disabled: All features cannot
    // be supported for MP4 capture at the moment (e.g. pause)
    if (IsSupportedContentTypeL(aContentType) &&
            (aContentType != KContentTypeAudioMp4NotIncluded))
    {
        aProtocolArray.AppendL(KMMACaptureProtocol);
    }
}