Exemplo n.º 1
0
/**
Called if derived class ServiceL()'s do not consume the opcode.
*/
TInt CViewSubSessionBase::ServiceL(const RMessage2& aMessage)
	{
	TInt reply(KErrNone);
	switch (aMessage.Function())
		{
		case ECntViewCount:
			CountL(aMessage);
			break;
		case ECntViewAt:
			reply=AtL(aMessage);
			break;
		case ECntViewContactAtLength:
			reply=ContactAtLengthL(aMessage);
			break;
		case ECntViewContactAt:
			ContactAtL(aMessage);
			break;
		case ECntViewFind:
			FindL(aMessage);
			break;
		case ECntAllFieldsLength:
			reply=GetAllFieldsLengthL(aMessage);
			break;
		case ECntAllFieldsText:
			GetAllFieldsTextL(aMessage);
			break;
		case ECntContactMatchingCriteriaExternalizedSize:
			ContactMatchingCriteriaExternalizedSizeL(aMessage);
			break;
		case ECntGetContactMatchingCriteria:
			GetContactMatchingCriteriaL(aMessage);
			break;
		case ECntGetIncludedTypes:
			GetIncludedTypesL(aMessage);
			break;
		case ECntRequestViewEvent:
			RequestViewEvent(aMessage);
			reply=KErrNoComplete;
			break;
		case ECntCancelRequestViewEvent:
			CancelRequestViewEvent();
			break;
		case ECntGetContactIds:
			GetContactIdsL(aMessage);
			break;
		case ECntSendPluginUidToServer:
			SendPluginUidToServer(aMessage);
			break;
		case ECntGetContactsMatchingFilter:
			GetContactsMatchingFilterL(aMessage);
			break;
		case ECntGetSortPluginUidFromServer:
			GetSortPluginUidFromServerL(aMessage);
			break;
		default:
			User::Leave(KErrNotFound);
			break;
		}
	return reply;
	}
// ---------------------------------------------------------------------------
// CAccPolAudioTopologyObjectCon::DublicateL()
// ---------------------------------------------------------------------------
//
CAccPolObjectBase* CAccPolAudioStreamFormatCon::DuplicateLC(
    CAccPolObjectCon* aObject )
    {
    API_TRACE_( "[AccFW: ACCPOLAUDIODEVICETOPOLOGY] CAccPolAudioTopologyObjectCon::DublicateL()" );
    CAccPolAudioStreamFormatCon* aContainer =
        CAccPolAudioStreamFormatCon::NewLC( aObject );
    TInt count( Count() );
    for( TInt i = 0; i < count; i++ )
        {
        aContainer->AddL( *AtL( i ) );
        }
    API_TRACE_( "[AccFW: ACCPOLAUDIODEVICETOPOLOGY] CAccPolAudioStreamFormatCon::DublicateL()" );
    return aContainer;
    }
// ---------------------------------------------------------------------------
// CAccPolAudioTopologyObjectCon::ExternalizeL()
// ---------------------------------------------------------------------------
//
EXPORT_C void CAccPolAudioStreamFormatCon::ExternalizeL( RWriteStream& aStream ) const
    {
    API_TRACE_( "[AccFW: ACCPOLAUDIODEVICETOPOLOGY] CAccPolAudioStreamFormatCon::ExternalizeL() - Enter" );
    TInt count( Count() );

    aStream.WriteUint8L( ObjectType() );// Type of object
    aStream.WriteUint8L( count );//Count

    API_TRACE_1( "[AccFW: ACCPOLAUDIODEVICETOPOLOGY] CAccPolAudioStreamFormatCon::ExternalizeL - object type  = %d", ObjectType() );
    API_TRACE_1( "[AccFW: ACCPOLAUDIODEVICETOPOLOGY] CAccPolAudioStreamFormatCon::ExternalizeL - object count = %d", count );

    for( TInt i = 0; i < count; i++ )
        {
        AtL( i )->ExternalizeL( aStream );
        }

    API_TRACE_( "[AccFW: ACCPOLAUDIODEVICETOPOLOGY] CAccPolAudioStreamFormatCon::ExternalizeL - Return" );
    }
// ---------------------------------------------------------------------------
// CAccPolAudioStreamFormatCon::GetInputStreamFormatsL()
// ---------------------------------------------------------------------------
//
EXPORT_C void CAccPolAudioStreamFormatCon::GetInputStreamFormatsL(
    RPointerArray<CAccPolAudioStreamFormat>& aInputStreamFormats ) const
    {
    API_TRACE_( "[AccFW: ACCPOLAUDIODEVICETOPOLOGY] CAccPolAudioStreamFormatCon::GetInputStreamFormatsL() - Enter" );

    CAccPolObjectBase* ptr = NULL;
    TInt count( Count() );

    for( TInt i = 0; i < count; i++ )
        {
        ptr = AtL( i );
        if( ptr->ObjectType() == EAccPolAudioInputStreamObject )
            {
            aInputStreamFormats.AppendL(
                reinterpret_cast<CAccPolAudioStreamFormat*> ( ptr ) );
            }
        }
    API_TRACE_( "[AccFW: ACCPOLAUDIODEVICETOPOLOGY] CAccPolAudioStreamFormatCon::GetInputStreamFormatsL() - Return" );
    }