# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1284700532 -10800 # Node ID e71858845f7377026025664031270a78af043a9a # Parent b7e5ed8c134234287ac1fe2f4ecc21887b3e8d1d Revisiom: 201037 diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/addeddevsoundcontrolcistub/BWINS/AddedDevSoundControlCIU.DEF --- a/audiostubs/devsoundextensions_stubs/addeddevsoundcontrolcistub/BWINS/AddedDevSoundControlCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - ??1CAddedDevSoundControlCI@@UAE@XZ @ 1 NONAME ; CAddedDevSoundControlCI::~CAddedDevSoundControlCI(void) - ?NewL@CAddedDevSoundControlCI@@SAPAV1@XZ @ 2 NONAME ; class CAddedDevSoundControlCI * CAddedDevSoundControlCI::NewL(void) - ?PauseAndFlush@CAddedDevSoundControlCI@@UAEHXZ @ 3 NONAME ; int CAddedDevSoundControlCI::PauseAndFlush(void) - ?SetHwAwareness@CAddedDevSoundControlCI@@UAEHH@Z @ 4 NONAME ; int CAddedDevSoundControlCI::SetHwAwareness(int) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/addeddevsoundcontrolcistub/EABI/AddedDevSoundControlCIU.DEF --- a/audiostubs/devsoundextensions_stubs/addeddevsoundcontrolcistub/EABI/AddedDevSoundControlCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -EXPORTS - _ZN23CAddedDevSoundControlCI13PauseAndFlushEv @ 1 NONAME - _ZN23CAddedDevSoundControlCI14SetHwAwarenessEi @ 2 NONAME - _ZN23CAddedDevSoundControlCI4NewLEv @ 3 NONAME - _ZN23CAddedDevSoundControlCID0Ev @ 4 NONAME - _ZN23CAddedDevSoundControlCID1Ev @ 5 NONAME - _ZN23CAddedDevSoundControlCID2Ev @ 6 NONAME - _ZTI23CAddedDevSoundControlCI @ 7 NONAME ; ## - _ZTV23CAddedDevSoundControlCI @ 8 NONAME ; ## - _ZThn4_N23CAddedDevSoundControlCI13PauseAndFlushEv @ 9 NONAME ; ## - _ZThn4_N23CAddedDevSoundControlCI14SetHwAwarenessEi @ 10 NONAME ; ## - _ZThn4_N23CAddedDevSoundControlCID0Ev @ 11 NONAME ; ## - _ZThn4_N23CAddedDevSoundControlCID1Ev @ 12 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/addeddevsoundcontrolcistub/Group/AddedDevSoundControlCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/addeddevsoundcontrolcistub/Group/AddedDevSoundControlCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Stub implementation for AddedDevSoundControl CI. -* -*/ - - -#include - -TARGET AddedDevSoundControlCI.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207B79 - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE AddedDevSoundControlCIStub.cpp - -USERINCLUDE ../inc - -OS_LAYER_SYSTEMINCLUDE - -LIBRARY euser.lib - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/addeddevsoundcontrolcistub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/addeddevsoundcontrolcistub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for ??? -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -AddedDevSoundControlCIStub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/addeddevsoundcontrolcistub/inc/AddedDevSoundControlCIStub.h --- a/audiostubs/devsoundextensions_stubs/addeddevsoundcontrolcistub/inc/AddedDevSoundControlCIStub.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Custom Interface for AddedDevSoundControl. -* -*/ - - -#ifndef ADDEDDEVSOUNDCONTROLCI_H -#define ADDEDDEVSOUNDCONTROLCI_H - -// INCLUDES -#include -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* Custom Interface for AddedDevSoundControl. -* -* @lib AddedDevSoundControlCIStub.lib -* @since S60 3.2 -*/ -class CAddedDevSoundControlCI : public CBase, - public MAddedDevSoundControl - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CAddedDevSoundControlCI* NewL(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CAddedDevSoundControlCI(); - - public: // New functions - - public: // Functions from MAddedDevSoundControl - - /** - * Sets HW awareness for Pause. - * - * @since S60 3.2 - * @param TBool - Toggles HW awareness - * @return TInt - - */ - IMPORT_C virtual TInt SetHwAwareness(TBool aHwAware); - - /** - * Pauses audio playback and flushes buffers. - * - * @since S60 3.2 - * @return TInt - Status - */ - IMPORT_C virtual TInt PauseAndFlush(); - - - protected: // New functions - - protected: // Functions from base classes - - private: - - /** - * C++ default constructor. - */ - CAddedDevSoundControlCI(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - public: // Data - protected: // Data - private: // Data - - TBool iHwAware; - - }; - -#endif // ADDEDDEVSOUNDCONTROLCI_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/addeddevsoundcontrolcistub/rom/AddedDevSoundControlCIStub.iby --- a/audiostubs/devsoundextensions_stubs/addeddevsoundcontrolcistub/rom/AddedDevSoundControlCIStub.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - DevSound adaptation stub. -* -*/ - - -#ifndef __ADDEDDEVSOUNDCONTROLCISTUB_IBY__ -#define __ADDEDDEVSOUNDCONTROLCISTUB_IBY__ - -file=ABI_DIR\BUILD_DIR\AddedDevSoundControlCIStub.dll SHARED_LIB_DIR\AddedDevSoundControlCI.dll - -#endif // __ADDEDDEVSOUNDCONTROLCISTUB_IBY__ diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/addeddevsoundcontrolcistub/src/AddedDevSoundControlCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/addeddevsoundcontrolcistub/src/AddedDevSoundControlCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,123 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Custom Interface stub implementation for AddedDevSoundControl. -* -*/ - - -// INCLUDE FILES -#include -#include "AddedDevSoundControlCIStub.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -/** - * CAddedDevSoundControlCI::CAddedDevSoundControlCI - * C++ default constructor can NOT contain any code, that might leave. - */ -CAddedDevSoundControlCI::CAddedDevSoundControlCI() - { - } - -/** - * CAddedDevSoundControlCI::ConstructL - * Symbian 2nd phase constructor can leave. - */ -void CAddedDevSoundControlCI::ConstructL() - { - } - -/** - * CAddedDevSoundControlCI::NewL - * Two-phased constructor. - */ -EXPORT_C CAddedDevSoundControlCI* CAddedDevSoundControlCI::NewL() - { - CAddedDevSoundControlCI* self = new (ELeave)CAddedDevSoundControlCI; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - -/** - * Destructor - */ -EXPORT_C CAddedDevSoundControlCI::~CAddedDevSoundControlCI() - { - } - - -// From CAddedDevSoundControl - -/** - * Handles DevSound observer’s request to alter DevSound's behavior - * for Pause. Can be called after DevSound creation. Must be called - * prior to calling Pause to take effect. When value is True, the - * Pause will halt the resource and keep all buffers sent to the - * DevSound interface intact for playing upon resuming. When the value - * is False, Pause will cause buffers to be flushed and any associated - * resources freed. Should return a KErrNotSupported if the DevSound - * behavior cannot be altered. - * - * (other items defined in the header) - */ -EXPORT_C TInt CAddedDevSoundControlCI::SetHwAwareness(TBool aHwAware) - { - iHwAware = aHwAware; - -#ifdef _DEBUG - RDebug::Print(_L("CAddedDevSoundControlCI::SetHwAwareness [%d]"), iHwAware); -#endif //_DEBUG - - return KErrNone; - } - -/** - * Handles DevSound observer’s request to pause the audio resources - * and explicitly flush the buffers. Must be in the Playing state in - * order to function properly. Should return KErrNotSupported if the - * feature is not available. - * - * (other items defined in the header) - */ -EXPORT_C TInt CAddedDevSoundControlCI::PauseAndFlush() - { -#ifdef _DEBUG - RDebug::Print(_L("CAddedDevSoundControlCI::PauseAndFlush [OK]")); -#endif //_DEBUG - - return KErrNone; - } - - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/aacdecoderconfigcistub/BWINS/AacDecoderConfigCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/aacdecoderconfigcistub/BWINS/AacDecoderConfigCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -EXPORTS - ??1CAacDecoderConfigCI@@UAE@XZ @ 1 NONAME ; CAacDecoderConfigCI::~CAacDecoderConfigCI(void) - ?NewL@CAacDecoderConfigCI@@SAPAV1@XZ @ 2 NONAME ; class CAacDecoderConfigCI * CAacDecoderConfigCI::NewL(void) - ?SetAudioConfig@CAacDecoderConfigCI@@UAEHAAVTAudioConfig@@@Z @ 3 NONAME ; int CAacDecoderConfigCI::SetAudioConfig(class TAudioConfig &) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/aacdecoderconfigcistub/EABI/AacDecoderConfigCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/aacdecoderconfigcistub/EABI/AacDecoderConfigCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -EXPORTS - _ZN19CAacDecoderConfigCI14SetAudioConfigER12TAudioConfig @ 1 NONAME - _ZN19CAacDecoderConfigCI4NewLEv @ 2 NONAME - _ZN19CAacDecoderConfigCID0Ev @ 3 NONAME - _ZN19CAacDecoderConfigCID1Ev @ 4 NONAME - _ZN19CAacDecoderConfigCID2Ev @ 5 NONAME - _ZTI19CAacDecoderConfigCI @ 6 NONAME ; ## - _ZTV19CAacDecoderConfigCI @ 7 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/aacdecoderconfigcistub/group/AacDecoderConfigCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/aacdecoderconfigcistub/group/AacDecoderConfigCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* Version : %version: bh1mmcf#14 % -* -*/ - - -#include - -TARGET AacDecoderConfigCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207B0C - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE AacDecoderConfigCIStub.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../inc -USERINCLUDE ../../../inc - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY AacDecoderConfigCI.lib - -LINKAS AacDecoderConfigCI.dll - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/aacdecoderconfigcistub/group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/aacdecoderconfigcistub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for AAC decoder config custom interface -* -*/ - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -AacDecoderConfigCIStub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/aacdecoderconfigcistub/src/AacDecoderConfigCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/aacdecoderconfigcistub/src/AacDecoderConfigCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - - -// INCLUDE FILES -#include "AacDecoderConfigCI.h" -#include - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CAacDecoderConfigCI::CAacDecoderConfigCI -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CAacDecoderConfigCI::CAacDecoderConfigCI() - { - - } - -// ----------------------------------------------------------------------------- -// CAacDecoderConfigCI::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CAacDecoderConfigCI::ConstructL() - { - - } - -// ----------------------------------------------------------------------------- -// CAacDecoderConfigCI::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CAacDecoderConfigCI* CAacDecoderConfigCI::NewL() - { - CAacDecoderConfigCI* self = new (ELeave)CAacDecoderConfigCI; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - -// Destructor -EXPORT_C CAacDecoderConfigCI::~CAacDecoderConfigCI() - { - - } - -// ----------------------------------------------------------------------------- -// CAacDecoderConfigCI::SetAudioConfig -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CAacDecoderConfigCI::SetAudioConfig(TAudioConfig& aAudioConfig) - { - TAudioConfig::TAudioObjectType audioObjectType = aAudioConfig.iAudioObjectType; - RDebug::Print(_L("CAacDecoderConfigCI::SetAudioConfig object type[%d]"), audioObjectType); - return KErrNone; - } diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/audiovibracontrolcistub/BWINS/AudioVibraControlCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/audiovibracontrolcistub/BWINS/AudioVibraControlCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - ??1CAudioVibraControlCI@@UAE@XZ @ 1 NONAME ; CAudioVibraControlCI::~CAudioVibraControlCI(void) - ?NewL@CAudioVibraControlCI@@SAPAV1@XZ @ 2 NONAME ; class CAudioVibraControlCI * CAudioVibraControlCI::NewL(void) - ?StartVibra@CAudioVibraControlCI@@UAEHXZ @ 3 NONAME ; int CAudioVibraControlCI::StartVibra(void) - ?StopVibra@CAudioVibraControlCI@@UAEHXZ @ 4 NONAME ; int CAudioVibraControlCI::StopVibra(void) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/audiovibracontrolcistub/EABI/AudioVibraControlCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/audiovibracontrolcistub/EABI/AudioVibraControlCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -EXPORTS - _ZN20CAudioVibraControlCI10StartVibraEv @ 1 NONAME - _ZN20CAudioVibraControlCI4NewLEv @ 2 NONAME - _ZN20CAudioVibraControlCI9StopVibraEv @ 3 NONAME - _ZN20CAudioVibraControlCID0Ev @ 4 NONAME - _ZN20CAudioVibraControlCID1Ev @ 5 NONAME - _ZN20CAudioVibraControlCID2Ev @ 6 NONAME - _ZTI20CAudioVibraControlCI @ 7 NONAME ; ## - _ZTV20CAudioVibraControlCI @ 8 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/audiovibracontrolcistub/group/AudioVibraControlCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/audiovibracontrolcistub/group/AudioVibraControlCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* Version : %version: bh1mmcf#12 % -* -*/ - - -#include - -TARGET AudioVibraControlCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207B14 - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../Src -SOURCE AudioVibraControlCIStub.cpp - -USERINCLUDE ../Inc -USERINCLUDE ../../Inc -USERINCLUDE ../../../Inc - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY AudioVibraControlCI.lib - -LINKAS AudioVibraControlCI.dll - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/audiovibracontrolcistub/group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/audiovibracontrolcistub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for audio vibra control custom interface -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -AudioVibraControlCIStub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/audiovibracontrolcistub/src/AudioVibraControlCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/audiovibracontrolcistub/src/AudioVibraControlCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - - -// INCLUDE FILES -#include "AudioVibraControlCI.h" -#include - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CAudioVibraControlCI::CAudioVibraControlCI -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CAudioVibraControlCI::CAudioVibraControlCI() - { - - } - -// ----------------------------------------------------------------------------- -// CAudioVibraControlCI::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CAudioVibraControlCI::ConstructL() - { - - } - -// ----------------------------------------------------------------------------- -// CAudioVibraControlCI::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CAudioVibraControlCI* CAudioVibraControlCI::NewL() - { - CAudioVibraControlCI* self = new (ELeave)CAudioVibraControlCI; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - -// Destructor -EXPORT_C CAudioVibraControlCI::~CAudioVibraControlCI() - { - - } - -// ----------------------------------------------------------------------------- -// CAudioVibraControlCI::StartVibra -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CAudioVibraControlCI::StartVibra() - { - RDebug::Print(_L("CAudioVibraControlCI::StartVibra")); - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// CAudioVibraControlCI::StopVibra -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CAudioVibraControlCI::StopVibra() - { - RDebug::Print(_L("CAudioVibraControlCI::StopVibra")); - return KErrNone; - } - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/eaacplusdecoderintfccistub/BWINS/EAacPlusDecoderIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/eaacplusdecoderintfccistub/BWINS/EAacPlusDecoderIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -EXPORTS - ??1CEAacPlusDecoderIntfcCI@@UAE@XZ @ 1 NONAME ; CEAacPlusDecoderIntfcCI::~CEAacPlusDecoderIntfcCI(void) - ?ApplyConfig@CEAacPlusDecoderIntfcCI@@UAEHXZ @ 2 NONAME ; int CEAacPlusDecoderIntfcCI::ApplyConfig(void) - ?GetAudioObjectType@CEAacPlusDecoderIntfcCI@@UAEHAAW4TAudioObjectType@CEAacPlusDecoderIntfc@@@Z @ 3 NONAME ; int CEAacPlusDecoderIntfcCI::GetAudioObjectType(enum CEAacPlusDecoderIntfc::TAudioObjectType &) - ?GetDownSampledMode@CEAacPlusDecoderIntfcCI@@UAEHAAH@Z @ 4 NONAME ; int CEAacPlusDecoderIntfcCI::GetDownSampledMode(int &) - ?GetInputSamplingFrequency@CEAacPlusDecoderIntfcCI@@UAEHAAI@Z @ 5 NONAME ; int CEAacPlusDecoderIntfcCI::GetInputSamplingFrequency(unsigned int &) - ?GetNumOfChannels@CEAacPlusDecoderIntfcCI@@UAEHAAI@Z @ 6 NONAME ; int CEAacPlusDecoderIntfcCI::GetNumOfChannels(unsigned int &) - ?GetSbr@CEAacPlusDecoderIntfcCI@@UAEHAAH@Z @ 7 NONAME ; int CEAacPlusDecoderIntfcCI::GetSbr(int &) - ?NewL@CEAacPlusDecoderIntfcCI@@SAPAV1@XZ @ 8 NONAME ; class CEAacPlusDecoderIntfcCI * CEAacPlusDecoderIntfcCI::NewL(void) - ?SetAudioObjectType@CEAacPlusDecoderIntfcCI@@UAEXW4TAudioObjectType@CEAacPlusDecoderIntfc@@@Z @ 9 NONAME ; void CEAacPlusDecoderIntfcCI::SetAudioObjectType(enum CEAacPlusDecoderIntfc::TAudioObjectType) - ?SetDownSampledMode@CEAacPlusDecoderIntfcCI@@UAEXH@Z @ 10 NONAME ; void CEAacPlusDecoderIntfcCI::SetDownSampledMode(int) - ?SetInputSamplingFrequency@CEAacPlusDecoderIntfcCI@@UAEXI@Z @ 11 NONAME ; void CEAacPlusDecoderIntfcCI::SetInputSamplingFrequency(unsigned int) - ?SetNumOfChannels@CEAacPlusDecoderIntfcCI@@UAEXI@Z @ 12 NONAME ; void CEAacPlusDecoderIntfcCI::SetNumOfChannels(unsigned int) - ?SetSbr@CEAacPlusDecoderIntfcCI@@UAEXH@Z @ 13 NONAME ; void CEAacPlusDecoderIntfcCI::SetSbr(int) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/eaacplusdecoderintfccistub/EABI/EAacPlusDecoderIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/eaacplusdecoderintfccistub/EABI/EAacPlusDecoderIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -EXPORTS - _ZN23CEAacPlusDecoderIntfcCI11ApplyConfigEv @ 1 NONAME - _ZN23CEAacPlusDecoderIntfcCI16GetNumOfChannelsERj @ 2 NONAME - _ZN23CEAacPlusDecoderIntfcCI16SetNumOfChannelsEj @ 3 NONAME - _ZN23CEAacPlusDecoderIntfcCI18GetAudioObjectTypeERN21CEAacPlusDecoderIntfc16TAudioObjectTypeE @ 4 NONAME - _ZN23CEAacPlusDecoderIntfcCI18GetDownSampledModeERi @ 5 NONAME - _ZN23CEAacPlusDecoderIntfcCI18SetAudioObjectTypeEN21CEAacPlusDecoderIntfc16TAudioObjectTypeE @ 6 NONAME - _ZN23CEAacPlusDecoderIntfcCI18SetDownSampledModeEi @ 7 NONAME - _ZN23CEAacPlusDecoderIntfcCI25GetInputSamplingFrequencyERj @ 8 NONAME - _ZN23CEAacPlusDecoderIntfcCI25SetInputSamplingFrequencyEj @ 9 NONAME - _ZN23CEAacPlusDecoderIntfcCI4NewLEv @ 10 NONAME - _ZN23CEAacPlusDecoderIntfcCI6GetSbrERi @ 11 NONAME - _ZN23CEAacPlusDecoderIntfcCI6SetSbrEi @ 12 NONAME - _ZN23CEAacPlusDecoderIntfcCID0Ev @ 13 NONAME - _ZN23CEAacPlusDecoderIntfcCID1Ev @ 14 NONAME - _ZN23CEAacPlusDecoderIntfcCID2Ev @ 15 NONAME - _ZTI23CEAacPlusDecoderIntfcCI @ 16 NONAME ; ## - _ZTV23CEAacPlusDecoderIntfcCI @ 17 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/eaacplusdecoderintfccistub/Group/EAacPlusDecoderIntfcCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/eaacplusdecoderintfccistub/Group/EAacPlusDecoderIntfcCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project specification for Enahanced AAC+ decoder configuration -* : Custom Interface stub implementation. -* Version : %version: bh1mmcf#7.1.7 % -* -*/ - -#include - -TARGET EAacPlusDecoderIntfcCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207B1D - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE EAacPlusDecoderIntfcCIStub.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../inc -USERINCLUDE ../../../inc - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY EAacPlusDecoderIntfcCI.lib - -LINKAS EAacPlusDecoderIntfcCI.dll - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/eaacplusdecoderintfccistub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/eaacplusdecoderintfccistub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for Enahanced AAC+ Decoder Custom Interface -* : stub implementation. -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -EAacPlusDecoderIntfcCIStub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/eaacplusdecoderintfccistub/src/EAacPlusDecoderIntfcCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/eaacplusdecoderintfccistub/src/EAacPlusDecoderIntfcCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,254 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Custom Interface stub implementation for eAAC+ decoder. -* -*/ - - -// INCLUDE FILES -#include -#include "EAacPlusDecoderIntfcCI.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -/** - * CEAacPlusDecoderIntfcCI::CEAacPlusDecoderIntfcCI - * C++ default constructor can NOT contain any code, that might leave. - */ -CEAacPlusDecoderIntfcCI::CEAacPlusDecoderIntfcCI() - { - } - -/** - * CEAacPlusDecoderIntfcCI::ConstructL - * Symbian 2nd phase constructor can leave. - */ -void CEAacPlusDecoderIntfcCI::ConstructL() - { - } - -/** - * CEAacPlusDecoderIntfcCI::NewL - * Two-phased constructor. - */ -EXPORT_C CEAacPlusDecoderIntfcCI* CEAacPlusDecoderIntfcCI::NewL() - { - CEAacPlusDecoderIntfcCI* self = new (ELeave)CEAacPlusDecoderIntfcCI; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - -/** - * Destructor - */ -EXPORT_C CEAacPlusDecoderIntfcCI::~CEAacPlusDecoderIntfcCI() - { - } - - -// From CEAacPlusDecoderIntfc - -/** - * Configures decoder's profile defined by TAudioObjectType. - * (other items defined in the header) - */ -EXPORT_C void CEAacPlusDecoderIntfcCI::SetAudioObjectType( - TAudioObjectType aAudioObjectType) - { - iAudioObjectType = aAudioObjectType; - -#ifdef _DEBUG - RDebug::Print(_L("CEAacPlusDecoderIntfcCI::SetAudioObjectType - object type[%d]"), - iAudioObjectType); -#endif //_DEBUG - } - -/** - * Configures decoder's input sampling frequency. - * (other items defined in the header) - */ -EXPORT_C void CEAacPlusDecoderIntfcCI::SetInputSamplingFrequency( - TUint aInputSamplingFrequency) - { - iInputSamplingFrequency = aInputSamplingFrequency; - -#ifdef _DEBUG - RDebug::Print(_L("CEAacPlusDecoderIntfcCI::SetInputSamplingFrequency [%d]"), - iInputSamplingFrequency); -#endif //_DEBUG - } - -/** - * Configures decoder's channel settings. - * (other items defined in the header) - */ -EXPORT_C void CEAacPlusDecoderIntfcCI::SetNumOfChannels(TUint aNumChannels) - { - iNumOfChannels = aNumChannels; - -#ifdef _DEBUG - RDebug::Print(_L("CEAacPlusDecoderIntfcCI::SetNumOfChannels [%d]"), - iNumOfChannels); -#endif //_DEBUG - } - -/** - * Configures decoder's SBR settings. - * (other items defined in the header) - */ -EXPORT_C void CEAacPlusDecoderIntfcCI::SetSbr(TBool aSbrEnabled) - { - iSbrEnabled = aSbrEnabled; - -#ifdef _DEBUG - RDebug::Print(_L("CEAacPlusDecoderIntfcCI::SetSbr [%d]"), iSbrEnabled); -#endif //_DEBUG - } - -/** - * Configures decoder's DSM settings. - * (other items defined in the header) - */ -EXPORT_C void CEAacPlusDecoderIntfcCI::SetDownSampledMode(TBool aDsmEnabled) - { - iDsmEnabled = aDsmEnabled; - -#ifdef _DEBUG - RDebug::Print(_L("CEAacPlusDecoderIntfcCI::SetDownSampledMode [%d]"), - iDsmEnabled); -#endif //_DEBUG - } - -/** - * Returns decoder's AAC profile settings. - * (other items defined in the header) - */ -EXPORT_C TInt CEAacPlusDecoderIntfcCI::GetAudioObjectType( - TAudioObjectType& aAudioObjectType) - { - aAudioObjectType = iCurrentAudioObjectType; - -#ifdef _DEBUG - RDebug::Print(_L("CEAacPlusDecoderIntfcCI::GetAudioObjectType [%d]"), - iAudioObjectType); -#endif //_DEBUG - - return KErrNone; - } - -/** - * Returns decoder's input sampling frequency settings. - * (other items defined in the header) - */ -EXPORT_C TInt CEAacPlusDecoderIntfcCI::GetInputSamplingFrequency( - TUint& aInputSamplingFrequency) - { - aInputSamplingFrequency = iCurrentInputSamplingFrequency; - -#ifdef _DEBUG - RDebug::Print(_L("CEAacPlusDecoderIntfcCI::GetInputSamplingFrequency [%d]"), - iInputSamplingFrequency); -#endif //_DEBUG - - return KErrNone; - } - -/** - * Returns decoder's channel settings. - * (other items defined in the header) - */ -EXPORT_C TInt CEAacPlusDecoderIntfcCI::GetNumOfChannels(TUint& aNumOfChannels) - { - aNumOfChannels = iCurrentNumOfChannels; - -#ifdef _DEBUG - RDebug::Print(_L("CEAacPlusDecoderIntfcCI::GetNumOfChannels [%d]"), - iCurrentNumOfChannels); -#endif //_DEBUG - - return KErrNone; - } - -/** - * Returns decoder's SBR settings. - * (other items defined in the header) - */ -EXPORT_C TInt CEAacPlusDecoderIntfcCI::GetSbr(TBool& aSbrEnabled) - { - aSbrEnabled = iCurrentSbrEnabled; - -#ifdef _DEBUG - RDebug::Print(_L("CEAacPlusDecoderIntfcCI::GetSbr [%d]"), - iCurrentSbrEnabled); -#endif //_DEBUG - - return KErrNone; - } - -/** - * Returns decoder's DSM settings. - * (other items defined in the header) - */ -EXPORT_C TInt CEAacPlusDecoderIntfcCI::GetDownSampledMode(TBool& aDsmEnabled) - { - aDsmEnabled = iCurrentDsmEnabled; - -#ifdef _DEBUG - RDebug::Print(_L("CEAacPlusDecoderIntfcCI::GetDownSampledMode [%d]"), - iCurrentDsmEnabled); -#endif //_DEBUG - - return KErrNone; - } - -/** - * Applies configuration settings to the decoder. - * (other items defined in the header) - */ -EXPORT_C TInt CEAacPlusDecoderIntfcCI::ApplyConfig() - { - iCurrentAudioObjectType = iAudioObjectType; - iCurrentInputSamplingFrequency = iInputSamplingFrequency; - iCurrentNumOfChannels = iNumOfChannels; - iCurrentSbrEnabled = iSbrEnabled; - iCurrentDsmEnabled = iDsmEnabled; - -#ifdef _DEBUG - RDebug::Print(_L("CEAacPlusDecoderIntfcCI::ApplyConfig - eAAC+ Config Applied")); -#endif //_DEBUG - - return KErrNone; - } - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/errorconcealmentintfccistub/BWINS/ErrorConcealmentIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/errorconcealmentintfccistub/BWINS/ErrorConcealmentIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -EXPORTS - ??1CErrorConcealmentIntfcCI@@UAE@XZ @ 1 NONAME ; CErrorConcealmentIntfcCI::~CErrorConcealmentIntfcCI(void) - ?ConcealErrorForNextBuffer@CErrorConcealmentIntfcCI@@UAEHXZ @ 2 NONAME ; int CErrorConcealmentIntfcCI::ConcealErrorForNextBuffer(void) - ?FrameModeRqrdForEC@CErrorConcealmentIntfcCI@@UAEHAAH@Z @ 3 NONAME ; int CErrorConcealmentIntfcCI::FrameModeRqrdForEC(int &) - ?NewL@CErrorConcealmentIntfcCI@@SAPAV1@XZ @ 4 NONAME ; class CErrorConcealmentIntfcCI * CErrorConcealmentIntfcCI::NewL(void) - ?SetFrameMode@CErrorConcealmentIntfcCI@@UAEHH@Z @ 5 NONAME ; int CErrorConcealmentIntfcCI::SetFrameMode(int) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/errorconcealmentintfccistub/EABI/ErrorConcealmentIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/errorconcealmentintfccistub/EABI/ErrorConcealmentIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -EXPORTS - _ZN24CErrorConcealmentIntfcCI12SetFrameModeEi @ 1 NONAME - _ZN24CErrorConcealmentIntfcCI18FrameModeRqrdForECERi @ 2 NONAME - _ZN24CErrorConcealmentIntfcCI25ConcealErrorForNextBufferEv @ 3 NONAME - _ZN24CErrorConcealmentIntfcCI4NewLEv @ 4 NONAME - _ZN24CErrorConcealmentIntfcCID0Ev @ 5 NONAME - _ZN24CErrorConcealmentIntfcCID1Ev @ 6 NONAME - _ZN24CErrorConcealmentIntfcCID2Ev @ 7 NONAME - _ZTI24CErrorConcealmentIntfcCI @ 8 NONAME ; ## - _ZTV24CErrorConcealmentIntfcCI @ 9 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/errorconcealmentintfccistub/group/ErrorConcealmentIntfcCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/errorconcealmentintfccistub/group/ErrorConcealmentIntfcCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* Version : %version: bh1mmcf#14 % -* -*/ - - -#include - -TARGET ErrorConcealmentIntfcCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207B0D - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE ErrorConcealmentIntfcCIStub.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../inc -USERINCLUDE ../../../inc - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY ErrorConcealmentIntfcCI.lib - -LINKAS ErrorConcealmentIntfcCI.dll - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/errorconcealmentintfccistub/group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/errorconcealmentintfccistub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for error concealment custom interface -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -ErrorConcealmentIntfcCIStub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/errorconcealmentintfccistub/src/ErrorConcealmentIntfcCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/errorconcealmentintfccistub/src/ErrorConcealmentIntfcCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - - -// INCLUDE FILES -#include "ErrorConcealmentIntfcCI.h" -#include - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CErrorConcealmentIntfcCI::CErrorConcealmentIntfcCI -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CErrorConcealmentIntfcCI::CErrorConcealmentIntfcCI() - { - - } - -// ----------------------------------------------------------------------------- -// CErrorConcealmentIntfcCI::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CErrorConcealmentIntfcCI::ConstructL() - { - - } - -// ----------------------------------------------------------------------------- -// CErrorConcealmentIntfcCI::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CErrorConcealmentIntfcCI* CErrorConcealmentIntfcCI::NewL() - { - CErrorConcealmentIntfcCI* self = new (ELeave)CErrorConcealmentIntfcCI; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - -// Destructor -EXPORT_C CErrorConcealmentIntfcCI::~CErrorConcealmentIntfcCI() - { - - } - -// ----------------------------------------------------------------------------- -// CErrorConcealmentIntfcCI::ConcealErrorForNextBuffer -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CErrorConcealmentIntfcCI::ConcealErrorForNextBuffer() - { - RDebug::Print(_L("CErrorConcealmentIntfcCI::ConcealErrorForNextBuffer")); - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// CErrorConcealmentIntfcCI::SetFrameMode -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CErrorConcealmentIntfcCI::SetFrameMode(TBool aFrameMode) - { - TBool myFrameMode = aFrameMode; - RDebug::Print(_L("CErrorConcealmentIntfcCI::SetFrameMode frameMode[%d]"), myFrameMode); - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// CErrorConcealmentIntfcCI::FrameModeRqrdForEC -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CErrorConcealmentIntfcCI::FrameModeRqrdForEC(TBool& aFrameModeRqrd) - { - iFrameModeRqrd = !iFrameModeRqrd; - aFrameModeRqrd = iFrameModeRqrd; - RDebug::Print(_L("CErrorConcealmentIntfcCI::FrameModeRqrdForEC frameModeRqrd[%d]"), aFrameModeRqrd); - return KErrNone; - } diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/g711decoderintfccistub/BWINS/G711DecoderIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/g711decoderintfccistub/BWINS/G711DecoderIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -EXPORTS - ??1CG711DecoderIntfcCI@@UAE@XZ @ 1 NONAME ; CG711DecoderIntfcCI::~CG711DecoderIntfcCI(void) - ?GetCng@CG711DecoderIntfcCI@@UAEHAAH@Z @ 2 NONAME ; int CG711DecoderIntfcCI::GetCng(int &) - ?NewL@CG711DecoderIntfcCI@@SAPAV1@XZ @ 3 NONAME ; class CG711DecoderIntfcCI * CG711DecoderIntfcCI::NewL(void) - ?SetCng@CG711DecoderIntfcCI@@UAEHH@Z @ 4 NONAME ; int CG711DecoderIntfcCI::SetCng(int) - ?SetDecoderMode@CG711DecoderIntfcCI@@UAEHW4TDecodeMode@CG711DecoderIntfc@@@Z @ 5 NONAME ; int CG711DecoderIntfcCI::SetDecoderMode(enum CG711DecoderIntfc::TDecodeMode) - ?SetPlc@CG711DecoderIntfcCI@@UAEHH@Z @ 6 NONAME ; int CG711DecoderIntfcCI::SetPlc(int) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/g711decoderintfccistub/EABI/G711DecoderIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/g711decoderintfccistub/EABI/G711DecoderIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -EXPORTS - _ZN19CG711DecoderIntfcCI14SetDecoderModeEN17CG711DecoderIntfc11TDecodeModeE @ 1 NONAME - _ZN19CG711DecoderIntfcCI4NewLEv @ 2 NONAME - _ZN19CG711DecoderIntfcCI6GetCngERi @ 3 NONAME - _ZN19CG711DecoderIntfcCI6SetCngEi @ 4 NONAME - _ZN19CG711DecoderIntfcCI6SetPlcEi @ 5 NONAME - _ZN19CG711DecoderIntfcCID0Ev @ 6 NONAME - _ZN19CG711DecoderIntfcCID1Ev @ 7 NONAME - _ZN19CG711DecoderIntfcCID2Ev @ 8 NONAME - _ZTI19CG711DecoderIntfcCI @ 9 NONAME ; ## - _ZTV19CG711DecoderIntfcCI @ 10 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/g711decoderintfccistub/group/G711DecoderIntfcCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/g711decoderintfccistub/group/G711DecoderIntfcCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* Version : %version: bh1mmcf#14 % -* -*/ - - -#include - -TARGET G711DecoderIntfcCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207B0E - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE G711DecoderIntfcCIStub.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../inc -USERINCLUDE ../../../inc - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY G711DecoderIntfcCI.lib - -LINKAS G711DecoderIntfcCI.dll - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/g711decoderintfccistub/group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/g711decoderintfccistub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for G711 decoder custom interface -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -G711DecoderIntfcCIStub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/g711decoderintfccistub/src/G711DecoderIntfcCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/g711decoderintfccistub/src/G711DecoderIntfcCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - - -// INCLUDE FILES -#include "G711DecoderIntfcCI.h" -#include - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CG711DecoderIntfcCI::CG711DecoderIntfcCI -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CG711DecoderIntfcCI::CG711DecoderIntfcCI() - { - - } - -// ----------------------------------------------------------------------------- -// CG711DecoderIntfcCI::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CG711DecoderIntfcCI::ConstructL() - { - - } - -// ----------------------------------------------------------------------------- -// CG711DecoderIntfcCI::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CG711DecoderIntfcCI* CG711DecoderIntfcCI::NewL() - { - CG711DecoderIntfcCI* self = new (ELeave)CG711DecoderIntfcCI; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - -// Destructor -EXPORT_C CG711DecoderIntfcCI::~CG711DecoderIntfcCI() - { - - } - -// ----------------------------------------------------------------------------- -// CG711DecoderIntfcCI::SetDecoderMode -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CG711DecoderIntfcCI::SetDecoderMode(TDecodeMode aDecodeMode) - { - TBool myDecodeMode = aDecodeMode; - RDebug::Print(_L("CG711DecoderIntfcCI::SetDecoderMode decodeMode[%d]"), myDecodeMode); - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// CG711DecoderIntfcCI::SetCng -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CG711DecoderIntfcCI::SetCng(TBool aCng) - { - iCng = aCng; - RDebug::Print(_L("CG711DecoderIntfcCI::SetCng cng[%d]"), iCng); - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// CG711DecoderIntfcCI::GetCng -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CG711DecoderIntfcCI::GetCng(TBool& aCng) - { - aCng = iCng; - RDebug::Print(_L("CG711DecoderIntfcCI::GetCng cng[%d]"), aCng); - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// CG711DecoderIntfcCI::SetPlc -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CG711DecoderIntfcCI::SetPlc(TBool aPlc) - { - TBool myPlc = aPlc; - RDebug::Print(_L("CG711DecoderIntfcCI::SetPlc plc[%d]"), myPlc); - return KErrNone; - } diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/g711encoderintfccistub/BWINS/G711EncoderIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/g711encoderintfccistub/BWINS/G711EncoderIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -EXPORTS - ??1CG711EncoderIntfcCI@@UAE@XZ @ 1 NONAME ; CG711EncoderIntfcCI::~CG711EncoderIntfcCI(void) - ?GetVadMode@CG711EncoderIntfcCI@@UAEHAAH@Z @ 2 NONAME ; int CG711EncoderIntfcCI::GetVadMode(int &) - ?NewL@CG711EncoderIntfcCI@@SAPAV1@XZ @ 3 NONAME ; class CG711EncoderIntfcCI * CG711EncoderIntfcCI::NewL(void) - ?SetEncoderMode@CG711EncoderIntfcCI@@UAEHW4TEncodeMode@CG711EncoderIntfc@@@Z @ 4 NONAME ; int CG711EncoderIntfcCI::SetEncoderMode(enum CG711EncoderIntfc::TEncodeMode) - ?SetVadMode@CG711EncoderIntfcCI@@UAEHH@Z @ 5 NONAME ; int CG711EncoderIntfcCI::SetVadMode(int) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/g711encoderintfccistub/EABI/G711EncoderIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/g711encoderintfccistub/EABI/G711EncoderIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -EXPORTS - _ZN19CG711EncoderIntfcCI10GetVadModeERi @ 1 NONAME - _ZN19CG711EncoderIntfcCI10SetVadModeEi @ 2 NONAME - _ZN19CG711EncoderIntfcCI14SetEncoderModeEN17CG711EncoderIntfc11TEncodeModeE @ 3 NONAME - _ZN19CG711EncoderIntfcCI4NewLEv @ 4 NONAME - _ZN19CG711EncoderIntfcCID0Ev @ 5 NONAME - _ZN19CG711EncoderIntfcCID1Ev @ 6 NONAME - _ZN19CG711EncoderIntfcCID2Ev @ 7 NONAME - _ZTI19CG711EncoderIntfcCI @ 8 NONAME ; ## - _ZTV19CG711EncoderIntfcCI @ 9 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/g711encoderintfccistub/group/G711EncoderIntfcCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/g711encoderintfccistub/group/G711EncoderIntfcCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* Version : %version: bh1mmcf#14 % -* -*/ - - -#include - -TARGET G711EncoderIntfcCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207B0F - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE G711EncoderIntfcCIStub.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../inc -USERINCLUDE ../../../inc - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY G711EncoderIntfcCI.lib - -LINKAS G711EncoderIntfcCI.dll - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/g711encoderintfccistub/group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/g711encoderintfccistub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for G711 encoder custom interface -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -G711EncoderIntfcCIStub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/g711encoderintfccistub/src/G711EncoderIntfcCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/g711encoderintfccistub/src/G711EncoderIntfcCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,123 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - - -// INCLUDE FILES -#include "G711EncoderIntfcCI.h" -#include - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CG711EncoderIntfcCI::CG711EncoderIntfcCI -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CG711EncoderIntfcCI::CG711EncoderIntfcCI() - { - - } - -// ----------------------------------------------------------------------------- -// CG711EncoderIntfcCI::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CG711EncoderIntfcCI::ConstructL() - { - - } - -// ----------------------------------------------------------------------------- -// CG711EncoderIntfcCI::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CG711EncoderIntfcCI* CG711EncoderIntfcCI::NewL() - { - CG711EncoderIntfcCI* self = new (ELeave)CG711EncoderIntfcCI; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - -// Destructor -EXPORT_C CG711EncoderIntfcCI::~CG711EncoderIntfcCI() - { - - } - -// ----------------------------------------------------------------------------- -// CG711EncoderIntfcCI::SetEncoderMode -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CG711EncoderIntfcCI::SetEncoderMode(TEncodeMode aEncodeMode) - { - TBool myEncodeMode = aEncodeMode; - RDebug::Print(_L("CG711EncoderIntfcCI::SetEncoderMode encodeMode[%d]"), myEncodeMode); - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// CG711EncoderIntfcCI::SetVadMode -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CG711EncoderIntfcCI::SetVadMode(TBool aVadMode) - { - iVadMode = aVadMode; - RDebug::Print(_L("CG711EncoderIntfcCI::SetVadMode VAD mode[%d]"), iVadMode); - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// CG711EncoderIntfcCI::GetVadMode -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CG711EncoderIntfcCI::GetVadMode(TBool& aVadMode) - { - aVadMode = iVadMode; - RDebug::Print(_L("CG711EncoderIntfcCI::GetVadMode VAD mode[%d]"), aVadMode); - return KErrNone; - } - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/g729decoderintfccistub/BWINS/G729DecoderIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/g729decoderintfccistub/BWINS/G729DecoderIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -EXPORTS - ??1CG729DecoderIntfcCI@@UAE@XZ @ 1 NONAME ; CG729DecoderIntfcCI::~CG729DecoderIntfcCI(void) - ?BadLsfNextBuffer@CG729DecoderIntfcCI@@UAEHXZ @ 2 NONAME ; int CG729DecoderIntfcCI::BadLsfNextBuffer(void) - ?NewL@CG729DecoderIntfcCI@@SAPAV1@XZ @ 3 NONAME ; class CG729DecoderIntfcCI * CG729DecoderIntfcCI::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/g729decoderintfccistub/EABI/G729DecoderIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/g729decoderintfccistub/EABI/G729DecoderIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -EXPORTS - _ZN19CG729DecoderIntfcCI16BadLsfNextBufferEv @ 1 NONAME - _ZN19CG729DecoderIntfcCI4NewLEv @ 2 NONAME - _ZN19CG729DecoderIntfcCID0Ev @ 3 NONAME - _ZN19CG729DecoderIntfcCID1Ev @ 4 NONAME - _ZN19CG729DecoderIntfcCID2Ev @ 5 NONAME - _ZTI19CG729DecoderIntfcCI @ 6 NONAME ; ## - _ZTV19CG729DecoderIntfcCI @ 7 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/g729decoderintfccistub/group/G729DecoderIntfcCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/g729decoderintfccistub/group/G729DecoderIntfcCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* Version : %version: bh1mmcf#10.1.7 % -* -*/ - - -#include - -TARGET G729DecoderIntfcCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207B10 - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE G729DecoderIntfcCIStub.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../inc -USERINCLUDE ../../../inc - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY G729DecoderIntfcCI.lib - -LINKAS G729DecoderIntfcCI.dll - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/g729decoderintfccistub/group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/g729decoderintfccistub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for G729 decoder custom interface -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -G729DecoderIntfcCIStub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/g729decoderintfccistub/src/G729DecoderIntfcCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/g729decoderintfccistub/src/G729DecoderIntfcCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - - -// INCLUDE FILES -#include "G729DecoderIntfcCI.h" -#include - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CG729DecoderIntfcCI::CG729DecoderIntfcCI -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CG729DecoderIntfcCI::CG729DecoderIntfcCI() - { - - } - -// ----------------------------------------------------------------------------- -// CG729DecoderIntfcCI::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CG729DecoderIntfcCI::ConstructL() - { - - } - -// ----------------------------------------------------------------------------- -// CG729DecoderIntfcCI::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CG729DecoderIntfcCI* CG729DecoderIntfcCI::NewL() - { - CG729DecoderIntfcCI* self = new (ELeave)CG729DecoderIntfcCI; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - -// Destructor -EXPORT_C CG729DecoderIntfcCI::~CG729DecoderIntfcCI() - { - - } - -// ----------------------------------------------------------------------------- -// CG729DecoderIntfcCI::BadLsfNextBuffer -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CG729DecoderIntfcCI::BadLsfNextBuffer() - { - RDebug::Print(_L("CG729DecoderIntfcCI::BadLsfNextBuffer")); - return KErrNone; - } - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/g729encoderintfccistub/BWINS/G729EncoderIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/g729encoderintfccistub/BWINS/G729EncoderIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - ??1CG729EncoderIntfcCI@@UAE@XZ @ 1 NONAME ; CG729EncoderIntfcCI::~CG729EncoderIntfcCI(void) - ?GetVadMode@CG729EncoderIntfcCI@@UAEHAAH@Z @ 2 NONAME ; int CG729EncoderIntfcCI::GetVadMode(int &) - ?NewL@CG729EncoderIntfcCI@@SAPAV1@XZ @ 3 NONAME ; class CG729EncoderIntfcCI * CG729EncoderIntfcCI::NewL(void) - ?SetVadMode@CG729EncoderIntfcCI@@UAEHH@Z @ 4 NONAME ; int CG729EncoderIntfcCI::SetVadMode(int) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/g729encoderintfccistub/EABI/G729EncoderIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/g729encoderintfccistub/EABI/G729EncoderIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -EXPORTS - _ZN19CG729EncoderIntfcCI10GetVadModeERi @ 1 NONAME - _ZN19CG729EncoderIntfcCI10SetVadModeEi @ 2 NONAME - _ZN19CG729EncoderIntfcCI4NewLEv @ 3 NONAME - _ZN19CG729EncoderIntfcCID0Ev @ 4 NONAME - _ZN19CG729EncoderIntfcCID1Ev @ 5 NONAME - _ZN19CG729EncoderIntfcCID2Ev @ 6 NONAME - _ZTI19CG729EncoderIntfcCI @ 7 NONAME ; ## - _ZTV19CG729EncoderIntfcCI @ 8 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/g729encoderintfccistub/group/G729EncoderIntfcCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/g729encoderintfccistub/group/G729EncoderIntfcCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* Version : %version: bh1mmcf#14 % -* -*/ - - -#include - -TARGET G729EncoderIntfcCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207B11 - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - - -SOURCEPATH ../src -SOURCE G729EncoderIntfcCIStub.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../inc -USERINCLUDE ../../../inc - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY G729EncoderIntfcCI.lib - -LINKAS G729EncoderIntfcCI.dll - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/g729encoderintfccistub/group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/g729encoderintfccistub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for G729 encoder custom interface -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -G729EncoderIntfcCIStub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/g729encoderintfccistub/src/G729EncoderIntfcCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/g729encoderintfccistub/src/G729EncoderIntfcCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,98 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - - -// INCLUDE FILES -#include "G729EncoderIntfcCI.h" -#include - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CG729EncoderIntfcCI::CG729EncoderIntfcCI -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CG729EncoderIntfcCI::CG729EncoderIntfcCI() - { - - } - -// ----------------------------------------------------------------------------- -// CG729EncoderIntfcCI::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CG729EncoderIntfcCI::ConstructL() - { - - } - -// ----------------------------------------------------------------------------- -// CG729EncoderIntfcCI::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CG729EncoderIntfcCI* CG729EncoderIntfcCI::NewL() - { - CG729EncoderIntfcCI* self = new (ELeave)CG729EncoderIntfcCI; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - -// Destructor -EXPORT_C CG729EncoderIntfcCI::~CG729EncoderIntfcCI() - { - - } - - -EXPORT_C TInt CG729EncoderIntfcCI::SetVadMode(TBool aVadMode) - { - iVadMode = aVadMode; - RDebug::Print(_L("CG729EncoderIntfcCI::SetVadMode VAD mode[%d]"), iVadMode); - return KErrNone; - } - -EXPORT_C TInt CG729EncoderIntfcCI::GetVadMode(TBool& aVadMode) - { - aVadMode = iVadMode; - RDebug::Print(_L("CG729EncoderIntfcCI::GetVadMode VAD mode[%d]"), aVadMode); - return KErrNone; - } diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* -* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - - -#include "../aacdecoderconfigcistub/group/bld.inf" -//#include "../audiovibracontrolcistub/group/bld.inf" //Audio vibra Control API is deprecated -#include "../eaacplusdecoderintfccistub/Group/bld.inf" -#include "../errorconcealmentintfccistub/group/bld.inf" -#include "../g711decoderintfccistub/group/bld.inf" -#include "../g711encoderintfccistub/group/bld.inf" -#include "../g729decoderintfccistub/group/bld.inf" -#include "../g729encoderintfccistub/group/bld.inf" -#include "../ilbcdecoderintfccistub/group/bld.inf" -#include "../ilbcencoderintfccistub/group/bld.inf" -#include "../sbcencoderintfccistub/Group/bld.inf" -#include "../speechencoderconfigcistub/group/bld.inf" -#include "../ra8decoderintfccistub/Group/bld.inf" -#include "../wmadecodercintfccistub/group/bld.inf" - -// End of File - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/ilbcdecoderintfccistub/BWINS/IlbcDecoderIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/ilbcdecoderintfccistub/BWINS/IlbcDecoderIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -EXPORTS - ??1CIlbcDecoderIntfcCI@@UAE@XZ @ 1 NONAME ; CIlbcDecoderIntfcCI::~CIlbcDecoderIntfcCI(void) - ?GetCng@CIlbcDecoderIntfcCI@@UAEHAAH@Z @ 2 NONAME ; int CIlbcDecoderIntfcCI::GetCng(int &) - ?NewL@CIlbcDecoderIntfcCI@@SAPAV1@XZ @ 3 NONAME ; class CIlbcDecoderIntfcCI * CIlbcDecoderIntfcCI::NewL(void) - ?SetCng@CIlbcDecoderIntfcCI@@UAEHH@Z @ 4 NONAME ; int CIlbcDecoderIntfcCI::SetCng(int) - ?SetDecoderMode@CIlbcDecoderIntfcCI@@UAEHW4TDecodeMode@CIlbcDecoderIntfc@@@Z @ 5 NONAME ; int CIlbcDecoderIntfcCI::SetDecoderMode(enum CIlbcDecoderIntfc::TDecodeMode) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/ilbcdecoderintfccistub/EABI/IlbcDecoderIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/ilbcdecoderintfccistub/EABI/IlbcDecoderIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -EXPORTS - _ZN19CIlbcDecoderIntfcCI14SetDecoderModeEN17CIlbcDecoderIntfc11TDecodeModeE @ 1 NONAME - _ZN19CIlbcDecoderIntfcCI4NewLEv @ 2 NONAME - _ZN19CIlbcDecoderIntfcCI6GetCngERi @ 3 NONAME - _ZN19CIlbcDecoderIntfcCI6SetCngEi @ 4 NONAME - _ZN19CIlbcDecoderIntfcCID0Ev @ 5 NONAME - _ZN19CIlbcDecoderIntfcCID1Ev @ 6 NONAME - _ZN19CIlbcDecoderIntfcCID2Ev @ 7 NONAME - _ZTI19CIlbcDecoderIntfcCI @ 8 NONAME ; ## - _ZTV19CIlbcDecoderIntfcCI @ 9 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/ilbcdecoderintfccistub/group/IlbcDecoderIntfcCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/ilbcdecoderintfccistub/group/IlbcDecoderIntfcCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* Version : %version: bh1mmcf#14 % -* -*/ - - -#include - -TARGET IlbcDecoderIntfcCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207B12 - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE IlbcDecoderIntfcCIStub.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../inc -USERINCLUDE ../../../inc - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY IlbcDecoderIntfcCI.lib - -LINKAS IlbcDecoderIntfcCI.dll - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/ilbcdecoderintfccistub/group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/ilbcdecoderintfccistub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for Ilbc decoder custom interface -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -IlbcDecoderIntfcCIStub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/ilbcdecoderintfccistub/src/IlbcDecoderIntfcCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/ilbcdecoderintfccistub/src/IlbcDecoderIntfcCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - - -// INCLUDE FILES -#include "IlbcDecoderIntfcCI.h" -#include - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CIlbcDecoderIntfcCI::CIlbcDecoderIntfcCI -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CIlbcDecoderIntfcCI::CIlbcDecoderIntfcCI() - { - - } - -// ----------------------------------------------------------------------------- -// CIlbcDecoderIntfcCI::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CIlbcDecoderIntfcCI::ConstructL() - { - - } - -// ----------------------------------------------------------------------------- -// CIlbcDecoderIntfcCI::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CIlbcDecoderIntfcCI* CIlbcDecoderIntfcCI::NewL() - { - CIlbcDecoderIntfcCI* self = new (ELeave)CIlbcDecoderIntfcCI; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - -// Destructor -EXPORT_C CIlbcDecoderIntfcCI::~CIlbcDecoderIntfcCI() - { - - } - -// ----------------------------------------------------------------------------- -// CIlbcDecoderIntfcCI::SetDecoderMode -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CIlbcDecoderIntfcCI::SetDecoderMode(TDecodeMode aDecodeMode) - { - TBool myDecodeMode = aDecodeMode; - RDebug::Print(_L("CIlbcDecoderIntfcCI::SetDecoderMode decodeMode[%d]"), myDecodeMode); - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// CIlbcDecoderIntfcCI::SetCng -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CIlbcDecoderIntfcCI::SetCng(TBool aCng) - { - iCng = aCng; - RDebug::Print(_L("CIlbcDecoderIntfcCI::SetCng cng[%d]"), iCng); - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// CIlbcDecoderIntfcCI::GetCng -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CIlbcDecoderIntfcCI::GetCng(TBool& aCng) - { - aCng = iCng; - RDebug::Print(_L("CIlbcDecoderIntfcCI::GetCng cng[%d]"), aCng); - return KErrNone; - } diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/ilbcencoderintfccistub/BWINS/IlbcEncoderIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/ilbcencoderintfccistub/BWINS/IlbcEncoderIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -EXPORTS - ??1CIlbcEncoderIntfcCI@@UAE@XZ @ 1 NONAME ; CIlbcEncoderIntfcCI::~CIlbcEncoderIntfcCI(void) - ?GetVadMode@CIlbcEncoderIntfcCI@@UAEHAAH@Z @ 2 NONAME ; int CIlbcEncoderIntfcCI::GetVadMode(int &) - ?NewL@CIlbcEncoderIntfcCI@@SAPAV1@XZ @ 3 NONAME ; class CIlbcEncoderIntfcCI * CIlbcEncoderIntfcCI::NewL(void) - ?SetEncoderMode@CIlbcEncoderIntfcCI@@UAEHW4TEncodeMode@CIlbcEncoderIntfc@@@Z @ 4 NONAME ; int CIlbcEncoderIntfcCI::SetEncoderMode(enum CIlbcEncoderIntfc::TEncodeMode) - ?SetVadMode@CIlbcEncoderIntfcCI@@UAEHH@Z @ 5 NONAME ; int CIlbcEncoderIntfcCI::SetVadMode(int) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/ilbcencoderintfccistub/EABI/IlbcEncoderIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/ilbcencoderintfccistub/EABI/IlbcEncoderIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -EXPORTS - _ZN19CIlbcEncoderIntfcCI10GetVadModeERi @ 1 NONAME - _ZN19CIlbcEncoderIntfcCI10SetVadModeEi @ 2 NONAME - _ZN19CIlbcEncoderIntfcCI14SetEncoderModeEN17CIlbcEncoderIntfc11TEncodeModeE @ 3 NONAME - _ZN19CIlbcEncoderIntfcCI4NewLEv @ 4 NONAME - _ZN19CIlbcEncoderIntfcCID0Ev @ 5 NONAME - _ZN19CIlbcEncoderIntfcCID1Ev @ 6 NONAME - _ZN19CIlbcEncoderIntfcCID2Ev @ 7 NONAME - _ZTI19CIlbcEncoderIntfcCI @ 8 NONAME ; ## - _ZTV19CIlbcEncoderIntfcCI @ 9 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/ilbcencoderintfccistub/group/IlbcEncoderIntfcCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/ilbcencoderintfccistub/group/IlbcEncoderIntfcCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* Version : %version: bh1mmcf#10.1.7 % -* -*/ - - -#include - -TARGET IlbcEncoderIntfcCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207B13 - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE IlbcEncoderIntfcCIStub.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../inc -USERINCLUDE ../../../inc - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY IlbcEncoderIntfcCI.lib - -LINKAS IlbcEncoderIntfcCI.dll - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/ilbcencoderintfccistub/group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/ilbcencoderintfccistub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for Ilbc encoder custom interface -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -IlbcEncoderIntfcCIStub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/ilbcencoderintfccistub/src/IlbcEncoderIntfcCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/ilbcencoderintfccistub/src/IlbcEncoderIntfcCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - - -// INCLUDE FILES -#include "IlbcEncoderIntfcCI.h" -#include - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CIlbcEncoderIntfcCI::CIlbcEncoderIntfcCI -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CIlbcEncoderIntfcCI::CIlbcEncoderIntfcCI() - { - - } - -// ----------------------------------------------------------------------------- -// CIlbcEncoderIntfcCI::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CIlbcEncoderIntfcCI::ConstructL() - { - - } - -// ----------------------------------------------------------------------------- -// CIlbcEncoderIntfcCI::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CIlbcEncoderIntfcCI* CIlbcEncoderIntfcCI::NewL() - { - CIlbcEncoderIntfcCI* self = new (ELeave)CIlbcEncoderIntfcCI; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - -// Destructor -EXPORT_C CIlbcEncoderIntfcCI::~CIlbcEncoderIntfcCI() - { - - } - -// ----------------------------------------------------------------------------- -// CIlbcEncoderIntfcCI::SetEncoderMode -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CIlbcEncoderIntfcCI::SetEncoderMode(TEncodeMode aEncodeMode) - { - TBool myEncodeMode = aEncodeMode; - RDebug::Print(_L("CIlbcEncoderIntfcCI::SetEncoderMode encodeMode[%d]"), myEncodeMode); - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// CIlbcEncoderIntfcCI::SetVadMode -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CIlbcEncoderIntfcCI::SetVadMode(TBool aVadMode) - { - iVadMode = aVadMode; - RDebug::Print(_L("CIlbcEncoderIntfcCI::SetVadMode VAD mode[%d]"), iVadMode); - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// CIlbcEncoderIntfcCI::GetVadMode -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CIlbcEncoderIntfcCI::GetVadMode(TBool& aVadMode) - { - aVadMode = iVadMode; - RDebug::Print(_L("CIlbcEncoderIntfcCI::GetVadMode VAD mode[%d]"), aVadMode); - return KErrNone; - } diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/ra8decoderintfccistub/BWINS/Ra8DecoderIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/ra8decoderintfccistub/BWINS/Ra8DecoderIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - ??1CRa8DecoderIntfcCI@@UAE@XZ @ 1 NONAME ; CRa8DecoderIntfcCI::~CRa8DecoderIntfcCI(void) - ?FrameNumber@CRa8DecoderIntfcCI@@UAEHXZ @ 2 NONAME ; int CRa8DecoderIntfcCI::FrameNumber(void) - ?NewL@CRa8DecoderIntfcCI@@SAPAV1@XZ @ 3 NONAME ; class CRa8DecoderIntfcCI * CRa8DecoderIntfcCI::NewL(void) - ?SetInitString@CRa8DecoderIntfcCI@@UAEHAAVTDesC8@@@Z @ 4 NONAME ; int CRa8DecoderIntfcCI::SetInitString(class TDesC8 &) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/ra8decoderintfccistub/EABI/Ra8DecoderIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/ra8decoderintfccistub/EABI/Ra8DecoderIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -EXPORTS - _ZN18CRa8DecoderIntfcCI11FrameNumberEv @ 1 NONAME - _ZN18CRa8DecoderIntfcCI13SetInitStringER6TDesC8 @ 2 NONAME - _ZN18CRa8DecoderIntfcCI4NewLEv @ 3 NONAME - _ZN18CRa8DecoderIntfcCID0Ev @ 4 NONAME - _ZN18CRa8DecoderIntfcCID1Ev @ 5 NONAME - _ZN18CRa8DecoderIntfcCID2Ev @ 6 NONAME - _ZTI18CRa8DecoderIntfcCI @ 7 NONAME ; ## - _ZTV18CRa8DecoderIntfcCI @ 8 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/ra8decoderintfccistub/Group/Ra8DecoderIntfcCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/ra8decoderintfccistub/Group/Ra8DecoderIntfcCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project specification for RA8 decoder configuration custom -* : interface stub implementation. -* Version : %version: bh1mmcf#8 % -* -*/ - - -#include - -TARGET Ra8DecoderIntfcCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207B80 - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE Ra8DecoderIntfcCIStub.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../inc -USERINCLUDE ../../../inc - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY Ra8DecoderIntfcCI.lib - -LINKAS Ra8DecoderIntfcCI.dll - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/ra8decoderintfccistub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/ra8decoderintfccistub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for RA8 decoder custom interface stub -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -Ra8DecoderIntfcCIStub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/ra8decoderintfccistub/src/Ra8DecoderIntfcCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/ra8decoderintfccistub/src/Ra8DecoderIntfcCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,116 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Custom Interface stub object for configuring the RA8 decoder. -* -*/ - - -// INCLUDE FILES -#include -#include "Ra8CustomInterfaceCI.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -/** - * CRa8DecoderIntfcCI::CRa8DecoderIntfcCI - * C++ default constructor. - */ -CRa8DecoderIntfcCI::CRa8DecoderIntfcCI() - { - } - -/** - * CRa8DecoderIntfcCI::ConstructL - * Symbian 2nd phase constructor. - */ -void CRa8DecoderIntfcCI::ConstructL() - { - } - -/** - * CRa8DecoderIntfcCI::NewL - * Two-phased constructor. - */ -EXPORT_C CRa8DecoderIntfcCI* CRa8DecoderIntfcCI::NewL() - { - CRa8DecoderIntfcCI* self = new (ELeave)CRa8DecoderIntfcCI; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - -/** - * Destructor - */ -EXPORT_C CRa8DecoderIntfcCI::~CRa8DecoderIntfcCI() - { - } - -/** - * CRa8DecoderIntfcCI::FrameNumber - * Returns frame number from the codec. - * (other items were commented in a header). - */ -EXPORT_C TInt CRa8DecoderIntfcCI::FrameNumber() - { - TInt frameNum(125); //any number is good - -#ifdef _DEBUG - RDebug::Print(_L("CRa8DecoderIntfcCI::FrameNumber [%d]"), frameNum); -#endif - return frameNum; - } - -/* - * CRa8DecoderIntfcCI::SetInitString - * Processes received init string. - * (other items were commented in a header). - */ -EXPORT_C TInt CRa8DecoderIntfcCI::SetInitString(TDesC8& aInitString) - { -#ifdef _DEBUG - RDebug::Print(_L("CRa8DecoderIntfcCI::SetInitString")); -#endif - - TBuf<64> buf; - buf.Copy(aInitString); - -#ifdef _DEBUG - _LIT(KTest, "RECEIVED STRING: [%S]\n"); - RDebug::Print(KTest, &buf); -#endif - - return KErrNone; - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/rom/AudioCodecCI_Stubs.iby --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/rom/AudioCodecCI_Stubs.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Image description file for project Audio Codec Stubs -* -*/ - - -#ifndef __AUDIOCODECCI_STUBS_IBY__ -#define __AUDIOCODECCI_STUBS_IBY__ - - -file=ABI_DIR\BUILD_DIR\AacDecoderConfigCI_stub.dll SHARED_LIB_DIR\AacDecoderConfigCI_stub.dll -file=ABI_DIR\BUILD_DIR\AudioVibraControlCI_stub.dll SHARED_LIB_DIR\AudioVibraControlCI_stub.dll -file=ABI_DIR\BUILD_DIR\ErrorConcealmentIntfcCI_stub.dll SHARED_LIB_DIR\ErrorConcealmentIntfcCI_stub.dll -file=ABI_DIR\BUILD_DIR\G711DecoderIntfcCI_stub.dll SHARED_LIB_DIR\G711DecoderIntfcCI_stub.dll -file=ABI_DIR\BUILD_DIR\G711EncoderIntfcCI_stub.dll SHARED_LIB_DIR\G711EncoderIntfcCI_stub.dll -file=ABI_DIR\BUILD_DIR\G729DecoderIntfcCI_stub.dll SHARED_LIB_DIR\G729DecoderIntfcCI_stub.dll -file=ABI_DIR\BUILD_DIR\G729EncoderIntfcCI_stub.dll SHARED_LIB_DIR\G729EncoderIntfcCI_stub.dll -file=ABI_DIR\BUILD_DIR\IlbcDecoderIntfcCI_stub.dll SHARED_LIB_DIR\IlbcDecoderIntfcCI_stub.dll -file=ABI_DIR\BUILD_DIR\IlbcEncoderIntfcCI_stub.dll SHARED_LIB_DIR\IlbcEncoderIntfcCI_stub.dll -file=ABI_DIR\BUILD_DIR\SpeechEncoderConfigCI_stub.dll SHARED_LIB_DIR\SpeechEncoderConfigCI_stub.dll -file=ABI_DIR\BUILD_DIR\EAacPlusDecoderIntfcCI_stub.dll SHARED_LIB_DIR\EAacPlusDecoderIntfcCI_stub.dll -file=ABI_DIR\BUILD_DIR\SbcEncoderIntfcCI_stub.dll SHARED_LIB_DIR\SbcEncoderIntfcCI_stub.dll -file=ABI_DIR\BUILD_DIR\Ra8DecoderIntfcCI_stub.dll SHARED_LIB_DIR\Ra8DecoderIntfcCI_stub.dll -file=ABI_DIR\BUILD_DIR\WmaDecoderIntfcCI_Stub.dll SHARED_LIB_DIR\WmaDecoderIntfcCI_Stub.dll - - -#endif __AUDIOCODECCI_STUBS_IBY__ diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/sbcencoderintfccistub/BWINS/SbcEncoderIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/sbcencoderintfccistub/BWINS/SbcEncoderIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -EXPORTS - ??1CSbcEncoderIntfcCI@@UAE@XZ @ 1 NONAME ; CSbcEncoderIntfcCI::~CSbcEncoderIntfcCI(void) - ?ApplyConfig@CSbcEncoderIntfcCI@@UAEHXZ @ 2 NONAME ; int CSbcEncoderIntfcCI::ApplyConfig(void) - ?GetAllocationMethod@CSbcEncoderIntfcCI@@UAEHAAW4TSbcAllocationMethod@CSbcEncoderIntfc@@@Z @ 3 NONAME ; int CSbcEncoderIntfcCI::GetAllocationMethod(enum CSbcEncoderIntfc::TSbcAllocationMethod &) - ?GetBitpoolSize@CSbcEncoderIntfcCI@@UAEHAAI@Z @ 4 NONAME ; int CSbcEncoderIntfcCI::GetBitpoolSize(unsigned int &) - ?GetChannelMode@CSbcEncoderIntfcCI@@UAEHAAW4TSbcChannelMode@CSbcEncoderIntfc@@@Z @ 5 NONAME ; int CSbcEncoderIntfcCI::GetChannelMode(enum CSbcEncoderIntfc::TSbcChannelMode &) - ?GetNumOfBlocks@CSbcEncoderIntfcCI@@UAEHAAI@Z @ 6 NONAME ; int CSbcEncoderIntfcCI::GetNumOfBlocks(unsigned int &) - ?GetNumOfSubbands@CSbcEncoderIntfcCI@@UAEHAAI@Z @ 7 NONAME ; int CSbcEncoderIntfcCI::GetNumOfSubbands(unsigned int &) - ?GetSamplingFrequency@CSbcEncoderIntfcCI@@UAEHAAI@Z @ 8 NONAME ; int CSbcEncoderIntfcCI::GetSamplingFrequency(unsigned int &) - ?GetSupportedAllocationMethods@CSbcEncoderIntfcCI@@UAEHAAV?$RArray@W4TSbcAllocationMethod@CSbcEncoderIntfc@@@@@Z @ 9 NONAME ; int CSbcEncoderIntfcCI::GetSupportedAllocationMethods(class RArray &) - ?GetSupportedBitpoolRange@CSbcEncoderIntfcCI@@UAEHAAI0@Z @ 10 NONAME ; int CSbcEncoderIntfcCI::GetSupportedBitpoolRange(unsigned int &, unsigned int &) - ?GetSupportedChannelModes@CSbcEncoderIntfcCI@@UAEHAAV?$RArray@W4TSbcChannelMode@CSbcEncoderIntfc@@@@@Z @ 11 NONAME ; int CSbcEncoderIntfcCI::GetSupportedChannelModes(class RArray &) - ?GetSupportedNumOfBlocks@CSbcEncoderIntfcCI@@UAEHAAV?$RArray@I@@@Z @ 12 NONAME ; int CSbcEncoderIntfcCI::GetSupportedNumOfBlocks(class RArray &) - ?GetSupportedNumOfSubbands@CSbcEncoderIntfcCI@@UAEHAAV?$RArray@I@@@Z @ 13 NONAME ; int CSbcEncoderIntfcCI::GetSupportedNumOfSubbands(class RArray &) - ?GetSupportedSamplingFrequencies@CSbcEncoderIntfcCI@@UAEHAAV?$RArray@I@@@Z @ 14 NONAME ; int CSbcEncoderIntfcCI::GetSupportedSamplingFrequencies(class RArray &) - ?NewL@CSbcEncoderIntfcCI@@SAPAV1@XZ @ 15 NONAME ; class CSbcEncoderIntfcCI * CSbcEncoderIntfcCI::NewL(void) - ?SetAllocationMethod@CSbcEncoderIntfcCI@@UAEXW4TSbcAllocationMethod@CSbcEncoderIntfc@@@Z @ 16 NONAME ; void CSbcEncoderIntfcCI::SetAllocationMethod(enum CSbcEncoderIntfc::TSbcAllocationMethod) - ?SetBitpoolSize@CSbcEncoderIntfcCI@@UAEXI@Z @ 17 NONAME ; void CSbcEncoderIntfcCI::SetBitpoolSize(unsigned int) - ?SetChannelMode@CSbcEncoderIntfcCI@@UAEXW4TSbcChannelMode@CSbcEncoderIntfc@@@Z @ 18 NONAME ; void CSbcEncoderIntfcCI::SetChannelMode(enum CSbcEncoderIntfc::TSbcChannelMode) - ?SetNumOfBlocks@CSbcEncoderIntfcCI@@UAEXI@Z @ 19 NONAME ; void CSbcEncoderIntfcCI::SetNumOfBlocks(unsigned int) - ?SetNumOfSubbands@CSbcEncoderIntfcCI@@UAEXI@Z @ 20 NONAME ; void CSbcEncoderIntfcCI::SetNumOfSubbands(unsigned int) - ?SetSamplingFrequency@CSbcEncoderIntfcCI@@UAEXI@Z @ 21 NONAME ; void CSbcEncoderIntfcCI::SetSamplingFrequency(unsigned int) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/sbcencoderintfccistub/EABI/SbcEncoderIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/sbcencoderintfccistub/EABI/SbcEncoderIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -EXPORTS - _ZN18CSbcEncoderIntfcCI11ApplyConfigEv @ 1 NONAME - _ZN18CSbcEncoderIntfcCI14GetBitpoolSizeERj @ 2 NONAME - _ZN18CSbcEncoderIntfcCI14GetChannelModeERN16CSbcEncoderIntfc15TSbcChannelModeE @ 3 NONAME - _ZN18CSbcEncoderIntfcCI14GetNumOfBlocksERj @ 4 NONAME - _ZN18CSbcEncoderIntfcCI14SetBitpoolSizeEj @ 5 NONAME - _ZN18CSbcEncoderIntfcCI14SetChannelModeEN16CSbcEncoderIntfc15TSbcChannelModeE @ 6 NONAME - _ZN18CSbcEncoderIntfcCI14SetNumOfBlocksEj @ 7 NONAME - _ZN18CSbcEncoderIntfcCI16GetNumOfSubbandsERj @ 8 NONAME - _ZN18CSbcEncoderIntfcCI16SetNumOfSubbandsEj @ 9 NONAME - _ZN18CSbcEncoderIntfcCI19GetAllocationMethodERN16CSbcEncoderIntfc20TSbcAllocationMethodE @ 10 NONAME - _ZN18CSbcEncoderIntfcCI19SetAllocationMethodEN16CSbcEncoderIntfc20TSbcAllocationMethodE @ 11 NONAME - _ZN18CSbcEncoderIntfcCI20GetSamplingFrequencyERj @ 12 NONAME - _ZN18CSbcEncoderIntfcCI20SetSamplingFrequencyEj @ 13 NONAME - _ZN18CSbcEncoderIntfcCI23GetSupportedNumOfBlocksER6RArrayIjE @ 14 NONAME - _ZN18CSbcEncoderIntfcCI24GetSupportedBitpoolRangeERjS0_ @ 15 NONAME - _ZN18CSbcEncoderIntfcCI24GetSupportedChannelModesER6RArrayIN16CSbcEncoderIntfc15TSbcChannelModeEE @ 16 NONAME - _ZN18CSbcEncoderIntfcCI25GetSupportedNumOfSubbandsER6RArrayIjE @ 17 NONAME - _ZN18CSbcEncoderIntfcCI29GetSupportedAllocationMethodsER6RArrayIN16CSbcEncoderIntfc20TSbcAllocationMethodEE @ 18 NONAME - _ZN18CSbcEncoderIntfcCI31GetSupportedSamplingFrequenciesER6RArrayIjE @ 19 NONAME - _ZN18CSbcEncoderIntfcCI4NewLEv @ 20 NONAME - _ZN18CSbcEncoderIntfcCID0Ev @ 21 NONAME - _ZN18CSbcEncoderIntfcCID1Ev @ 22 NONAME - _ZN18CSbcEncoderIntfcCID2Ev @ 23 NONAME - _ZTI18CSbcEncoderIntfcCI @ 24 NONAME ; ## - _ZTV18CSbcEncoderIntfcCI @ 25 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/sbcencoderintfccistub/Group/SbcEncoderIntfcCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/sbcencoderintfccistub/Group/SbcEncoderIntfcCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project specification for BT SBC Encoder configuration custom -* : interface stub implementation. -* Version : %version: bh1mmcf#10 % -* -*/ - - -#include - -TARGET SbcEncoderIntfcCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207B0B - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE SbcEncoderIntfcCIStub.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../inc -USERINCLUDE ../../../inc - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY SbcEncoderIntfcCI.lib - -LINKAS SbcEncoderIntfcCI.dll - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/sbcencoderintfccistub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/sbcencoderintfccistub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for BT SBC encoder custom interface -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -SbcEncoderIntfcCIStub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/sbcencoderintfccistub/src/SbcEncoderIntfcCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/sbcencoderintfccistub/src/SbcEncoderIntfcCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,408 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Custom Interface stub object for configuring the SBC encoder. -* -*/ - - -// INCLUDE FILES -#include -#include "SbcEncoderIntfcCI.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -/** - * CSbcEncoderIntfcCI::CSbcEncoderIntfcCI - * C++ default constructor. - */ -CSbcEncoderIntfcCI::CSbcEncoderIntfcCI() - { - } - -/** - * CSbcEncoderIntfcCI::ConstructL - * Symbian 2nd phase constructor. - */ -void CSbcEncoderIntfcCI::ConstructL() - { - } - -/** - * CSbcEncoderIntfcCI::NewL - * Two-phased constructor. - */ -EXPORT_C CSbcEncoderIntfcCI* CSbcEncoderIntfcCI::NewL() - { - CSbcEncoderIntfcCI* self = new (ELeave)CSbcEncoderIntfcCI; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - -/** - * Destructor - */ -EXPORT_C CSbcEncoderIntfcCI::~CSbcEncoderIntfcCI() - { - } - -/** - * CSbcEncoderIntfcCI::GetSupportedSamplingFrequencies - * Returns and array of supported sampling frequencies. - * (other items were commented in a header). - */ -EXPORT_C TInt CSbcEncoderIntfcCI::GetSupportedSamplingFrequencies( - RArray& aSupportedSamplingFrequencies) - { - aSupportedSamplingFrequencies.Reset(); - aSupportedSamplingFrequencies.Append(16000); - aSupportedSamplingFrequencies.Append(32000); - aSupportedSamplingFrequencies.Append(44100); - aSupportedSamplingFrequencies.Append(48000); - -#ifdef _DEBUG - RDebug::Print(_L("CSbcEncoderIntfcCI::GetSupportedSamplingFrequencies - Num of supported Fs[%d]"), - aSupportedSamplingFrequencies.Count()); -#endif - return KErrNone; - } - -/* - * CSbcEncoderIntfcCI::GetSupportedChannelModes - * Returns and array of supported channel modes. - * (other items were commented in a header). - */ -EXPORT_C TInt CSbcEncoderIntfcCI::GetSupportedChannelModes( - RArray& - aSupportedChannelModes) - { - aSupportedChannelModes.Reset(); - aSupportedChannelModes.Append(ESbcChannelMono); - aSupportedChannelModes.Append(ESbcChannelDual); - aSupportedChannelModes.Append(ESbcChannelStereo); - aSupportedChannelModes.Append(ESbcChannelJointStereo); - -#ifdef _DEBUG - RDebug::Print(_L("CSbcEncoderIntfcCI::GetSupportedChannelModes - Num of supported ch modes[%d]"), - aSupportedChannelModes.Count()); -#endif - return KErrNone; - } - -/* - * CSbcEncoderIntfcCI::GetSupportedNumOfBlocks - * Returns an array of supported block numbers. - * (other items were commented in a header). - */ -EXPORT_C TInt CSbcEncoderIntfcCI::GetSupportedNumOfBlocks( - RArray& aSupportedNumOfBlocks) - { - aSupportedNumOfBlocks.Reset(); - aSupportedNumOfBlocks.Append(4); - aSupportedNumOfBlocks.Append(8); - aSupportedNumOfBlocks.Append(12); - aSupportedNumOfBlocks.Append(16); - -#ifdef _DEBUG - RDebug::Print(_L("CSbcEncoderIntfcCI::GetSupportedNumOfBlocks - Num of supported blocks[%d]"), - aSupportedNumOfBlocks.Count()); -#endif - return KErrNone; - } - -/* - * CSbcEncoderIntfcCI::GetSupportedNumOfSubbands - * Returns an array of supported subbands. - * (other items were commented in a header). - */ -EXPORT_C TInt CSbcEncoderIntfcCI::GetSupportedNumOfSubbands( - RArray& aSupportedNumOfSubbands) - { - aSupportedNumOfSubbands.Reset(); - aSupportedNumOfSubbands.Append(4); - aSupportedNumOfSubbands.Append(8); - -#ifdef _DEBUG - RDebug::Print(_L("CSbcEncoderIntfcCI::GetSupportedNumOfSubbands - Num of supported subbands[%d]"), - aSupportedNumOfSubbands.Count()); -#endif - return KErrNone; - } - -/* - * CSbcEncoderIntfcCI::GetSupportedAllocationMethods - * Returns an array of supported allocation methods. - * (other items were commented in a header). - */ -EXPORT_C TInt CSbcEncoderIntfcCI::GetSupportedAllocationMethods( - RArray& - aSupportedAllocationMethods) - { - aSupportedAllocationMethods.Reset(); - aSupportedAllocationMethods.Append(ESbcAllocationSNR); - aSupportedAllocationMethods.Append(ESbcAllocationLoudness); - -#ifdef _DEBUG - RDebug::Print(_L("CSbcEncoderIntfcCI::GetSupportedAllocationMethods - Num of supported alloc methods[%d]"), - aSupportedAllocationMethods.Count()); -#endif - return KErrNone; - } - -/* - * CSbcEncoderIntfcCI::GetSupportedBitpoolRange - * Returns supported bitpool range. - * (other items were commented in a header). - */ -EXPORT_C TInt CSbcEncoderIntfcCI::GetSupportedBitpoolRange( - TUint& aMinSupportedBitpoolSize, - TUint& aMaxSupportedBitpoolSize) - { - aMinSupportedBitpoolSize = 2; - aMaxSupportedBitpoolSize = 250; - -#ifdef _DEBUG - RDebug::Print(_L("CSbcEncoderIntfcCI::GetSupportedBitpoolRange - Min[%d] - Max [%d]"), - aMinSupportedBitpoolSize, - aMaxSupportedBitpoolSize); -#endif - return KErrNone; - } - -/* - * CSbcEncoderIntfcCI::SetSamplingFrequency - * Sets new sampling frequency. - * (other items were commented in a header). - */ -EXPORT_C void CSbcEncoderIntfcCI::SetSamplingFrequency(TUint aSamplingFrequency) - { - iSamplingFrequency = aSamplingFrequency; - -#ifdef _DEBUG - RDebug::Print(_L("CSbcEncoderIntfcCI::SetSamplingFrequency [%d]"), - iSamplingFrequency); -#endif - } - -/* - * CSbcEncoderIntfcCI::GetSamplingFrequency - * Returns current sampling frequency. - * (other items were commented in a header). - */ -EXPORT_C TInt CSbcEncoderIntfcCI::GetSamplingFrequency( - TUint& aSamplingFrequency) - { - aSamplingFrequency = iCurrentSamplingFrequency; - -#ifdef _DEBUG - RDebug::Print(_L("CSbcEncoderIntfcCI::GetSamplingFrequency [%d]"), - iCurrentSamplingFrequency); -#endif - return KErrNone; - } - -/* - * CSbcEncoderIntfcCI::SetChannelMode - * Sets new channel mode. - * (other items were commented in a header). - */ -EXPORT_C void CSbcEncoderIntfcCI::SetChannelMode(TSbcChannelMode aChannelMode) - { - iChannelMode = aChannelMode; - -#ifdef _DEBUG - RDebug::Print(_L("CSbcEncoderIntfcCI::SetChannelMode [%d]"), iChannelMode); -#endif - } - -/* - * CSbcEncoderIntfcCI::GetChannelMode - * Returns current channel mode. - * (other items were commented in a header). - */ -EXPORT_C TInt CSbcEncoderIntfcCI::GetChannelMode(TSbcChannelMode& aChannelMode) - { - aChannelMode = iCurrentChannelMode; - -#ifdef _DEBUG - RDebug::Print(_L("CSbcEncoderIntfcCI::GetChannelMode [%d]"), - iCurrentChannelMode); -#endif - return KErrNone; - } - -/* - * CSbcEncoderIntfcCI::SetNumOfSubbands - * Sets new number of subbands. - * (other items were commented in a header). - */ -EXPORT_C void CSbcEncoderIntfcCI::SetNumOfSubbands(TUint aNumOfSubbands) - { - iNumOfSubbands = aNumOfSubbands; - -#ifdef _DEBUG - RDebug::Print(_L("CSbcEncoderIntfcCI::SetNumOfSubbands [%d]"), - iNumOfSubbands); -#endif - } - -/* - * CSbcEncoderIntfcCI::GetNumOfSubbands - * Returns current number of subbands. - * (other items were commented in a header). - */ -EXPORT_C TInt CSbcEncoderIntfcCI::GetNumOfSubbands(TUint& aNumOfSubbands) - { - aNumOfSubbands = iCurrentNumOfSubbands; - -#ifdef _DEBUG - RDebug::Print(_L("CSbcEncoderIntfcCI::GetNumOfSubbands [%d]"), - iCurrentNumOfSubbands); -#endif - return KErrNone; - } - -/* - * CSbcEncoderIntfcCI::SetNumOfBlocks - * Sets new number of blocks. - * (other items were commented in a header). - */ -EXPORT_C void CSbcEncoderIntfcCI::SetNumOfBlocks(TUint aNumOfBlocks) - { - iNumOfBlocks = aNumOfBlocks; - -#ifdef _DEBUG - RDebug::Print(_L("CSbcEncoderIntfcCI::SetNumOfBlocks [%d]"), iNumOfBlocks); -#endif - } - -/* - * CSbcEncoderIntfcCI::GetNumOfBlocks - * Returns current number of blocks. - * (other items were commented in a header). - */ -EXPORT_C TInt CSbcEncoderIntfcCI::GetNumOfBlocks(TUint& aNumOfBlocks) - { - aNumOfBlocks = iCurrentNumOfBlocks; - -#ifdef _DEBUG - RDebug::Print(_L("CSbcEncoderIntfcCI::GetNumOfBlocks [%d]"), - iCurrentNumOfBlocks); -#endif - return KErrNone; - } - -/* - * CSbcEncoderIntfcCI::SetAllocationMethod - * Sets new allocation method. - * (other items were commented in a header). - */ -EXPORT_C void CSbcEncoderIntfcCI::SetAllocationMethod( - TSbcAllocationMethod aAllocationMethod) - { - iAllocationMethod = aAllocationMethod; - -#ifdef _DEBUG - RDebug::Print(_L("CSbcEncoderIntfcCI::SetAllocationMethod [%d]"), - iAllocationMethod); -#endif - } - -/* - * CSbcEncoderIntfcCI::GetAllocationMethod - * Returns current allocation method. - * (other items were commented in a header). - */ -EXPORT_C TInt CSbcEncoderIntfcCI::GetAllocationMethod( - TSbcAllocationMethod& aAllocationMethod) - { - aAllocationMethod = iCurrentAllocationMethod; - -#ifdef _DEBUG - RDebug::Print(_L("CSbcEncoderIntfcCI::GetAllocationMethod [%d]"), - iCurrentAllocationMethod); -#endif - return KErrNone; - } - -/* - * CSbcEncoderIntfcCI::SetBitpoolSize - * Sets new bitpool size. - * (other items were commented in a header). - */ -EXPORT_C void CSbcEncoderIntfcCI::SetBitpoolSize(TUint aBitpoolSize) - { - iBitpoolSize = aBitpoolSize; - -#ifdef _DEBUG - RDebug::Print(_L("CSbcEncoderIntfcCI::SetBitpoolSize [%d]"), iBitpoolSize); -#endif - } - -/* - * CSbcEncoderIntfcCI::GetBitpoolSize - * Returns current bitpool size. - * (other items were commented in a header). - */ -EXPORT_C TInt CSbcEncoderIntfcCI::GetBitpoolSize(TUint& aBitpoolSize) - { - aBitpoolSize = iCurrentBitpoolSize; - -#ifdef _DEBUG - RDebug::Print(_L("CSbcEncoderIntfcCI::GetBitpoolSize [%d]"), - iCurrentBitpoolSize); -#endif - return KErrNone; - } - -/* - * CSbcEncoderIntfcCI::ApplyConfig - * Commits new configutaion settings. - * (other items were commented in a header). - */ -EXPORT_C TInt CSbcEncoderIntfcCI::ApplyConfig() - { - iCurrentSamplingFrequency = iSamplingFrequency; - iCurrentChannelMode = iChannelMode; - iCurrentNumOfSubbands = iNumOfSubbands; - iCurrentNumOfBlocks = iNumOfBlocks; - iCurrentAllocationMethod = iAllocationMethod; - iCurrentBitpoolSize = iBitpoolSize; - -#ifdef _DEBUG - RDebug::Print(_L("CSbcEncoderIntfcCI::ApplyConfig - SBC config applied")); -#endif - return KErrNone; - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/speechencoderconfigcistub/BWINS/SpeechEncoderConfigCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/speechencoderconfigcistub/BWINS/SpeechEncoderConfigCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -EXPORTS - ??1CSpeechEncoderConfigCI@@UAE@XZ @ 1 NONAME ; CSpeechEncoderConfigCI::~CSpeechEncoderConfigCI(void) - ?GetBitrate@CSpeechEncoderConfigCI@@UAEHAAI@Z @ 2 NONAME ; int CSpeechEncoderConfigCI::GetBitrate(unsigned int &) - ?GetSupportedBitrates@CSpeechEncoderConfigCI@@UAEHAAV?$RArray@I@@@Z @ 3 NONAME ; int CSpeechEncoderConfigCI::GetSupportedBitrates(class RArray &) - ?GetVadMode@CSpeechEncoderConfigCI@@UAEHAAH@Z @ 4 NONAME ; int CSpeechEncoderConfigCI::GetVadMode(int &) - ?NewL@CSpeechEncoderConfigCI@@SAPAV1@XZ @ 5 NONAME ; class CSpeechEncoderConfigCI * CSpeechEncoderConfigCI::NewL(void) - ?SetBitrate@CSpeechEncoderConfigCI@@UAEHI@Z @ 6 NONAME ; int CSpeechEncoderConfigCI::SetBitrate(unsigned int) - ?SetVadMode@CSpeechEncoderConfigCI@@UAEHH@Z @ 7 NONAME ; int CSpeechEncoderConfigCI::SetVadMode(int) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/speechencoderconfigcistub/EABI/SpeechEncoderConfigCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/speechencoderconfigcistub/EABI/SpeechEncoderConfigCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -EXPORTS - _ZN22CSpeechEncoderConfigCI10GetBitrateERj @ 1 NONAME - _ZN22CSpeechEncoderConfigCI10GetVadModeERi @ 2 NONAME - _ZN22CSpeechEncoderConfigCI10SetBitrateEj @ 3 NONAME - _ZN22CSpeechEncoderConfigCI10SetVadModeEi @ 4 NONAME - _ZN22CSpeechEncoderConfigCI20GetSupportedBitratesER6RArrayIjE @ 5 NONAME - _ZN22CSpeechEncoderConfigCI4NewLEv @ 6 NONAME - _ZN22CSpeechEncoderConfigCID0Ev @ 7 NONAME - _ZN22CSpeechEncoderConfigCID1Ev @ 8 NONAME - _ZN22CSpeechEncoderConfigCID2Ev @ 9 NONAME - _ZTI22CSpeechEncoderConfigCI @ 10 NONAME ; ## - _ZTV22CSpeechEncoderConfigCI @ 11 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/speechencoderconfigcistub/group/SpeechEncoderConfigCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/speechencoderconfigcistub/group/SpeechEncoderConfigCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* Version : %version: bh1mmcf#14 % -* -*/ - - -#include - -TARGET SpeechEncoderConfigCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207B0B - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE SpeechEncoderConfigCIStub.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../inc -USERINCLUDE ../../../inc - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server -SYSTEMINCLUDE ../inc - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY SpeechEncoderConfigCI.lib - -LINKAS SpeechEncoderConfigCI.dll - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/speechencoderconfigcistub/group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/speechencoderconfigcistub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for speech encoder custom interface -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -SpeechEncoderConfigCIStub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/speechencoderconfigcistub/src/SpeechEncoderConfigCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/speechencoderconfigcistub/src/SpeechEncoderConfigCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,154 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - - -// INCLUDE FILES -#include "SpeechEncoderConfigCI.h" -#include - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CSpeechEncoderConfigCI::CSpeechEncoderConfigCI -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CSpeechEncoderConfigCI::CSpeechEncoderConfigCI() - { - - } - -// ----------------------------------------------------------------------------- -// CSpeechEncoderConfigCI::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CSpeechEncoderConfigCI::ConstructL() - { - - } - -// ----------------------------------------------------------------------------- -// CSpeechEncoderConfigCI::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CSpeechEncoderConfigCI* CSpeechEncoderConfigCI::NewL() - { - CSpeechEncoderConfigCI* self = new (ELeave)CSpeechEncoderConfigCI; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - -// Destructor -EXPORT_C CSpeechEncoderConfigCI::~CSpeechEncoderConfigCI() - { - - } - -// ----------------------------------------------------------------------------- -// CSpeechEncoderConfigCI::GetSupportedBitrates -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CSpeechEncoderConfigCI::GetSupportedBitrates(RArray& aSupportedBitrates) - { - aSupportedBitrates.Reset(); - aSupportedBitrates.Append(8000); - aSupportedBitrates.Append(16000); - aSupportedBitrates.Append(44100); - aSupportedBitrates.Append(48000); - RDebug::Print(_L("CSpeechEncoderConfigCI::GetSupportedBitrates")); - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// CSpeechEncoderConfigCI::SetBitrate -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CSpeechEncoderConfigCI::SetBitrate(TUint aBitrate) - { - iBitrate = aBitrate; - RDebug::Print(_L("CSpeechEncoderConfigCI::SetBitrate bitrate[%d]"), iBitrate); - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// CSpeechEncoderConfigCI::GetBitrate -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CSpeechEncoderConfigCI::GetBitrate(TUint& aBitrate) - { - aBitrate = iBitrate; - RDebug::Print(_L("CSpeechEncoderConfigCI::GetBitrate bitrate[%d]"), aBitrate); - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// CSpeechEncoderConfigCI::SetVadMode -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CSpeechEncoderConfigCI::SetVadMode(TBool aVadMode) - { - iVadMode = aVadMode; - RDebug::Print(_L("CSpeechEncoderConfigCI::SetVadMode VAD mode[%d]"), iVadMode); - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// CSpeechEncoderConfigCI::GetVadMode -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CSpeechEncoderConfigCI::GetVadMode(TBool& aVadMode) - { - aVadMode = iVadMode; - RDebug::Print(_L("CSpeechEncoderConfigCI::GetVadMode VAD mode[%d]"), aVadMode); - return KErrNone; - } - - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/wmadecodercintfccistub/BWINS/WmaDecoderIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/wmadecodercintfccistub/BWINS/WmaDecoderIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -EXPORTS - ??1CWmaDecoderIntfcCI@@UAE@XZ @ 1 NONAME ; CWmaDecoderIntfcCI::~CWmaDecoderIntfcCI(void) - ?ApplyConfig@CWmaDecoderIntfcCI@@UAEHXZ @ 2 NONAME ; int CWmaDecoderIntfcCI::ApplyConfig(void) - ?DisableTool@CWmaDecoderIntfcCI@@UAEXW4TTool@CWmaDecoderIntfc@@@Z @ 3 NONAME ; void CWmaDecoderIntfcCI::DisableTool(enum CWmaDecoderIntfc::TTool) - ?EnableTool@CWmaDecoderIntfcCI@@UAEXW4TTool@CWmaDecoderIntfc@@@Z @ 4 NONAME ; void CWmaDecoderIntfcCI::EnableTool(enum CWmaDecoderIntfc::TTool) - ?GetAvgBytesPerSec@CWmaDecoderIntfcCI@@UAEHAAI@Z @ 5 NONAME ; int CWmaDecoderIntfcCI::GetAvgBytesPerSec(unsigned int &) - ?GetBitsPerSampleIn@CWmaDecoderIntfcCI@@UAEHAAI@Z @ 6 NONAME ; int CWmaDecoderIntfcCI::GetBitsPerSampleIn(unsigned int &) - ?GetBlockAlign@CWmaDecoderIntfcCI@@UAEHAAI@Z @ 7 NONAME ; int CWmaDecoderIntfcCI::GetBlockAlign(unsigned int &) - ?GetChannelMaskIn@CWmaDecoderIntfcCI@@UAEHAAI@Z @ 8 NONAME ; int CWmaDecoderIntfcCI::GetChannelMaskIn(unsigned int &) - ?GetControllableTools@CWmaDecoderIntfcCI@@UAEHAAV?$RArray@W4TTool@CWmaDecoderIntfc@@@@@Z @ 9 NONAME ; int CWmaDecoderIntfcCI::GetControllableTools(class RArray &) - ?GetEncodeOptions1@CWmaDecoderIntfcCI@@UAEHAAI@Z @ 10 NONAME ; int CWmaDecoderIntfcCI::GetEncodeOptions1(unsigned int &) - ?GetEncodeOptions2@CWmaDecoderIntfcCI@@UAEHAAI@Z @ 11 NONAME ; int CWmaDecoderIntfcCI::GetEncodeOptions2(unsigned int &) - ?GetEncodeOptions@CWmaDecoderIntfcCI@@UAEHAAI@Z @ 12 NONAME ; int CWmaDecoderIntfcCI::GetEncodeOptions(unsigned int &) - ?GetFormat@CWmaDecoderIntfcCI@@UAEHAAW4TFormat@CWmaDecoderIntfc@@@Z @ 13 NONAME ; int CWmaDecoderIntfcCI::GetFormat(enum CWmaDecoderIntfc::TFormat &) - ?GetNumOfChannelsIn@CWmaDecoderIntfcCI@@UAEHAAI@Z @ 14 NONAME ; int CWmaDecoderIntfcCI::GetNumOfChannelsIn(unsigned int &) - ?GetSamplesPerSec@CWmaDecoderIntfcCI@@UAEHAAI@Z @ 15 NONAME ; int CWmaDecoderIntfcCI::GetSamplesPerSec(unsigned int &) - ?GetSupportedFormats@CWmaDecoderIntfcCI@@UAEHAAV?$RArray@W4TFormat@CWmaDecoderIntfc@@@@@Z @ 16 NONAME ; int CWmaDecoderIntfcCI::GetSupportedFormats(class RArray &) - ?GetSupportedMaxBitrate@CWmaDecoderIntfcCI@@UAEHAAI@Z @ 17 NONAME ; int CWmaDecoderIntfcCI::GetSupportedMaxBitrate(unsigned int &) - ?GetSupportedMaxChannelsIn@CWmaDecoderIntfcCI@@UAEHAAI@Z @ 18 NONAME ; int CWmaDecoderIntfcCI::GetSupportedMaxChannelsIn(unsigned int &) - ?GetSupportedMaxSampleRate@CWmaDecoderIntfcCI@@UAEHAAI@Z @ 19 NONAME ; int CWmaDecoderIntfcCI::GetSupportedMaxSampleRate(unsigned int &) - ?GetSupportedTools@CWmaDecoderIntfcCI@@UAEHAAV?$RArray@W4TTool@CWmaDecoderIntfc@@@@@Z @ 20 NONAME ; int CWmaDecoderIntfcCI::GetSupportedTools(class RArray &) - ?GetTool@CWmaDecoderIntfcCI@@UAEHW4TTool@CWmaDecoderIntfc@@AAH@Z @ 21 NONAME ; int CWmaDecoderIntfcCI::GetTool(enum CWmaDecoderIntfc::TTool, int &) - ?NewL@CWmaDecoderIntfcCI@@SAPAV1@XZ @ 22 NONAME ; class CWmaDecoderIntfcCI * CWmaDecoderIntfcCI::NewL(void) - ?SetAvgBytesPerSec@CWmaDecoderIntfcCI@@UAEXI@Z @ 23 NONAME ; void CWmaDecoderIntfcCI::SetAvgBytesPerSec(unsigned int) - ?SetBitsPerSampleIn@CWmaDecoderIntfcCI@@UAEXI@Z @ 24 NONAME ; void CWmaDecoderIntfcCI::SetBitsPerSampleIn(unsigned int) - ?SetBlockAlign@CWmaDecoderIntfcCI@@UAEXI@Z @ 25 NONAME ; void CWmaDecoderIntfcCI::SetBlockAlign(unsigned int) - ?SetChannelMaskIn@CWmaDecoderIntfcCI@@UAEXI@Z @ 26 NONAME ; void CWmaDecoderIntfcCI::SetChannelMaskIn(unsigned int) - ?SetEncodeOptions1@CWmaDecoderIntfcCI@@UAEXI@Z @ 27 NONAME ; void CWmaDecoderIntfcCI::SetEncodeOptions1(unsigned int) - ?SetEncodeOptions2@CWmaDecoderIntfcCI@@UAEXI@Z @ 28 NONAME ; void CWmaDecoderIntfcCI::SetEncodeOptions2(unsigned int) - ?SetEncodeOptions@CWmaDecoderIntfcCI@@UAEXI@Z @ 29 NONAME ; void CWmaDecoderIntfcCI::SetEncodeOptions(unsigned int) - ?SetFormat@CWmaDecoderIntfcCI@@UAEXW4TFormat@CWmaDecoderIntfc@@@Z @ 30 NONAME ; void CWmaDecoderIntfcCI::SetFormat(enum CWmaDecoderIntfc::TFormat) - ?SetNumChannelsIn@CWmaDecoderIntfcCI@@UAEXI@Z @ 31 NONAME ; void CWmaDecoderIntfcCI::SetNumChannelsIn(unsigned int) - ?SetSamplesPerSec@CWmaDecoderIntfcCI@@UAEXI@Z @ 32 NONAME ; void CWmaDecoderIntfcCI::SetSamplesPerSec(unsigned int) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/wmadecodercintfccistub/EABI/WmaDecoderIntfcCIu.def --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/wmadecodercintfccistub/EABI/WmaDecoderIntfcCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -EXPORTS - _ZN18CWmaDecoderIntfcCI10EnableToolEN16CWmaDecoderIntfc5TToolE @ 1 NONAME - _ZN18CWmaDecoderIntfcCI11ApplyConfigEv @ 2 NONAME - _ZN18CWmaDecoderIntfcCI11DisableToolEN16CWmaDecoderIntfc5TToolE @ 3 NONAME - _ZN18CWmaDecoderIntfcCI13GetBlockAlignERj @ 4 NONAME - _ZN18CWmaDecoderIntfcCI13SetBlockAlignEj @ 5 NONAME - _ZN18CWmaDecoderIntfcCI16GetChannelMaskInERj @ 6 NONAME - _ZN18CWmaDecoderIntfcCI16GetEncodeOptionsERj @ 7 NONAME - _ZN18CWmaDecoderIntfcCI16GetSamplesPerSecERj @ 8 NONAME - _ZN18CWmaDecoderIntfcCI16SetChannelMaskInEj @ 9 NONAME - _ZN18CWmaDecoderIntfcCI16SetEncodeOptionsEj @ 10 NONAME - _ZN18CWmaDecoderIntfcCI16SetNumChannelsInEj @ 11 NONAME - _ZN18CWmaDecoderIntfcCI16SetSamplesPerSecEj @ 12 NONAME - _ZN18CWmaDecoderIntfcCI17GetAvgBytesPerSecERj @ 13 NONAME - _ZN18CWmaDecoderIntfcCI17GetEncodeOptions1ERj @ 14 NONAME - _ZN18CWmaDecoderIntfcCI17GetEncodeOptions2ERj @ 15 NONAME - _ZN18CWmaDecoderIntfcCI17GetSupportedToolsER6RArrayIN16CWmaDecoderIntfc5TToolEE @ 16 NONAME - _ZN18CWmaDecoderIntfcCI17SetAvgBytesPerSecEj @ 17 NONAME - _ZN18CWmaDecoderIntfcCI17SetEncodeOptions1Ej @ 18 NONAME - _ZN18CWmaDecoderIntfcCI17SetEncodeOptions2Ej @ 19 NONAME - _ZN18CWmaDecoderIntfcCI18GetBitsPerSampleInERj @ 20 NONAME - _ZN18CWmaDecoderIntfcCI18GetNumOfChannelsInERj @ 21 NONAME - _ZN18CWmaDecoderIntfcCI18SetBitsPerSampleInEj @ 22 NONAME - _ZN18CWmaDecoderIntfcCI19GetSupportedFormatsER6RArrayIN16CWmaDecoderIntfc7TFormatEE @ 23 NONAME - _ZN18CWmaDecoderIntfcCI20GetControllableToolsER6RArrayIN16CWmaDecoderIntfc5TToolEE @ 24 NONAME - _ZN18CWmaDecoderIntfcCI22GetSupportedMaxBitrateERj @ 25 NONAME - _ZN18CWmaDecoderIntfcCI25GetSupportedMaxChannelsInERj @ 26 NONAME - _ZN18CWmaDecoderIntfcCI25GetSupportedMaxSampleRateERj @ 27 NONAME - _ZN18CWmaDecoderIntfcCI4NewLEv @ 28 NONAME - _ZN18CWmaDecoderIntfcCI7GetToolEN16CWmaDecoderIntfc5TToolERi @ 29 NONAME - _ZN18CWmaDecoderIntfcCI9GetFormatERN16CWmaDecoderIntfc7TFormatE @ 30 NONAME - _ZN18CWmaDecoderIntfcCI9SetFormatEN16CWmaDecoderIntfc7TFormatE @ 31 NONAME - _ZN18CWmaDecoderIntfcCID0Ev @ 32 NONAME - _ZN18CWmaDecoderIntfcCID1Ev @ 33 NONAME - _ZN18CWmaDecoderIntfcCID2Ev @ 34 NONAME - _ZTI18CWmaDecoderIntfcCI @ 35 NONAME ; ## - _ZTV18CWmaDecoderIntfcCI @ 36 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/wmadecodercintfccistub/group/WmaDecoderintfcStub.mmp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/wmadecodercintfccistub/group/WmaDecoderintfcStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* Version : %version: bh1mmcf#3.1.7 % -* -*/ - - -#include - -TARGET WmaDecoderIntfcCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207BAE - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE WmaDecoderIntfcCIStub.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../inc -USERINCLUDE ../../../inc - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -//EXPORTLIBRARY WmaDecoderIntfc_CI.lib - -LINKAS WmaDecoderIntfcCI.dll - -// End of files diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/wmadecodercintfccistub/group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/wmadecodercintfccistub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for AAC decoder config custom interface -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -WmaDecoderintfcStub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiocodeccistubs/wmadecodercintfccistub/src/WmaDecoderIntfcCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audiocodeccistubs/wmadecodercintfccistub/src/WmaDecoderIntfcCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,707 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - - -// INCLUDE FILES -#include "WmaDecoderIntfcCI.h" -#include - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CWmaDecoderIntfcCI::CWmaDecoderIntfcCI -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CWmaDecoderIntfcCI::CWmaDecoderIntfcCI() - { - - } - -// ----------------------------------------------------------------------------- -// CWmaDecoderIntfcCI::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CWmaDecoderIntfcCI::ConstructL() - { - iCurrentFormat = EWma; - iCurrentBitsPerSample = 8; - iCurrentNumChannelsIn = 2; - iCurrentSamplesPerSec = 4600; - iCurrentAvgBytesPerSec = 3600; - iCurrentBlockAlign = 4945; - iCurrentEncodeOptions = 5; - iCurrentEncodeOptions1 = 5; - iCurrentEncodeOptions2 = 5; - - iCurrentChannelMask = 2; - iCurrentSupportedMaxSampleRate = 8900; - iCurrentSupportedMaxChannelsIn = 5678; - iCurrentSupportedMaxBitrate = 4356; - iCurrentEnable = CWmaDecoderIntfc::EToolOutput32Bit; - iCurrentDisable = CWmaDecoderIntfc::EDownMixToStereo; -/* - iSupportedFormats.Append(EWma); - iSupportedFormats.Append(EWmaPro); - - iSupportedTools.Append(EDownMixToStereo); - iSupportedTools.Append(ELostDataConcealment); - iSupportedTools.Append(EToolOutput32Bit); - - iControllableTools.Append(EToolOutput32Bit); - iControllableTools.Append(EDownMixToStereo); - iControllableTools.Append(EToolOutput32Bit); - iControllableTools.Append(ELostDataConcealment); - */ - - iCurrentSupportedFormats.Append(EWma); - iCurrentSupportedFormats.Append(EWmaPro); - - iCurrentSupportedTools.Append(EDownMixToStereo); - iCurrentSupportedTools.Append(ELostDataConcealment); - // iCurrentSupportedTools.Append(EToolOutput32Bit); - - iCurrentControllableTools.Append(EToolOutput32Bit); - // iCurrentControllableTools.Append(EDownMixToStereo); - //iCurrentControllableTools.Append(EToolOutput32Bit); - // iCurrentControllableTools.Append(ELostDataConcealment); - - // iCurrentControllableTools; - - - } - -// ----------------------------------------------------------------------------- -// CWmaDecoderIntfcCI::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CWmaDecoderIntfcCI* CWmaDecoderIntfcCI::NewL() - { - CWmaDecoderIntfcCI* self = new (ELeave)CWmaDecoderIntfcCI; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - -// Destructor -EXPORT_C CWmaDecoderIntfcCI::~CWmaDecoderIntfcCI() - { - iCurrentSupportedFormats.Close(); - iCurrentSupportedTools.Close(); - iCurrentControllableTools.Close(); -/* - iSupportedFormats.Close(); - iSupportedTools.Close(); - iControllableTools.Close(); - */ - } - -// ----------------------------------------------------------------------------- -// CWmaDecoderIntfcCI::SetAudioConfig -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -// From CWmaDecoderIntfc -/** - * Configures format. - * - */ -EXPORT_C void CWmaDecoderIntfcCI::SetFormat(TFormat aFormat) - { - iCurrentFormat = aFormat; - } - -/** - * Configures decoder's bits per sample. - * - */ -EXPORT_C void CWmaDecoderIntfcCI::SetBitsPerSampleIn(TUint aBitsPerSample) - { - iCurrentBitsPerSample = aBitsPerSample; - } - -/** - * Configures decoder's number of channels. - * - */ -EXPORT_C void CWmaDecoderIntfcCI::SetNumChannelsIn (TUint aNumChannelsIn) - { - iCurrentNumChannelsIn = aNumChannelsIn; - } - -/** - * Configures decoder's sample rate. - * - */ -EXPORT_C void CWmaDecoderIntfcCI::SetSamplesPerSec (TUint aSamplesPerSec) - { - iCurrentSamplesPerSec = aSamplesPerSec; - } - -/** - * Configures decoder's average bytes per second. - * - */ -EXPORT_C void CWmaDecoderIntfcCI::SetAvgBytesPerSec (TUint aAvgBytesPerSec) - { - iCurrentAvgBytesPerSec = aAvgBytesPerSec; - } - -/** - * Configures decoder's block align. - * - */ -EXPORT_C void CWmaDecoderIntfcCI::SetBlockAlign (TUint aBlockAlign) - { - iCurrentBlockAlign = aBlockAlign; - } - -/** - * Configures decoder's Encode Options. - * - */ -EXPORT_C void CWmaDecoderIntfcCI::SetEncodeOptions (TUint aEncodeOptions) - { - iCurrentEncodeOptions = aEncodeOptions; - } - -/** - * Configures decoder's Advance Encode Options. - * - */ -EXPORT_C void CWmaDecoderIntfcCI::SetEncodeOptions1 (TUint aEncodeOptions) - { - iCurrentEncodeOptions1 = aEncodeOptions; - } - -/** - * Configures decoder's Advance Encode Options. - * - */ -EXPORT_C void CWmaDecoderIntfcCI::SetEncodeOptions2 (TUint aEncodeOptions) - { - iCurrentEncodeOptions2 = aEncodeOptions; - } - -/** - * Configures decoder's Channel Mask. - * - */ -EXPORT_C void CWmaDecoderIntfcCI::SetChannelMaskIn (TUint aChannelMask) - { - iCurrentChannelMask = aChannelMask; - } - -/** - * Returns decoder's current configured format. - * - */ -EXPORT_C TInt CWmaDecoderIntfcCI::GetFormat (TFormat& aFormat) - { - TInt status = KErrNone; - aFormat = iCurrentFormat; -/* - else if (iApplyConfStatus == KErrNone || iApplyConfStatus == KErrCompletion || - iApplyConfStatus == KErrUnknown || iApplyConfStatus == KErrArgument || - iApplyConfStatus == KErrNotReady || iApplyConfStatus == KErrNotFound) - { - status = iApplyConfStatus; - } - else - { - status = KErrGeneral; - } -*/ - return status; - } - -/** - * Returns configured bits per sample . - * - */ -EXPORT_C TInt CWmaDecoderIntfcCI::GetBitsPerSampleIn(TUint& aBitsPerSample) - { - TInt status = KErrNone; - aBitsPerSample = iCurrentBitsPerSample; -/* - else if (iApplyConfStatus == KErrNone || iApplyConfStatus == KErrCompletion || - iApplyConfStatus == KErrUnknown || iApplyConfStatus == KErrArgument || - iApplyConfStatus == KErrNotReady || iApplyConfStatus == KErrNotFound) - { - status = iApplyConfStatus; - } - else - { - status = KErrGeneral; - } - */ - return status; - } - -/** - * Returns configured number of channels. - * - */ -EXPORT_C TInt CWmaDecoderIntfcCI::GetNumOfChannelsIn (TUint& aNumOfChannels) - { - TInt status = KErrNone; - aNumOfChannels = iCurrentNumChannelsIn; - -/* - else if (iApplyConfStatus == KErrNone || iApplyConfStatus == KErrCompletion || - iApplyConfStatus == KErrUnknown || iApplyConfStatus == KErrArgument || - iApplyConfStatus == KErrNotReady || iApplyConfStatus == KErrNotFound) - { - status = iApplyConfStatus; - } - else - { - status = KErrGeneral; - } - */ - return status; - } - -/** - * Returns configured sample rate. - * - */ -EXPORT_C TInt CWmaDecoderIntfcCI::GetSamplesPerSec (TUint& aSamplesPerSec) - { - TInt status = KErrNone; - aSamplesPerSec = iCurrentSamplesPerSec; -/* - else if (iApplyConfStatus == KErrNone || iApplyConfStatus == KErrCompletion || - iApplyConfStatus == KErrUnknown || iApplyConfStatus == KErrArgument || - iApplyConfStatus == KErrNotReady || iApplyConfStatus == KErrNotFound) - { - status = iApplyConfStatus; - } - else - { - status = KErrGeneral; - } - */ - return status; - } - -/** - * Returns configured average bytes per second. - * - */ -EXPORT_C TInt CWmaDecoderIntfcCI::GetAvgBytesPerSec (TUint& aAvgBytesPerSec) - { - TInt status = KErrNone; - aAvgBytesPerSec = iCurrentAvgBytesPerSec; -/* - else if (iApplyConfStatus == KErrNone || iApplyConfStatus == KErrCompletion || - iApplyConfStatus == KErrUnknown || iApplyConfStatus == KErrArgument || - iApplyConfStatus == KErrNotReady || iApplyConfStatus == KErrNotFound) - { - status = iApplyConfStatus; - } - else - { - status = KErrGeneral; - } - */ - - return status; - } - -/** - * Returns configured block align. - * - */ -EXPORT_C TInt CWmaDecoderIntfcCI::GetBlockAlign (TUint& aBlockAlign) - { - TInt status = KErrNone; - aBlockAlign = iCurrentBlockAlign; -/* - else if (iApplyConfStatus == KErrNone || iApplyConfStatus == KErrCompletion || - iApplyConfStatus == KErrUnknown || iApplyConfStatus == KErrArgument || - iApplyConfStatus == KErrNotReady || iApplyConfStatus == KErrNotFound) - { - status = iApplyConfStatus; - } - else - { - status = KErrGeneral; - } -*/ - return status; - } - -/** - * Returns configured encode options. - * - */ -EXPORT_C TInt CWmaDecoderIntfcCI::GetEncodeOptions (TUint& aEncodeOpts) - { - TInt status = KErrNone; - aEncodeOpts = iCurrentEncodeOptions; -/* - else if (iApplyConfStatus == KErrNone || iApplyConfStatus == KErrCompletion || - iApplyConfStatus == KErrUnknown || iApplyConfStatus == KErrArgument || - iApplyConfStatus == KErrNotReady || iApplyConfStatus == KErrNotFound) - { - status = iApplyConfStatus; - } - else - { - status = KErrGeneral; - } - */ - return status; - } - -/** - * Returns configured advanced encode options. - * - */ -EXPORT_C TInt CWmaDecoderIntfcCI::GetEncodeOptions1 (TUint& aEncodeOpts1) - { - TInt status = KErrNone; - aEncodeOpts1 = iCurrentEncodeOptions1; - -/* - else if (iApplyConfStatus == KErrNone || iApplyConfStatus == KErrCompletion || - iApplyConfStatus == KErrUnknown || iApplyConfStatus == KErrArgument || - iApplyConfStatus == KErrNotReady || iApplyConfStatus == KErrNotFound || - iApplyConfStatus == KErrNotSupported) - { - status = iApplyConfStatus; - } - else - { - status = KErrGeneral; - } -*/ - - return status; - } - - /** - * Returns configured advanced encode options. - * - */ -EXPORT_C TInt CWmaDecoderIntfcCI::GetEncodeOptions2 (TUint& aEncodeOpts2) - { - TInt status = KErrNone; - aEncodeOpts2 = iCurrentEncodeOptions2; - -/* - else if (iApplyConfStatus == KErrNone || iApplyConfStatus == KErrCompletion || - iApplyConfStatus == KErrUnknown || iApplyConfStatus == KErrArgument || - iApplyConfStatus == KErrNotReady || iApplyConfStatus == KErrNotFound || - iApplyConfStatus == KErrNotSupported) - { - status = iApplyConfStatus; - } - else - { - status = KErrGeneral; - } -*/ - - return status; - } - -/** - * Returns configured channel mask. - * - */ -EXPORT_C TInt CWmaDecoderIntfcCI::GetChannelMaskIn (TUint& aChannelMask) - { - TInt status = KErrNone; - aChannelMask = iCurrentChannelMask; -/* - else if (iApplyConfStatus == KErrNone || iApplyConfStatus == KErrCompletion || - iApplyConfStatus == KErrUnknown || iApplyConfStatus == KErrArgument || - iApplyConfStatus == KErrNotReady || iApplyConfStatus == KErrNotFound || - iApplyConfStatus == KErrNotSupported) - { - status = iApplyConfStatus; - } - else - { - status = KErrGeneral; - } -*/ - return status; - } - -/** - * Returns supported formats. - * - */ -EXPORT_C TInt CWmaDecoderIntfcCI::GetSupportedFormats(RArray& aSupportedFormats) - { - TInt status = KErrNone; - TInt num = iCurrentSupportedFormats.Count(); - aSupportedFormats.Reset(); - for (int i = 0; i < num; ++i) - { - aSupportedFormats.Append(iCurrentSupportedFormats[i]); - - } - return status; - } - - -/** - * Returns supported tools. - * - */ -EXPORT_C TInt CWmaDecoderIntfcCI::GetSupportedTools(RArray& aSupportedTools) - { - TInt status = KErrNone; - TInt num = iCurrentSupportedTools.Count(); - aSupportedTools.Reset(); - for (int i = 0; i < num; ++i) - { - aSupportedTools.Append(iCurrentSupportedTools[i]); - - } - return status; - } - -/** - * Returns supported max number of channels. - * - */ -EXPORT_C TInt CWmaDecoderIntfcCI::GetSupportedMaxChannelsIn(TUint& aSupportedMaxChannelsIn) - { - TInt status = KErrNone; - aSupportedMaxChannelsIn = iCurrentSupportedMaxChannelsIn; - return status; - } - -/** - * Returns supported max bit rate. - * - */ -EXPORT_C TInt CWmaDecoderIntfcCI::GetSupportedMaxBitrate(TUint& aSupportedMaxBitrate) - { - TInt status = KErrNone; - aSupportedMaxBitrate = iCurrentSupportedMaxBitrate; - return status; - } - -/** - * Returns supported max sample rate. - * - */ -EXPORT_C TInt CWmaDecoderIntfcCI::GetSupportedMaxSampleRate(TUint& aSupportedMaxSampleRate) - { - TInt status = KErrNone; - aSupportedMaxSampleRate = iCurrentSupportedMaxSampleRate; - return status; - } - -/** - * Returns controllable tools. - * - */ -EXPORT_C TInt CWmaDecoderIntfcCI::GetControllableTools(RArray& aControllableTools) - { - TInt status = KErrNone; - TInt num = iCurrentControllableTools.Count(); - aControllableTools.Reset(); - for (int i = 0; i < num; ++i) - { - aControllableTools.Append(iCurrentControllableTools[i]); - - } - return status; - } - -/** - * Enable tool. - * - */ -EXPORT_C void CWmaDecoderIntfcCI::EnableTool(TTool aTool) - { - switch (aTool) - { - case EToolOutput32Bit: - iCurrentToolOutPut32Bit = ETrue; - break; - case EDownMixToStereo: - iCurrentToolDownMixToStereo = ETrue; - break; - case ELostDataConcealment: - iCurrentToolLostDataConcealment = ETrue; - break; - default: - break; - } - } -/** - * disable tool. - * - */ -EXPORT_C void CWmaDecoderIntfcCI::DisableTool(TTool aTool) - { - switch (aTool) - { - case EToolOutput32Bit: - iCurrentToolOutPut32Bit = EFalse; - break; - case EDownMixToStereo: - iCurrentToolDownMixToStereo = EFalse; - break; - case ELostDataConcealment: - iCurrentToolLostDataConcealment = EFalse; - break; - default: - break; - } - } - - -/** - * Returns tool state. - * - */ -EXPORT_C TInt CWmaDecoderIntfcCI::GetTool(TTool aTool, TBool& aEnabled) - { - - TInt status = KErrNone; - switch (aTool) - { - case EToolOutput32Bit: - if (iCurrentToolOutPut32Bit) - { - aEnabled = ETrue; - } - else - { - aEnabled = EFalse; - } - break; - - case EDownMixToStereo: - if (iCurrentToolDownMixToStereo) - { - aEnabled = ETrue; - } - else - { - aEnabled = EFalse; - } - break; - - case ELostDataConcealment: - if (iCurrentToolLostDataConcealment) - { - aEnabled = ETrue; - } - else - { - aEnabled = EFalse; - } - break; - default: - break; - } - -return status; -} - -/** - * Applies configuration settings to the decoder. - * - */ -EXPORT_C TInt CWmaDecoderIntfcCI::ApplyConfig() - { - iCurrentFormat = iFormat; - iCurrentBitsPerSample = iBitsPerSample; - iCurrentNumChannelsIn = iNumChannelsIn; - iCurrentSamplesPerSec = iSamplesPerSec; - iCurrentAvgBytesPerSec = iAvgBytesPerSec; - iCurrentBlockAlign = iBlockAlign; - iCurrentEncodeOptions = iEncodeOptions; - - iCurrentEncodeOptions1 = iEncodeOptions1; - iCurrentEncodeOptions2 = iEncodeOptions2; - - iCurrentChannelMask = iChannelMask; - iCurrentSupportedMaxSampleRate = iSupportedMaxSampleRate; - iCurrentSupportedMaxChannelsIn = iSupportedMaxChannelsIn; - iCurrentSupportedMaxBitrate = iSupportedMaxBitrate; - iCurrentEnable = iEnable; - iCurrentDisable = iDisable; - - iCurrentToolOutPut32Bit = iToolOutPut32Bit; - iCurrentToolDownMixToStereo = iToolDownMixToStereo; - iCurrentToolLostDataConcealment = iToolLostDataConcealment; - - - return KErrNone; - } - - -/* - iCurrentFormat = EWma; - iCurrentBitsPerSample = 8; - iCurrentNumChannelsIn = 2; - iCurrentSamplesPerSec = 4600; - iCurrentAvgBytesPerSec = 3600; - iCurrentBlockAlign = 4945; - iCurrentEncodeOptions = 5; - iCurrentEncodeOptions1 = 5; - iCurrentEncodeOptions2 = 5; - - iCurrentChannelMask = 2; - iCurrentSupportedMaxSampleRate = 8900; - iCurrentSupportedMaxChannelsIn = 5678; - iCurrentSupportedMaxBitrate = 4356; - iCurrentEnable = CWmaDecoderIntfc::EToolOutput32Bit; - iCurrentDisable = CWmaDecoderIntfc::EDownMixToStereo; - - iCurrentSupportedFormats[0] = EWma; - iCurrentSupportedFormats[1] = EWmaPro; - - iCurrentSupportedTools[0] = EToolOutput32Bit; - iCurrentSupportedTools[1] = EToolOutput32Bit; - iCurrentSupportedTools[2] = EToolOutput32Bit; -*/ diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/audioequalizercistub/BWINS/AUDIOEQUALIZERCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/audioequalizercistub/BWINS/AUDIOEQUALIZERCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - ?NewL@CAudioEqualizerCI@@SAPAV1@AAVCMMFDevSound@@@Z @ 1 NONAME ; class CAudioEqualizerCI * CAudioEqualizerCI::NewL(class CMMFDevSound &) - ?NewL@CAudioEqualizerCI@@SAPAV1@XZ @ 2 NONAME ; class CAudioEqualizerCI * CAudioEqualizerCI::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/audioequalizercistub/EABI/AudioEqualizerCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/audioequalizercistub/EABI/AudioEqualizerCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - _ZN17CAudioEqualizerCI4NewLER12CMMFDevSound @ 1 NONAME - _ZTI17CAudioEqualizerCI @ 2 NONAME ; ## - _ZTV17CAudioEqualizerCI @ 3 NONAME ; ## - _ZN17CAudioEqualizerCI4NewLEv @ 4 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/audioequalizercistub/Group/AudioEqualizerCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/audioequalizercistub/Group/AudioEqualizerCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project file for Equalizer Effect Custom Interface STUB. -* -* -*/ - - -#include - -TARGET AudioEqualizerCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10203839 - - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - - -SOURCEPATH ../src -SOURCE AudioEqualizerCIStub.cpp - -USERINCLUDE ../inc ../src - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common - - -LIBRARY euser.lib -LIBRARY EffectBase.lib -LIBRARY AudioEqualizerEffect.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY AudioEqualizerCI.lib - -LINKAS AudioEqualizerCI.dll - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/audioequalizercistub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/audioequalizercistub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for adaptation custom interface stub -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -AudioEqualizerCIStub.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/audioequalizercistub/inc/AudioEqualizerCI.h --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/audioequalizercistub/inc/AudioEqualizerCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - This is the definition of the AudioEqualizer Custom Interface class. -* -* -*/ - - -#include -#include - -class CMMFDevSound; - -class CAudioEqualizerCI : public CAudioEqualizer - { - public: // Constructor and Destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CAudioEqualizerCI* NewL(CMMFDevSound& aDevSound); - - /** - * Destructor. - */ - virtual ~CAudioEqualizerCI(); - - /** - * From CAudioEffect - * Apply effect settings - * @since 3.0 - */ - virtual void ApplyL(); - - IMPORT_C static CAudioEqualizerCI* NewL(); - - private: - - /** - * C++ default constructor. - */ - CAudioEqualizerCI(CMMFDevSound& aDevSound); - CAudioEqualizerCI(); - - private: // Data - - CMMFDevSound* iDevSound; - }; diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/audioequalizercistub/src/AudioEqualizerCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/audioequalizercistub/src/AudioEqualizerCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,111 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Implementation of the AudioEqualizer effect Custom Interface class -* -*/ - - -#ifdef _DEBUG -#include -#endif -#include "AudioEqualizerCI.h" - - -EXPORT_C CAudioEqualizerCI* CAudioEqualizerCI::NewL( - CMMFDevSound& aDevSound ) - { - CAudioEqualizerCI* self = new(ELeave) CAudioEqualizerCI(aDevSound); - return self; - } - -CAudioEqualizerCI::CAudioEqualizerCI( - CMMFDevSound& aDevSound ) - : iDevSound(&aDevSound ) - { - iAudioEqualizerData.iMindB = -20; // Initial value - iAudioEqualizerData.iMaxdB = 20; // Initial value - - TEfAudioEqualizerBand band; - -// for (TInt i=1; i<=8; i++) - - for (TInt i=1; i<=5; i++) { - band.iBandId = i; - band.iBandLevel = 1+i; - band.iBandWidth = 10+i; - band.iCenterFrequency = 20+i; - band.iCrossoverFrequency = 30+i; - - iBandsData.Append(band); - } - - } - -EXPORT_C CAudioEqualizerCI* CAudioEqualizerCI::NewL() - { - CAudioEqualizerCI* self = new(ELeave) CAudioEqualizerCI(); - return self; - } - -CAudioEqualizerCI::CAudioEqualizerCI() - { - iAudioEqualizerData.iMindB = -20; // Initial value - iAudioEqualizerData.iMaxdB = 20; // Initial value - - TEfAudioEqualizerBand band; - -// for (TInt i=1; i<=8; i++) - for (TInt i=1; i<=5; i++) - { - band.iBandId = i; - band.iBandLevel = 1+i; - band.iBandWidth = 10+i; - band.iCenterFrequency = 20+i; - band.iCrossoverFrequency = 30+i; - - iBandsData.Append(band); - } - - } - - -CAudioEqualizerCI::~CAudioEqualizerCI() - { - } - -void CAudioEqualizerCI::ApplyL() - { -#ifdef _DEBUG - RDebug::Print(_L("CAudioEqualizerCI::ApplyL")); -#endif - - if (iObservers.Count() > 0) - { - iAudioEqualizerData.iEnabled = ETrue; - - iBandsData[4].iBandLevel = 99; - iBandsData[4].iBandWidth = 99; - iBandsData[4].iCenterFrequency = 99; - iBandsData[4].iCrossoverFrequency = 99; - - iObservers[0]->EffectChanged(this, (TUint8)MAudioEqualizerObserver::KBand5Changed); - - } - } - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/bassboostcistub/BWINS/BassBoostCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/bassboostcistub/BWINS/BassBoostCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - ?NewL@CBassBoostCI@@SAPAV1@AAVCMMFDevSound@@@Z @ 1 NONAME ; class CBassBoostCI * CBassBoostCI::NewL(class CMMFDevSound &) - ?NewL@CBassBoostCI@@SAPAV1@XZ @ 2 NONAME ; class CBassBoostCI * CBassBoostCI::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/bassboostcistub/EABI/BassBoostCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/bassboostcistub/EABI/BassBoostCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - _ZN12CBassBoostCI4NewLER12CMMFDevSound @ 1 NONAME - _ZTI12CBassBoostCI @ 2 NONAME ; ## - _ZTV12CBassBoostCI @ 3 NONAME ; ## - _ZN12CBassBoostCI4NewLEv @ 4 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/bassboostcistub/Group/BassBoostCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/bassboostcistub/Group/BassBoostCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project file for BassBoost Effect Custom Interface STUB. -* -* -*/ - -#include - -TARGET BassBoostCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207A97 -VENDORID VID_DEFAULT - - -CAPABILITY CAP_GENERAL_DLL - - -SOURCEPATH ../src -SOURCE BassBoostCIStub.cpp - -USERINCLUDE ../inc ../src - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - - -LIBRARY euser.lib -LIBRARY EffectBase.lib -LIBRARY BassBoostEffect.lib -LIBRARY mmfdevsound.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY BassBoostCI.lib - -LINKAS BassBoostCI.dll - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/bassboostcistub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/bassboostcistub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for adaptation custom interface STUB -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -BassBoostCIStub.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/bassboostcistub/inc/BassBoostCI.h --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/bassboostcistub/inc/BassBoostCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - This is the definition of the bassboost Custom Interface class. -* This serves as an example of how adaptation might define the -* custom interface class. -* The CBassBoostCI object is typically instantiated by a DevSound -* instance and return to the client when the CustomInterface() -* method is invoked. -* -* -*/ - - -#include -#include - -class CMMFDevSound; - -class CBassBoostCI : public CBassBoost - { - public: // Constructor and Destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CBassBoostCI* NewL(CMMFDevSound& aDevSound); - - /** - * Destructor. - */ - virtual ~CBassBoostCI(); - - public: // From Base Class - - /** - * From CAudioEffect - * Apply effect settings - * @since 3.0 - */ - virtual void ApplyL(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CBassBoostCI* NewL(); - - private: - - /** - * C++ default constructor. - */ - CBassBoostCI(CMMFDevSound& aDevSound); - CBassBoostCI(); - - private: // Data - - CMMFDevSound* iDevSound; - }; diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/bassboostcistub/src/BassBoostCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/bassboostcistub/src/BassBoostCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Implementation of the bassboost effect Custom Interface class -* -*/ - - -#ifdef _DEBUG -#include // Needed for RDebug Prints -#endif - -#include "BassBoostCI.h" -#include - -// ----------------------------------------------------------------------------- -// CBassBoost::NewL -// Static function for creating an instance of the CBassBoostCI object. -// ----------------------------------------------------------------------------- -// - -EXPORT_C CBassBoostCI* CBassBoostCI::NewL( - CMMFDevSound& aDevSound ) - { - CBassBoostCI* self = new(ELeave) CBassBoostCI(aDevSound); - return self; - } - -CBassBoostCI::CBassBoostCI( - CMMFDevSound& aDevSound ) - : iDevSound(&aDevSound) - { - } - -// ----------------------------------------------------------------------------- -// CBassBoost::NewL -// Static function for creating an instance of the CBassBoostCI object. -// ----------------------------------------------------------------------------- -// - -EXPORT_C CBassBoostCI* CBassBoostCI::NewL() - { - CBassBoostCI* self = new(ELeave) CBassBoostCI(); - return self; - } - -CBassBoostCI::CBassBoostCI() - { - } - -// Destructor - -CBassBoostCI::~CBassBoostCI() - { -#ifdef _DEBUG - RDebug::Print(_L("CBassBoostCI::~CBassBoostCI")); -#endif - } - -// ----------------------------------------------------------------------------- -// CBassBoostCI::ApplyL -// -// Applies the bassboost settings. -// Adaptation must check each settings and take appropriate actions since -// this method might be called after several settings have been made. -// ----------------------------------------------------------------------------- -// -void CBassBoostCI::ApplyL() - { -#ifdef _DEBUG - RDebug::Print(_L("CBassBoostCI::ApplyL")); -#endif - - if ( !HaveUpdateRights() ) - { - User::Leave(KErrAccessDenied); - } - - if ( IsEnabled() ) - { - } - - // The effect change event is simulated by changing the bassboost and - // sending the observer a message indicating bassboost has changed. - // This is done for testing only. - - // The intention of this callback is to notify the observer when the bassboost - // object changes spontaneously. ie the user did not change the settings but - // event somewhere in the system causes the bassboost object to change state. - - if (iObservers.Count() > 0) - { - iObservers[0]->EffectChanged(this, (TUint8)MBassBoostObserver::KBassBoostChanged); - } - } - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/distanceattenuationcistub/BWINS/DistanceAttenuationCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/distanceattenuationcistub/BWINS/DistanceAttenuationCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - ?NewL@CDistanceAttenuationCI@@SAPAV1@AAVCMMFDevSound@@@Z @ 1 NONAME ; class CDistanceAttenuationCI * CDistanceAttenuationCI::NewL(class CMMFDevSound &) - ?NewL@CDistanceAttenuationCI@@SAPAV1@XZ @ 2 NONAME ; class CDistanceAttenuationCI * CDistanceAttenuationCI::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/distanceattenuationcistub/EABI/DistanceAttenuationCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/distanceattenuationcistub/EABI/DistanceAttenuationCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - _ZN22CDistanceAttenuationCI4NewLER12CMMFDevSound @ 1 NONAME - _ZTI22CDistanceAttenuationCI @ 2 NONAME ; ## - _ZTV22CDistanceAttenuationCI @ 3 NONAME ; ## - _ZN22CDistanceAttenuationCI4NewLEv @ 4 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/distanceattenuationcistub/Group/DistanceAttenuationCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/distanceattenuationcistub/Group/DistanceAttenuationCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project file for DistanceAttenuation Custom Interface STUB. -* -* -*/ - - -#include - -TARGET DistanceAttenuationCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207ADC - - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - - -SOURCEPATH ../src -SOURCE DistanceAttenuationCIStub.cpp - -USERINCLUDE ../inc ../src - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common - -LIBRARY euser.lib -LIBRARY EffectBase.lib -LIBRARY DistanceAttenuationEffect.lib - - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY DistanceAttenuationCI.lib - -LINKAS DistanceAttenuationCI.dll - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/distanceattenuationcistub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/distanceattenuationcistub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for adaptation custom interface stub -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -DistanceAttenuationCIStub.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/distanceattenuationcistub/inc/DistanceAttenuationCI.h --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/distanceattenuationcistub/inc/DistanceAttenuationCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - This is the definition of the DistanceAttenuation Custom Interface class. -* -* -*/ - - -#include -#include - -class CMMFDevSound; - -class CDistanceAttenuationCI : public CDistanceAttenuation - { - public: // Constructor and Destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CDistanceAttenuationCI* NewL(CMMFDevSound& aDevSound); - - /** - * Destructor. - */ - virtual ~CDistanceAttenuationCI(); - - /** - * From CAudioEffect - * Apply effect settings - * @since 3.0 - */ - virtual void ApplyL(); - - IMPORT_C static CDistanceAttenuationCI* NewL(); - - private: - - /** - * C++ default constructor. - */ - CDistanceAttenuationCI(CMMFDevSound& aDevSound); - CDistanceAttenuationCI(); - - private: // Data - - CMMFDevSound* iDevSound; - }; diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/distanceattenuationcistub/src/DistanceAttenuationCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/distanceattenuationcistub/src/DistanceAttenuationCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Implementation of the DistanceAttenuation effect Custom Interface class -* -*/ - - -#ifdef _DEBUG -#include -#endif -#include "DistanceAttenuationCI.h" - - -EXPORT_C CDistanceAttenuationCI* CDistanceAttenuationCI::NewL( - CMMFDevSound& aDevSound ) - { - CDistanceAttenuationCI* self = new(ELeave) CDistanceAttenuationCI(aDevSound); - return self; - } - -CDistanceAttenuationCI::CDistanceAttenuationCI( - CMMFDevSound& aDevSound ) - : iDevSound(&aDevSound ) - { - iDistanceAttenuationData.iRMin = 0; - iDistanceAttenuationData.iRMax = 100; - iDistanceAttenuationData.iMuteAfterMax = EFalse; - iDistanceAttenuationData.iRollOffFactor = 100; - iDistanceAttenuationData.iRoomRollOffFactor = 100; - iDistanceAttenuationData.iRollOffFactorMax = 1000; - iDistanceAttenuationData.iRoomRollOffFactorMax = 1000; - - } - -EXPORT_C CDistanceAttenuationCI* CDistanceAttenuationCI::NewL() - { - CDistanceAttenuationCI* self = new(ELeave) CDistanceAttenuationCI(); - return self; - } - -CDistanceAttenuationCI::CDistanceAttenuationCI() - { - iDistanceAttenuationData.iRMin = 0; - iDistanceAttenuationData.iRMax = 100; - iDistanceAttenuationData.iMuteAfterMax = EFalse; - iDistanceAttenuationData.iRollOffFactor = 100; - iDistanceAttenuationData.iRoomRollOffFactor = 100; - iDistanceAttenuationData.iRollOffFactorMax = 1000; - iDistanceAttenuationData.iRoomRollOffFactorMax = 1000; - - } - -CDistanceAttenuationCI::~CDistanceAttenuationCI() - { - } - -void CDistanceAttenuationCI::ApplyL() - { -#ifdef _DEBUG - RDebug::Print(_L("CDistanceAttenuationCI::ApplyL")); -#endif - - if (iObservers.Count() > 0) - { - if(iDistanceAttenuationData.iEnabled) - { - iEnabled = iDistanceAttenuationData.iEnabled; - iObservers[0]->EffectChanged(this, (TUint8)MAudioEffectObserver::KEnabled); - } - else - { - iEnabled = iDistanceAttenuationData.iEnabled; - iObservers[0]->EffectChanged(this, (TUint8)MAudioEffectObserver::KDisabled); - } - - } - } - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - - - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/environmentalreverbcistub/BWINS/EnvironmentalReverbCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/environmentalreverbcistub/BWINS/EnvironmentalReverbCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - ?NewL@CEnvironmentalReverbCI@@SAPAV1@AAVCMMFDevSound@@@Z @ 1 NONAME ; class CEnvironmentalReverbCI * CEnvironmentalReverbCI::NewL(class CMMFDevSound &) - ?NewL@CEnvironmentalReverbCI@@SAPAV1@XZ @ 2 NONAME ; class CEnvironmentalReverbCI * CEnvironmentalReverbCI::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/environmentalreverbcistub/EABI/EnvironmentalReverbCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/environmentalreverbcistub/EABI/EnvironmentalReverbCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - _ZN22CEnvironmentalReverbCI4NewLER12CMMFDevSound @ 1 NONAME - _ZTI22CEnvironmentalReverbCI @ 2 NONAME ; ## - _ZTV22CEnvironmentalReverbCI @ 3 NONAME ; ## - _ZN22CEnvironmentalReverbCI4NewLEv @ 4 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/environmentalreverbcistub/Group/EnvironmentalReverbCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/environmentalreverbcistub/Group/EnvironmentalReverbCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project file for Environmental Reverb Custom Interface STUB. -* -* -*/ - - -#include - -TARGET EnvironmentalReverbCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207A83 - - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - - -SOURCEPATH ../src -SOURCE EnvironmentalReverbCIStub.cpp - -USERINCLUDE ../inc ../src - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common - -LIBRARY euser.lib -LIBRARY EffectBase.lib -LIBRARY EnvironmentalReverbEffect.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY EnvironmentalReverbCI.lib - -LINKAS EnvironmentalReverbCI.dll - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/environmentalreverbcistub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/environmentalreverbcistub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for adaptation custom interface stub -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - - -PRJ_MMPFILES -EnvironmentalReverbCIStub.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/environmentalreverbcistub/inc/EnvironmentalReverbCI.h --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/environmentalreverbcistub/inc/EnvironmentalReverbCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - This is the definition of the EnvironmentalReverb Custom Interface class. -* -* -*/ - - -#include -#include - -class CMMFDevSound; - -class CEnvironmentalReverbCI : public CEnvironmentalReverb - { - public: // Constructor and Destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CEnvironmentalReverbCI* NewL(CMMFDevSound& aDevSound); - - /** - * Destructor. - */ - virtual ~CEnvironmentalReverbCI(); - - /** - * From CAudioEffect - * Apply effect settings - * @since 3.0 - */ - virtual void ApplyL(); - - IMPORT_C static CEnvironmentalReverbCI* NewL(); - - private: - - /** - * C++ default constructor. - */ - CEnvironmentalReverbCI(CMMFDevSound& aDevSound); - CEnvironmentalReverbCI(); - - private: // Data - - CMMFDevSound* iDevSound; - }; diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/environmentalreverbcistub/src/EnvironmentalReverbCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/environmentalreverbcistub/src/EnvironmentalReverbCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,123 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Implementation of the EnvironmentalReverb effect Custom Interface class -* -*/ - - -#ifdef _DEBUG -#include -#endif -#include "EnvironmentalReverbCI.h" - - -EXPORT_C CEnvironmentalReverbCI* CEnvironmentalReverbCI::NewL( - CMMFDevSound& aDevSound ) - { - CEnvironmentalReverbCI* self = new(ELeave) CEnvironmentalReverbCI(aDevSound); - return self; - } - -CEnvironmentalReverbCI::CEnvironmentalReverbCI( - CMMFDevSound& aDevSound ) - : iDevSound(&aDevSound ) - { - iReverbData.iDecayHFRatio = 0; - iReverbData.iDecayHFRatioMin = 0; - iReverbData.iDecayHFRatioMax = 10000; - iReverbData.iDecayTime = 0; - iReverbData.iDecayTimeMin = 0; - iReverbData.iDecayTimeMax = 100000; - iReverbData.iDensity = 0; - iReverbData.iDiffusion = 0; - iReverbData.iReflectionsLevel = 0; - iReverbData.iReflectionLevelMin = 0; - iReverbData.iReflectionLevelMax = 1000; - iReverbData.iReflectionsDelay = 0; - iReverbData.iReflectionsDelayMax = 10000; - iReverbData.iReverbDelay = 0; - iReverbData.iReverbDelayMax = 100000; - iReverbData.iReverbLevel = 0; - iReverbData.iReverbLevelMin = 0; - iReverbData.iReverbLevelMax = 1000; - iReverbData.iRoomHFLevel = 0; - iReverbData.iRoomHFLevelMin = 0; - iReverbData.iRoomHFLevelMax = 1000; - iReverbData.iRoomLevel = 0; - iReverbData.iRoomLevelMin = 0; - iReverbData.iRoomLevelMax = 1000; - iReverbData.iDelayMax = 110000; - iReverbData.iEnvironmentalReverbId = 54; - } - -EXPORT_C CEnvironmentalReverbCI* CEnvironmentalReverbCI::NewL() - { - CEnvironmentalReverbCI* self = new(ELeave) CEnvironmentalReverbCI(); - return self; - } - -CEnvironmentalReverbCI::CEnvironmentalReverbCI() - { - iReverbData.iDecayHFRatio = 0; - iReverbData.iDecayHFRatioMin = 0; - iReverbData.iDecayHFRatioMax = 10000; - iReverbData.iDecayTime = 0; - iReverbData.iDecayTimeMin = 0; - iReverbData.iDecayTimeMax = 100000; - iReverbData.iDensity = 0; - iReverbData.iDiffusion = 0; - iReverbData.iReflectionsLevel = 0; - iReverbData.iReflectionLevelMin = 0; - iReverbData.iReflectionLevelMax = 1000; - iReverbData.iReflectionsDelay = 0; - iReverbData.iReflectionsDelayMax = 10000; - iReverbData.iReverbDelay = 0; - iReverbData.iReverbDelayMax = 100000; - iReverbData.iReverbLevel = 0; - iReverbData.iReverbLevelMin = 0; - iReverbData.iReverbLevelMax = 1000; - iReverbData.iRoomHFLevel = 0; - iReverbData.iRoomHFLevelMin = 0; - iReverbData.iRoomHFLevelMax = 1000; - iReverbData.iRoomLevel = 0; - iReverbData.iRoomLevelMin = 0; - iReverbData.iRoomLevelMax = 1000; - iReverbData.iDelayMax = 110000; - iReverbData.iEnvironmentalReverbId = 54; - } - -CEnvironmentalReverbCI::~CEnvironmentalReverbCI() - { - } - -void CEnvironmentalReverbCI::ApplyL() - { -#ifdef _DEBUG - RDebug::Print(_L("CEnvironmentalReverbCI::ApplyL")); -#endif - - if (iObservers.Count() > 0) - { - iReverbData.iEnabled = ETrue; - iObservers[0]->EffectChanged(this, (TUint8)MAudioEffectObserver::KEnabled); - - } - } - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - - -#include "../audioequalizercistub/Group/bld.inf" -#include "../bassboostcistub/Group/bld.inf" -#include "../distanceattenuationcistub/Group/bld.inf" -#include "../environmentalreverbcistub/Group/bld.inf" -#include "../listenerdopplercistub/Group/bld.inf" -#include "../listenerlocationcistub/Group/bld.inf" -#include "../listenerorientationcistub/Group/bld.inf" -#include "../loudnesscistub/Group/bld.inf" -#include "../roomlevelcistub/Group/bld.inf" -#include "../sourcedopplercistub/Group/bld.inf" -#include "../sourcelocationcistub/Group/bld.inf" -#include "../sourceorientationcistub/Group/bld.inf" -#include "../stereowideningcistub/Group/bld.inf" \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerdopplercistub/BWINS/ListenerDopplerCIu.def --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerdopplercistub/BWINS/ListenerDopplerCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - ?NewL@CListenerDopplerCI@@SAPAV1@AAVCMMFDevSound@@@Z @ 1 NONAME ; class CListenerDopplerCI * CListenerDopplerCI::NewL(class CMMFDevSound &) - ?NewL@CListenerDopplerCI@@SAPAV1@XZ @ 2 NONAME ; class CListenerDopplerCI * CListenerDopplerCI::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerdopplercistub/EABI/ListenerDopplerCIu.def --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerdopplercistub/EABI/ListenerDopplerCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - _ZN18CListenerDopplerCI4NewLER12CMMFDevSound @ 1 NONAME - _ZN18CListenerDopplerCI4NewLEv @ 2 NONAME - _ZTI18CListenerDopplerCI @ 3 NONAME ; ## - _ZTV18CListenerDopplerCI @ 4 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerdopplercistub/Group/ListenerDopplerCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerdopplercistub/Group/ListenerDopplerCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project file for Listener Doppler Effect Custom Interface STUB. -* -* -*/ - - -#include - -TARGET ListenerDopplerCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207B18 -VENDORID VID_DEFAULT - - -CAPABILITY CAP_GENERAL_DLL - - -SOURCEPATH ../src -SOURCE ListenerDopplerCIStub.cpp - -USERINCLUDE ../inc ../src - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib -LIBRARY EffectBase.lib -LIBRARY Dopplerbase.lib -LIBRARY ListenerDopplerEffect.lib -LIBRARY mmfdevsound.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY ListenerDopplerCI.lib - -LINKAS ListenerDopplerCI.dll - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerdopplercistub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerdopplercistub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for adaptation custom interface STUB -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - - -PRJ_MMPFILES -ListenerDopplerCIStub.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerdopplercistub/inc/ListenerDopplerCI.h --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerdopplercistub/inc/ListenerDopplerCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - This is the definition of the ListenerDoppler Custom Interface class. -* This serves as an example of how adaptation might define the -* custom interface class. -* The CListenerDopplerCI object is typically instantiated by a DevSound -* instance and return to the client when the CustomInterface() -* method is invoked. -* -* -*/ - - -#include -#include - -class CMMFDevSound; - -class CListenerDopplerCI : public CListenerDoppler - { - public: // Constructor and Destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CListenerDopplerCI* NewL(CMMFDevSound& aDevSound); - - /** - * Destructor. - */ - virtual ~CListenerDopplerCI(); - - public: // From Base Class - - /** - * From CAudioEffect - * Apply effect settings - * @since 3.0 - */ - virtual void ApplyL(); - - IMPORT_C static CListenerDopplerCI* NewL(); - - private: - - /** - * C++ default constructor. - */ - CListenerDopplerCI(CMMFDevSound& aDevSound); - CListenerDopplerCI(); - - private: // Data - - CMMFDevSound* iDevSound; - }; diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerdopplercistub/src/ListenerDopplerCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerdopplercistub/src/ListenerDopplerCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,127 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Implementation of the doppler effect Custom Interface class -* -*/ - - -#ifdef _DEBUG -#include // Needed for RDebug Prints -#endif - -#include "ListenerDopplerCI.h" -#include - -// ----------------------------------------------------------------------------- -// CListenerDoppler::NewL -// Static function for creating an instance of the CListenerDopplerCI object. -// ----------------------------------------------------------------------------- -// - -EXPORT_C CListenerDopplerCI* CListenerDopplerCI::NewL( - CMMFDevSound& aDevSound ) - { - CListenerDopplerCI* self = new(ELeave) CListenerDopplerCI(aDevSound); - return self; - } - -CListenerDopplerCI::CListenerDopplerCI( - CMMFDevSound& aDevSound ) - : iDevSound(&aDevSound) - { - iDopplerData.iVelocityX = 10; - iDopplerData.iVelocityY = 10; - iDopplerData.iVelocityZ = 10; - iDopplerData.iAzimuth = 20; - iDopplerData.iElevation = 20; - iDopplerData.iRadius = 20; - iDopplerData.iFactor = 5; - iDopplerData.iMaxFactor = 10; - } - -// ----------------------------------------------------------------------------- -// CListenerDoppler::NewL -// Static function for creating an instance of the CListenerDopplerCI object. -// ----------------------------------------------------------------------------- -// - -EXPORT_C CListenerDopplerCI* CListenerDopplerCI::NewL() - { - CListenerDopplerCI* self = new(ELeave) CListenerDopplerCI(); - return self; - } - -CListenerDopplerCI::CListenerDopplerCI() - { - iDopplerData.iVelocityX = 10; - iDopplerData.iVelocityY = 10; - iDopplerData.iVelocityZ = 10; - iDopplerData.iAzimuth = 20; - iDopplerData.iElevation = 20; - iDopplerData.iRadius = 20; - iDopplerData.iFactor = 5; - iDopplerData.iMaxFactor = 10; - } - -// Destructor - -CListenerDopplerCI::~CListenerDopplerCI() - { -#ifdef _DEBUG - RDebug::Print(_L("CListenerDopplerCI::~CListenerDopplerCI")); -#endif - } - -// ----------------------------------------------------------------------------- -// CListenerDopplerCI::ApplyL -// -// Applies the ListenerDoppler settings. -// Adaptation must check each settings and take appropriate actions since -// this method might be called after several settings have been made. -// ----------------------------------------------------------------------------- -// -void CListenerDopplerCI::ApplyL() - { -#ifdef _DEBUG - RDebug::Print(_L("CListenerDopplerCI::ApplyL")); -#endif - - if ( !HaveUpdateRights() ) - { - User::Leave(KErrAccessDenied); - } - - if (iObservers.Count() > 0) - { - if(iDopplerData.iEnabled) - { - iEnabled = iDopplerData.iEnabled; - iObservers[0]->EffectChanged(this, (TUint8)MAudioEffectObserver::KEnabled); - } - else - { - iEnabled = iDopplerData.iEnabled; - iObservers[0]->EffectChanged(this, (TUint8)MAudioEffectObserver::KDisabled); - } - - } - - } - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerlocationcistub/BWINS/ListenerLocationCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerlocationcistub/BWINS/ListenerLocationCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - ?NewL@CListenerLocationCI@@SAPAV1@AAVCMMFDevSound@@@Z @ 1 NONAME ; class CListenerLocationCI * CListenerLocationCI::NewL(class CMMFDevSound &) - ?NewL@CListenerLocationCI@@SAPAV1@XZ @ 2 NONAME ; class CListenerLocationCI * CListenerLocationCI::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerlocationcistub/EABI/ListenerLocationCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerlocationcistub/EABI/ListenerLocationCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - _ZN19CListenerLocationCI4NewLER12CMMFDevSound @ 1 NONAME - _ZTI19CListenerLocationCI @ 2 NONAME ; ## - _ZTV19CListenerLocationCI @ 3 NONAME ; ## - _ZN19CListenerLocationCI4NewLEv @ 4 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerlocationcistub/Group/ListenerLocationCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerlocationcistub/Group/ListenerLocationCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project file for ListenerLocation Effect Custom Interface STUB. -* -* -*/ - - -#include - -TARGET ListenerLocationCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207ACC -VENDORID VID_DEFAULT - - -CAPABILITY CAP_GENERAL_DLL - - -SOURCEPATH ../src -SOURCE ListenerLocationCIStub.cpp - -USERINCLUDE ../inc ../src - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib -LIBRARY EffectBase.lib -LIBRARY LocationBase.lib -LIBRARY ListenerLocationEffect.lib -LIBRARY mmfdevsound.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY ListenerLocationCI.lib - -LINKAS ListenerLocationCI.dll - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerlocationcistub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerlocationcistub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for adaptation custom interface STUB -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - - -PRJ_MMPFILES -ListenerLocationCIStub.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerlocationcistub/inc/ListenerLocationCI.h --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerlocationcistub/inc/ListenerLocationCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - This is the definition of the bassboost Custom Interface class. -* This serves as an example of how adaptation might define the -* custom interface class. -* The CListenerLocationCI object is typically instantiated by a DevSound -* instance and return to the client when the CustomInterface() -* method is invoked. -* -* -*/ - - -#include -#include - -class CMMFDevSound; - -class CListenerLocationCI : public CListenerLocation - { - public: // Constructor and Destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CListenerLocationCI* NewL(CMMFDevSound& aDevSound); - - /** - * Destructor. - */ - virtual ~CListenerLocationCI(); - - public: // From Base Class - - /** - * From CAudioEffect - * Apply effect settings - * @since 3.0 - */ - virtual void ApplyL(); - - IMPORT_C static CListenerLocationCI* NewL(); - - private: - - /** - * C++ default constructor. - */ - CListenerLocationCI(CMMFDevSound& aDevSound); - CListenerLocationCI(); - - private: // Data - - CMMFDevSound* iDevSound; - }; diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerlocationcistub/src/ListenerLocationCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerlocationcistub/src/ListenerLocationCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,123 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Implementation of the bassboost effect Custom Interface class -* -*/ - - -#ifdef _DEBUG -#include // Needed for RDebug Prints -#endif - -#include "ListenerLocationCI.h" -#include - -// ----------------------------------------------------------------------------- -// CListenerLocation::NewL -// Static function for creating an instance of the CListenerLocationCI object. -// ----------------------------------------------------------------------------- -// - -EXPORT_C CListenerLocationCI* CListenerLocationCI::NewL( - CMMFDevSound& aDevSound ) - { - CListenerLocationCI* self = new(ELeave) CListenerLocationCI(aDevSound); - return self; - } - -CListenerLocationCI::CListenerLocationCI( - CMMFDevSound& aDevSound ) - : iDevSound(&aDevSound) - { - iLocationData.iXCoordinate = 10; - iLocationData.iYCoordinate = 10; - iLocationData.iZCoordinate = 10; - iLocationData.iAzimuth = 10; - iLocationData.iElevation = 10; - iLocationData.iRadius = 10; - } - -// ----------------------------------------------------------------------------- -// CListenerLocation::NewL -// Static function for creating an instance of the CListenerLocationCI object. -// ----------------------------------------------------------------------------- -// - -EXPORT_C CListenerLocationCI* CListenerLocationCI::NewL() - { - CListenerLocationCI* self = new(ELeave) CListenerLocationCI(); - return self; - } - -CListenerLocationCI::CListenerLocationCI() - { - iLocationData.iXCoordinate = 10; - iLocationData.iYCoordinate = 10; - iLocationData.iZCoordinate = 10; - iLocationData.iAzimuth = 10; - iLocationData.iElevation = 10; - iLocationData.iRadius = 10; - } - -// Destructor - -CListenerLocationCI::~CListenerLocationCI() - { -#ifdef _DEBUG - RDebug::Print(_L("CListenerLocationCI::~CListenerLocationCI")); -#endif - } - -// ----------------------------------------------------------------------------- -// CListenerLocationCI::ApplyL -// -// Applies the bassboost settings. -// Adaptation must check each settings and take appropriate actions since -// this method might be called after several settings have been made. -// ----------------------------------------------------------------------------- -// -void CListenerLocationCI::ApplyL() - { -#ifdef _DEBUG - RDebug::Print(_L("CListenerLocationCI::ApplyL")); -#endif - - if ( !HaveUpdateRights() ) - { - User::Leave(KErrAccessDenied); - } - - if ( IsEnabled() ) - { - } - - // The effect change event is simulated by changing the bassboost and - // sending the observer a message indicating bassboost has changed. - // This is done for testing only. - - // The intention of this callback is to notify the observer when the bassboost - // object changes spontaneously. ie the user did not change the settings but - // event somewhere in the system causes the bassboost object to change state. - - if (iObservers.Count() > 0) - { - iObservers[0]->EffectChanged(this, (TUint8)MListenerLocationObserver::KSpecificEffectBase); - } - } - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerorientationcistub/BWINS/ListenerOrientationCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerorientationcistub/BWINS/ListenerOrientationCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - ?NewL@CListenerOrientationCI@@SAPAV1@AAVCMMFDevSound@@@Z @ 1 NONAME ; class CListenerOrientationCI * CListenerOrientationCI::NewL(class CMMFDevSound &) - ?NewL@CListenerOrientationCI@@SAPAV1@XZ @ 2 NONAME ; class CListenerOrientationCI * CListenerOrientationCI::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerorientationcistub/EABI/ListenerOrientationCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerorientationcistub/EABI/ListenerOrientationCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - _ZN22CListenerOrientationCI4NewLER12CMMFDevSound @ 1 NONAME - _ZTI22CListenerOrientationCI @ 2 NONAME ; ## - _ZTV22CListenerOrientationCI @ 3 NONAME ; ## - _ZN22CListenerOrientationCI4NewLEv @ 4 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerorientationcistub/Group/ListenerOrientationCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerorientationcistub/Group/ListenerOrientationCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project file for ListenerOrientation Effect Custom Interface STUB. -* -* -*/ - - -#include - -TARGET ListenerOrientationCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207AD0 -VENDORID VID_DEFAULT - - -CAPABILITY CAP_GENERAL_DLL - - -SOURCEPATH ../src -SOURCE ListenerOrientationCIStub.cpp - -USERINCLUDE ../inc ../src - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib -LIBRARY EffectBase.lib -LIBRARY OrientationBase.lib -LIBRARY ListenerOrientationEffect.lib -LIBRARY mmfdevsound.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY ListenerOrientationCI.lib - -LINKAS ListenerOrientationCI.dll - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerorientationcistub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerorientationcistub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for adaptation custom interface STUB -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - - -PRJ_MMPFILES -ListenerOrientationCIStub.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerorientationcistub/inc/ListenerOrientationCI.h --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerorientationcistub/inc/ListenerOrientationCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - This is the definition of the bassboost Custom Interface class. -* This serves as an example of how adaptation might define the -* custom interface class. -* The CListenerOrientationCI object is typically instantiated by a DevSound -* instance and return to the client when the CustomInterface() -* method is invoked. -* -* -*/ - - -#include -#include - -class CMMFDevSound; - -class CListenerOrientationCI : public CListenerOrientation - { - public: // Constructor and Destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CListenerOrientationCI* NewL(CMMFDevSound& aDevSound); - - /** - * Destructor. - */ - virtual ~CListenerOrientationCI(); - - public: // From Base Class - - /** - * From CAudioEffect - * Apply effect settings - * @since 3.0 - */ - virtual void ApplyL(); - - IMPORT_C static CListenerOrientationCI* NewL(); - - private: - - /** - * C++ default constructor. - */ - CListenerOrientationCI(CMMFDevSound& aDevSound); - CListenerOrientationCI(); - - private: // Data - - CMMFDevSound* iDevSound; - }; diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerorientationcistub/src/ListenerOrientationCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/listenerorientationcistub/src/ListenerOrientationCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Implementation of the bassboost effect Custom Interface class -* -*/ - - -#ifdef _DEBUG -#include // Needed for RDebug Prints -#endif - -#include "ListenerOrientationCI.h" -#include - -// ----------------------------------------------------------------------------- -// CListenerOrientation::NewL -// Static function for creating an instance of the CListenerOrientationCI object. -// ----------------------------------------------------------------------------- -// - -EXPORT_C CListenerOrientationCI* CListenerOrientationCI::NewL( - CMMFDevSound& aDevSound ) - { - CListenerOrientationCI* self = new(ELeave) CListenerOrientationCI(aDevSound); - return self; - } - -CListenerOrientationCI::CListenerOrientationCI( - CMMFDevSound& aDevSound ) - : iDevSound(&aDevSound) - { - iOrientationData.iHeading = 10; - iOrientationData.iPitch = 10; - iOrientationData.iRoll = 10; - iOrientationData.iFrontX = 10; - iOrientationData.iFrontY = 10; - iOrientationData.iFrontZ = 10; - iOrientationData.iAboveX = 10; - iOrientationData.iAboveY = 10; - iOrientationData.iAboveZ = 10; - - } - -// ----------------------------------------------------------------------------- -// CListenerOrientation::NewL -// Static function for creating an instance of the CListenerOrientationCI object. -// ----------------------------------------------------------------------------- -// - -EXPORT_C CListenerOrientationCI* CListenerOrientationCI::NewL() - { - CListenerOrientationCI* self = new(ELeave) CListenerOrientationCI(); - return self; - } - -CListenerOrientationCI::CListenerOrientationCI() - { - iOrientationData.iHeading = 10; - iOrientationData.iPitch = 10; - iOrientationData.iRoll = 10; - iOrientationData.iFrontX = 10; - iOrientationData.iFrontY = 10; - iOrientationData.iFrontZ = 10; - iOrientationData.iAboveX = 10; - iOrientationData.iAboveY = 10; - iOrientationData.iAboveZ = 10; - - } - -// Destructor - -CListenerOrientationCI::~CListenerOrientationCI() - { -#ifdef _DEBUG - RDebug::Print(_L("CListenerOrientationCI::~CListenerOrientationCI")); -#endif - } - -// ----------------------------------------------------------------------------- -// CListenerOrientationCI::ApplyL -// -// Applies the bassboost settings. -// Adaptation must check each settings and take appropriate actions since -// this method might be called after several settings have been made. -// ----------------------------------------------------------------------------- -// -void CListenerOrientationCI::ApplyL() - { -#ifdef _DEBUG - RDebug::Print(_L("CListenerOrientationCI::ApplyL")); -#endif - - if ( !HaveUpdateRights() ) - { - User::Leave(KErrAccessDenied); - } - - if ( IsEnabled() ) - { - } - - // The effect change event is simulated by changing the bassboost and - // sending the observer a message indicating bassboost has changed. - // This is done for testing only. - - // The intention of this callback is to notify the observer when the bassboost - // object changes spontaneously. ie the user did not change the settings but - // event somewhere in the system causes the bassboost object to change state. - - if (iObservers.Count() > 0) - { - iObservers[0]->EffectChanged(this, (TUint8)MListenerOrientationObserver::KSpecificEffectBase); - } - } - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/loudnesscistub/BWINS/LoudnessCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/loudnesscistub/BWINS/LoudnessCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - ?NewL@CLoudnessCI@@SAPAV1@AAVCMMFDevSound@@@Z @ 1 NONAME ; class CLoudnessCI * CLoudnessCI::NewL(class CMMFDevSound &) - ?NewL@CLoudnessCI@@SAPAV1@XZ @ 2 NONAME ; class CLoudnessCI * CLoudnessCI::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/loudnesscistub/EABI/LoudnessCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/loudnesscistub/EABI/LoudnessCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - _ZN11CLoudnessCI4NewLER12CMMFDevSound @ 1 NONAME - _ZTI11CLoudnessCI @ 2 NONAME ; ## - _ZTV11CLoudnessCI @ 3 NONAME ; ## - _ZN11CLoudnessCI4NewLEv @ 4 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/loudnesscistub/Group/LoudnessCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/loudnesscistub/Group/LoudnessCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project file for Loudness Custom Interface STUB. -* -* -*/ - - -#include - -TARGET LoudnessCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207AEC - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - - -SOURCEPATH ../src -SOURCE LoudnessCIStub.cpp - -USERINCLUDE ../inc ../src - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common - -LIBRARY euser.lib -LIBRARY EffectBase.lib -LIBRARY LoudnessEffect.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY LoudnessCI.lib - -LINKAS LoudnessCI.dll - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/loudnesscistub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/loudnesscistub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for adaptation custom interface stub -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -LoudnessCIStub.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/loudnesscistub/inc/LoudnessCI.h --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/loudnesscistub/inc/LoudnessCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - This is the definition of the Loudness Custom Interface class. -* -* -*/ - - -#include -#include - -class CMMFDevSound; - -class CLoudnessCI : public CLoudness - { - public: // Constructor and Destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CLoudnessCI* NewL(CMMFDevSound& aDevSound); - - /** - * Destructor. - */ - virtual ~CLoudnessCI(); - - /** - * From CAudioEffect - * Apply effect settings - * @since 3.0 - */ - virtual void ApplyL(); - - IMPORT_C static CLoudnessCI* NewL(); - - private: - - /** - * C++ default constructor. - */ - CLoudnessCI(CMMFDevSound& aDevSound); - CLoudnessCI(); - - private: // Data - - CMMFDevSound* iDevSound; - }; diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/loudnesscistub/src/LoudnessCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/loudnesscistub/src/LoudnessCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Implementation of the Loudness effect Custom Interface class -* -*/ - - -#ifdef _DEBUG -#include -#endif -#include "LoudnessCI.h" - - -EXPORT_C CLoudnessCI* CLoudnessCI::NewL( - CMMFDevSound& aDevSound ) - { - CLoudnessCI* self = new(ELeave) CLoudnessCI(aDevSound); - return self; - } - -CLoudnessCI::CLoudnessCI( - CMMFDevSound& aDevSound ) - : iDevSound(&aDevSound ) - { - } - -EXPORT_C CLoudnessCI* CLoudnessCI::NewL() - { - CLoudnessCI* self = new(ELeave) CLoudnessCI(); - return self; - } - -CLoudnessCI::CLoudnessCI() - { - } - -CLoudnessCI::~CLoudnessCI() - { - } - -void CLoudnessCI::ApplyL() - { -#ifdef _DEBUG - RDebug::Print(_L("CLoudnessCI::ApplyL")); -#endif - - if (iObservers.Count() > 0) - { - if(iLoudnessData.iEnabled) - { - iEnabled = iLoudnessData.iEnabled; - iObservers[0]->EffectChanged(this, (TUint8)MAudioEffectObserver::KEnabled); - } - else - { - iEnabled = iLoudnessData.iEnabled; - iObservers[0]->EffectChanged(this, (TUint8)MAudioEffectObserver::KDisabled); - } - - } - } - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/rom/Effects_Stubs.iby --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/rom/Effects_Stubs.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Support for Effects CI Stubs -* -*/ - -#ifndef __EFFECTS_STUBS_IBY__ -#define __EFFECTS_STUBS_IBY__ - -file=ABI_DIR\BUILD_DIR\AudioEqualizerCI_Stub.dll SHARED_LIB_DIR\AudioEqualizerCI_Stub.dll -file=ABI_DIR\BUILD_DIR\EnvironmentalReverbCI_Stub.dll SHARED_LIB_DIR\EnvironmentalReverbCI_Stub.dll -file=ABI_DIR\BUILD_DIR\StereoWideningCI_Stub.dll SHARED_LIB_DIR\StereoWideningCI_Stub.dll -file=ABI_DIR\BUILD_DIR\BassBoostCI_Stub.dll SHARED_LIB_DIR\BassBoostCI_Stub.dll -file=ABI_DIR\BUILD_DIR\ListenerDopplerCI_Stub.dll SHARED_LIB_DIR\ListenerDopplerCI_Stub.dll -file=ABI_DIR\BUILD_DIR\SourceDopplerCI_Stub.dll SHARED_LIB_DIR\SourceDopplerCI_Stub.dll -file=ABI_DIR\BUILD_DIR\ListenerLocationCI_Stub.dll SHARED_LIB_DIR\ListenerLocationCI_Stub.dll -file=ABI_DIR\BUILD_DIR\ListenerOrientationCI_Stub.dll SHARED_LIB_DIR\ListenerOrientationCI_Stub.dll -file=ABI_DIR\BUILD_DIR\SourceLocationCI_Stub.dll SHARED_LIB_DIR\SourceLocationCI_Stub.dll -file=ABI_DIR\BUILD_DIR\SourceOrientationCI_Stub.dll SHARED_LIB_DIR\SourceOrientationCI_Stub.dll -file=ABI_DIR\BUILD_DIR\DistanceAttenuationCI_Stub.dll SHARED_LIB_DIR\DistanceAttenuationCI_Stub.dll -file=ABI_DIR\BUILD_DIR\LoudnessCI_Stub.dll SHARED_LIB_DIR\LoudnessCI_Stub.dll -file=ABI_DIR\BUILD_DIR\RoomLevelCI_Stub.dll SHARED_LIB_DIR\RoomLevelCI_Stub.dll - -#endif diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/roomlevelcistub/BWINS/RoomLevelCIu.def --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/roomlevelcistub/BWINS/RoomLevelCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - ?NewL@CRoomLevelCI@@SAPAV1@AAVCMMFDevSound@@@Z @ 1 NONAME ; class CRoomLevelCI * CRoomLevelCI::NewL(class CMMFDevSound &) - ?NewL@CRoomLevelCI@@SAPAV1@XZ @ 2 NONAME ; class CRoomLevelCI * CRoomLevelCI::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/roomlevelcistub/EABI/RoomLevelCIu.def --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/roomlevelcistub/EABI/RoomLevelCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - _ZN12CRoomLevelCI4NewLER12CMMFDevSound @ 1 NONAME - _ZN12CRoomLevelCI4NewLEv @ 2 NONAME - _ZTI12CRoomLevelCI @ 3 NONAME ; ## - _ZTV12CRoomLevelCI @ 4 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/roomlevelcistub/Group/RoomLevelCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/roomlevelcistub/Group/RoomLevelCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project file for RoomLevel Custom Interface STUB. -* -* -*/ - - -#include - -TARGET RoomLevelCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207B3F - - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - - -SOURCEPATH ../src -SOURCE RoomLevelCIStub.cpp - -USERINCLUDE ../inc ../src - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common - -LIBRARY euser.lib -LIBRARY EffectBase.lib -LIBRARY RoomLevelEffect.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY RoomLevelCI.lib - -LINKAS RoomLevelCI.dll - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/roomlevelcistub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/roomlevelcistub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for adaptation custom interface stub -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - - -PRJ_MMPFILES -RoomLevelCIStub.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/roomlevelcistub/inc/RoomLevelCI.h --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/roomlevelcistub/inc/RoomLevelCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - This is the definition of the RoomLevel Custom Interface class. -* -* -*/ - - -#include -#include - -class CMMFDevSound; - -class CRoomLevelCI : public CRoomLevel - { - public: // Constructor and Destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CRoomLevelCI* NewL(CMMFDevSound& aDevSound); - - /** - * Destructor. - */ - virtual ~CRoomLevelCI(); - - /** - * From CAudioEffect - * Apply effect settings - * @since 3.0 - */ - virtual void ApplyL(); - - IMPORT_C static CRoomLevelCI* NewL(); - - private: - - /** - * C++ default constructor. - */ - CRoomLevelCI(CMMFDevSound& aDevSound); - CRoomLevelCI(); - - private: // Data - - CMMFDevSound* iDevSound; - }; diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/roomlevelcistub/src/RoomLevelCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/roomlevelcistub/src/RoomLevelCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Implementation of the RoomLevel effect Custom Interface class -* -*/ - - -#ifdef _DEBUG -#include -#endif -#include "RoomLevelCI.h" - - -EXPORT_C CRoomLevelCI* CRoomLevelCI::NewL( - CMMFDevSound& aDevSound ) - { - CRoomLevelCI* self = new(ELeave) CRoomLevelCI(aDevSound); - return self; - } - -CRoomLevelCI::CRoomLevelCI( - CMMFDevSound& aDevSound ) - : iDevSound(&aDevSound ) - { - iRoomLevelData.iEnvironmentalReverbId = 123456; - iRoomLevelData.iStreamRoomLevel = 0; - iRoomLevelData.iStreamMinRoomLevel = 0; - iRoomLevelData.iStreamMaxRoomLevel = 1000; - - } - -EXPORT_C CRoomLevelCI* CRoomLevelCI::NewL() - { - CRoomLevelCI* self = new(ELeave) CRoomLevelCI(); - return self; - } - -CRoomLevelCI::CRoomLevelCI() - { - iRoomLevelData.iEnvironmentalReverbId = 123456; - iRoomLevelData.iStreamRoomLevel = 0; - iRoomLevelData.iStreamMinRoomLevel = 0; - iRoomLevelData.iStreamMaxRoomLevel = 1000; - } - -CRoomLevelCI::~CRoomLevelCI() - { - } - -void CRoomLevelCI::ApplyL() - { -#ifdef _DEBUG - RDebug::Print(_L("CRoomLevelCI::ApplyL")); -#endif - - if (iObservers.Count() > 0) - { - iRoomLevelData.iEnabled = ETrue; - iObservers[0]->EffectChanged(this, (TUint8)MAudioEffectObserver::KEnabled); - - } - } - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcedopplercistub/BWINS/SourceDopplerCIu.def --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcedopplercistub/BWINS/SourceDopplerCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - ?NewL@CSourceDopplerCI@@SAPAV1@AAVCMMFDevSound@@@Z @ 1 NONAME ; class CSourceDopplerCI * CSourceDopplerCI::NewL(class CMMFDevSound &) - ?NewL@CSourceDopplerCI@@SAPAV1@XZ @ 2 NONAME ; class CSourceDopplerCI * CSourceDopplerCI::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcedopplercistub/EABI/SourceDopplerCIu.def --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcedopplercistub/EABI/SourceDopplerCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - _ZN16CSourceDopplerCI4NewLER12CMMFDevSound @ 1 NONAME - _ZN16CSourceDopplerCI4NewLEv @ 2 NONAME - _ZTI16CSourceDopplerCI @ 3 NONAME ; ## - _ZTV16CSourceDopplerCI @ 4 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcedopplercistub/Group/SourceDopplerCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcedopplercistub/Group/SourceDopplerCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project file for Source Doppler Effect Custom Interface STUB. -* -* -*/ - - - -#include - -TARGET SourceDopplerCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207AA5 -VENDORID VID_DEFAULT - - -CAPABILITY CAP_GENERAL_DLL - - -SOURCEPATH ../src -SOURCE SourceDopplerCIStub.cpp - -USERINCLUDE ../inc ../src - - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib -LIBRARY EffectBase.lib -LIBRARY Dopplerbase.lib -LIBRARY SourceDopplerEffect.lib -LIBRARY mmfdevsound.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY SourceDopplerCI.lib - -LINKAS SourceDopplerCI.dll - - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcedopplercistub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcedopplercistub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for adaptation custom interface STUB -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -SourceDopplerCIStub.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcedopplercistub/inc/SourceDopplerCI.h --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcedopplercistub/inc/SourceDopplerCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - This is the definition of the SourceDoppler Custom Interface class. -* This serves as an example of how adaptation might define the -* custom interface class. -* The CSourceDopplerCI object is typically instantiated by a DevSound -* instance and return to the client when the CustomInterface() -* method is invoked. -* -* -*/ - - -#include -#include - -class CMMFDevSound; - -class CSourceDopplerCI : public CSourceDoppler - { - public: // Constructor and Destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CSourceDopplerCI* NewL(CMMFDevSound& aDevSound); - - /** - * Destructor. - */ - virtual ~CSourceDopplerCI(); - - public: // From Base Class - - /** - * From CAudioEffect - * Apply effect settings - * @since 3.0 - */ - virtual void ApplyL(); - - IMPORT_C static CSourceDopplerCI* NewL(); - - private: - - /** - * C++ default constructor. - */ - CSourceDopplerCI(CMMFDevSound& aDevSound); - CSourceDopplerCI(); - - private: // Data - - CMMFDevSound* iDevSound; - }; diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcedopplercistub/src/SourceDopplerCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcedopplercistub/src/SourceDopplerCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,127 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Implementation of the Source Doppler Effect Custom Interface class -* -*/ - - -#ifdef _DEBUG -#include // Needed for RDebug Prints -#endif - -#include "SourceDopplerCI.h" -#include - -// ----------------------------------------------------------------------------- -// CSourceDoppler::NewL -// Static function for creating an instance of the CSourceDopplerCI object. -// ----------------------------------------------------------------------------- -// - -EXPORT_C CSourceDopplerCI* CSourceDopplerCI::NewL( - CMMFDevSound& aDevSound ) - { - CSourceDopplerCI* self = new(ELeave) CSourceDopplerCI(aDevSound); - return self; - } - -CSourceDopplerCI::CSourceDopplerCI( - CMMFDevSound& aDevSound ) - : iDevSound(&aDevSound) - { - iDopplerData.iVelocityX = 10; - iDopplerData.iVelocityY = 10; - iDopplerData.iVelocityZ = 10; - iDopplerData.iAzimuth = 20; - iDopplerData.iElevation = 20; - iDopplerData.iRadius = 20; - iDopplerData.iFactor = 5; - iDopplerData.iMaxFactor = 10; - } - -// ----------------------------------------------------------------------------- -// CSourceDoppler::NewL -// Static function for creating an instance of the CSourceDopplerCI object. -// ----------------------------------------------------------------------------- -// - -EXPORT_C CSourceDopplerCI* CSourceDopplerCI::NewL() - { - CSourceDopplerCI* self = new(ELeave) CSourceDopplerCI(); - return self; - } - -CSourceDopplerCI::CSourceDopplerCI() - { - iDopplerData.iVelocityX = 10; - iDopplerData.iVelocityY = 10; - iDopplerData.iVelocityZ = 10; - iDopplerData.iAzimuth = 20; - iDopplerData.iElevation = 20; - iDopplerData.iRadius = 20; - iDopplerData.iFactor = 5; - iDopplerData.iMaxFactor = 10; - } - -// Destructor - -CSourceDopplerCI::~CSourceDopplerCI() - { -#ifdef _DEBUG - RDebug::Print(_L("CSourceDopplerCI::~CSourceDopplerCI")); -#endif - } - -// ----------------------------------------------------------------------------- -// CSourceDopplerCI::ApplyL -// -// Applies the SourceDoppler settings. -// Adaptation must check each settings and take appropriate actions since -// this method might be called after several settings have been made. -// ----------------------------------------------------------------------------- -// -void CSourceDopplerCI::ApplyL() - { -#ifdef _DEBUG - RDebug::Print(_L("CSourceDopplerCI::ApplyL")); -#endif - - if ( !HaveUpdateRights() ) - { - User::Leave(KErrAccessDenied); - } - - if (iObservers.Count() > 0) - { - if(iDopplerData.iEnabled) - { - iEnabled = iDopplerData.iEnabled; - iObservers[0]->EffectChanged(this, (TUint8)MAudioEffectObserver::KEnabled); - } - else - { - iEnabled = iDopplerData.iEnabled; - iObservers[0]->EffectChanged(this, (TUint8)MAudioEffectObserver::KDisabled); - } - - } - - } - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcelocationcistub/BWINS/SourceLocationCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcelocationcistub/BWINS/SourceLocationCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - ?NewL@CSourceLocationCI@@SAPAV1@AAVCMMFDevSound@@@Z @ 1 NONAME ; class CSourceLocationCI * CSourceLocationCI::NewL(class CMMFDevSound &) - ?NewL@CSourceLocationCI@@SAPAV1@XZ @ 2 NONAME ; class CSourceLocationCI * CSourceLocationCI::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcelocationcistub/BWINS/SourceLocationCI_StubU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcelocationcistub/BWINS/SourceLocationCI_StubU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - ?NewL@CSourceLocationCI@@SAPAV1@AAVCMMFDevSound@@@Z @ 1 NONAME ; class CSourceLocationCI * CSourceLocationCI::NewL(class CMMFDevSound &) - ?NewL@CSourceLocationCI@@SAPAV1@XZ @ 2 NONAME ; class CSourceLocationCI * CSourceLocationCI::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcelocationcistub/EABI/SourceLocationCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcelocationcistub/EABI/SourceLocationCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - _ZN17CSourceLocationCI4NewLER12CMMFDevSound @ 1 NONAME - _ZTI17CSourceLocationCI @ 2 NONAME ; ## - _ZTV17CSourceLocationCI @ 3 NONAME ; ## - _ZN17CSourceLocationCI4NewLEv @ 4 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcelocationcistub/EABI/SourceLocationCI_StubU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcelocationcistub/EABI/SourceLocationCI_StubU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - _ZN17CSourceLocationCI4NewLER12CMMFDevSound @ 1 NONAME - _ZN17CSourceLocationCI4NewLEv @ 2 NONAME - _ZTI17CSourceLocationCI @ 3 NONAME ; ## - _ZTV17CSourceLocationCI @ 4 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcelocationcistub/Group/SourceLocationCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcelocationcistub/Group/SourceLocationCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project file for SourceLocation Effect Custom Interface STUB. -* -* -*/ - - -#include - -TARGET SourceLocationCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207AD4 -VENDORID VID_DEFAULT - - -CAPABILITY CAP_GENERAL_DLL - - -SOURCEPATH ../src -SOURCE SourceLocationCIStub.cpp - -USERINCLUDE ../inc ../src - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib -LIBRARY EffectBase.lib -LIBRARY LocationBase.lib -LIBRARY SourceLocationEffect.lib -LIBRARY mmfdevsound.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY SourceLocationCI.lib - -LINKAS SourceLocationCI.dll - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcelocationcistub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcelocationcistub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for adaptation custom interface STUB -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - - -PRJ_MMPFILES -SourceLocationCIStub.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcelocationcistub/inc/SourceLocationCI.h --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcelocationcistub/inc/SourceLocationCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - This is the definition of the bassboost Custom Interface class. -* This serves as an example of how adaptation might define the -* custom interface class. -* The CSourceLocationCI object is typically instantiated by a DevSound -* instance and return to the client when the CustomInterface() -* method is invoked. -* -* -*/ - - -#include -#include - -class CMMFDevSound; - -class CSourceLocationCI : public CSourceLocation - { - public: // Constructor and Destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CSourceLocationCI* NewL(CMMFDevSound& aDevSound); - - /** - * Destructor. - */ - virtual ~CSourceLocationCI(); - - public: // From Base Class - - /** - * From CAudioEffect - * Apply effect settings - * @since 3.0 - */ - virtual void ApplyL(); - - IMPORT_C static CSourceLocationCI* NewL(); - - private: - - /** - * C++ default constructor. - */ - CSourceLocationCI(CMMFDevSound& aDevSound); - CSourceLocationCI(); - - private: // Data - - CMMFDevSound* iDevSound; - }; diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcelocationcistub/src/SourceLocationCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourcelocationcistub/src/SourceLocationCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Implementation of the bassboost effect Custom Interface class -* -*/ - - -#ifdef _DEBUG -#include // Needed for RDebug Prints -#endif - -#include "SourceLocationCI.h" -#include - -// ----------------------------------------------------------------------------- -// CSourceLocation::NewL -// Static function for creating an instance of the CSourceLocationCI object. -// ----------------------------------------------------------------------------- -// - -EXPORT_C CSourceLocationCI* CSourceLocationCI::NewL( - CMMFDevSound& aDevSound ) - { - CSourceLocationCI* self = new(ELeave) CSourceLocationCI(aDevSound); - return self; - } - -CSourceLocationCI::CSourceLocationCI( - CMMFDevSound& aDevSound ) - : iDevSound(&aDevSound) - { - iLocationData.iXCoordinate = 10; - iLocationData.iYCoordinate = 10; - iLocationData.iZCoordinate = 10; - iLocationData.iAzimuth = 10; - iLocationData.iElevation = 10; - iLocationData.iRadius = 10; - } - -// ----------------------------------------------------------------------------- -// CSourceLocation::NewL -// Static function for creating an instance of the CSourceLocationCI object. -// ----------------------------------------------------------------------------- -// - -EXPORT_C CSourceLocationCI* CSourceLocationCI::NewL() - { - CSourceLocationCI* self = new(ELeave) CSourceLocationCI(); - return self; - } - -CSourceLocationCI::CSourceLocationCI() - { - iLocationData.iXCoordinate = 10; - iLocationData.iYCoordinate = 10; - iLocationData.iZCoordinate = 10; - iLocationData.iAzimuth = 10; - iLocationData.iElevation = 10; - iLocationData.iRadius = 10; - } - -// Destructor - -CSourceLocationCI::~CSourceLocationCI() - { -#ifdef _DEBUG - RDebug::Print(_L("CSourceLocationCI::~CSourceLocationCI")); -#endif - } - -// ----------------------------------------------------------------------------- -// CSourceLocationCI::ApplyL -// -// Applies the bassboost settings. -// Adaptation must check each settings and take appropriate actions since -// this method might be called after several settings have been made. -// ----------------------------------------------------------------------------- -// -void CSourceLocationCI::ApplyL() - { -#ifdef _DEBUG - RDebug::Print(_L("CSourceLocationCI::ApplyL")); -#endif - - if ( !HaveUpdateRights() ) - { - User::Leave(KErrAccessDenied); - } - - if ( IsEnabled() ) - { - } - - // The effect change event is simulated by changing the bassboost and - // sending the observer a message indicating bassboost has changed. - // This is done for testing only. - - // The intention of this callback is to notify the observer when the bassboost - // object changes spontaneously. ie the user did not change the settings but - // event somewhere in the system causes the bassboost object to change state. - - if (iObservers.Count() > 0) - { - iObservers[0]->EffectChanged(this, (TUint8)MSourceLocationObserver::KSpecificEffectBase); - } - } - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - - - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourceorientationcistub/BWINS/SourceOrientationCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourceorientationcistub/BWINS/SourceOrientationCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - ?NewL@CSourceOrientationCI@@SAPAV1@AAVCMMFDevSound@@@Z @ 1 NONAME ; class CSourceOrientationCI * CSourceOrientationCI::NewL(class CMMFDevSound &) - ?NewL@CSourceOrientationCI@@SAPAV1@XZ @ 2 NONAME ; class CSourceOrientationCI * CSourceOrientationCI::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourceorientationcistub/EABI/SourceOrientationCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourceorientationcistub/EABI/SourceOrientationCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - _ZN20CSourceOrientationCI4NewLER12CMMFDevSound @ 1 NONAME - _ZTI20CSourceOrientationCI @ 2 NONAME ; ## - _ZTV20CSourceOrientationCI @ 3 NONAME ; ## - _ZN20CSourceOrientationCI4NewLEv @ 4 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourceorientationcistub/Group/SourceOrientationCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourceorientationcistub/Group/SourceOrientationCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project file for SourceOrientation Effect Custom Interface STUB. -* -* -*/ - - -#include - -TARGET SourceOrientationCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207AD8 -VENDORID VID_DEFAULT - - -CAPABILITY CAP_GENERAL_DLL - - -SOURCEPATH ../src -SOURCE SourceOrientationCIStub.cpp - -USERINCLUDE ../inc ../src - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib -LIBRARY EffectBase.lib -LIBRARY OrientationBase.lib -LIBRARY SourceOrientationEffect.lib -LIBRARY mmfdevsound.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY SourceOrientationCI.lib - -LINKAS SourceOrientationCI.dll - - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourceorientationcistub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourceorientationcistub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for adaptation custom interface STUB -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - - -PRJ_MMPFILES -SourceOrientationCIStub.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourceorientationcistub/inc/SourceOrientationCI.h --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourceorientationcistub/inc/SourceOrientationCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - This is the definition of the bassboost Custom Interface class. -* This serves as an example of how adaptation might define the -* custom interface class. -* The CSourceOrientationCI object is typically instantiated by a DevSound -* instance and return to the client when the CustomInterface() -* method is invoked. -* -* -*/ - - -#include -#include - -class CMMFDevSound; - -class CSourceOrientationCI : public CSourceOrientation - { - public: // Constructor and Destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CSourceOrientationCI* NewL(CMMFDevSound& aDevSound); - - /** - * Destructor. - */ - virtual ~CSourceOrientationCI(); - - public: // From Base Class - - /** - * From CAudioEffect - * Apply effect settings - * @since 3.0 - */ - virtual void ApplyL(); - - IMPORT_C static CSourceOrientationCI* NewL(); - - private: - - /** - * C++ default constructor. - */ - CSourceOrientationCI(CMMFDevSound& aDevSound); - CSourceOrientationCI(); - - private: // Data - - CMMFDevSound* iDevSound; - }; diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourceorientationcistub/src/SourceOrientationCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/sourceorientationcistub/src/SourceOrientationCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,130 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Implementation of the bassboost effect Custom Interface class -* -*/ - - -#ifdef _DEBUG -#include // Needed for RDebug Prints -#endif - -#include "SourceOrientationCI.h" -#include - -// ----------------------------------------------------------------------------- -// CSourceOrientation::NewL -// Static function for creating an instance of the CSourceOrientationCI object. -// ----------------------------------------------------------------------------- -// - -EXPORT_C CSourceOrientationCI* CSourceOrientationCI::NewL( - CMMFDevSound& aDevSound ) - { - CSourceOrientationCI* self = new(ELeave) CSourceOrientationCI(aDevSound); - return self; - } - -CSourceOrientationCI::CSourceOrientationCI( - CMMFDevSound& aDevSound ) - : iDevSound(&aDevSound) - { - iOrientationData.iHeading = 10; - iOrientationData.iPitch = 10; - iOrientationData.iRoll = 10; - iOrientationData.iFrontX = 10; - iOrientationData.iFrontY = 10; - iOrientationData.iFrontZ = 10; - iOrientationData.iAboveX = 10; - iOrientationData.iAboveY = 10; - iOrientationData.iAboveZ = 10; - } - -// ----------------------------------------------------------------------------- -// CSourceOrientation::NewL -// Static function for creating an instance of the CSourceOrientationCI object. -// ----------------------------------------------------------------------------- -// - -EXPORT_C CSourceOrientationCI* CSourceOrientationCI::NewL() - { - CSourceOrientationCI* self = new(ELeave) CSourceOrientationCI(); - return self; - } - -CSourceOrientationCI::CSourceOrientationCI() - { - iOrientationData.iHeading = 10; - iOrientationData.iPitch = 10; - iOrientationData.iRoll = 10; - iOrientationData.iFrontX = 10; - iOrientationData.iFrontY = 10; - iOrientationData.iFrontZ = 10; - iOrientationData.iAboveX = 10; - iOrientationData.iAboveY = 10; - iOrientationData.iAboveZ = 10; - } - -// Destructor - -CSourceOrientationCI::~CSourceOrientationCI() - { -#ifdef _DEBUG - RDebug::Print(_L("CSourceOrientationCI::~CSourceOrientationCI")); -#endif - } - -// ----------------------------------------------------------------------------- -// CSourceOrientationCI::ApplyL -// -// Applies the bassboost settings. -// Adaptation must check each settings and take appropriate actions since -// this method might be called after several settings have been made. -// ----------------------------------------------------------------------------- -// -void CSourceOrientationCI::ApplyL() - { -#ifdef _DEBUG - RDebug::Print(_L("CSourceOrientationCI::ApplyL")); -#endif - - if ( !HaveUpdateRights() ) - { - User::Leave(KErrAccessDenied); - } - - if ( IsEnabled() ) - { - } - - // The effect change event is simulated by changing the bassboost and - // sending the observer a message indicating bassboost has changed. - // This is done for testing only. - - // The intention of this callback is to notify the observer when the bassboost - // object changes spontaneously. ie the user did not change the settings but - // event somewhere in the system causes the bassboost object to change state. - - if (iObservers.Count() > 0) - { - iObservers[0]->EffectChanged(this, (TUint8)MSourceOrientationObserver::KSpecificEffectBase); - } - } - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/stereowideningcistub/BWINS/StereoWideningCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/stereowideningcistub/BWINS/StereoWideningCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - ?NewL@CStereoWideningCI@@SAPAV1@AAVCMMFDevSound@@@Z @ 1 NONAME ; class CStereoWideningCI * CStereoWideningCI::NewL(class CMMFDevSound &) - ?NewL@CStereoWideningCI@@SAPAV1@XZ @ 2 NONAME ; class CStereoWideningCI * CStereoWideningCI::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/stereowideningcistub/EABI/StereoWideningCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/stereowideningcistub/EABI/StereoWideningCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - _ZN17CStereoWideningCI4NewLER12CMMFDevSound @ 1 NONAME - _ZTI17CStereoWideningCI @ 2 NONAME ; ## - _ZTV17CStereoWideningCI @ 3 NONAME ; ## - _ZN17CStereoWideningCI4NewLEv @ 4 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/stereowideningcistub/Group/StereoWideningCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/stereowideningcistub/Group/StereoWideningCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project file for StereoWidening Custom Interface STUB. -* -* -*/ - - -#include - -TARGET StereoWideningCI_Stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207A88 - - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - - -SOURCEPATH ../src -SOURCE StereoWideningCIStub.cpp - -USERINCLUDE ../inc ../src - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common - -LIBRARY euser.lib -LIBRARY EffectBase.lib -LIBRARY StereoWideningEffect.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY StereoWideningCI.lib - -LINKAS StereoWideningCI.dll - - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/stereowideningcistub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/stereowideningcistub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for adaptation custom interface stub -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - - -PRJ_MMPFILES -StereoWideningCIStub.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/stereowideningcistub/inc/StereoWideningCI.h --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/stereowideningcistub/inc/StereoWideningCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - This is the definition of the StereoWidening Custom Interface class. -* -* -*/ - - -#include -#include - -class CMMFDevSound; - -class CStereoWideningCI : public CStereoWidening - { - public: // Constructor and Destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CStereoWideningCI* NewL(CMMFDevSound& aDevSound); - - /** - * Destructor. - */ - virtual ~CStereoWideningCI(); - - /** - * From CAudioEffect - * Apply effect settings - * @since 3.0 - */ - virtual void ApplyL(); - - IMPORT_C static CStereoWideningCI* NewL(); - - private: - - /** - * C++ default constructor. - */ - CStereoWideningCI(CMMFDevSound& aDevSound); - CStereoWideningCI(); - - private: // Data - - CMMFDevSound* iDevSound; - }; diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioeffectscistubs/stereowideningcistub/src/StereoWideningCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audioeffectscistubs/stereowideningcistub/src/StereoWideningCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Implementation of the StereoWidening effect Custom Interface class -* -*/ - - -#ifdef _DEBUG -#include -#endif -#include "StereoWideningCI.h" - - -EXPORT_C CStereoWideningCI* CStereoWideningCI::NewL( - CMMFDevSound& aDevSound ) - { - CStereoWideningCI* self = new(ELeave) CStereoWideningCI(aDevSound); - return self; - } - -CStereoWideningCI::CStereoWideningCI( - CMMFDevSound& aDevSound ) - : iDevSound(&aDevSound ) - { - iStereoWideningData.iLevel = 20; // Initial value - iStereoWideningData.iContinuousLevelSupported = EFalse; // Initial value - } - -EXPORT_C CStereoWideningCI* CStereoWideningCI::NewL() - { - CStereoWideningCI* self = new(ELeave) CStereoWideningCI(); - return self; - } - -CStereoWideningCI::CStereoWideningCI() - { - iStereoWideningData.iLevel = 20; // Initial value - iStereoWideningData.iContinuousLevelSupported = EFalse; // Initial value - } - -CStereoWideningCI::~CStereoWideningCI() - { - } - -void CStereoWideningCI::ApplyL() - { -#ifdef _DEBUG - RDebug::Print(_L("CStereoWideningCI::ApplyL")); -#endif - - if (iObservers.Count() > 0) - { - if(iStereoWideningData.iEnabled) - { - iEnabled = iStereoWideningData.iEnabled; - iObservers[0]->EffectChanged(this, (TUint8)MAudioEffectObserver::KEnabled); - } - else - { - iEnabled = iStereoWideningData.iEnabled; - iObservers[0]->EffectChanged(this, (TUint8)MAudioEffectObserver::KDisabled); - } - - } - } - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/CustomInterfaceProxyFactory_stub/BWINS/CustomInterfaceProxyFactoryU.DEF --- a/audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/CustomInterfaceProxyFactory_stub/BWINS/CustomInterfaceProxyFactoryU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - ?CreateProxy@CCustomInterfaceProxyFactory@@SAPAXVTUid@@V?$TPckgBuf@VTMMFMessageDestination@@@@AAVMCustomCommand@@PAVCCustomInterfaceUtility@@@Z @ 1 NONAME ; void * CCustomInterfaceProxyFactory::CreateProxy(class TUid, class TPckgBuf, class MCustomCommand &, class CCustomInterfaceUtility *) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/CustomInterfaceProxyFactory_stub/EABI/CustomInterfaceProxyFactoryU.DEF --- a/audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/CustomInterfaceProxyFactory_stub/EABI/CustomInterfaceProxyFactoryU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - _ZN28CCustomInterfaceProxyFactory11CreateProxyE4TUid8TPckgBufI22TMMFMessageDestinationER14MCustomCommandP23CCustomInterfaceUtility @ 1 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/CustomInterfaceProxyFactory_stub/group/CustomInterfaceProxyFactory_stub.mmp --- a/audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/CustomInterfaceProxyFactory_stub/group/CustomInterfaceProxyFactory_stub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - -#include - -TARGET CustomInterfaceProxyFactory.dll -TARGETTYPE DLL -UID 0x1000008D 0x10200012 - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - - -SOURCEPATH ../src -SOURCE CustomInterfaceProxyFactory.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../Inc -USERINCLUDE ../src - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib -LIBRARY AudioEqualizerProxy.lib -LIBRARY EnvironmentalReverbProxy.lib -LIBRARY StereoWideningProxy.lib -LIBRARY BassBoostProxy.lib -LIBRARY ListenerDopplerProxy.lib -LIBRARY ListenerLocationProxy.lib -LIBRARY ListenerOrientationProxy.lib -LIBRARY SourceDopplerProxy.lib -LIBRARY SourceLocationProxy.lib -LIBRARY SourceOrientationProxy.lib -LIBRARY DistanceAttenuationProxy.lib -LIBRARY LoudnessProxy.lib -LIBRARY RoomLevelProxy.lib -LIBRARY AddedDevSoundControlProxy.lib -LIBRARY RestrictedAudioOutputProxy.lib -LIBRARY AudioInputProxy.lib -LIBRARY AudioOutputProxy.lib -LIBRARY G711DecoderIntfcProxy.lib -LIBRARY G729DecoderIntfcProxy.lib -LIBRARY IlbcDecoderIntfcProxy.lib -LIBRARY G711EncoderIntfcProxy.lib -LIBRARY G729EncoderIntfcProxy.lib -LIBRARY IlbcEncoderIntfcProxy.lib -LIBRARY SpeechEncoderConfigProxy.lib -LIBRARY ErrorConcealmentIntfcProxy.lib - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/CustomInterfaceProxyFactory_stub/group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/CustomInterfaceProxyFactory_stub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file custom interface proxy builder. -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -CustomInterfaceProxyFactory_stub.mmp - -// End of File - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/CustomInterfaceProxyFactory_stub/inc/CustomInterfaceProxyFactory.h --- a/audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/CustomInterfaceProxyFactory_stub/inc/CustomInterfaceProxyFactory.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - CustomInterfaceProxyFactory adaptation stub implementation. -* -*/ - -#ifndef __CUSTOMINTERFACEPROXYFACTORY_H -#define __CUSTOMINTERFACEPROXYFACTORY_H - -#include -#include - -// FORWARD DECLARATIONS -class CCustomInterfaceUtility; - -// CLASS DECLARATION -class CCustomInterfaceProxyFactory - { -public: - IMPORT_C static TAny* CreateProxy(TUid aInterfaceUid, - TMMFMessageDestinationPckg aHandlePckg, - MCustomCommand& aCustomCommand, - CCustomInterfaceUtility* aCustomInterfaceUtility); - }; - -#endif - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/CustomInterfaceProxyFactory_stub/src/CustomInterfaceProxyFactory.cpp --- a/audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/CustomInterfaceProxyFactory_stub/src/CustomInterfaceProxyFactory.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,187 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - -#include "AudioEqualizerProxy.h" -#include "BassBoostProxy.h" -#include "DistanceAttenuationProxy.h" -#include "EnvironmentalReverbProxy.h" -#include "ListenerDopplerProxy.h" -#include "ListenerLocationProxy.h" -#include "ListenerOrientationProxy.h" -#include "LoudnessProxy.h" -#include "RoomLevelProxy.h" -#include "SourceDopplerProxy.h" -#include "SourceLocationProxy.h" -#include "SourceOrientationProxy.h" -#include "StereoWideningProxy.h" -#include "AddedDevSoundControlCI.h" -#include "AddedDevSoundControlProxy.h" -#include "RestrictedAudioOutputProxy.h" -#include "AudioInputProxy.h" -#include "AudioOutputProxy.h" -#include "AudioInputMessageTypes.h" -#include "AudioOutputMessageTypes.h" -#include "G711DecoderIntfcProxy.h" -#include "G729DecoderIntfcProxy.h" -#include "IlbcDecoderIntfcProxy.h" -#include "G711EncoderIntfcProxy.h" -#include "G729EncoderIntfcProxy.h" -#include "IlbcEncoderIntfcProxy.h" -#include "SpeechEncoderConfigProxy.h" -#include "ErrorConcealmentIntfcProxy.h" -#include "CustomInterfaceProxyFactory.h" - - -EXPORT_C TAny* CCustomInterfaceProxyFactory::CreateProxy(TUid aInterfaceUid, - TMMFMessageDestinationPckg aHandlePckg, - MCustomCommand& aCustomCommand, - CCustomInterfaceUtility* aCustomInterfaceUtility) - { - TAny* customInterface = NULL; - - if (aInterfaceUid == KUidAudioInput) - { - CAudioInputProxy* inputProxy = CAudioInputProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = inputProxy; - } - else if(aInterfaceUid == KUidAudioOutput) - { - CAudioOutputProxy* outputProxy = CAudioOutputProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = outputProxy; - } - else if (aInterfaceUid == KUidAudioEqualizerEffect) - { - CAudioEqualizerProxy* audioEqualizerProxy = CAudioEqualizerProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = audioEqualizerProxy; - } - else if (aInterfaceUid == KUidBassBoostEffect) - { - CBassBoostProxy* bassBoostProxy = CBassBoostProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = bassBoostProxy; - } - else if (aInterfaceUid == KUidDistanceAttenuationEffect) - { - CDistanceAttenuationProxy* distanceAttenuationProxy = CDistanceAttenuationProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = distanceAttenuationProxy; - } - else if (aInterfaceUid == KUidEnvironmentalReverbEffect) - { - CEnvironmentalReverbProxy* environmentalReverbProxy = CEnvironmentalReverbProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = environmentalReverbProxy; - } - else if (aInterfaceUid == KUidListenerDopplerEffect) - { - CListenerDopplerProxy* listenerDopplerProxy = CListenerDopplerProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = listenerDopplerProxy; - } - else if (aInterfaceUid == KUidListenerLocationEffect) - { - CListenerLocationProxy* listenerLocationProxy = CListenerLocationProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = listenerLocationProxy; - } - else if (aInterfaceUid == KUidListenerOrientationEffect) - { - CListenerOrientationProxy* listenerOrientationProxy = CListenerOrientationProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = listenerOrientationProxy; - } - else if (aInterfaceUid == KUidLoudnessEffect) - { - CLoudnessProxy* loudnessProxy = CLoudnessProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = loudnessProxy; - } - else if (aInterfaceUid == KUidRoomLevelEffect) - { - CRoomLevelProxy* roomLevelProxy = CRoomLevelProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = roomLevelProxy; - } - else if (aInterfaceUid == KUidSourceDopplerEffect) - { - CSourceDopplerProxy* sourceDopplerProxy = CSourceDopplerProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = sourceDopplerProxy; - } - else if (aInterfaceUid == KUidSourceLocationEffect) - { - CSourceLocationProxy* sourceLocationProxy = CSourceLocationProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = sourceLocationProxy; - } - else if (aInterfaceUid == KUidSourceOrientationEffect) - { - CSourceOrientationProxy* sourceOrientationProxy = CSourceOrientationProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = sourceOrientationProxy; - } - else if (aInterfaceUid == KUidStereoWideningEffect) - { - CStereoWideningProxy* stereoWideningProxy = CStereoWideningProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = stereoWideningProxy; - } - else if(aInterfaceUid == KUidAddedDevSoundControlInterface) - { - CAddedDevSoundControlProxy* proxy = CAddedDevSoundControlProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = proxy; - } - else if (aInterfaceUid == KUidG711DecoderIntfc) - { - CG711DecoderIntfcProxy* g711DecoderIntfcProxy = CG711DecoderIntfcProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = g711DecoderIntfcProxy; - } - else if (aInterfaceUid == KUidG729DecoderIntfc) - { - CG729DecoderIntfcProxy* g729DecoderIntfcProxy = CG729DecoderIntfcProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = g729DecoderIntfcProxy; - } - else if (aInterfaceUid == KUidIlbcDecoderIntfc) - { - CIlbcDecoderIntfcProxy* iIlbcDecoderIntfcProxy = CIlbcDecoderIntfcProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = iIlbcDecoderIntfcProxy; - } - else if (aInterfaceUid == KUidG711EncoderIntfc) - { - CG711EncoderIntfcProxy* g711EncoderIntfcProxy = CG711EncoderIntfcProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = g711EncoderIntfcProxy; - } - else if (aInterfaceUid == KUidG729EncoderIntfc) - { - CG729EncoderIntfcProxy* g729EncoderIntfcProxy = CG729EncoderIntfcProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = g729EncoderIntfcProxy; - } - else if (aInterfaceUid == KUidIlbcEncoderIntfc) - { - CIlbcEncoderIntfcProxy* iIlbcEncoderIntfcProxy = CIlbcEncoderIntfcProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = iIlbcEncoderIntfcProxy; - } - else if (aInterfaceUid == KUidSpeechEncoderConfig) - { - CSpeechEncoderConfigProxy* speechEncoderIntfcProxy = CSpeechEncoderConfigProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = speechEncoderIntfcProxy; - } - else if (aInterfaceUid == KUidErrorConcealmentIntfc) - { - CErrorConcealmentIntfcProxy* errConcealmentIntfcProxy = CErrorConcealmentIntfcProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = errConcealmentIntfcProxy; - } - else if(aInterfaceUid == KUidRestrictedAudioOutput) - { - CRestrictedAudioOutputProxy* proxy = CRestrictedAudioOutputProxy::NewL(aHandlePckg, aCustomCommand, aCustomInterfaceUtility); - customInterface = proxy; - } - - return customInterface; - } - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/Inc/AddedDevSoundControlMsgHdlr.h --- a/audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/Inc/AddedDevSoundControlMsgHdlr.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,134 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Message handler for AddedDevSoundControl CI. -* -*/ - - -#ifndef CADDEDDEVSOUNDCONTROLMSGHDLR_H -#define CADDEDDEVSOUNDCONTROLMSGHDLR_H - -// INCLUDES -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -class MAddedDevSoundControl; - -// CLASS DECLARATION - -/** - * Handle messages received from the interface proxy. - * The class receives the messages sent by the custom interface proxy - * and makes the appropriate call on its custom interface implementation. - * - * @lib AddedDevSoundControlMsgHdlr.lib - * @since S60 3.2 - */ -class CAddedDevSoundControlMsgHdlr: public CMMFObject - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CAddedDevSoundControlMsgHdlr* NewL( - TAny* aAddedDSControlCI); - - /** - * Destructor. - */ - virtual ~CAddedDevSoundControlMsgHdlr(); - - public: // New functions - - public: // Functions from base classes - - /** - * From CAddedDevSoundControl - */ - virtual void HandleRequest(TMMFMessage& aMessage); - - protected: // New functions - protected: // Functions from base classes - - private: - - /** - * C++ default constructor. - */ - CAddedDevSoundControlMsgHdlr(MAddedDevSoundControl* - aAddedDSControlCI); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - /** - * Determines which custom interface to call. - * - * @since S60 3.2 - * @param TMMFMessage& - client/server message container. - * @return void - * - */ - void DoHandleRequestL(TMMFMessage& aMessage); - - /** - * Handles EAddedDSControlSetHwAwareness message from the proxy and - * calls custom interface method. - * - * @since S60 3.2 - * @param TMMFMessage& - client/server message container. - * @return void - * - */ - void DoSetHwAwarenessL(TMMFMessage& aMessage); - - /** - * Handles EAddedDSControlPauseAndFlush message from the proxy and - * calls custom interface method. - * - * @since S60 3.2 - * @param TMMFMessage& - client/server message container. - * @return void - * - */ - void DoPauseAndFlushL(TMMFMessage& aMessage); - - - public: // Data - protected: // Data - private: // Data - - // Pointer to the actual custom interface implementation - MAddedDevSoundControl* iAddedDSControlCI; - - public: // Friend classes - protected: // Friend classes - private: // Friend classes - - }; - -#endif // CADDEDDEVSOUNDCONTROLMSGHDLR_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/Inc/AddedDevSoundControlProxy.h --- a/audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/Inc/AddedDevSoundControlProxy.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,123 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Interface proxy for AddedDevSoundControl CI. -* -*/ - - -#ifndef ADDEDDEVSOUNDCONTROLPROXY_H -#define ADDEDDEVSOUNDCONTROLPROXY_H - -// INCLUDES -#include -#include "AddedDevSoundControlCI.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -class CCustomInterfaceUtility; -class MCustomCommand; - -// CLASS DECLARATION - -/** - * Proxy for AddedDevSoundControl CI. - * This proxy translates the interface API calls to messages and - * sends them to the message handler. - * - * @lib AddedDevSoundControlProxy.lib - * @since S60 3.2 - */ -class CAddedDevSoundControlProxy : public MAddedDevSoundControl - - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CAddedDevSoundControlProxy* NewL( - TMMFMessageDestinationPckg aMessageHandler, - MCustomCommand& aCustomCommand, - CCustomInterfaceUtility* aCustomInterfaceUtility); - - /** - * Destructor. - */ - virtual ~CAddedDevSoundControlProxy(); - - public: // New functions - - public: // Functions from base classes - - // From MAddedDevSoundControl - - /** - * Handles client request to alter DevSound's behavior for Pause. - * - * @since S60 3.2 - * @param TBool - Toggles HW awarness - * @return TInt - Function call status - * - */ - virtual TInt SetHwAwareness(TBool aHwAware); - - /** - * Handles client request to pause the audio resources and flush. - * the buffers. - * - * @since S60 3.2 - * @return TInt - Function call status - */ - virtual TInt PauseAndFlush(); - - - protected: // New functions - - protected: // Functions from base classes - - private: - - /** - * C++ default constructor. - */ - CAddedDevSoundControlProxy( - TMMFMessageDestinationPckg aMessageHandler, - MCustomCommand& aCustomCommand, - CCustomInterfaceUtility* aCustomInterfaceUtility); - - public: // Data - protected: // Data - private: // Data - - // Handle to object used for sending IPC commands - MCustomCommand& iCustomCommand; - - // Message object destined for the message handler - TMMFMessageDestinationPckg iMessageHandler; - - // Handle to utility object used in interface framework - CCustomInterfaceUtility* iCustomInterfaceUtility; - - }; - -#endif // ADDEDDEVSOUNDCONTROLPROXY_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/MessageHandlerFactory_stub/BWINS/MESSAGEHANDLERFACTORYU.DEF --- a/audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/MessageHandlerFactory_stub/BWINS/MESSAGEHANDLERFACTORYU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - ?Create@CMessageHandlerFactory@@SAPAVCMMFObject@@VTUid@@PAXAAVCMMFObjectContainer@@@Z @ 1 NONAME ; class CMMFObject * CMessageHandlerFactory::Create(class TUid, void *, class CMMFObjectContainer &) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/MessageHandlerFactory_stub/EABI/MessageHandlerFactoryU.DEF --- a/audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/MessageHandlerFactory_stub/EABI/MessageHandlerFactoryU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - _ZN22CMessageHandlerFactory6CreateE4TUidPvR19CMMFObjectContainer @ 1 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/MessageHandlerFactory_stub/group/MessageHandlerFactory_stub.mmp --- a/audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/MessageHandlerFactory_stub/group/MessageHandlerFactory_stub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -/* -* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project definition file for project MessageHandlerFactory_stub -* Version : %version: bh1mmcf#16 % -* -*/ - - -#include - -TARGET MessageHandlerFactory.dll -TARGETTYPE DLL -UID 0x1000008D 0x10203821 - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE MessageHandlerFactory.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../Inc -USERINCLUDE ../src - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common - -LIBRARY euser.lib - -LIBRARY AudioEqualizerMessageHandler.lib -LIBRARY EnvironmentalReverbMessageHandler.lib -LIBRARY StereoWideningMessageHandler.lib -LIBRARY BassBoostMessageHandler.lib -LIBRARY ListenerDopplerMessageHandler.lib -LIBRARY ListenerLocationMessageHandler.lib -LIBRARY ListenerOrientationMessageHandler.lib -LIBRARY SourceDopplerMessageHandler.lib -LIBRARY SourceLocationMessageHandler.lib -LIBRARY SourceOrientationMessageHandler.lib -LIBRARY DistanceAttenuationMessageHandler.lib -LIBRARY LoudnessMessageHandler.lib -LIBRARY RoomLevelMessageHandler.lib -LIBRARY RestrictedAudioOutputMessageHandler.lib -LIBRARY AudioInputMessageHandler.lib -LIBRARY AudioOutputMessageHandler.lib -LIBRARY SpeechEncoderConfigMsgHdlr.lib -LIBRARY ErrorConcealmentIntfcMsgHdlr.lib -LIBRARY G711DecoderIntfcMsgHdlr.lib -LIBRARY G729DecoderIntfcMsgHdlr.lib -LIBRARY IlbcDecoderIntfcMsgHdlr.lib -LIBRARY G711EncoderIntfcMsgHdlr.lib -LIBRARY G729EncoderIntfcMsgHdlr.lib -LIBRARY IlbcEncoderIntfcMsgHdlr.lib -LIBRARY AddedDevSoundControlMsgHdlr.lib - -//enable each line when supported by the adaptation -//LIBRARY AudioResourceMessageHandler.lib -//LIBRARY AacDecoderConfigMsgHdlr.lib -//LIBRARY AudioVibraControlMsgHdlr.lib - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/MessageHandlerFactory_stub/group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/MessageHandlerFactory_stub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file custom interface proxy builder. -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -MessageHandlerFactory_stub.mmp - -// End of File - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/MessageHandlerFactory_stub/inc/MessageHandlerFactory.h --- a/audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/MessageHandlerFactory_stub/inc/MessageHandlerFactory.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Declaration of the adaptation stub for MessageHandlerFactory. -* -*/ - -#ifndef __CMESSAGEHANDLERFACTORY_H -#define __CMESSAGEHANDLERFACTORY_H - -#include -#include - -// CLASS DECLARATION -class CMessageHandlerFactory : public CBase - { -public: - IMPORT_C static CMMFObject* Create(TUid aInterfaceUid, - TAny* aCustomInterface, - CMMFObjectContainer& aContainer); - }; - -#endif - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/MessageHandlerFactory_stub/src/MessageHandlerFactory.cpp --- a/audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/MessageHandlerFactory_stub/src/MessageHandlerFactory.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,196 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Implementation of the adaptation stub for -* : MessageHandlerFactory. -* -*/ - -#include "MessageHandlerFactory.h" -#include "AudioInputMessageHandler.h" -#include "AudioOutputMessageHandler.h" -#include "AudioInputMessageTypes.h" -#include "AudioOutputMessageTypes.h" - -#include "MessageHandlerFactory.h" -#include "AudioEqualizerMessageHandler.h" -#include "BassBoostMessageHandler.h" -#include "DistanceAttenuationMessageHandler.h" -#include "EnvironmentalReverbMessageHandler.h" -#include "ListenerDopplerMessageHandler.h" -#include "ListenerLocationMessageHandler.h" -#include "ListenerOrientationMessageHandler.h" -#include "LoudnessMessageHandler.h" -#include "RoomLevelMessageHandler.h" -#include "SourceDopplerMessageHandler.h" -#include "SourceLocationMessageHandler.h" -#include "SourceOrientationMessageHandler.h" -#include "StereoWideningMessageHandler.h" -#include "AddedDevSoundControlMsgHdlr.h" -#include "RestrictedAudioOutputMessageHandler.h" -#include "AudioOutputMessageHandler.h" - -#include "SpeechEncoderConfigMsgHdlr.h" -#include "ErrorConcealmentIntfcMsgHdlr.h" -#include "G711DecoderIntfcMsgHdlr.h" -#include "G729DecoderIntfcMsgHdlr.h" -#include "IlbcDecoderIntfcMsgHdlr.h" -#include "G711EncoderIntfcMsgHdlr.h" -#include "G729EncoderIntfcMsgHdlr.h" -#include "IlbcEncoderIntfcMsgHdlr.h" -#include "AacDecoderConfigMsgHdlr.h" -//#include "AudioVibraControlMsgHdlr.h" // Audio Vibra Control API is deprecated - -#include "SpeechEncoderConfig.h" -#include "AacDecoderConfig.h" -#include "ErrorConcealmentIntfc.h" -#include "G711DecoderIntfc.h" -#include "G729DecoderIntfc.h" -#include "IlbcDecoderIntfc.h" -#include "G711EncoderIntfc.h" -#include "G729EncoderIntfc.h" -#include "IlbcEncoderIntfc.h" -//#include "AudioVibraControl.h" // Audio Vibra Control API is deprecated - -EXPORT_C CMMFObject* CMessageHandlerFactory::Create(TUid aInterfaceUid, - TAny* aCustomInterface, - CMMFObjectContainer& aContainer) - { - CMMFObject* messageHandler = NULL; - - if (aInterfaceUid == KUidAudioEqualizerEffect) - { - messageHandler = CAudioEqualizerMessageHandler::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidBassBoostEffect) - { - messageHandler = CBassBoostMessageHandler::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidDistanceAttenuationEffect) - { - messageHandler = CDistanceAttenuationMessageHandler::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidEnvironmentalReverbEffect) - { - messageHandler = CEnvironmentalReverbMessageHandler::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidListenerDopplerEffect) - { - messageHandler = CListenerDopplerMessageHandler::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidListenerLocationEffect) - { - messageHandler = CListenerLocationMessageHandler::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidListenerOrientationEffect) - { - messageHandler = CListenerOrientationMessageHandler::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidLoudnessEffect) - { - messageHandler = CLoudnessMessageHandler::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidRoomLevelEffect) - { - messageHandler = CRoomLevelMessageHandler::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidSourceDopplerEffect) - { - messageHandler = CSourceDopplerMessageHandler::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidSourceLocationEffect) - { - messageHandler = CSourceLocationMessageHandler::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidSourceOrientationEffect) - { - messageHandler = CSourceOrientationMessageHandler::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidStereoWideningEffect) - { - messageHandler = CStereoWideningMessageHandler::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidRestrictedAudioOutput) - { - messageHandler = CRestrictedAudioOutputMessageHandler::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidAudioOutput) - { - messageHandler = CAudioOutputMessageHandler::NewL(aCustomInterface, aContainer); - } - else if (aInterfaceUid == KUidAudioInput) - { - messageHandler = CAudioInputMessageHandler::NewL(aCustomInterface, aContainer); - } - else if (aInterfaceUid == KUidAudioOutput) - { - messageHandler = CAudioOutputMessageHandler::NewL(aCustomInterface, aContainer); - } - else if (aInterfaceUid == KUidSpeechEncoderConfig) - { - messageHandler = CSpeechEncoderConfigMsgHdlr::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidErrorConcealmentIntfc) - { - messageHandler = CErrorConcealmentIntfcMsgHdlr::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidG711DecoderIntfc) - { - messageHandler = CG711DecoderIntfcMsgHdlr::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidG729DecoderIntfc) - { - messageHandler = CG729DecoderIntfcMsgHdlr::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidIlbcDecoderIntfc) - { - messageHandler = CIlbcDecoderIntfcMsgHdlr::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidG711EncoderIntfc) - { - messageHandler = CG711EncoderIntfcMsgHdlr::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidG729EncoderIntfc) - { - messageHandler = CG729EncoderIntfcMsgHdlr::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidIlbcEncoderIntfc) - { - messageHandler = CIlbcEncoderIntfcMsgHdlr::NewL(aCustomInterface); - }/* - else if (aInterfaceUid == KUidAddedDevSoundControlInterface) - { - messageHandler = CAddedDevSoundControlMsgHdlr::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidAudioResource) - { - messageHandler = CAudioResourceMessageHandler::NewL(aCustomInterface, aContainer); - } - else if (aInterfaceUid == KUidAudioEqualizerEffect) - { - messageHandler = CAudioEqualizerMessageHandler::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidAudioVibraControl) - { - messageHandler = CAudioVibraControlMsgHdlr::NewL(aCustomInterface); - } - else if (aInterfaceUid == KUidAacDecoderConfig) - { - messageHandler = CAacDecoderConfigMsgHdlr::NewL(aCustomInterface); - }*/ - - return messageHandler; - } - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audioenhancementfactorystubs/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file custom command utility -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -../CustomInterfaceProxyFactory_stub/group/CustomInterfaceProxyFactory_stub.mmp -../MessageHandlerFactory_stub/group/MessageHandlerFactory_stub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioinputcistub/BWINS/AUDIOINPUTCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioinputcistub/BWINS/AUDIOINPUTCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - ?NewL@CAudioInputCI@@SAPAV1@AAVCMMFDevSound@@@Z @ 1 NONAME ; class CAudioInputCI * CAudioInputCI::NewL(class CMMFDevSound &) - ?NewL@CAudioInputCI@@SAPAV1@XZ @ 2 NONAME ; class CAudioInputCI * CAudioInputCI::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioinputcistub/EABI/AudioInputCIU.DEF --- a/audiostubs/devsoundextensions_stubs/audioinputcistub/EABI/AudioInputCIU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -EXPORTS - _ZN13CAudioInputCI4NewLER12CMMFDevSound @ 1 NONAME - _ZN13CAudioInputCI4NewLEv @ 2 NONAME - _ZTI13CAudioInputCI @ 3 NONAME ; ## - _ZTV13CAudioInputCI @ 4 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioinputcistub/Group/AudioInputCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audioinputcistub/Group/AudioInputCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project definition file for project AudioInputCIStub -* Version : %version: bh1mmcf#17 % -* -*/ - -#include - -TARGET AudioInputCI_stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x1020381B - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE AudioInputCIStub.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../inc - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY AudioInputCI.lib - -LINKAS AudioInputCI.dll - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioinputcistub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audioinputcistub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for adaptation custom interface builder stub -* -*/ - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -AudioInputCIStub.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioinputcistub/rom/AudioInputCI_Stub.iby --- a/audiostubs/devsoundextensions_stubs/audioinputcistub/rom/AudioInputCI_Stub.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Support for AudioInput Routing API Stubs -* -*/ - -#ifndef __AUDIOINPUTCI_STUB_IBY__ -#define __AUDIOINPUTCI_STUB_IBY__ - -file=ABI_DIR\BUILD_DIR\AudioInputCI_Stub.dll SHARED_LIB_DIR\AudioInputCI_Stub.dll - -#endif diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audioinputcistub/src/AudioInputCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audioinputcistub/src/AudioInputCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - AudioInput CI Stub -* -*/ - -#include -#include "AudioInputCI.h" - - -EXPORT_C CAudioInputCI* CAudioInputCI::NewL(CMMFDevSound& aDevSound) - { - CAudioInputCI* self = new(ELeave) CAudioInputCI(aDevSound); - return self; - } - -EXPORT_C CAudioInputCI* CAudioInputCI::NewL() - { - CAudioInputCI* self = new(ELeave) CAudioInputCI(); - return self; - } - -CAudioInputCI::CAudioInputCI(CMMFDevSound& aDevSound) : - iDevSound(&aDevSound), - iInputArray(4) - { - } - -CAudioInputCI::CAudioInputCI() : - iInputArray(4) - { - } - -CAudioInputCI::~CAudioInputCI() - { - } - -CAudioInput::TAudioInputArray CAudioInputCI::AudioInput() - { -#ifdef _DEBUG - RDebug::Print(_L("CAudioInputCI::AudioInput")); -#endif - return iInputArray.Array(); - } - -void CAudioInputCI::SetAudioInputL(TAudioInputArray aAudioInputs) - { -#ifdef _DEBUG - RDebug::Print(_L("CAudioInputCI::SetAudioInputL")); -#endif - iInputArray.Reset(); - TInt count = aAudioInputs.Count(); - - - for(int i=0; i# - _ZTI17CAudioOutputTimer @ 4 NONAME ; ## - _ZTV14CAudioOutputCI @ 5 NONAME ; ## - _ZTV17CAudioOutputTimer @ 6 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiooutputcistub/Group/AudioOutputCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/audiooutputcistub/Group/AudioOutputCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project definition file for project AudioOutputCIStub -* Version : %version: bh1mmcf#16 % -* -*/ - - -#include - -TARGET AudioOutputCI_stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x1020381B - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE AudioOutputCIStub.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../inc - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/common - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY AudioOutputCI.lib - -LINKAS AudioOutputCI.dll - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiooutputcistub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audiooutputcistub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for adaptation custom interface builder stub -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -AudioOutputCIStub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiooutputcistub/rom/AudioOutputCI_Stub.iby --- a/audiostubs/devsoundextensions_stubs/audiooutputcistub/rom/AudioOutputCI_Stub.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Support for AudioOutput Routing API Stubs -* -*/ - -#ifndef __AUDIOOUTPUTCI_STUB_IBY__ -#define __AUDIOOUTPUTCI_STUB_IBY__ - -file=ABI_DIR\BUILD_DIR\AudioOutputCI_Stub.dll SHARED_LIB_DIR\AudioOutputCI_Stub.dll - -#endif diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiooutputcistub/src/AudioOutputCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/audiooutputcistub/src/AudioOutputCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,167 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - AudioOutput CI Stub -* -*/ - -#include -//#include "AudioOutputCustomInterfaceHandler.h" -#include "AudioOutputCI.h" -//#include "AudioOutputMessageTypes.h" -#include -#include - -EXPORT_C CAudioOutputCI* CAudioOutputCI::NewL(CMMFDevSound& aDevSound) - { - CAudioOutputCI* self = new(ELeave) CAudioOutputCI(aDevSound); - return self; - } - -CAudioOutputCI::CAudioOutputCI(CMMFDevSound& aDevSound) : - iDevSound(&aDevSound), - iDefault(EPublic) - { - if (!iAudioOutputTimer) - { - iAudioOutputTimer = new (ELeave) CAudioOutputTimer(this); - } - iAudioOutputTimer->After(5000000); - } - -CAudioOutputCI::~CAudioOutputCI() - { - delete iAudioOutputTimer; - } - -CAudioOutput::TAudioOutputPreference CAudioOutputCI::AudioOutput() - { - return iOutput; - } - -CAudioOutput::TAudioOutputPreference CAudioOutputCI::DefaultAudioOutput() - { - return iDefault; - } - -void CAudioOutputCI::RegisterObserverL( MAudioOutputObserver& aObserver ) - { - iObserver = &aObserver; - } - -TBool CAudioOutputCI::SecureOutput() - { -#ifdef _DEBUG - RDebug::Print(_L("CAudioOutputCI::SecureOutput")); -#endif - return iSecureOutput; - } - -void CAudioOutputCI::SetAudioOutputL( TAudioOutputPreference aAudioOutput ) - { -#ifdef _DEBUG - RDebug::Print(_L("CAudioOutputCI::SetAudioOutputL")); -#endif - iOutput = aAudioOutput; - } - -void CAudioOutputCI::SetSecureOutputL( TBool aSecure ) - { -#ifdef _DEBUG - RDebug::Print(_L("CAudioOutputCI::SetSecureOutputL")); -#endif - iSecureOutput = aSecure; - } - -void CAudioOutputCI::UnregisterObserver( MAudioOutputObserver&/* aObserver */) - { - iObserver = NULL; - } - -void CAudioOutputCI::DefaultChanged() - { - - if (iCount % 4 == 0) - { - iDefault = EAll; - } - else if (iCount % 4 == 1) - { - iDefault = ENoOutput; - } - else if ( iCount % 4 == 2) - { - iDefault = EPrivate; - } - else if (iCount % 4 == 3) - { - iDefault = EPublic; - } - - if (iObserver) - { - iObserver->DefaultAudioOutputChanged(*this,iDefault); - } - iCount++; - iAudioOutputTimer->After(5000000); - - } - -EXPORT_C CAudioOutputCI* CAudioOutputCI::NewL() - { - CAudioOutputCI* self = new(ELeave) CAudioOutputCI(); - return self; - } - -CAudioOutputCI::CAudioOutputCI() : - iDefault(EPublic) - { - if (!iAudioOutputTimer) - { - iAudioOutputTimer = new (ELeave) CAudioOutputTimer(this); - } - iAudioOutputTimer->After(5000000); - } - -CAudioOutputTimer::CAudioOutputTimer(CAudioOutputCI* aCustomInterface) : - CTimer(0), - iCustomInterface(aCustomInterface) - { - CTimer::ConstructL(); - CActiveScheduler::Add(this); - } - -CAudioOutputTimer::~CAudioOutputTimer() - { - Cancel(); - } - -void CAudioOutputTimer::RunL() - { -#ifdef _DEBUG - RDebug::Print(_L("CAudioOutputTimer::RunL")); -#endif - iCustomInterface->DefaultChanged(); - } - -void CAudioOutputTimer::DoCancel() - { - } - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - - - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiovisualizationstub/Bwins/VisualizationU.DEF --- a/audiostubs/devsoundextensions_stubs/audiovisualizationstub/Bwins/VisualizationU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -EXPORTS - ?DataRate@CVisualization@@QBEKXZ @ 1 NONAME ; unsigned long CVisualization::DataRate(void) const - ?DataRateRange@CVisualization@@QAEXAAK0@Z @ 2 NONAME ; void CVisualization::DataRateRange(unsigned long &, unsigned long &) - ?EnableFrequencyData@CVisualization@@QAEXH@Z @ 3 NONAME ; void CVisualization::EnableFrequencyData(int) - ?EnableWaveformData@CVisualization@@QAEXH@Z @ 4 NONAME ; void CVisualization::EnableWaveformData(int) - ?FreqencyBandCount@CVisualization@@QBEKXZ @ 5 NONAME ; unsigned long CVisualization::FreqencyBandCount(void) const - ?FrequencyBandCountRange@CVisualization@@QAEXAAK0@Z @ 6 NONAME ; void CVisualization::FrequencyBandCountRange(unsigned long &, unsigned long &) - ?IsFrequencyDataEnabled@CVisualization@@QBEHXZ @ 7 NONAME ; int CVisualization::IsFrequencyDataEnabled(void) const - ?IsWaveformDataEnabled@CVisualization@@QBEHXZ @ 8 NONAME ; int CVisualization::IsWaveformDataEnabled(void) const - ?NewL@CVisualization@@SAPAV1@AAVMVisualizationObserver@@@Z @ 9 NONAME ; class CVisualization * CVisualization::NewL(class MVisualizationObserver &) - ?SamplingRate@CVisualization@@QBEKXZ @ 10 NONAME ; unsigned long CVisualization::SamplingRate(void) const - ?SetDataRateL@CVisualization@@QAEXK@Z @ 11 NONAME ; void CVisualization::SetDataRateL(unsigned long) - ?SetFrequencyBandCountL@CVisualization@@QAEXK@Z @ 12 NONAME ; void CVisualization::SetFrequencyBandCountL(unsigned long) - ?SetWaveformDataLengthL@CVisualization@@QAEXK@Z @ 13 NONAME ; void CVisualization::SetWaveformDataLengthL(unsigned long) - ?StartL@CVisualization@@QAEXXZ @ 14 NONAME ; void CVisualization::StartL(void) - ?StopL@CVisualization@@QAEXXZ @ 15 NONAME ; void CVisualization::StopL(void) - ?WaveformDataLength@CVisualization@@QBEKXZ @ 16 NONAME ; unsigned long CVisualization::WaveformDataLength(void) const - ?WaveformDataLengthRange@CVisualization@@QAEXAAK0@Z @ 17 NONAME ; void CVisualization::WaveformDataLengthRange(unsigned long &, unsigned long &) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiovisualizationstub/EABI/VisualizationU.DEF --- a/audiostubs/devsoundextensions_stubs/audiovisualizationstub/EABI/VisualizationU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -EXPORTS - _ZN14CVisualization12SetDataRateLEm @ 1 NONAME - _ZN14CVisualization13DataRateRangeERmS0_ @ 2 NONAME - _ZN14CVisualization18EnableWaveformDataEi @ 3 NONAME - _ZN14CVisualization19EnableFrequencyDataEi @ 4 NONAME - _ZN14CVisualization22SetFrequencyBandCountLEm @ 5 NONAME - _ZN14CVisualization22SetWaveformDataLengthLEm @ 6 NONAME - _ZN14CVisualization23FrequencyBandCountRangeERmS0_ @ 7 NONAME - _ZN14CVisualization23WaveformDataLengthRangeERmS0_ @ 8 NONAME - _ZN14CVisualization4NewLER22MVisualizationObserver @ 9 NONAME - _ZN14CVisualization5StopLEv @ 10 NONAME - _ZN14CVisualization6StartLEv @ 11 NONAME - _ZNK14CVisualization12SamplingRateEv @ 12 NONAME - _ZNK14CVisualization17FreqencyBandCountEv @ 13 NONAME - _ZNK14CVisualization18WaveformDataLengthEv @ 14 NONAME - _ZNK14CVisualization21IsWaveformDataEnabledEv @ 15 NONAME - _ZNK14CVisualization22IsFrequencyDataEnabledEv @ 16 NONAME - _ZNK14CVisualization8DataRateEv @ 17 NONAME - _ZTI14CVisualization @ 18 NONAME ; ## - _ZTIN14CVisualization5CBodyE @ 19 NONAME ; ## - _ZTV14CVisualization @ 20 NONAME ; ## - _ZTVN14CVisualization5CBodyE @ 21 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiovisualizationstub/Group/Visualization.mmp --- a/audiostubs/devsoundextensions_stubs/audiovisualizationstub/Group/Visualization.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project file for Audio Visualization -* -* -*/ - - -#include - -TARGET Visualization_stub.dll -TARGETTYPE dll -UID 0x1000008d 0x10207A99 - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src - -USERINCLUDE ../inc ../src - -OS_LAYER_SYSTEMINCLUDE - -SOURCE Visualization.cpp -SOURCE VisualizationBody.cpp - -LIBRARY Euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY Visualization.lib - -LINKAS Visualization.dll diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiovisualizationstub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/audiovisualizationstub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for Audio Visualization -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -Visualization.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiovisualizationstub/rom/Visualization_stub.iby --- a/audiostubs/devsoundextensions_stubs/audiovisualizationstub/rom/Visualization_stub.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - IBY file for the AudioVisualizationStub -* -*/ - - -#ifndef VISUALIZATION_IBY -#define VISUALIZATION_IBY - -#ifdef __AUDIO_EFFECTS_API - -file=ABI_DIR\BUILD_DIR\Visualization_stub.dll SHARED_LIB_DIR\Visualization.dll - -#endif //__AUDIO_EFFECTS_API -#endif // VISUALIZATION_IBY - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiovisualizationstub/src/VisualizationBody.cpp --- a/audiostubs/devsoundextensions_stubs/audiovisualizationstub/src/VisualizationBody.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,261 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Implementation of class Audio VisualiztionBody. -* -*/ - - -// INCLUDE FILES - -#ifdef _DEBUG -#include -#endif -#include -#include -#include "VisualizationBody.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CVisualization::CVisualization -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CVisualization::CBody::CBody() - : iFrequencyDataEnabled(EFalse), - iWaveFormDataEnabled(EFalse) - { - } - - -// Destructor -CVisualization::CBody::~CBody() - { - iFrequencyData.Close(); - iWaveFormData.Close(); - } - -// ----------------------------------------------------------------------------- -// CVisualization::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CVisualization::CBody::ConstructL( - MVisualizationObserver& aObserver ) - { -#ifdef _DEBUG - RDebug::Print(_L("CVisualization::Body::ConstructL")); -#endif - iObserver = &aObserver; - } - -// ----------------------------------------------------------------------------- -// CVisualization::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CVisualization::CBody* CVisualization::CBody::NewL( - MVisualizationObserver& aObserver ) - { -#ifdef _DEBUG - RDebug::Print(_L("CVisualization::Cbody::NewL")); -#endif - CVisualization::CBody* self = new (ELeave) CVisualization::CBody(); - CleanupStack::PushL(self); - self->ConstructL(aObserver); - CleanupStack::Pop(); - return self; - } - -// ----------------------------------------------------------------------------- -// CVisualization::DataRate -// ----------------------------------------------------------------------------- -// - TUint32 CVisualization::CBody::DataRate() const - { - return iDataRate; - } - -// ----------------------------------------------------------------------------- -// CVisualization::DataRateRange -// ----------------------------------------------------------------------------- -// - void CVisualization::CBody::DataRateRange( - TUint32& aMin, - TUint32& aMax ) - { - aMin = iDataRateMin; - aMax = iDataRateMax; - } - -// ----------------------------------------------------------------------------- -// CVisualization::EnableFrequencyData -// ----------------------------------------------------------------------------- -// - void CVisualization::CBody::EnableFrequencyData( - TBool aIndicator ) - { - iFrequencyDataEnabled = aIndicator; - } - -// ----------------------------------------------------------------------------- -// CVisualization::EnableWaveformData -// ----------------------------------------------------------------------------- -// - void CVisualization::CBody::EnableWaveformData( - TBool aIndicator ) - { - iWaveFormDataEnabled = aIndicator; - } - -// ----------------------------------------------------------------------------- -// CVisualization::FreqencyBandCount -// ----------------------------------------------------------------------------- -// - TUint32 CVisualization::CBody::FreqencyBandCount() const - { - return iFreqencyBandCount; - } - -// ----------------------------------------------------------------------------- -// CVisualization::FrequencyBandCountRange -// ----------------------------------------------------------------------------- -// - void CVisualization::CBody::FrequencyBandCountRange( - TUint32& aMin, - TUint32& aMax ) - { - aMin = iFreqencyBandCountMin; - aMax = iFreqencyBandCountMax; - } - -// ----------------------------------------------------------------------------- -// CVisualization::IsFrequencyDataEnabled -// ----------------------------------------------------------------------------- -// - TBool CVisualization::CBody::IsFrequencyDataEnabled() const - { - return iFrequencyDataEnabled; - } - -// ----------------------------------------------------------------------------- -// CVisualization::IsWaveformDataEnabled -// ----------------------------------------------------------------------------- -// - TBool CVisualization::CBody::IsWaveformDataEnabled() const - { - return iWaveFormDataEnabled; - } - -// ----------------------------------------------------------------------------- -// CVisualization::SamplingRate -// ----------------------------------------------------------------------------- -// - TUint32 CVisualization::CBody::SamplingRate() const - { - return iSamplingRate; - } - -// ----------------------------------------------------------------------------- -// CVisualization::SetDataRateL -// ----------------------------------------------------------------------------- -// - void CVisualization::CBody::SetDataRateL( - TUint32 aDataRate ) - { - if ( (aDataRate >= iDataRateMin) && (aDataRate <= iDataRateMax) ) - { - iDataRate = aDataRate; - } - else - { - User::Leave(KErrArgument); - } - } - -// ----------------------------------------------------------------------------- -// CVisualization::SetFrequencyBandCount -// ----------------------------------------------------------------------------- -// - void CVisualization::CBody::SetFrequencyBandCountL( - TUint32 aFrequencyBandCount ) - { - if ( (aFrequencyBandCount >= iFreqencyBandCountMin) && (aFrequencyBandCount <= iFreqencyBandCountMax) ) - { - iFreqencyBandCount = aFrequencyBandCount; - } - else - { - User::Leave(KErrArgument); - } - } - -// ----------------------------------------------------------------------------- -// CVisualization::SetWaveformDataLength -// ----------------------------------------------------------------------------- -// - void CVisualization::CBody::SetWaveformDataLengthL( - TUint32 aWaveformDataLength ) - { - if ( (aWaveformDataLength >= iWaveformDataLengthMin) && (aWaveformDataLength <= iWaveformDataLengthMax) ) - { - iWaveformDataLength = aWaveformDataLength; - } - else - { - User::Leave(KErrArgument); - } - } - -// ----------------------------------------------------------------------------- -// CVisualization::StartL -// ----------------------------------------------------------------------------- -// - void CVisualization::CBody::StartL() - { - User::Leave(KErrNotSupported); - } - -// ----------------------------------------------------------------------------- -// CVisualization::StopL -// ----------------------------------------------------------------------------- -// - void CVisualization::CBody::StopL() - { - User::Leave(KErrNotSupported); - } - -// ----------------------------------------------------------------------------- -// CVisualization::WaveformDataLength -// ----------------------------------------------------------------------------- -// - TUint32 CVisualization::CBody::WaveformDataLength() const - { - return iWaveformDataLength; - } - -// ----------------------------------------------------------------------------- -// CVisualization::WaveformDataLengthRange -// ----------------------------------------------------------------------------- -// - void CVisualization::CBody::WaveformDataLengthRange( - TUint32& aMin, - TUint32& aMax ) - { - aMin = iWaveformDataLengthMin; - aMax = iWaveformDataLengthMax; - } - - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiovisualizationstub/src/VisualizationBody.h --- a/audiostubs/devsoundextensions_stubs/audiovisualizationstub/src/VisualizationBody.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,223 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - This is the definition of the audio visualization body class. -* -* -*/ - - -#ifndef CVISUALIZATIONBODY_H -#define CVISUALIZATIONBODY_H - -// INCLUDES -#include - -// FORWARD DECLARATION -class MVisualizationObserver; - -// CLASS DECLARATION - -/** -* This is the base class for audio visualization. -* -* @lib Visualization.lib -* @since 3.0 -*/ - -class CVisualization::CBody: public CBase - { - - public: // Constructors and destructor - - /** - * Factory function for creating the volume object. - * @since 3.0 - * @param aObserver A visualization observer. - * @return pointer to CVisualization object - */ - static CBody* NewL( MVisualizationObserver& aObserver); - - /** - * Destructor - */ - virtual ~CBody(); - - public: // New functions - - /** - * Get the data rate. - * @since 3.0 - * @return data rate in Hz. - */ - TUint32 DataRate() const; - - /** - * Get the upper and lower limits of the supported data rate range - * @since 3.0 - * @param aMin The lower limit of the data rate range - * @param aMax The upper limit of the data rate range - */ - void DataRateRange( TUint32& aMin, TUint32& aMax ); - - /** - * Used by application enable or disable frequency data. - * @since 3.0 - * @param aIndicator Set to ETrue to enable frequency, EFalse to disable frequency data. - */ - void EnableFrequencyData( TBool aIndicator ); - - /** - * Used by application to enable or disable waveform data. - * @since 3.0 - * @param aIndicator Set to ETrue to enable waveform data, EFalse to disable waveform data. - */ - void EnableWaveformData( TBool aIndicator ); - - /** - * Get frequency band count. - * @since 3.0 - * @return frequency band count. - */ - TUint32 FreqencyBandCount( ) const; - - /** - * Get frequency band count range. - * @since 3.0 - * @param aMin Lower limit of the frequency band count range - * @param aMax Upper limit of the frequency band count range - */ - void FrequencyBandCountRange( TUint32& aMin, TUint32& aMax ); - - /** - * Determine whether frequency data is enabled. - * @since 3.0 - * @return ETrue, if frequency data is enabled. EFalse, if frequency data is disabled. - */ - TBool IsFrequencyDataEnabled( ) const; - - /** - * Determine whether waveform data is enabled. - * @since 3.0 - * @return ETrue, if waveform data is enabled. EFalse, if waveform data is disabled. - */ - TBool IsWaveformDataEnabled( ) const; - - /** - * Get the sampling rate. - * @since 3.0 - * @return The sampling rate. - */ - TUint32 SamplingRate() const; - - /** - * Set the data rate. - * @since 3.0 - * @param aDataRate The data rate. - */ - void SetDataRateL( TUint32 aDataRate ); - - /** - * Sets the frequency band count. Results in a call to - * MVisualizationObserver::FrequencyBandCountChanged(). - * @since 3.0 - * @param aFrequencyBandCount The frequency band count. - */ - void SetFrequencyBandCountL( TUint32 aFrequencyBandCount ); - - /** - * Sets the waveform band count. Results in a call to - * MVisualizationObserver::WaveformDataLengthChanged(). - * @since 3.0 - * @param aWaveformDataLength The waveform data length in samples. - */ - void SetWaveformDataLengthL( TUint32 aWaveformDataLength ); - - /** - * Starts visualization. Results in a call to MVisualizationObserver::VisualizationStarted() - * @since 3.0 - */ - void StartL( ); - - /** - * Stops visualization. Results in a call to MVisualizationObserver::VisualizationStopped() - * @since 3.0 - */ - void StopL( ); - - /** - * Get the waveform data length. - * @since 3.0 - * @return The waveform data length in samples. - */ - TUint32 WaveformDataLength() const; - - /** - * Get the waveform data length range in samples. - * @since 3.0 - * @param aMin The lower limit of the waveform data length range - * @param aMax The upper limit of the waveform data length range - */ - void WaveformDataLengthRange( TUint32& aMin, TUint32& aMax ); - - private: - - /** - * Private C++ constructor for this class. - * @since 3.0 - */ - CBody(); - - /** - * Second Phase Costructor - * @since 3.0 - * @param aObserver Visualization Observer - */ - void ConstructL(MVisualizationObserver& aObserver ); - - private: // Data - - // Indicate whether frequency data is enabled or not - TBool iFrequencyDataEnabled; - - // Indicate whether waveform data is enabled or not - TBool iWaveFormDataEnabled; - - // Data rate - TUint32 iDataRate; - TUint32 iDataRateMin; - TUint32 iDataRateMax; - - // Frequency Data - TUint32 iFreqencyBandCount; - TUint32 iFreqencyBandCountMin; - TUint32 iFreqencyBandCountMax; - - // Sampling rate - TUint32 iSamplingRate; - - // Waveform Data - TUint32 iWaveformDataLength; - TUint32 iWaveformDataLengthMin; - TUint32 iWaveformDataLengthMax; - - RArray iFrequencyData; - RArray iWaveFormData; - - // Pointer to Observer - MVisualizationObserver* iObserver; - }; - -#endif // of CVISUALIZATIONCBODY_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/audiovisualizationstub/src/visualization.cpp --- a/audiostubs/devsoundextensions_stubs/audiovisualizationstub/src/visualization.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,232 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Implementation of class Audio Visualiztion. -* -*/ - - -// INCLUDE FILES - -#ifdef _DEBUG -#include -#endif -#include -#include -#include "VisualizationBody.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CVisualization::CVisualization -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CVisualization::CVisualization() - { - } - - -// Destructor -CVisualization::~CVisualization() - { - delete iBody; - } - -// ----------------------------------------------------------------------------- -// CVisualization::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CVisualization::ConstructL(MVisualizationObserver& aObserver) - { -#ifdef _DEBUG - RDebug::Print(_L("CVisualization::ConstructL")); -#endif - iBody = CVisualization::CBody::NewL(aObserver); - } - -// ----------------------------------------------------------------------------- -// CVisualization::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CVisualization* CVisualization::NewL( - MVisualizationObserver& aObserver ) - { -#ifdef _DEBUG - RDebug::Print(_L("CVisualization::NewL")); -#endif - CVisualization* self = new (ELeave) CVisualization(); - CleanupStack::PushL(self); - self->ConstructL(aObserver); - CleanupStack::Pop(); - return self; - } - -// ----------------------------------------------------------------------------- -// CVisualization::DataRate -// ----------------------------------------------------------------------------- -// -EXPORT_C TUint32 CVisualization::DataRate() const - { - return iBody->DataRate(); - } - -// ----------------------------------------------------------------------------- -// CVisualization::DataRateRange -// ----------------------------------------------------------------------------- -// -EXPORT_C void CVisualization::DataRateRange( - TUint32& aMin, - TUint32& aMax ) - { - iBody->DataRateRange(aMin, aMax); - } - -// ----------------------------------------------------------------------------- -// CVisualization::EnableFrequencyData -// ----------------------------------------------------------------------------- -// -EXPORT_C void CVisualization::EnableFrequencyData( - TBool aIndicator ) - { - iBody->EnableFrequencyData(aIndicator); - } - -// ----------------------------------------------------------------------------- -// CVisualization::EnableWaveformData -// ----------------------------------------------------------------------------- -// -EXPORT_C void CVisualization::EnableWaveformData( - TBool aIndicator ) - { - iBody->EnableWaveformData(aIndicator); - } - -// ----------------------------------------------------------------------------- -// CVisualization::FreqencyBandCount -// ----------------------------------------------------------------------------- -// -EXPORT_C TUint32 CVisualization::FreqencyBandCount() const - { - return iBody->FreqencyBandCount(); - } - -// ----------------------------------------------------------------------------- -// CVisualization::FrequencyBandCountRange -// ----------------------------------------------------------------------------- -// -EXPORT_C void CVisualization::FrequencyBandCountRange( - TUint32& aMin, - TUint32& aMax ) - { - iBody->FrequencyBandCountRange(aMin, aMax); - } - -// ----------------------------------------------------------------------------- -// CVisualization::IsFrequencyDataEnabled -// ----------------------------------------------------------------------------- -// -EXPORT_C TBool CVisualization::IsFrequencyDataEnabled() const - { - return iBody->IsFrequencyDataEnabled(); - } - -// ----------------------------------------------------------------------------- -// CVisualization::IsWaveformDataEnabled -// ----------------------------------------------------------------------------- -// -EXPORT_C TBool CVisualization::IsWaveformDataEnabled() const - { - return iBody->IsWaveformDataEnabled(); - } - -// ----------------------------------------------------------------------------- -// CVisualization::SamplingRate -// ----------------------------------------------------------------------------- -// -EXPORT_C TUint32 CVisualization::SamplingRate() const - { - return iBody->SamplingRate(); - } - -// ----------------------------------------------------------------------------- -// CVisualization::SetDataRateL -// ----------------------------------------------------------------------------- -// -EXPORT_C void CVisualization::SetDataRateL( - TUint32 aDataRate ) - { - iBody->SetDataRateL(aDataRate); - } - -// ----------------------------------------------------------------------------- -// CVisualization::SetFrequencyBandCount -// ----------------------------------------------------------------------------- -// -EXPORT_C void CVisualization::SetFrequencyBandCountL( - TUint32 aFrequencyBandCount ) - { - iBody->SetFrequencyBandCountL(aFrequencyBandCount); - } - -// ----------------------------------------------------------------------------- -// CVisualization::SetWaveformDataLength -// ----------------------------------------------------------------------------- -// -EXPORT_C void CVisualization::SetWaveformDataLengthL( - TUint32 aWaveformDataLength ) - { - iBody->SetWaveformDataLengthL(aWaveformDataLength ); - } - -// ----------------------------------------------------------------------------- -// CVisualization::StartL -// ----------------------------------------------------------------------------- -// -EXPORT_C void CVisualization::StartL() - { - User::Leave(KErrNotSupported); - } - -// ----------------------------------------------------------------------------- -// CVisualization::StopL -// ----------------------------------------------------------------------------- -// -EXPORT_C void CVisualization::StopL() - { - User::Leave(KErrNotSupported); - } - -// ----------------------------------------------------------------------------- -// CVisualization::WaveformDataLength -// ----------------------------------------------------------------------------- -// -EXPORT_C TUint32 CVisualization::WaveformDataLength() const - { - return iBody->WaveformDataLength(); - } - -// ----------------------------------------------------------------------------- -// CVisualization::WaveformDataLengthRange -// ----------------------------------------------------------------------------- -// -EXPORT_C void CVisualization::WaveformDataLengthRange( - TUint32& aMin, - TUint32& aMax ) - { - iBody->WaveformDataLengthRange(aMin,aMax); - } - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/cistubplugin/data/cistubplugin.rss --- a/audiostubs/devsoundextensions_stubs/cistubplugin/data/cistubplugin.rss Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Stubplugin rss -* -*/ - - - -#include -#include -#include "cistubplugin.hrh" - - -RESOURCE REGISTRY_INFO theInfo - { - dll_uid = KUidCustomInterfacePluginDll; - interfaces = - { - INTERFACE_INFO - { - interface_uid = KMmfUidS60CustomInterfaceStub; - implementations = - { - IMPLEMENTATION_INFO - { - implementation_uid = KUidCustomInterfaceStubPlugin; - version_no = 1; - display_name = "Audio Play Routing Control Stub"; - default_data = "10207cab" ; - opaque_data = ""; - } - }; - } - }; - } - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/cistubplugin/group/bld.inf --- a/audiostubs/devsoundextensions_stubs/cistubplugin/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -cistubplugin.mmp diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/cistubplugin/group/cistubplugin.mmp --- a/audiostubs/devsoundextensions_stubs/cistubplugin/group/cistubplugin.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CI Stub plugin mmp -* -*/ - - -#include - -TARGET cistubplugin.dll -TARGETTYPE PLUGIN -UID 0x10009D8D 0x10207C70 -CAPABILITY ALL -TCB -VENDORID VID_DEFAULT - - -USERINCLUDE ../inc -USERINCLUDE ../../inc -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/ecom -SYSTEMINCLUDE /epoc32/include/mmf/server -SYSTEMINCLUDE /epoc32/include/mmf/common - -LIBRARY euser.lib -LIBRARY ecom.lib -LIBRARY efsrv.lib -LIBRARY RestrictedAudioOutputCI.lib -LIBRARY AudioOutputCI.lib -LIBRARY AudioInputCI.lib - -SOURCEPATH ../src - -SOURCE cistubplugin.cpp -SOURCE cistubpluginMain.cpp - -SOURCEPATH ../data -START RESOURCE cistubplugin.rss -TARGET cistubplugin.rsc -END - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/cistubplugin/inc/cistubplugin.h --- a/audiostubs/devsoundextensions_stubs/cistubplugin/inc/cistubplugin.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CI stub plugin -* -*/ - - - -// This file defines the API for AudiPlayRoutingControlCIStub.dll - -#ifndef CISTUBPLUGIN_H -#define CISTUBPLUGIN_H - -#include // CBase -#include // TBuf -#include -#include -#include "RestrictedAudioOutputCIStub.h" -#include "AudioOutputCI.h" -#include "AudioInputCI.h" -#include "AudioOutputMessageTypes.h" -#include "AudioInputMessageTypes.h" - -class MyMCustomInterface - { -public: - virtual TAny* CustomInterface(TUid aCustomeInterface) = 0; - virtual void Release() = 0; - virtual void PassDestructionKey(TUid aUid) = 0; - }; - -class CCIStubPlugin : public CBase,public MyMCustomInterface - { -public: - - static MyMCustomInterface* NewL(); - static CCIStubPlugin* NewLC(); - ~CCIStubPlugin(); - TAny* CustomInterface(TUid aInterfaceId); - void Release(); - void PassDestructionKey(TUid aUid); - -private: - TUid iDtor_ID_Key; - CCIStubPlugin(); - void ConstructL(); - }; - -#endif // __AUDIPLAYROUTINGCONTROLHWDEVICE_H__ diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/cistubplugin/inc/cistubplugin.hrh --- a/audiostubs/devsoundextensions_stubs/cistubplugin/inc/cistubplugin.hrh Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ci stub plugin uids -* -*/ - - -#ifndef CISTUBPLUGIN_HRH -#define CISTUBPLUGIN_HRH - - -#define KMmfUidS60CustomInterfaceStub 0x10207C49 -#define KUidCustomInterfacePluginDll 0x10207C70 -#define KUidCustomInterfaceStubPlugin 0x10207C71 - -#endif diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/cistubplugin/src/cistubplugin.cpp --- a/audiostubs/devsoundextensions_stubs/cistubplugin/src/cistubplugin.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: Generic Stub plugin that load required CI stub in WINSCW - * - */ - - - -#include "cistubplugin.h" - -#ifdef _DEBUG -#define DEBPRN0 RDebug::Printf( "*CI STUB PLUGIN* %s", __PRETTY_FUNCTION__); -#define DEBPRN1(str) RDebug::Printf( "%s %s", __PRETTY_FUNCTION__, str ); -#else -#define DEBPRN0 -#define DEBPRN1(str) -#endif - -#define KTenSeconds 3000000 -// Member Functions - - -CCIStubPlugin* CCIStubPlugin::NewLC() - { - DEBPRN0; - CCIStubPlugin* self = new (ELeave) CCIStubPlugin; - CleanupStack::PushL(self); - self->ConstructL(); - return self; - } - -MyMCustomInterface* CCIStubPlugin::NewL() - { - DEBPRN0; - CCIStubPlugin* self = CCIStubPlugin::NewLC(); - CleanupStack::Pop(self); - return (MyMCustomInterface*) self; - } - -CCIStubPlugin::CCIStubPlugin() -// note, CBase initialises all member variables to zero - { - DEBPRN0; - } - -void CCIStubPlugin::ConstructL() - { - DEBPRN0; - } - -CCIStubPlugin::~CCIStubPlugin() - { - DEBPRN0; - } - -TAny* CCIStubPlugin::CustomInterface(TUid aInterfaceId) - { - DEBPRN0; - if (aInterfaceId == KUidRestrictedAudioOutput) - { - return (TAny*)CRestrictedAudioOutputCI::NewL(); - } - if(aInterfaceId == KUidAudioOutput) - { - return (TAny*)CAudioOutputCI::NewL(); - } - if(aInterfaceId == KUidAudioInput) - { - return (TAny*)CAudioInputCI::NewL(); - } - return NULL; - } - -void CCIStubPlugin::Release() - { - DEBPRN0; - REComSession::DestroyedImplementation(iDtor_ID_Key); - delete this; - } -void CCIStubPlugin::PassDestructionKey(TUid aUid) - { - DEBPRN0; - iDtor_ID_Key = aUid; - } diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/cistubplugin/src/cistubpluginMain.cpp --- a/audiostubs/devsoundextensions_stubs/cistubplugin/src/cistubpluginMain.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Stub plugin main -* -*/ - - - -#include -#include -#include "cistubplugin.h" -#include "cistubplugin.hrh" - - -// ImplementationTable - -const TImplementationProxy - ImplementationTable[] = - { - IMPLEMENTATION_PROXY_ENTRY(KUidCustomInterfaceStubPlugin, CCIStubPlugin::NewL), - }; - - -// ImplementationGroupProxy - -EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) - { - aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); - return ImplementationTable; - } - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/group/bld.inf --- a/audiostubs/devsoundextensions_stubs/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Build file for AdvancedAudioController including the projects that -* are needed to be built. -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// MmfDevSoundAdaptation Stub -#include "../mmfdevsoundadaptation_stub/group/bld.inf" - -// mmfaudioserverfactorystub Stub -#include "../mmfaudioserverfactorystub/group/bld.inf" - -// Added DevSoundControl CI Stub -#include "../addeddevsoundcontrolcistub/Group/bld.inf" - -// Audio Enhancement Factory Stubs -#include "../audioenhancementfactorystubs/group/bld.inf" - -// Audio Routing CI Stub -#include "../audioinputcistub/Group/bld.inf" -#include "../audiooutputcistub/Group/bld.inf" - -// Audio Effect CI Stub -#include "../audioeffectscistubs/group/bld.inf" - -// Audio Codec CI Stub -#include "../audiocodeccistubs/group/bld.inf" - -// Audio Visualization Stub -- As Audio Visualization is deprecated, this also should be deprecated -//#include "../audiovisualizationstub/Group/bld.inf" - -// Restricted Audio Output CI Stub -#include "../restrictedaudiooutputcistub/Group/bld.inf" - -//CI stub plugin -#include "../cistubplugin/group/bld.inf" - -PRJ_TESTMMPFILES - -PRJ_TESTEXPORTS - -//////////////////////////////////////////////////////////////////////////////// -// END OF FILE // -//////////////////////////////////////////////////////////////////////////////// diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/inc/AacDecoderConfigCI.h --- a/audiostubs/devsoundextensions_stubs/inc/AacDecoderConfigCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,98 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - -#ifndef AACDECODERCONFIGCIIMPL_H -#define AACDECODERCONFIGCIIMPL_H - -// INCLUDES -#include -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* ?one_line_short_description. -* ?other_description_lines -* -* @lib ?library -* @since Series ?XX ?SeriesXX_version -*/ -class CAacDecoderConfigCI : public CAacDecoderConfig - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CAacDecoderConfigCI* NewL(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CAacDecoderConfigCI(); - - public: // New functions - - public: // Functions from base classes - - /** - * From ?base_class ?member_description. - * @since Series ?XX ?SeriesXX_version - * @param ?arg1 - * @return - */ - IMPORT_C virtual TInt SetAudioConfig(TAudioConfig& aAudioConfig); - - protected: // New functions - - protected: // Functions from base classes - - private: - - /** - * C++ default constructor. - */ - CAacDecoderConfigCI(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - public: // Data - protected: // Data - private: // Data - public: // Friend classes - protected: // Friend classes - private: // Friend classes - - }; - -#endif // AACDECODERCONFIGCIIMPL_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/inc/AudioInputCI.h --- a/audiostubs/devsoundextensions_stubs/inc/AudioInputCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - AudioInput CI -* -*/ - -#include "AudioInput.h" - -class CMMFDevSound; - -class CAudioInputCI : public CAudioInput - { - public: - IMPORT_C static CAudioInputCI* NewL(CMMFDevSound& aDevSound); - IMPORT_C static CAudioInputCI* NewL(); - virtual ~CAudioInputCI(); - - virtual TAudioInputArray AudioInput(); - virtual void SetAudioInputL(TAudioInputArray aAudioInputs); - - private: - CAudioInputCI(CMMFDevSound& aDevSound); - CAudioInputCI(); - - CMMFDevSound* iDevSound; - CArrayFixFlat iInputArray; - }; diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/inc/AudioOutputCI.h --- a/audiostubs/devsoundextensions_stubs/inc/AudioOutputCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -/* -* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - AudioOutput CI -* -*/ - -#ifndef _AUDIOOUTPUTCI_H__ -#define _AUDIOOUTPUTCI_H__ - -#include -#include "AudioOutput.h" - -class CMMFDevSound; -class CAudioOutputCustomInterfaceHandler; -class CAudioOutputTimer; - -class CAudioOutputCI : public CAudioOutput - { - public: - IMPORT_C static CAudioOutputCI* NewL(CMMFDevSound& aDevSound); - virtual ~CAudioOutputCI(); - - - virtual TAudioOutputPreference AudioOutput(); - virtual TAudioOutputPreference DefaultAudioOutput(); - virtual void RegisterObserverL( MAudioOutputObserver& aObserver ); - virtual TBool SecureOutput(); - virtual void SetAudioOutputL( TAudioOutputPreference aAudioOutput = ENoPreference ); - virtual void SetSecureOutputL( TBool aSecure = EFalse ); - virtual void UnregisterObserver( MAudioOutputObserver& aObserver ); - void DefaultChanged(); - - IMPORT_C static CAudioOutputCI* NewL(); - - private: - CAudioOutputCI(CMMFDevSound& aDevSound); - CAudioOutputCI(); - - private: - //CMMFDevSound& iDevSound; - CMMFDevSound* iDevSound; - TAudioOutputPreference iOutput; - TBool iSecureOutput; - TAudioOutputPreference iDefault; - MAudioOutputObserver* iObserver; - CAudioOutputTimer* iAudioOutputTimer; - TInt iCount; - - }; - - -class CAudioOutputTimer : public CTimer - { - public: - CAudioOutputTimer(CAudioOutputCI* aCustomInterface); - ~CAudioOutputTimer(); - void RunL(); - void DoCancel(); - - private: - CAudioOutputCI* iCustomInterface; - }; - -#endif \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/inc/AudioVibraControlCI.h --- a/audiostubs/devsoundextensions_stubs/inc/AudioVibraControlCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - -#ifndef AUDIOVIBRACONTROLCI_H -#define AUDIOVIBRACONTROLCI_H - -// INCLUDES -#include -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* ?one_line_short_description. -* ?other_description_lines -* -* @lib ?library -* @since Series ?XX ?SeriesXX_version -*/ -class CAudioVibraControlCI : public CAudioVibraControl - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CAudioVibraControlCI* NewL(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CAudioVibraControlCI(); - - public: // New functions - - public: // Functions from base classes - - /** - * From ?base_class ?member_description. - * @since Series ?XX ?SeriesXX_version - * @param ?arg1 - * @return - */ - IMPORT_C virtual TInt StartVibra(); - IMPORT_C virtual TInt StopVibra(); - - protected: // New functions - - protected: // Functions from base classes - - private: - - /** - * C++ default constructor. - */ - CAudioVibraControlCI(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - public: // Data - protected: // Data - private: // Data - public: // Friend classes - protected: // Friend classes - private: // Friend classes - - }; - -#endif // AUDIOVIBRACONTROLCI_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/inc/EAacPlusDecoderIntfcCI.h --- a/audiostubs/devsoundextensions_stubs/inc/EAacPlusDecoderIntfcCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,192 +0,0 @@ -/* -* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Custom Interface for eAAC+ decoder. -* -*/ - - -#ifndef EAACPLUSDECODERINTFCCI_H -#define EAACPLUSDECODERINTFCCI_H - -// INCLUDES -#include -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* Custom Interface for eAAC+ decoder. -* -* @lib EAacPlusDecoderIntfcCI_Stub.lib -* @since S60 3.0 -*/ -class CEAacPlusDecoderIntfcCI : public CEAacPlusDecoderIntfc - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CEAacPlusDecoderIntfcCI* NewL(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CEAacPlusDecoderIntfcCI(); - - public: // New functions - - public: // Functions from CEAacPlusDecoderIntfc - - /** - * Configures decoder's profile defined by TAudioObjectType. - * @since S60 3.0 - * @param TAudioObjectType - Supported AAC profile. - * @return void - */ - IMPORT_C virtual void SetAudioObjectType( - TAudioObjectType aAudioObjectType); - - /** - * Configures decoder's input sampling frequency. - * @since S60 3.0 - * @param TUint - Decoder's input sampling frequency value. - * @return void - */ - IMPORT_C virtual void SetInputSamplingFrequency( - TUint aInputSamplingFrequency); - - /** - * Configures the number of channels to be used by the decoder. - * @since S60 3.0 - * @param TUint - Number of channels (stereo/mono). - * @return void - */ - IMPORT_C virtual void SetNumOfChannels(TUint aNumOfChannels); - - /** - * Configures decoder's spectral bandwidth replication (SBR). - * @since S60 3.0 - * @param TBool - Toggle SBR. - * @return void - */ - IMPORT_C virtual void SetSbr(TBool aSbrEnabled); - - /** - * Configures decoder's down-sampled mode (DSM). - * @since S60 3.0 - * @param TBool - Toggle DSM. - * @return void - */ - IMPORT_C virtual void SetDownSampledMode(TBool aDsmEnabled); - - /** - * Commits configuration settings to the decoder. - * @since S60 3.0 - * @return TInt - Status - */ - IMPORT_C virtual TInt ApplyConfig(); - - /** - * Returns decoder's AAC profile setting. - * @since S60 3.0 - * @param TAudioObjectType& - Reference to AAC profile. - * @return TInt - Status - */ - IMPORT_C virtual TInt GetAudioObjectType( - TAudioObjectType& aAudioObjectType); - - /** - * Returns decoder's input sampling frequency setting. - * @since S60 3.0 - * @param TUint& - Reference to input sampling frequency. - * @return TInt - Status - */ - IMPORT_C virtual TInt GetInputSamplingFrequency( - TUint& aInputSamplingFrequency); - - /** - * Returns decoder's channel setting. - * @since S60 3.0 - * @param TUint& - Reference to the number of channels. - * @return TInt - Status - */ - IMPORT_C virtual TInt GetNumOfChannels(TUint& aNumOfChannels); - - /** - * Returns decoder's SBR setting. - * @since S60 3.0 - * @param TBool& - Reference to the SBR setting. - * @return TInt - Status - */ - IMPORT_C virtual TInt GetSbr(TBool& aSbrEnabled); - - /** - * Returns decoder's DSM setting. - * @since S60 3.0 - * @param TBool& - Reference to the DSM setting. - * @return TInt - Status - */ - IMPORT_C virtual TInt GetDownSampledMode(TBool& aDsmEnabled); - - - protected: // New functions - - protected: // Functions from base classes - - private: - - /** - * C++ default constructor. - */ - CEAacPlusDecoderIntfcCI(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - public: // Data - protected: // Data - private: // Data - - // Working config before ApplyConfig() - TAudioObjectType iAudioObjectType; - TUint iInputSamplingFrequency; - TUint iNumOfChannels; - TBool iSbrEnabled; - TBool iDsmEnabled; - - // Current config after ApplyConfig() - TAudioObjectType iCurrentAudioObjectType; - TUint iCurrentInputSamplingFrequency; - TUint iCurrentNumOfChannels; - TBool iCurrentSbrEnabled; - TBool iCurrentDsmEnabled; - - }; - -#endif // EAACPLUSDECODERINTFCCI_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/inc/ErrorConcealmentIntfcCI.h --- a/audiostubs/devsoundextensions_stubs/inc/ErrorConcealmentIntfcCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - -#ifndef ERRORCONCEALMENTINTFCCI_H -#define ERRORCONCEALMENTINTFCCI_H - -// INCLUDES -#include -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* ?one_line_short_description. -* ?other_description_lines -* -* @lib ?library -* @since Series ?XX ?SeriesXX_version -*/ -class CErrorConcealmentIntfcCI : public CErrorConcealmentIntfc - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CErrorConcealmentIntfcCI* NewL(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CErrorConcealmentIntfcCI(); - - public: // New functions - - public: // Functions from base classes - - /** - * From ?base_class ?member_description. - * @since Series ?XX ?SeriesXX_version - * @param ?arg1 - * @return - */ - IMPORT_C virtual TInt ConcealErrorForNextBuffer(); - IMPORT_C virtual TInt SetFrameMode(TBool aFrameMode); - IMPORT_C virtual TInt FrameModeRqrdForEC(TBool& aFrameModeRqrd); - - protected: // New functions - - protected: // Functions from base classes - - private: - - /** - * C++ default constructor. - */ - CErrorConcealmentIntfcCI(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - public: // Data - protected: // Data - private: // Data - TBool iFrameModeRqrd; - public: // Friend classes - protected: // Friend classes - private: // Friend classes - - }; - -#endif // ERRORCONCEALMENTINTFCCI_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/inc/G711DecoderIntfcCI.h --- a/audiostubs/devsoundextensions_stubs/inc/G711DecoderIntfcCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,102 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - -#ifndef G711DECODERINTFCCI_H -#define G711DECODERINTFCCI_H - -// INCLUDES -#include -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* ?one_line_short_description. -* ?other_description_lines -* -* @lib ?library -* @since Series ?XX ?SeriesXX_version -*/ -class CG711DecoderIntfcCI : public CG711DecoderIntfc - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CG711DecoderIntfcCI* NewL(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CG711DecoderIntfcCI(); - - public: // New functions - - public: // Functions from base classes - - /** - * From ?base_class ?member_description. - * @since Series ?XX ?SeriesXX_version - * @param ?arg1 - * @return - */ - IMPORT_C virtual TInt SetDecoderMode(TDecodeMode aDecodeMode); - IMPORT_C virtual TInt SetCng(TBool aCng); - IMPORT_C virtual TInt GetCng(TBool& aCng); - IMPORT_C virtual TInt SetPlc(TBool aPlc); - - protected: // New functions - - protected: // Functions from base classes - - private: - - /** - * C++ default constructor. - */ - CG711DecoderIntfcCI(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - public: // Data - protected: // Data - private: // Data - TBool iCng; - public: // Friend classes - protected: // Friend classes - private: // Friend classes - - }; - -#endif // G711DECODERINTFCCI_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/inc/G711EncoderIntfcCI.h --- a/audiostubs/devsoundextensions_stubs/inc/G711EncoderIntfcCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - -#ifndef G711ENCODERINTFCCI_H -#define G711ENCODERINTFCCI_H - -// INCLUDES -#include -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* ?one_line_short_description. -* ?other_description_lines -* -* @lib ?library -* @since Series ?XX ?SeriesXX_version -*/ -class CG711EncoderIntfcCI : public CG711EncoderIntfc - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CG711EncoderIntfcCI* NewL(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CG711EncoderIntfcCI(); - - public: // New functions - - public: // Functions from base classes - - /** - * From ?base_class ?member_description. - * @since Series ?XX ?SeriesXX_version - * @param ?arg1 - * @return - */ - IMPORT_C virtual TInt SetEncoderMode(TEncodeMode aEncodeMode); - IMPORT_C virtual TInt SetVadMode(TBool aVadMode); - IMPORT_C virtual TInt GetVadMode(TBool& aVadMode); - - protected: // New functions - - protected: // Functions from base classes - - private: - - /** - * C++ default constructor. - */ - CG711EncoderIntfcCI(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - public: // Data - protected: // Data - private: // Data - TBool iVadMode; - public: // Friend classes - protected: // Friend classes - private: // Friend classes - - }; - -#endif // G711ENCODERINTFCCI_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/inc/G729DecoderIntfcCI.h --- a/audiostubs/devsoundextensions_stubs/inc/G729DecoderIntfcCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - -#ifndef G729DECODERINTFCCI_H -#define G729DECODERINTFCCI_H - -// INCLUDES -#include -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* ?one_line_short_description. -* ?other_description_lines -* -* @lib ?library -* @since Series ?XX ?SeriesXX_version -*/ -class CG729DecoderIntfcCI : public CG729DecoderIntfc - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CG729DecoderIntfcCI* NewL(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CG729DecoderIntfcCI(); - - public: // New functions - - public: // Functions from base classes - - /** - * From ?base_class ?member_description. - * @since Series ?XX ?SeriesXX_version - * @param ?arg1 - * @return - */ - IMPORT_C virtual TInt BadLsfNextBuffer(); - - protected: // New functions - - protected: // Functions from base classes - - private: - - /** - * C++ default constructor. - */ - CG729DecoderIntfcCI(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - public: // Data - protected: // Data - private: // Data - TBool iCng; - public: // Friend classes - protected: // Friend classes - private: // Friend classes - - }; - -#endif // G729DECODERINTFCCI_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/inc/G729EncoderIntfcCI.h --- a/audiostubs/devsoundextensions_stubs/inc/G729EncoderIntfcCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,100 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - -#ifndef G729ENCODERINTFCCI_H -#define G729ENCODERINTFCCI_H - -// INCLUDES -#include -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* ?one_line_short_description. -* ?other_description_lines -* -* @lib ?library -* @since Series ?XX ?SeriesXX_version -*/ -class CG729EncoderIntfcCI : public CG729EncoderIntfc - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CG729EncoderIntfcCI* NewL(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CG729EncoderIntfcCI(); - - public: // New functions - - public: // Functions from base classes - - /** - * From ?base_class ?member_description. - * @since Series ?XX ?SeriesXX_version - * @param ?arg1 - * @return - */ - IMPORT_C virtual TInt SetVadMode(TBool aVadMode); - IMPORT_C virtual TInt GetVadMode(TBool& aVadMode); - - protected: // New functions - - protected: // Functions from base classes - - private: - - /** - * C++ default constructor. - */ - CG729EncoderIntfcCI(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - public: // Data - protected: // Data - private: // Data - TBool iVadMode; - public: // Friend classes - protected: // Friend classes - private: // Friend classes - - }; - -#endif // G729ENCODERINTFCCI_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/inc/IlbcDecoderIntfcCI.h --- a/audiostubs/devsoundextensions_stubs/inc/IlbcDecoderIntfcCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - -#ifndef ILBCDECODERINTFCCI_H -#define ILBCDECODERINTFCCI_H - -// INCLUDES -#include -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* ?one_line_short_description. -* ?other_description_lines -* -* @lib ?library -* @since Series ?XX ?SeriesXX_version -*/ -class CIlbcDecoderIntfcCI : public CIlbcDecoderIntfc - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CIlbcDecoderIntfcCI* NewL(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CIlbcDecoderIntfcCI(); - - public: // New functions - - public: // Functions from base classes - - /** - * From ?base_class ?member_description. - * @since Series ?XX ?SeriesXX_version - * @param ?arg1 - * @return - */ - IMPORT_C virtual TInt SetDecoderMode(TDecodeMode aDecodeMode); - IMPORT_C virtual TInt SetCng(TBool aCng); - IMPORT_C virtual TInt GetCng(TBool& aCng); - - protected: // New functions - - protected: // Functions from base classes - - private: - - /** - * C++ default constructor. - */ - CIlbcDecoderIntfcCI(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - public: // Data - protected: // Data - private: // Data - TBool iCng; - public: // Friend classes - protected: // Friend classes - private: // Friend classes - - }; - -#endif // ILBCDECODERINTFCCI_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/inc/IlbcEncoderIntfcCI.h --- a/audiostubs/devsoundextensions_stubs/inc/IlbcEncoderIntfcCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - -#ifndef ILBCENCODERINTFCCI_H -#define ILBCENCODERINTFCCI_H - -// INCLUDES -#include -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* ?one_line_short_description. -* ?other_description_lines -* -* @lib ?library -* @since Series ?XX ?SeriesXX_version -*/ -class CIlbcEncoderIntfcCI : public CIlbcEncoderIntfc - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CIlbcEncoderIntfcCI* NewL(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CIlbcEncoderIntfcCI(); - - public: // New functions - - public: // Functions from base classes - - /** - * From ?base_class ?member_description. - * @since Series ?XX ?SeriesXX_version - * @param ?arg1 - * @return - */ - IMPORT_C virtual TInt SetEncoderMode(TEncodeMode aEncodeMode); - IMPORT_C virtual TInt SetVadMode(TBool aVadMode); - IMPORT_C virtual TInt GetVadMode(TBool& aVadMode); - - protected: // New functions - - protected: // Functions from base classes - - private: - - /** - * C++ default constructor. - */ - CIlbcEncoderIntfcCI(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - public: // Data - protected: // Data - private: // Data - TBool iVadMode; - public: // Friend classes - protected: // Friend classes - private: // Friend classes - - }; - -#endif // ILBCENCODERINTFCCI_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/inc/Ra8CustomInterfaceCI.h --- a/audiostubs/devsoundextensions_stubs/inc/Ra8CustomInterfaceCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +0,0 @@ -/* -* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Custom Interface Stub implementation for RA8 decoder. -* -*/ - - -#ifndef RA8DECODERINTFCCI_H -#define RA8DECODERINTFCCI_H - -// INCLUDES -#include -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -//class CCustomInterfaceUtility; -//class MCustomCommand; -//class CMMFDevSound; - -// CLASS DECLARATION - -/** -* Custom Interface for RA8 decoder. -* Stub implementation. -* -* @lib Ra8DecoderIntfcCI_Stub.lib -* @since Series 60 3.2 -*/ -class CRa8DecoderIntfcCI : public CRa8CustomInterface - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CRa8DecoderIntfcCI* NewL(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CRa8DecoderIntfcCI(); - - public: // New functions - - public: // Functions from base classes - - /** - * From CRa8CustomInterface - */ - IMPORT_C virtual TInt FrameNumber(); - IMPORT_C virtual TInt SetInitString(TDesC8& aInitString); - - protected: // New functions - - protected: // Functions from base classes - - private: - - /** - * C++ default constructor. - */ - CRa8DecoderIntfcCI(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - public: // Data - protected: // Data - private: // Data - public: // Friend classes - protected: // Friend classes - private: // Friend classes - - }; - -#endif // RA8DECODERINTFCCI_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/inc/RestrictedAudioOutputCIStub.h --- a/audiostubs/devsoundextensions_stubs/inc/RestrictedAudioOutputCIStub.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - This is the definition of the RestrictedAudioOutput Custom Interface class. -* This serves as an example of how adaptation might define the -* custom interface class. -* The CRestrictedAudioOutputCI object is typically instantiated by a DevSound -* instance and return to the client when the CustomInterface() -* method is invoked. -* -* -*/ - -#ifndef RESTRICTEDAUDIOOUTPUTCI_H -#define RESTRICTEDAUDIOOUTPUTCI_H - -#include -#include -# -class CMMFDevSound; - -class CRestrictedAudioOutputCI : public CRestrictedAudioOutput - - { - public: // Constructor and Destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CRestrictedAudioOutputCI* NewL(); - - /** - * Destructor. - */ - virtual ~CRestrictedAudioOutputCI(); - - public: // From Base Class - - /** - * - * - * @since 3.2 - */ - virtual TInt Commit(); - - private: - - /** - * By default Symbian 2nd phase constructor is private. - */ - // static void ConstructL(); - /** - * C++ default constructor. - */ - - CRestrictedAudioOutputCI(); - - private: // Data - - - }; -#endif //RESTRICTEDAUDIOOUTPUTCI_H diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/inc/SbcEncoderIntfcCI.h --- a/audiostubs/devsoundextensions_stubs/inc/SbcEncoderIntfcCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,266 +0,0 @@ -/* -* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Custom Interface stub object for configuring the SBC encoder. -* -*/ - - -#ifndef CSBCENCODERINTFCCI_H -#define CSBCENCODERINTFCCI_H - -// INCLUDES -#include -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** - * Custom Interface stub for configuring the SBC encoder operating modes. - * This class processes requests received from the CSbcEncoderIntfcProxy. - * - * @lib SbcEncoderIntfcCI_Stub.lib - * @since S60 3.0 - */ -class CSbcEncoderIntfcCI : public CSbcEncoderIntfc - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CSbcEncoderIntfcCI* NewL(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CSbcEncoderIntfcCI(); - - public: // New functions - - public: // Functions from CSbcEncoderInfc base class - - /** - * Retrieves the sampling frequencies supported by the encoder. - * @since S60 3.0 - * @param RArray& - reference to the array of sampling freq. - * @return TInt status - */ - IMPORT_C virtual TInt GetSupportedSamplingFrequencies( - RArray& aSupportedSamplingFrequencies); - - /** - * Retrieves the channel modes supported by the encoder. - * @since S60 3.0 - * @param RArray& - reference to the array of channel modes. - * @return TInt status - */ - IMPORT_C virtual TInt GetSupportedChannelModes( - RArray& aSupportedChannelModes); - - /** - * Retrieves the blocks supported by the encoder. - * @since S60 3.0 - * @param RArray& - reference to the array of blocks. - * @return TInt status - */ - IMPORT_C virtual TInt GetSupportedNumOfBlocks( - RArray& aSupportedNumOfBlocks); - - /** - * Retrieves the subbands supported by the encoder. - * @since S60 3.0 - * @param RArray& - reference to the array of subbands. - * @return TInt status - */ - IMPORT_C virtual TInt GetSupportedNumOfSubbands( - RArray& aSupportedNumOfSubbands); - - /** - * Retrieves the allocation methods supported by the encoder. - * @since S60 3.0 - * @param RArray& - reference to the array of alloc. methods. - * @return TInt status - */ - IMPORT_C virtual TInt GetSupportedAllocationMethods( - RArray& - aSupportedAllocationMethods); - - /** - * Retrieves the bitpool size supported by the encoder. - * @since S60 3.0 - * @param TUint& - reference to the min bitpool size. - * @param TUint& - reference to the max bitpool size. - * @return TInt status - */ - IMPORT_C virtual TInt GetSupportedBitpoolRange( - TUint& aMinSupportedBitpoolSize, - TUint& aMaxSupportedBitpoolSize); - - /** - * Sets new sampling frequency. - * @since S60 3.0 - * @param TUint - sampling frequency to be set. - * @return void - */ - IMPORT_C virtual void SetSamplingFrequency(TUint aSamplingFrequency); - - /** - * Returns current sampling frequency. - * @since S60 3.0 - * @param TUint& - current sampling frequency. - * @return TInt - status - */ - IMPORT_C virtual TInt GetSamplingFrequency(TUint& aSamplingFrequency); - - /** - * Sets new channel mode. - * @since S60 3.0 - * @param TSbcChannelMode - channel mode to be set. - * @return void - */ - IMPORT_C virtual void SetChannelMode(TSbcChannelMode aChannelMode); - - /** - * Returns current channel mode. - * @since S60 3.0 - * @param TSbcChannelMode& - current channel mode. - * @return TInt - status - */ - IMPORT_C virtual TInt GetChannelMode(TSbcChannelMode& aChannelMode); - - /** - * Sets new number of subbands. - * @since S60 3.0 - * @param TSbcChannelMode - number of subbands to be set. - * @return void - */ - IMPORT_C virtual void SetNumOfSubbands(TUint aNumOfSubbands); - - /** - * Returns current number of subbands. - * @since S60 3.0 - * @param TUint& - current subbands. - * @return TInt - status - */ - IMPORT_C virtual TInt GetNumOfSubbands(TUint& aNumOfSubbands); - - /** - * Sets new number of blocks. - * @since S60 3.0 - * @param TSbcChannelMode - number of blocks to be set. - * @return void - */ - IMPORT_C virtual void SetNumOfBlocks(TUint aNumOfBlocks); - - /** - * Returns current number of blocks. - * @since S60 3.0 - * @param TUint& - current number of blocks. - * @return TInt - status - */ - IMPORT_C virtual TInt GetNumOfBlocks(TUint& aNumOfBlocks); - - /** - * Sets new allocation method. - * @since S60 3.0 - * @param TSbcAllocationMethod - allocation method to be set. - * @return void - */ - IMPORT_C virtual void SetAllocationMethod( - TSbcAllocationMethod aAllocationMethod); - - /** - * Returns current allocation method. - * @since S60 3.0 - * @param TUint& - current allocation method. - * @return TInt - status - */ - IMPORT_C virtual TInt GetAllocationMethod( - TSbcAllocationMethod& aAllocationMethod); - - /** - * Sets new bitpool size. - * @since S60 3.0 - * @param TUint - bitpool size to be set. - * @return void - */ - IMPORT_C virtual void SetBitpoolSize(TUint aBitpoolSize); - - /** - * Returns current bitpool size. - * @since S60 3.0 - * @param TUint& - current bitpool size. - * @return TInt - status - */ - IMPORT_C virtual TInt GetBitpoolSize(TUint& aBitpoolSize); - - /** - * Commits new configuration settings. - * @since S60 3.0 - * @return TInt - status - */ - IMPORT_C virtual TInt ApplyConfig(); - - - protected: // New functions - - protected: // Functions from base classes - - private: - - /** - * C++ default constructor. - */ - CSbcEncoderIntfcCI(); - - /** - * Symbian 2nd phase constructor. - */ - void ConstructL(); - - public: // Data - protected: // Data - private: // Data - - // Working config before ApplyConfig() - TUint iSamplingFrequency; - TSbcChannelMode iChannelMode; - TUint iNumOfSubbands; - TUint iNumOfBlocks; - TSbcAllocationMethod iAllocationMethod; - TUint iBitpoolSize; - - // Current config after ApplyConfig() - TUint iCurrentSamplingFrequency; - TSbcChannelMode iCurrentChannelMode; - TUint iCurrentNumOfSubbands; - TUint iCurrentNumOfBlocks; - TSbcAllocationMethod iCurrentAllocationMethod; - TUint iCurrentBitpoolSize; - - }; - -#endif // CSBCENCODERINTFCCI_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/inc/SpeechEncoderConfigCI.h --- a/audiostubs/devsoundextensions_stubs/inc/SpeechEncoderConfigCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,104 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - -#ifndef CSPEECHENCODERCONFIGCI_H -#define CSPEECHENCODERCONFIGCI_H - -// INCLUDES -#include -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* ?one_line_short_description. -* ?other_description_lines -* -* @lib ?library -* @since Series ?XX ?SeriesXX_version -*/ -class CSpeechEncoderConfigCI : public CSpeechEncoderConfig - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CSpeechEncoderConfigCI* NewL(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CSpeechEncoderConfigCI(); - - public: // New functions - - public: // Functions from base classes - - /** - * From ?base_class ?member_description. - * @since Series ?XX ?SeriesXX_version - * @param ?arg1 - * @return - */ - IMPORT_C virtual TInt GetSupportedBitrates(RArray& aSupportedBitrates); - IMPORT_C virtual TInt SetBitrate(TUint aBitrate); - IMPORT_C virtual TInt GetBitrate(TUint& aBitrate); - IMPORT_C virtual TInt SetVadMode(TBool aVadMode); - IMPORT_C virtual TInt GetVadMode(TBool& aVadMode); - - protected: // New functions - - protected: // Functions from base classes - - private: - - /** - * C++ default constructor. - */ - CSpeechEncoderConfigCI(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - public: // Data - protected: // Data - private: // Data - TUint iBitrate; - TBool iVadMode; - public: // Friend classes - protected: // Friend classes - private: // Friend classes - - }; - -#endif // CSPEECHENCODERCONFIGCI_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/inc/WmaDecoderIntfcCI.h --- a/audiostubs/devsoundextensions_stubs/inc/WmaDecoderIntfcCI.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,383 +0,0 @@ -/* -* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - -#ifndef WmaDECODERINTFCCIIMPL_H -#define WmaDECODERINTFCCIIMPL_H - -// INCLUDES -#include -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* ?one_line_short_description. -* ?other_description_lines -* -* @lib ?library -* @since Series ?XX ?SeriesXX_version -*/ -class CWmaDecoderIntfcCI : public CWmaDecoderIntfc - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CWmaDecoderIntfcCI* NewL(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CWmaDecoderIntfcCI(); - - public: // New functions - - public: // Functions from base classes - - public: // Functions from base classes - - // From CWmaDecoderIntfc - - /** - * Identifies the compressed audio format - * @since S60 3.2 - * @param aFormat - the audio format. - * @return void - */ - IMPORT_C virtual void SetFormat(TFormat aFormat) ; - - /** - * Specifies the number of bits per sample - * @since S60 3.2 - * @param aFormat - the audio format. - * @return void - */ - IMPORT_C virtual void SetBitsPerSampleIn(TUint aBitsPerSample) ; - - /** - * Specifies the number of audio channels - * @since S60 3.2 - * @param aNumOfChannels: The number of audio channels. - * @return void - */ - IMPORT_C virtual void SetNumChannelsIn (TUint aNumChannelsIn) ; - - /** - * Specifies the sampling rate - * @since S60 3.2 - * @param aSamplesPerSec: Sample rate value in Hertz. - * @return void - */ - IMPORT_C virtual void SetSamplesPerSec (TUint aSamplesPerSec) ; - - /** - * Specifies the average number of bytes per second - * @since S60 3.2 - * @param aAvgBytesPerSec: Average bytes per second. - * @return void - */ - IMPORT_C virtual void SetAvgBytesPerSec (TUint aAvgBytesPerSec) ; - - /** - * Specifies the block size in bytes - * @since S60 3.2 - * @param aBlockAlign: Block size in bytes - * @return void - */ - IMPORT_C virtual void SetBlockAlign (TUint aBlockAlign) ; - - /** - * Configuration information specific to the WMA decoder - * @since S60 3.2 - * @param aEncodeOptions: The encode options - * @return void - */ - IMPORT_C virtual void SetEncodeOptions (TUint aEncodeOptions) ; - - /** - * Returns the configuration state of the advanced encode options. - * @since S60 3.2 - * @return aAdvEncodeOpts: The encode options - */ - IMPORT_C virtual TInt GetEncodeOptions1 (TUint& aEncodeOpts1); - - /** - * Returns the configuration state of the advanced encode options. - * @since S60 3.2 - * @return aAdvEncodeOpts: The encode options - */ - IMPORT_C virtual TInt GetEncodeOptions2 (TUint& aEncodeOpts2); - - /** - * Configures the decoder for the channel data arrangement - * @since S60 3.2 - * @param aChannelMask: Channel mask - * @return void - */ - IMPORT_C virtual void SetChannelMaskIn (TUint aChannelMask) ; - - /** - * Commits configuration settings to the decoder. - * @since S60 3.2 - * @return TInt - Status - */ - IMPORT_C virtual TInt ApplyConfig() ; - - /** - * Returns the configuration state of audio format. - * @since S60 3.2 - * @return aFormat: The audio format - */ - IMPORT_C virtual TInt GetFormat (TFormat& aFormat) ; - - /** - * Returns the configuration state of number of bits per sample. - * @since S60 3.2 - * @return aBitsPerSample: Number of bits per sample - */ - IMPORT_C virtual TInt GetBitsPerSampleIn(TUint& aBitsPerSample) ; - - /** - * Returns the configuration state of the number of channels. - * @since S60 3.2 - * @return aNumOfChannels: Number of channels - */ - IMPORT_C virtual TInt GetNumOfChannelsIn (TUint& aNumOfChannels) ; - - /** - * Returns the configuration state of the sample rate. - * @since S60 3.2 - * @return aSamplesPerSec: Sample rate value in Hertz - */ - IMPORT_C virtual TInt GetSamplesPerSec (TUint& aSamplesPerSec) ; - - /** - * Returns the configuration state of average bytes per second. - * @since S60 3.2 - * @return aAvgBytesPerSec: Average bytes per second - */ - IMPORT_C virtual TInt GetAvgBytesPerSec (TUint& aAvgBytesPerSec) ; - - /** - * Returns the configuration state of block alignment. - * @since S60 3.2 - * @return aBlockAlign: Block size in bytes - */ - IMPORT_C virtual TInt GetBlockAlign (TUint& aBlockAlign) ; - - /** - * Returns the configuration state of the encode options. - * @since S60 3.2 - * @return aEncodeOpts: The encode options. - */ - IMPORT_C virtual TInt GetEncodeOptions (TUint& aEncodeOpts) ; - - - /** - * Returns the configuration state of the input channel mask. - * @since S60 3.2 - * @return aChannelMask: Channel mask. - */ - IMPORT_C virtual TInt GetChannelMaskIn (TUint& aChannelMask) ; - - /** - * Gets a list of formats supported by the decoder. - * @since S60 3.2 - * @return aSupportedFormats: An array of the formats, as defined in TFormat - */ - IMPORT_C virtual TInt GetSupportedFormats(RArray& aSupportedFormats) ; - - /** - * Gets a list of tools supported by the decoder. - * @since S60 3.2 - * @return aSupportedTools: An array of the tools supported by the decoder - */ - IMPORT_C virtual TInt GetSupportedTools(RArray& aSupportedTools) ; - - /** - * Get the maximum number of input channels supported by the decoder. - * @since S60 3.2 - * @return aSupportedMaxChannelsIn: number of channels. - */ - IMPORT_C virtual TInt GetSupportedMaxChannelsIn(TUint& aSupportedMaxChannelsIn) ; - - /** - * Get the maximum bitrate supported by the decoder. - * @since S60 3.2 - * @return aSupportedMaxBitrate: maximum bitrate - */ - IMPORT_C virtual TInt GetSupportedMaxBitrate(TUint& aSupportedMaxBitrate) ; - - /** - * Get the maximum sample rate supported by the decoder. - * @since S60 3.2 - * @return aSupportedMaxSampleRate: maximum sample rate - */ - IMPORT_C virtual TInt GetSupportedMaxSampleRate(TUint& aSupportedMaxSampleRate) ; - - /** - * Gets a list of the tools that are controllable through this interface. - * @since S60 3.2 - * @return aControllableTools: An array of the tools that are controllable through this interface. - */ - IMPORT_C virtual TInt GetControllableTools(RArray& aControllableTools) ; - - /** - * Enables the tool specified. - * @since S60 3.2 - * @return aTool: Specifies the tool to enable. - */ - IMPORT_C virtual void EnableTool(TTool aTool) ; - - /** - * Disables the tool specified. - * @since S60 3.2 - * @return aTool: Specifies the tool to disable. - */ - IMPORT_C virtual void DisableTool(TTool aTool) ; - - /** - * Returns the state of the specified tool - * @since S60 3.2 - * @return aTool: Specifies the tool for which the state is requested - * @ aEnabled : Indicates the state of the tool specified in aTool - */ - IMPORT_C virtual TInt GetTool(TTool aTool, TBool& aEnabled) ; - - /** - * Configuration information specific to the WMA decoder - * @since S60 3.2 - * @param aEncodeOptions: The encode options - * @return void - */ - IMPORT_C virtual void SetEncodeOptions1 (TUint aEncodeOptions1); - - /** - * Configuration information specific to the WMA decoder - * @since S60 3.2 - * @param aEncodeOptions: The encode options - * @return void - */ - IMPORT_C virtual void SetEncodeOptions2 (TUint aEncodeOptions2); - - /** - * Configures the decoder for the channel data arrangement - * @since S60 3.2 - * @param aChannelMask: Channel mask - * @return void - */ - - - protected: // New functions - - protected: // Functions from base classes - - private: - - /** - * C++ default constructor. - */ - CWmaDecoderIntfcCI(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - public: // Data - protected: // Data - private: // Data - // Working config before ApplyConfig() - TFormat iFormat; - TUint iBitsPerSample; - TUint iNumChannelsIn; - TUint iSamplesPerSec; - TUint iAvgBytesPerSec; - TUint iBlockAlign; - TUint iEncodeOptions; - TUint iEncodeOptions1; - TUint iEncodeOptions2; - - TUint iChannelMask; - RArray iSupportedFormats; - RArray iSupportedTools; - RArray iControllableTools; - TUint iSupportedMaxSampleRate; - TUint iSupportedMaxChannelsIn; - TUint iSupportedMaxBitrate; - TTool iEnable; - TTool iDisable; - - - TBool iToolOutPut32Bit; - TBool iToolDownMixToStereo; - TBool iToolLostDataConcealment; - - - TFormat iCurrentFormat; - TUint iCurrentBitsPerSample; - TUint iCurrentNumChannelsIn; - TUint iCurrentSamplesPerSec; - TUint iCurrentAvgBytesPerSec; - TUint iCurrentBlockAlign; - TUint iCurrentEncodeOptions; - TUint iCurrentEncodeOptions1; - TUint iCurrentEncodeOptions2; - - TUint iCurrentChannelMask; - RArrayiCurrentSupportedFormats; - RArray iCurrentSupportedTools; - RArray iCurrentControllableTools; - TUint iCurrentSupportedMaxSampleRate; - TUint iCurrentSupportedMaxChannelsIn; - TUint iCurrentSupportedMaxBitrate; - - TBool iCurrentToolOutPut32Bit; - TBool iCurrentToolDownMixToStereo; - TBool iCurrentToolLostDataConcealment; - - TTool iCurrentEnable; - TTool iCurrentDisable; - - // Flag indicating readiness of the data to be applied - TBool iHasBeenApplied; - // returned status of function ApplyConfigL - TInt iApplyConfStatus; - - - public: // Friend classes - protected: // Friend classes - private: // Friend classes - - - }; - -#endif // WMADECODERINTFCCIIMPL_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/inc/devsoundextensionstubs_common.h --- a/audiostubs/devsoundextensions_stubs/inc/devsoundextensionstubs_common.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Common definitions -* -*/ - -#ifndef DEVSOUNDEXTENSIONSTUBS_COMMON_H_ -#define DEVSOUNDEXTENSIONSTUBS_COMMON_H_ - -#define KUidDevsoundExtensionStubsInterface 0x10207C49 - -#define RET_ERR_IF_ERR(err) if ( err != KErrNone) return err; - -#ifdef _DEBUG -#include "e32debug.h" - -#define DB_IN RDebug::Printf("%s>ENTER", __PRETTY_FUNCTION__) -#define DB_OUT RDebug::Printf("%s>EXIT", __PRETTY_FUNCTION__) -#define DB_IF_ERR(err) if (err != KErrNone) RDebug::Printf( "%s>BREAK[%d]", __PRETTY_FUNCTION__, err ) - -#define DB0(str) RDebug::Print(str, this) -#define DB1(str, val1) RDebug::Print(str, this, val1) -#define DB2(str, val1, val2) RDebug::Print(str, this, val1, val2) - -#define DB_CUSTOM0(str) RDebug::Print(str) -#define DB_CUSTOM1(str, val1) RDebug::Print(str, val1) -#define DB_CUSTOM2(str, val1, val2) RDebug::Print(str, val1, val2) - -#else - -#define DB_IN -#define DB_OUT -#define DB_IF_ERR(err) -#define DB0(str) -#define DB1(str, val1) -#define DB2(str, val1, val2) -#define DB_CUSTOM0(str) -#define DB_CUSTOM1(str, val1) -#define DB_CUSTOM2(str, val1, val2) -#endif //_DEBUG - - -#endif /*DEVSOUNDEXTENSIONSTUBS_COMMON_H_*/ diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/bwinscw/mmfaudioserverfactorystubu.def --- a/audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/bwinscw/mmfaudioserverfactorystubu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - ?ImplementationGroupProxy@@YAPBUTImplementationProxy@@AAH@Z @ 1 NONAME ; struct TImplementationProxy const * ImplementationGroupProxy(int &) - ?NewL@CMMFAudioServerFactoryStub@@SAPAVMAudioSvrService@@XZ @ 2 NONAME ; class MAudioSvrService * CMMFAudioServerFactoryStub::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/data/10207ABC.rss --- a/audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/data/10207ABC.rss Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - AudioServerFactoryStub ECOM plugin resource registry definition. -* -*/ - -// RESOURCE IDENTIFIER - -// INCLUDES -#include -#include // For KUidA3fAudioServicePlugin - -#include "mmfaudioserverfactorystub.hrh" - -// RESOURCE DEFINITIONS -// ----------------------------------------------------------------------------- -// -// Identifies adapters for ECOM. -// -// ----------------------------------------------------------------------------- -// -RESOURCE REGISTRY_INFO theInfo - { - resource_format_version = RESOURCE_FORMAT_VERSION_2; - dll_uid = KMMFAudioServiceFactoryStubUID; - interfaces = - { - INTERFACE_INFO - { - interface_uid = KUidA3fAudioServicePlugin; - implementations = - { - IMPLEMENTATION_INFO - { - implementation_uid = KMMFAudioServiceFactoryStubImplementationUID; - version_no = 1; - display_name = "Telephony Audio Routing Manager Service"; - rom_only = 1; - } - }; - } - }; - } - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/eabi/mmfaudioserverfactorystubu.def --- a/audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/eabi/mmfaudioserverfactorystubu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -EXPORTS - _Z24ImplementationGroupProxyRi @ 1 NONAME - _ZN26CMMFAudioServerFactoryStub4NewLEv @ 2 NONAME - _ZTI26CMMFAudioServerFactoryStub @ 3 NONAME ; ## - _ZTI33CTelephonyAudioRoutingManagerStub @ 4 NONAME ; ## - _ZTV26CMMFAudioServerFactoryStub @ 5 NONAME ; ## - _ZTV33CTelephonyAudioRoutingManagerStub @ 6 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/group/bld.inf --- a/audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for the Audio Server Factory -* -*/ - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -mmfaudioserverfactorystub.mmp diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/group/mmfaudioserverfactorystub.mmp --- a/audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/group/mmfaudioserverfactorystub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project specification file for AudioServerFactory stub -* -*/ - -#include - -TARGET mmfaudioserverfactorystub.dll -TARGETTYPE PLUGIN -UID 0x10009d8d 0x10207ABB - -VENDORID VID_DEFAULT -CAPABILITY CAP_ECOM_PLUGIN - -#if defined(WINSCW) -DEFFILE ../bwinscw/ -#elif defined(WINS) -DEFFILE ../bwins/ -#elif defined(GCC32) -DEFFILE ../bmarm/ -#else -DEFFILE ../eabi/ -#endif - -SOURCEPATH ../src -SOURCE main.cpp -SOURCE mmfaudioserverfactorystub.cpp -SOURCE telephonyaudioroutingmanagerstub.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../inc - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/a3f -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/ecom - - -SOURCEPATH ../data -START RESOURCE 10207ABC.rss - TARGET mmfaudioserverfactorystub.rsc -END - -LIBRARY euser.lib -LIBRARY ecom.lib -LIBRARY TelephonyAudioRoutingManager.lib diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/inc/mmfaudioserverfactorystub.h --- a/audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/inc/mmfaudioserverfactorystub.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - CMMFAudioServerFactoryStub class declaration. -* -*/ - -#ifndef MMFAUDIOSERVERFACTORYSTUB_H -#define MMFAUDIOSERVERFACTORYSTUB_H - -#include - -// FORWARD DECLARATION -class CTelephonyAudioRoutingManagerStub; - -// CLASS DECLARATION -class CMMFAudioServerFactoryStub : public CBase, - public MAudioSvrService - { - public: - IMPORT_C static MAudioSvrService* NewL(); - - virtual void PassDestructorKey(TUid aUid); - virtual TInt Load(); - virtual TInt Start(); - virtual void Stop(); - virtual void Release(); - - private: - CMMFAudioServerFactoryStub(); - TUid iDestructorKeyUid; - - private: - CTelephonyAudioRoutingManagerStub* iTelephonyAudioRoutingManStub; - }; - -#endif // MMFAUDIOSERVERFACTORYSTUB_H diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/inc/mmfaudioserverfactorystub.hrh --- a/audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/inc/mmfaudioserverfactorystub.hrh Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Resource definitions of CMMFAudioServerFactoryStub. -* -*/ - -#ifndef MMFAUDIOSERVERFACTORYSTUB_HRH -#define MMFAUDIOSERVERFACTORYSTUB_HRH - -#define KMMFAudioServiceFactoryStubUID 0x10207ABB -#define KMMFAudioServiceFactoryStubImplementationUID 0x10207ABC - -#endif // MMFAUDIOSERVERFACTORYSTUB_HRH diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/inc/telephonyaudioroutingmanagerstub.h --- a/audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/inc/telephonyaudioroutingmanagerstub.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - CTelephonyAudioRoutingManagerStub class declaration. -* -*/ - -#ifndef TELEPHONYAUDIOROUTINGMANAGERSTUB_H -#define TELEPHONYAUDIOROUTINGMANAGERSTUB_H - -#include - -// FORWARD DECLARATIONS -class CTelephonyAudioRoutingManager; - -// CLASS DECLARATION -class CTelephonyAudioRoutingManagerStub : - public CBase, - public MTelephonyAudioRoutingPolicyObserver - { - public: - // Construct/destruct - static CTelephonyAudioRoutingManagerStub* NewL(); - ~CTelephonyAudioRoutingManagerStub(); - - private: - // Construct/destruct - CTelephonyAudioRoutingManagerStub(); - void ConstructL(); - - // From MTelephonyAudioRoutingPolicyObserver - virtual void OutputChangeRequested( - CTelephonyAudioRoutingManager& - aTelephonyAudioRoutingManager, - CTelephonyAudioRouting::TAudioOutput aOutput); - - private: - CTelephonyAudioRoutingManager* iTelephonyAudioRoutingMan; - RArray iAudioOutput; - }; - - -#endif /* TELEPHONYAUDIOROUTINGMANAGERSTUB_H */ diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/src/main.cpp --- a/audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/src/main.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - ECOM implementationproxy definition. -* -*/ - -#include // For making it ECom plugin - -#include "mmfaudioserverfactorystub.h" -#include "mmfaudioserverfactorystub.hrh" - -const TImplementationProxy ImplementationTable[] = - { - IMPLEMENTATION_PROXY_ENTRY(KMMFAudioServiceFactoryStubImplementationUID, CMMFAudioServerFactoryStub::NewL), - }; - - -EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) - { - aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); - return ImplementationTable; - } diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/src/mmfaudioserverfactorystub.cpp --- a/audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/src/mmfaudioserverfactorystub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Audio Server factory stub class implementation. -* -*/ - -#include "devsoundextensionstubs_common.h" -#include "mmfaudioserverfactorystub.h" -#include "telephonyaudioroutingmanagerstub.h" - -CMMFAudioServerFactoryStub::CMMFAudioServerFactoryStub() - { - // No Impl - } - -EXPORT_C MAudioSvrService* CMMFAudioServerFactoryStub::NewL() - { - DB_IN; - CMMFAudioServerFactoryStub* self = new(ELeave)CMMFAudioServerFactoryStub(); - MAudioSvrService* ptr = static_cast(self); - DB_OUT; - return ptr; - } - -void CMMFAudioServerFactoryStub::PassDestructorKey(TUid aUid) - { - DB_IN; - iDestructorKeyUid = aUid; - DB_OUT; - } - -TInt CMMFAudioServerFactoryStub::Load() - { - DB_IN; - TInt err(KErrNone); - DB_OUT; - return err; - } - -TInt CMMFAudioServerFactoryStub::Start() - { - DB_IN; - TInt err(KErrNone); - iTelephonyAudioRoutingManStub = CTelephonyAudioRoutingManagerStub::NewL(); - DB_OUT; - return err; - } - -void CMMFAudioServerFactoryStub::Stop() - { - // No Impl - } - -void CMMFAudioServerFactoryStub::Release() - { - DB_IN; - delete iTelephonyAudioRoutingManStub; - REComSession::DestroyedImplementation(iDestructorKeyUid); - DB_OUT; - } diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/src/telephonyaudioroutingmanagerstub.cpp --- a/audiostubs/devsoundextensions_stubs/mmfaudioserverfactorystub/src/telephonyaudioroutingmanagerstub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - TelephonyAudioRoutingManagerStub class implementation. -* Starts the TelephonyAudioRoutingManager. -* -*/ - -#include - -#include "devsoundextensionstubs_common.h" -#include "telephonyaudioroutingmanagerstub.h" - -CTelephonyAudioRoutingManagerStub::CTelephonyAudioRoutingManagerStub() - { - // No Impl - } - -CTelephonyAudioRoutingManagerStub::~CTelephonyAudioRoutingManagerStub() - { - DB_IN; - iAudioOutput.Close(); - delete iTelephonyAudioRoutingMan; - DB_OUT; - } - -CTelephonyAudioRoutingManagerStub* CTelephonyAudioRoutingManagerStub::NewL() - { - DB_IN; - CTelephonyAudioRoutingManagerStub* self = new (ELeave) CTelephonyAudioRoutingManagerStub; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - DB_OUT; - return self; - } - -void CTelephonyAudioRoutingManagerStub::ConstructL() - { - DB_IN; - // Configure and launch Telephony Audio Routing Manager - iAudioOutput.Reset(); - iAudioOutput.Append(CTelephonyAudioRouting::EHandset); - iAudioOutput.Append(CTelephonyAudioRouting::ELoudspeaker); - - iTelephonyAudioRoutingMan = CTelephonyAudioRoutingManager::NewL(*this, iAudioOutput.Array()); - - DB_CUSTOM0(_L("Telephony Audio Routing Manager created")); - DB_OUT; - } - -void CTelephonyAudioRoutingManagerStub::OutputChangeRequested ( - CTelephonyAudioRoutingManager& /*aTelephonyAudioRoutingManager*/, - CTelephonyAudioRouting::TAudioOutput /*aOutput*/) - { - // No Impl - } diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/BWINS/MmfDevSoundAdaptation.def --- a/audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/BWINS/MmfDevSoundAdaptation.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -EXPORTS - ??1CMMFDevSoundAdaptation@@UAE@XZ @ 1 NONAME ; CMMFDevSoundAdaptation::~CMMFDevSoundAdaptation(void) - ?Capabilities@CMMFDevSoundAdaptation@@QAE?AVTMMFCapabilities@@XZ @ 2 NONAME ; class TMMFCapabilities CMMFDevSoundAdaptation::Capabilities(void) - ?ClientConfig@CMMFDevSoundAdaptation@@QBEABVTMMFClientConfig@@XZ @ 3 NONAME ; class TMMFClientConfig const & CMMFDevSoundAdaptation::ClientConfig(void) const - ?Config@CMMFDevSoundAdaptation@@QBE?AVTMMFCapabilities@@XZ @ 4 NONAME ; class TMMFCapabilities CMMFDevSoundAdaptation::Config(void) const - ?CustomInterface@CMMFDevSoundAdaptation@@QAEPAXVTUid@@@Z @ 5 NONAME ; void * CMMFDevSoundAdaptation::CustomInterface(class TUid) - ?FixedSequenceCount@CMMFDevSoundAdaptation@@QAEHXZ @ 6 NONAME ; int CMMFDevSoundAdaptation::FixedSequenceCount(void) - ?FixedSequenceName@CMMFDevSoundAdaptation@@QAEABVTDesC16@@H@Z @ 7 NONAME ; class TDesC16 const & CMMFDevSoundAdaptation::FixedSequenceName(int) - ?Gain@CMMFDevSoundAdaptation@@QAEHXZ @ 8 NONAME ; int CMMFDevSoundAdaptation::Gain(void) - ?GetPlayBalanceL@CMMFDevSoundAdaptation@@QAEXAAH0@Z @ 9 NONAME ; void CMMFDevSoundAdaptation::GetPlayBalanceL(int &, int &) - ?GetRecordBalanceL@CMMFDevSoundAdaptation@@QAEXAAH0@Z @ 10 NONAME ; void CMMFDevSoundAdaptation::GetRecordBalanceL(int &, int &) - ?GetSupportedInputDataTypesL@CMMFDevSoundAdaptation@@QBEXAAV?$RArray@VTFourCC@@@@ABVTMMFPrioritySettings@@@Z @ 11 NONAME ; void CMMFDevSoundAdaptation::GetSupportedInputDataTypesL(class RArray &, class TMMFPrioritySettings const &) const - ?GetSupportedOutputDataTypesL@CMMFDevSoundAdaptation@@QBEXAAV?$RArray@VTFourCC@@@@ABVTMMFPrioritySettings@@@Z @ 12 NONAME ; void CMMFDevSoundAdaptation::GetSupportedOutputDataTypesL(class RArray &, class TMMFPrioritySettings const &) const - ?InitializeL@CMMFDevSoundAdaptation@@QAEXAAVMDevSoundAdaptationObserver@@VTFourCC@@W4TMMFState@@@Z @ 13 NONAME ; void CMMFDevSoundAdaptation::InitializeL(class MDevSoundAdaptationObserver &, class TFourCC, enum TMMFState) - ?InitializeL@CMMFDevSoundAdaptation@@QAEXAAVMDevSoundAdaptationObserver@@VTUid@@W4TMMFState@@@Z @ 14 NONAME ; void CMMFDevSoundAdaptation::InitializeL(class MDevSoundAdaptationObserver &, class TUid, enum TMMFState) - ?InitializeL@CMMFDevSoundAdaptation@@QAEXAAVMDevSoundAdaptationObserver@@W4TMMFState@@@Z @ 15 NONAME ; void CMMFDevSoundAdaptation::InitializeL(class MDevSoundAdaptationObserver &, enum TMMFState) - ?MaxGain@CMMFDevSoundAdaptation@@QAEHXZ @ 16 NONAME ; int CMMFDevSoundAdaptation::MaxGain(void) - ?MaxVolume@CMMFDevSoundAdaptation@@QAEHXZ @ 17 NONAME ; int CMMFDevSoundAdaptation::MaxVolume(void) - ?NewL@CMMFDevSoundAdaptation@@SAPAV1@AAVRServer2@@@Z @ 18 NONAME ; class CMMFDevSoundAdaptation * CMMFDevSoundAdaptation::NewL(class RServer2 &) - ?Pause@CMMFDevSoundAdaptation@@QAEXXZ @ 19 NONAME ; void CMMFDevSoundAdaptation::Pause(void) - ?PlayDTMFStringL@CMMFDevSoundAdaptation@@QAEXABVTDesC16@@@Z @ 20 NONAME ; void CMMFDevSoundAdaptation::PlayDTMFStringL(class TDesC16 const &) - ?PlayData@CMMFDevSoundAdaptation@@QAEXXZ @ 21 NONAME ; void CMMFDevSoundAdaptation::PlayData(void) - ?PlayDualToneL@CMMFDevSoundAdaptation@@QAEXHHABVTTimeIntervalMicroSeconds@@@Z @ 22 NONAME ; void CMMFDevSoundAdaptation::PlayDualToneL(int, int, class TTimeIntervalMicroSeconds const &) - ?PlayFixedSequenceL@CMMFDevSoundAdaptation@@QAEXH@Z @ 23 NONAME ; void CMMFDevSoundAdaptation::PlayFixedSequenceL(int) - ?PlayInitL@CMMFDevSoundAdaptation@@QAEXXZ @ 24 NONAME ; void CMMFDevSoundAdaptation::PlayInitL(void) - ?PlayToneL@CMMFDevSoundAdaptation@@QAEXHABVTTimeIntervalMicroSeconds@@@Z @ 25 NONAME ; void CMMFDevSoundAdaptation::PlayToneL(int, class TTimeIntervalMicroSeconds const &) - ?PlayToneSequenceL@CMMFDevSoundAdaptation@@QAEXABVTDesC8@@@Z @ 26 NONAME ; void CMMFDevSoundAdaptation::PlayToneSequenceL(class TDesC8 const &) - ?RecordData@CMMFDevSoundAdaptation@@QAEXXZ @ 27 NONAME ; void CMMFDevSoundAdaptation::RecordData(void) - ?RecordInitL@CMMFDevSoundAdaptation@@QAEXXZ @ 28 NONAME ; void CMMFDevSoundAdaptation::RecordInitL(void) - ?SamplesPlayed@CMMFDevSoundAdaptation@@QAEHXZ @ 29 NONAME ; int CMMFDevSoundAdaptation::SamplesPlayed(void) - ?SamplesRecorded@CMMFDevSoundAdaptation@@QAEHXZ @ 30 NONAME ; int CMMFDevSoundAdaptation::SamplesRecorded(void) - ?SetClientConfig@CMMFDevSoundAdaptation@@QAEXABVTMMFClientConfig@@@Z @ 31 NONAME ; void CMMFDevSoundAdaptation::SetClientConfig(class TMMFClientConfig const &) - ?SetConfigL@CMMFDevSoundAdaptation@@QAEXABVTMMFCapabilities@@@Z @ 32 NONAME ; void CMMFDevSoundAdaptation::SetConfigL(class TMMFCapabilities const &) - ?SetDTMFLengths@CMMFDevSoundAdaptation@@QAEXAAVTTimeIntervalMicroSeconds32@@00@Z @ 33 NONAME ; void CMMFDevSoundAdaptation::SetDTMFLengths(class TTimeIntervalMicroSeconds32 &, class TTimeIntervalMicroSeconds32 &, class TTimeIntervalMicroSeconds32 &) - ?SetGain@CMMFDevSoundAdaptation@@QAEXH@Z @ 34 NONAME ; void CMMFDevSoundAdaptation::SetGain(int) - ?SetPlayBalanceL@CMMFDevSoundAdaptation@@QAEXHH@Z @ 35 NONAME ; void CMMFDevSoundAdaptation::SetPlayBalanceL(int, int) - ?SetPrioritySettings@CMMFDevSoundAdaptation@@QAEXABVTMMFPrioritySettings@@@Z @ 36 NONAME ; void CMMFDevSoundAdaptation::SetPrioritySettings(class TMMFPrioritySettings const &) - ?SetRecordBalanceL@CMMFDevSoundAdaptation@@QAEXHH@Z @ 37 NONAME ; void CMMFDevSoundAdaptation::SetRecordBalanceL(int, int) - ?SetToneRepeats@CMMFDevSoundAdaptation@@QAEXHABVTTimeIntervalMicroSeconds@@@Z @ 38 NONAME ; void CMMFDevSoundAdaptation::SetToneRepeats(int, class TTimeIntervalMicroSeconds const &) - ?SetVolume@CMMFDevSoundAdaptation@@QAEXH@Z @ 39 NONAME ; void CMMFDevSoundAdaptation::SetVolume(int) - ?SetVolumeRamp@CMMFDevSoundAdaptation@@QAEXABVTTimeIntervalMicroSeconds@@@Z @ 40 NONAME ; void CMMFDevSoundAdaptation::SetVolumeRamp(class TTimeIntervalMicroSeconds const &) - ?Stop@CMMFDevSoundAdaptation@@QAEXXZ @ 41 NONAME ; void CMMFDevSoundAdaptation::Stop(void) - ?Volume@CMMFDevSoundAdaptation@@QAEHXZ @ 42 NONAME ; int CMMFDevSoundAdaptation::Volume(void) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/EABI/MmfDevSoundAdaptation.def --- a/audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/EABI/MmfDevSoundAdaptation.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -EXPORTS - _ZN22CMMFDevSoundAdaptation10RecordDataEv @ 1 NONAME - _ZN22CMMFDevSoundAdaptation10SetConfigLERK16TMMFCapabilities @ 2 NONAME - _ZN22CMMFDevSoundAdaptation11InitializeLER27MDevSoundAdaptationObserver4TUid9TMMFState @ 3 NONAME - _ZN22CMMFDevSoundAdaptation11InitializeLER27MDevSoundAdaptationObserver7TFourCC9TMMFState @ 4 NONAME - _ZN22CMMFDevSoundAdaptation11InitializeLER27MDevSoundAdaptationObserver9TMMFState @ 5 NONAME - _ZN22CMMFDevSoundAdaptation11RecordInitLEv @ 6 NONAME - _ZN22CMMFDevSoundAdaptation12CapabilitiesEv @ 7 NONAME - _ZN22CMMFDevSoundAdaptation13PlayDualToneLEiiRK25TTimeIntervalMicroSeconds @ 8 NONAME - _ZN22CMMFDevSoundAdaptation13SamplesPlayedEv @ 9 NONAME - _ZN22CMMFDevSoundAdaptation13SetVolumeRampERK25TTimeIntervalMicroSeconds @ 10 NONAME - _ZN22CMMFDevSoundAdaptation14SetDTMFLengthsER27TTimeIntervalMicroSeconds32S1_S1_ @ 11 NONAME - _ZN22CMMFDevSoundAdaptation14SetToneRepeatsEiRK25TTimeIntervalMicroSeconds @ 12 NONAME - _ZN22CMMFDevSoundAdaptation15CustomInterfaceE4TUid @ 13 NONAME - _ZN22CMMFDevSoundAdaptation15GetPlayBalanceLERiS0_ @ 14 NONAME - _ZN22CMMFDevSoundAdaptation15PlayDTMFStringLERK7TDesC16 @ 15 NONAME - _ZN22CMMFDevSoundAdaptation15SamplesRecordedEv @ 16 NONAME - _ZN22CMMFDevSoundAdaptation15SetClientConfigERK16TMMFClientConfig @ 17 NONAME - _ZN22CMMFDevSoundAdaptation15SetPlayBalanceLEii @ 18 NONAME - _ZN22CMMFDevSoundAdaptation17FixedSequenceNameEi @ 19 NONAME - _ZN22CMMFDevSoundAdaptation17GetRecordBalanceLERiS0_ @ 20 NONAME - _ZN22CMMFDevSoundAdaptation17PlayToneSequenceLERK6TDesC8 @ 21 NONAME - _ZN22CMMFDevSoundAdaptation17SetRecordBalanceLEii @ 22 NONAME - _ZN22CMMFDevSoundAdaptation18FixedSequenceCountEv @ 23 NONAME - _ZN22CMMFDevSoundAdaptation18PlayFixedSequenceLEi @ 24 NONAME - _ZN22CMMFDevSoundAdaptation19SetPrioritySettingsERK20TMMFPrioritySettings @ 25 NONAME - _ZN22CMMFDevSoundAdaptation4GainEv @ 26 NONAME - _ZN22CMMFDevSoundAdaptation4NewLER8RServer2 @ 27 NONAME - _ZN22CMMFDevSoundAdaptation4StopEv @ 28 NONAME - _ZN22CMMFDevSoundAdaptation5PauseEv @ 29 NONAME - _ZN22CMMFDevSoundAdaptation6VolumeEv @ 30 NONAME - _ZN22CMMFDevSoundAdaptation7MaxGainEv @ 31 NONAME - _ZN22CMMFDevSoundAdaptation7SetGainEi @ 32 NONAME - _ZN22CMMFDevSoundAdaptation8PlayDataEv @ 33 NONAME - _ZN22CMMFDevSoundAdaptation9MaxVolumeEv @ 34 NONAME - _ZN22CMMFDevSoundAdaptation9PlayInitLEv @ 35 NONAME - _ZN22CMMFDevSoundAdaptation9PlayToneLEiRK25TTimeIntervalMicroSeconds @ 36 NONAME - _ZN22CMMFDevSoundAdaptation9SetVolumeEi @ 37 NONAME - _ZN22CMMFDevSoundAdaptationD0Ev @ 38 NONAME - _ZN22CMMFDevSoundAdaptationD1Ev @ 39 NONAME - _ZN22CMMFDevSoundAdaptationD2Ev @ 40 NONAME - _ZNK22CMMFDevSoundAdaptation12ClientConfigEv @ 41 NONAME - _ZNK22CMMFDevSoundAdaptation27GetSupportedInputDataTypesLER6RArrayI7TFourCCERK20TMMFPrioritySettings @ 42 NONAME - _ZNK22CMMFDevSoundAdaptation28GetSupportedOutputDataTypesLER6RArrayI7TFourCCERK20TMMFPrioritySettings @ 43 NONAME - _ZNK22CMMFDevSoundAdaptation6ConfigEv @ 44 NONAME - _ZTI16CMMFHwDeviceStub @ 45 NONAME DATA 12 ; ## - _ZTI17TMdaDTMFGenerator @ 46 NONAME DATA 12 ; ## - _ZTI17TMdaToneGenerator @ 47 NONAME DATA 12 ; ## - _ZTI19CMMFDevSoundUtility @ 48 NONAME DATA 12 ; ## - _ZTI21TMdaDualToneGenerator @ 49 NONAME DATA 12 ; ## - _ZTI21TMdaSequenceGenerator @ 50 NONAME DATA 12 ; ## - _ZTI22CMMFDevSoundAdaptation @ 51 NONAME DATA 12 ; ## - _ZTI22CTonePlayCompleteTimer @ 52 NONAME DATA 12 ; ## - _ZTI23TMdaSimpleToneGenerator @ 53 NONAME DATA 12 ; ## - _ZTIN22CMMFDevSoundAdaptation5CBodyE @ 54 NONAME DATA 32 ; ## - _ZTV16CMMFHwDeviceStub @ 55 NONAME DATA 36 ; ## - _ZTV17TMdaDTMFGenerator @ 56 NONAME DATA 24 ; ## - _ZTV17TMdaToneGenerator @ 57 NONAME DATA 24 ; ## - _ZTV19CMMFDevSoundUtility @ 58 NONAME DATA 20 ; ## - _ZTV21TMdaDualToneGenerator @ 59 NONAME DATA 24 ; ## - _ZTV21TMdaSequenceGenerator @ 60 NONAME DATA 24 ; ## - _ZTV22CMMFDevSoundAdaptation @ 61 NONAME DATA 20 ; ## - _ZTV22CTonePlayCompleteTimer @ 62 NONAME DATA 32 ; ## - _ZTV23TMdaSimpleToneGenerator @ 63 NONAME DATA 24 ; ## - _ZTVN22CMMFDevSoundAdaptation5CBodyE @ 64 NONAME DATA 68 ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/data/sample1.wav Binary file audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/data/sample1.wav has changed diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/group/MmfDevSoundAdaptation.mmp --- a/audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/group/MmfDevSoundAdaptation.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* -* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project specification file for MmfDevSoundAdaptation_Stub -* Version : %version: bh1mmcf#32 % -* -*/ - - -#include - -TARGET MmfDevSoundAdaptation_Stub.dll -CAPABILITY MultimediaDD ProtServ UserEnvironment -TARGETTYPE DLL - -UID 0x101F4549 0x10207ABC -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE MmfDevSoundAdaptation.cpp -SOURCE MmfDevSoundAdaptationBody.cpp -SOURCE MmfHwDeviceStub.cpp -SOURCE ToneGenerator.cpp -SOURCE DevSoundUtility.cpp -SOURCE TonePlayCompleteTimer.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../inc - -START RESOURCE FixedSequence.rss -TARGETPATH Resource/DevSound -HEADER -END - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/ecom -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server - -LIBRARY euser.lib -LIBRARY mmfserverbaseclasses.lib -LIBRARY mmfcontrollerframework.lib -LIBRARY bafl.lib -LIBRARY efsrv.lib -LIBRARY ecom.lib - -LIBRARY AudioInputCI.lib -LIBRARY AudioOutputCI.lib -LIBRARY G711DecoderIntfcCI.lib -LIBRARY G729DecoderIntfcCI.lib -LIBRARY IlbcDecoderIntfcCI.lib -LIBRARY G711EncoderIntfcCI.lib -LIBRARY G729EncoderIntfcCI.lib -LIBRARY IlbcEncoderIntfcCI.lib -LIBRARY ErrorConcealmentIntfcCI.lib -LIBRARY SpeechEncoderConfigCI.lib - -deffile MmfDevSoundAdaptation.def -nostrictdef - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/group/bld.inf --- a/audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Build file for MMFDevSoundAdaptation Stub project -* -*/ - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS -// for Hw -../data/sample1.wav /Epoc32/Data/z/System/Data/DevSoundAdaptationStub/sample1.wav -// for Wins -../data/sample1.wav /Epoc32/winscw/c/sample1.wav - -PRJ_MMPFILES -./MmfDevSoundAdaptation.mmp diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/inc/MmfDevSoundAdaptation.h --- a/audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/inc/MmfDevSoundAdaptation.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,776 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Implementation of the MMF DevSound Server adaptation. -* -*/ - - -#ifndef MMFDEVSOUNDADAPTATION_H -#define MMFDEVSOUNDADAPTATION_H - -// INCLUDES -#include - -// CLASS DECLARATION - -/** -An interface to a set of DevSound adaptation observer callback functions. - -This serves as the method of communication between the client and the -DevSound. - -The class is a mixin and is intended to be inherited by the client class -that is interested in observing the DevSound operation. The functions -encapsulated by this class are called when specific events occur in the -process of initializing and playing/recording an audio sample or playing -tones. -*/ -class MDevSoundAdaptationObserver - { -public: - /** - Handles initialization completion event. - - A derived class must provide an implementation to handle the initialization - request. - - CMMFDevSound object calls this function when its InitializeL() function - completes. - - @param aError - Error code. KErrNone if successful. Other values are possible - indicating a problem initializing CMMFDevSound object. - */ - virtual void InitializeComplete(TInt aError)=0; - - /** - Handles tone play completion event. - - A derived class must provide an implementation to handle the tone play - completion request. - - CMMFDevSound object calls this function when an attempt to play tone has - completed, successfully or otherwise. - - The following are the play tone functions; PlayToneL(), PlayDMTFStringL(), - PlayToneSequenceL(), and PlayFixedSequenceL(). - - @param aError - Error code. The status of tone playback. KErrUnderflow playing of - the tone is complete. KErrAccessDenied the sound device is in use by - another higher priority client. KErrCancel playing of the audio - sample is stopped by DevSound client another higher priority client. - */ - virtual void ToneFinished(TInt aError)=0; - - /** - Handles CMMFDevSound object's data request event. - - A derived class must provide an implementation to supply CMMFDevSound - object the data that it needs to play. - - CMMFDevSound object calls this function when and where it needs data for - playing. The observer should notify CMMFDevSound object as - quickly as possible after the data is read into buffer, aBuffer by calling - PlayData(), otherwise the implementation might callback function PlayError() - on derived class object with error code KErrUnderflow. - This does not apply to the very first call to PlayData(), however. - It is possible for a user of DevSound to hold the first buffer sent in - BufferToBeFilled() until ready to play. - The use case for this is if a low latency audio response - is required, as at this point all the resources used to play audio are open. - If used in this way then it is important to be aware that when when the - resources for audio are ready at the BufferToBeFilled() callback, a Devsound - on a real device will be running at increased power consumption as the audio - hw and any required DSPs will be powered up etc. - - @param aBuffer - Buffer into which data should be read. The amount of data that is - needed is specified in CMMFBuffer::RequestSize(). - */ - virtual void BufferToBeFilled(CMMFBuffer* aBuffer)=0; - - /** - Handles play completion or cancel event. - - A derived class must provide an implementation to handle the play - completion or cancel request. - - CMMFDevSound object calls this function when an attempt to play audio sample - has completed, successfully or otherwise. - - @param aError - Error code. The status of playback. KErrUnderflow playing of the - audio sample is complete. KErrAccessDenied the sound device is in - use by another higher priority client. - */ - virtual void PlayError(TInt aError)=0; - - /** - Handles CMMFDevSound object's data request event. - - A derived class must provide an implementation to process the data - supplied by CMMFDevSound object while recording. - - CMMFDevSound object calls this function when the buffer, aBuffer gets filled - while recording. The observer should notify CMMFDevSound - object as quickly as possible after data in the buffer is processed by - calling RecordData(), otherwise the implementation might callback - the function RecordError() on derived class object with error code - KErrOverflow. - - @param aBuffer - Buffer containing processed (recorded) data. The amount - of data that is available is specified in CMMFBuffer::RequestSize(). - */ - virtual void BufferToBeEmptied(CMMFBuffer* aBuffer)=0; - - /** - Handles record completion or cancel event. - - A derived class must provide an implementation to handle the record - completion or cancel request. - - CMMFDevSound object calls this function when an attempt to record audio - sample has completed, successfully or otherwise. - - @param aError - Error code. The status of recording. KErrOverflow audio devices - runs out of internal buffer. KErrAccessDenied the sound device is - in use by another higher priority client. - */ - virtual void RecordError(TInt aError)=0; - - /** - Handles device event. - - A derived class must provide an implementtion to handle the messages from - audio hardware device. - - CMMFDevSound object calls this function when a message is received from the - audio hardware device. - - @param aMessageType - Defines the type of message. Used to determine how to - interpret the contents of aMsg. - @param aMsg - Message that is packed in the Descriptor format. - */ - virtual void DeviceMessage(TUid aMessageType, const TDesC8& aMsg)=0; - - }; - - -/** -* A class representing client application information. -* -* @lib MmfDevSoundAdaptation.lib -* @since S60 3.0 -*/ -class TMMFClientConfig - { - public: - TVendorId iVendorId; // Application Vendor Id - TSecureId iSecureId; // Application Secure Id - TProcessId iProcessId; // Application Process Id - RArray iCapabilities; // Application capabilities array - }; - -// CLASS DECLARATION - -/** -* This class implements DevSound behavior in a hardware independent way. -* -* @lib MmfDevSoundAdaptation.lib -* @since S60 3.0 -*/ -class CMMFDevSoundAdaptation : public CBase - { - - public: // Constructors and destructor - - /** - * Constructs, and returns a pointer to, a new CMMFDevSoundAdaptation - * object. - * Leaves on failure.. - * @param RServer2& aPolicyServerHandle A handle to policy server. - * @return CMMFDevSoundAdaptation* A pointer to newly created object. - */ - IMPORT_C static CMMFDevSoundAdaptation* NewL( - RServer2& aPolicyServerHandle); - - /** - * Destructor. - */ - IMPORT_C virtual ~CMMFDevSoundAdaptation(); - - public: // New functions - - /** - * Initializes to raw audio data PCM16 and Sampling Rate of 8 KHz. - * On completion of Initialization, calls InitializeComplete() on - * aDevSoundObserver. - * Leaves on failure. - * @since S60 3.0 - * @param MDevSoundAdaptationObserver& aDevSoundObserver A reference to - * the DevSound Observer instance. - * @param TMMFState aMode Mode for which this object will be used. - * @return void - */ - IMPORT_C void InitializeL( - MDevSoundAdaptationObserver& aDevSoundObserver, - TMMFState aMode); - - /** - * Initializes DevSound object for the mode aMode for processing audio - * data with hardware device aHWDev. - * On completion of Initialization, calls InitializeComplete() on - * aDevSoundObserver. - * Leaves on failure. - * @since S60 3.0 - * @param MDevSoundAdaptationObserver& aDevSoundObserver A reference to - * the DevSound Observer instance. - * @param TUid aHWDev The CMMFHwDevice implementation identifier. - * @param TMMFState aMode The mode for which this object will be used - * @return void - */ - IMPORT_C void InitializeL( - MDevSoundAdaptationObserver& aDevSoundObserver, - TUid aHWDev, - TMMFState aMode); - - /** - * Initializes DevSound object for the mode aMode for processing audio - * data with hardware device supporting FourCC aDesiredFourCC. - * Leaves on failure. - * @since S60 3.0 - * @param MDevSoundAdaptationObserver& aDevSoundObserver A reference to - * DevSound Observer instance. - * @param TFourCC aDesiredFourCC The CMMFHwDevice implementation FourCC - * code. - * @param TMMFState aMode The mode for which this object will be used - * @return KErrNone if successfull, else corresponding error code - * @return void - */ - IMPORT_C void InitializeL( - MDevSoundAdaptationObserver& aDevSoundObserver, - TFourCC aDesiredFourCC, - TMMFState aMode); - - /** - * Returns the supported Audio settings ie. encoding, sample rates, - * mono/stereo operation, buffer size etc.. - * @since S60 3.0 - * @return TMMFCapabilities The device settings. - */ - IMPORT_C TMMFCapabilities Capabilities(); - - /** - * Returns the current device configuration. - * @since S60 3.0 - * @return TMMFCapabilities The device settings. - */ - IMPORT_C TMMFCapabilities Config() const; - - /** - * Configure CMMFDevSound object with the settings in aConfig. Use this - * to set sampling rate, encoding and mono/stereo. - * Leaves on failure. - * @since S60 3.0 - * @param const TMMFCapabilities& aConfig The attribute values to which - * CMMFDevSound object will be configured to. - * @return void - */ - IMPORT_C void SetConfigL(const TMMFCapabilities& aCaps); - - /** - * Returns an integer representing the maximum volume device supports. - * This is the maximum value which can be passed to - * CMMFDevSound::SetVolume. - * @since S60 3.0 - * @return TInt The maximum volume. This value is platform dependent but - * is always greater than or equal to one. - */ - IMPORT_C TInt MaxVolume(); - - /** - * Returns an integer representing the current volume. - * @since S60 3.0 - * @return TInt The current volume level. - */ - IMPORT_C TInt Volume(); - - /** - * Changes the current playback volume to a specified value. The volume - * can be changed before or during playback and is effective immediately. - * @since S60 3.0 - * @param TInt aVolume The volume setting. This can be any value from 0 - * to the value returned by a call to - * CMMFDevSound::MaxVolume(). If the volume is not - * within this range, the volume is automatically set - * to minimum or maximum value based on the value - * that is being passed. Setting a zero value mutes - * the sound. Setting the maximum value results in - * the loudest possible sound. - * @return void - */ - IMPORT_C void SetVolume(TInt aVolume); - - /** - * Returns an integer representing the maximum gain the device supports. - * This is the maximum value which can be passed to CMMFDevSound::SetGain - * @since S60 3.0 - * @return TInt The maximum gain. This value is platform dependent but is - * always greater than or equal to one. - */ - IMPORT_C TInt MaxGain(); - - /** - * Returns an integer representing the current gain. - * @since S60 3.0 - * @return TInt The current gain level. - */ - IMPORT_C TInt Gain(); - - /** - * Changes the current recording gain to a specified value. The gain can - * be changed before or during recording and is effective immediately. - * @since S60 3.0 - * @param TInt aGain The gain setting. This can be any value from zero to - * the value returned by a call to - * CMMFDevSound::MaxGain(). If the volume - * is not within this range, the gain is automatically - * set to minimum or maximum value based on the value - * that is being passed. Setting a zero value mutes the - * sound. Setting the maximum value results in the - * loudest possible sound. - * @return void - */ - IMPORT_C void SetGain(TInt aGain); - - /** - * Returns the speaker balance set for playing. - * Leaves on failure. - * @since S60 3.0 - * @param TInt &aLeftPercentage On return contains the left speaker - * volume percentage. - * @param TInt &aRightPercentage On return contains the right speaker - * volume percentage. - * @return void - */ - IMPORT_C void GetPlayBalanceL(TInt& aLeftPercentage, - TInt& aRightPercentage); - - /** - * Sets the speaker balance for playing. The speaker balance can be - * changed before or during playback and is effective immediately. - * Leaves on failure. - * @since S60 3.0 - * @param TInt aLeftPercentage The left speaker volume percentage. This - * can be any value from zero to 100. Setting - * a zero value mutes the sound on left - * speaker. - * @param TInt aRightPercentage The right speaker volume percentage. - * This can be any value from zero to 100. - * Setting a zero value mutes the sound on - * right speaker. - * @return void - */ - IMPORT_C void SetPlayBalanceL(TInt aLeftPercentage, - TInt aRightPercentage); - - /** - * Returns the microphone gain balance set for recording. - * Leaves on failure. - * @since S60 3.0 - * @param TInt &aLeftPercentage On return contains the left microphone - * gain percentage. - * @param TInt &aRightPercentage On return contains the right microphone - * gain percentage. - * @return void - */ - IMPORT_C void GetRecordBalanceL(TInt& aLeftPercentage, - TInt& aRightPercentage); - - /** - * Sets the microphone balance for recording. The microphone balance can - * be changed before or during recording and is effective immediately. - * Leaves on failure. - * @since S60 3.0 - * @param TInt aLeftPercentage The left microphone gain percentage. This - * can be any value from zero to 100. Setting - * a zero value mutes the sound from left - * microphone. - * @param TInt aRightPercentage The right microphone gain percentage. - * This can be any value from zero to 100. - * Setting a zero value mutes the sound from - * right microphone. - * @return void - */ - IMPORT_C void SetRecordBalanceL(TInt aLeftPercentage, - TInt aRightPercentage); - - /** - * Initializes the audio device and starts the play process. This - * function queries and acquires the audio policy before initializing - * audio device. If there was an error during policy initialization, - * PlayError() function will be called on the observer with error code - * KErrAccessDenied, otherwise BufferToBeFilled() function will be called - * with a buffer reference. After reading data into the buffer reference - * passed, the client should call PlayData() to play data. - * The amount of data that can be played is specified in - * CMMFBuffer::RequestSize(). Any data that is read into buffer beyond - * this size will be ignored. - * Leaves on failure. - * @since S60 3.0 - * @return void - */ - IMPORT_C void PlayInitL(); - - /** - * Initializes the audio device and starts the record process. This - * function queries and acquires the audio policy before initializing - * audio device. If there was an error during policy initialization, - * RecordError() function will be called on the observer with error code - * KErrAccessDenied, otherwise BufferToBeEmptied() function will be - * called with a buffer reference. This buffer contains recorded or - * encoded data. After processing data in the buffer reference passed, - * the client should call RecordData() to continue recording process. - * The amount of data that is available is specified in - * CMMFBuffer::RequestSize(). - * Leaves on failure. - * @since S60 3.0 - * @return void - */ - IMPORT_C void RecordInitL(); - - /** - * Plays data in the buffer at the current volume. - * The client should fill the buffer with audio data before calling this - * function. The observer gets a reference to the buffer along with the - * callback function BufferToBeFilled(). When playing of the audio sample - * is complete, successfully or otherwise, the function PlayError() on - * the observer is called. - * The last buffer of the audio stream being played should have the last - * buffer flag set using CMMFBuffer::SetLastBuffer(TBool). If a - * subsequent attempt to play the clip is made, this flag will need - * resetting by the client. - * @return void - */ - IMPORT_C void PlayData(); - - /** - * Contine the process of recording. - * Once the buffer is filled with recorded data, the Observer gets a - * reference to the buffer along with the callback function - * BufferToBeEmptied(). After processing the buffer (copying over to a - * different buffer or writing to file) the client should call this - * function to continue the recording process. - * @return void - */ - IMPORT_C void RecordData(); - - /** - * Stops the ongoing operation (Play, Record, TonePlay). - * @since S60 3.0 - * @return void - */ - IMPORT_C void Stop(); - - /** - * Temporarily Stops the ongoing operation (Play, Record, TonePlay). - * @since S60 3.0 - * @return void - */ - IMPORT_C void Pause(); - - /** - * Returns the Sample recorded so far - * @since S60 3.0 - * @return TInt Returns the samples recorded. - */ - IMPORT_C TInt SamplesRecorded(); - - /** - * Returns the Sample played so far - * @since S60 3.0 - * @return TInt Returns the samples played. - */ - IMPORT_C TInt SamplesPlayed(); - - /** - * Initializes the audio device and starts playing a tone. The tone is - * played with the frequency and duration specified. - * Leaves on failure. - * @since S60 3.0 - * @param TInt aFrequency The frequency at which the tone will be played. - * @param const TTimeIntervalMicroSeconds &aDuration The period over - * which the tone will be played. A zero value causes the no tone - * to be played. - * @return void - */ - IMPORT_C void PlayToneL( - TInt aFrequency, - const TTimeIntervalMicroSeconds& aDuration); - - /** - * Initializes audio device and starts playing a dual tone. Dual Tone is - * played with the specified frequencies and for the specified duration. - * Leaves on failure. - * @since S60 3.0 - * @param TInt aFrequencyOne The first frequency of dual tone. - * @param TInt aFrequencyTwo The second frequency of dual tone. - * @param const TTimeIntervalMicroSeconds &aDuration The period over - * which the tone will be played. A zero value causes the no tone - * to be played. - * @return void - */ - IMPORT_C void PlayDualToneL(TInt aFrequencyOne, - TInt aFrequencyTwo, - const TTimeIntervalMicroSeconds& aDuration); - - /** - * Initializes the audio device and starts playing the DTMF string - * aDTMFString. - * Leaves on failure. - * @since S60 3.0 - * @param const TDesC &aDTMFString The DTMF sequence in a descriptor. - * @return void - */ - IMPORT_C void PlayDTMFStringL(const TDesC& aDTMFString); - - /** - * Initializes the audio device and starts playing a tone sequence. - * Leaves on failure. - * @since S60 3.0 - * @param const TDesC8 &aData The tone sequence in a descriptor. - * @return void - */ - IMPORT_C void PlayToneSequenceL(const TDesC8& aData); - - /** - * Initializes the audio device and starts playing the specified - * pre-defined tone sequence. - * Leaves on failure. - * @since S60 3.0 - * @param TInt aSequenceNumber The index identifying the specific - * pre-defined tone sequence. Index values are relative to zero. - * This can be any value from zero to the value returned by a call - * to FixedSequenceCount() - 1. The function raises a panic if the - * sequence number is not within this range. - * @return void - */ - IMPORT_C void PlayFixedSequenceL(TInt aSequenceNumber); - - /** - * Defines the number of times the audio is to be repeated during the - * tone playback operation. A period of silence can follow each playing - * of a tone. The tone playing can be repeated indefinitely - * @since S60 3.0 - * @param TInt aRepeatCount The number of times the tone, together with - * the trailing silence, is to be repeated. If this is set to - * KMdaRepeatForever, then the tone, together with the trailing - * silence, is repeated indefinitely or until Stop() is called. - * If this is set to zero, then the tone is not repeated. - * @param const TTimeIntervalMicroSeconds &aRepeatTrailingSilence An - * interval of silence which will be played after each tone. - * Supported only during tone playing. - * @return void - */ - IMPORT_C void SetToneRepeats(TInt aRepeatCount, - const TTimeIntervalMicroSeconds& aRepeatTrailingSilence); - - /** - * Defines the duration of tone on, tone off and tone pause to be used - * during the DTMF tone playback operation. - * Supported only during tone playing. - * @since S60 3.0 - * @param TTimeIntervalMicroSeconds32 &aToneOnLength The period over - * which the tone will be played. If this is set to zero, then the - * tone is not played. - * @param TTimeIntervalMicroSeconds32 &aToneOffLength The period over - * which the no tone will be played. - * @param TTimeIntervalMicroSeconds32 &aPauseLength The period over which - * the tone playing will be paused. - * @return void - */ - IMPORT_C void SetDTMFLengths( - TTimeIntervalMicroSeconds32& aToneOnLength, - TTimeIntervalMicroSeconds32& aToneOffLength, - TTimeIntervalMicroSeconds32& aPauseLength); - - /** - * Defines the period over which the volume level is to rise smoothly - * from nothing to the normal volume level. - * The function is only available before playing. - * @since S60 3.0 - * @param const TTimeIntervalMicroSeconds &aRampDuration The period over - * which the volume is to rise. A zero value causes the tone - * sample to be played at the normal level for the full duration - * of the playback. A value, which is longer than the duration of - * the tone sample means that the sample never reaches its normal - * volume level. - * @return void - */ - IMPORT_C void SetVolumeRamp( - const TTimeIntervalMicroSeconds& aRampDuration); - - /** - * Defines the priority settings that should be used for this instance. - * @since S60 3.0 - * @param const TMMFPrioritySettings &aPrioritySettings A class type - * representing the client's priority, priority preference and - * state - * @return void - */ - IMPORT_C void SetPrioritySettings( - const TMMFPrioritySettings& aPrioritySettings); - - /** - * Retrieves a custom interface to the device. - * @since S60 3.0 - * @param TUid aInterfaceId The interface UID, defined with the custom - * interface. - * @return TAny* A pointer to the interface implementation, or NULL if - * the device does not implement the interface requested. The - * return value must be cast to the correct type by the user. - */ - IMPORT_C TAny* CustomInterface(TUid aInterfaceId); - - /** - * Returns the number of available pre-defined tone sequences. - * This is the number of fixed sequence supported by DevSound by default. - * @since S60 3.0 - * @return TInt The fixed sequence count. This value is implementation - * dependent. - */ - IMPORT_C TInt FixedSequenceCount(); - - /** - * Returns the name assigned to a specific pre-defined tone sequence. - * This is the number of the fixed sequence supported by DevSound by - * default. - * The function raises a panic if sequence number specified is invalid. - * @since S60 3.0 - * @param TInt aSequenceNumber The index identifying the specific - * pre-defined tone sequence. Index values are relative to zero. - * This can be any value from zero to the value returned by a call - * to CMdaAudioPlayerUtility::FixedSequenceCount() - 1. The - * function raises a panic if sequence number is not within this - * range. - * @return const TDesC & A reference to a Descriptor containing the fixed - * sequence name indexed by aSequenceNumber. - */ - IMPORT_C const TDesC& FixedSequenceName(TInt aSequenceNumber); - - /** - * Returns a list of the supported input datatypes that can be sent to - * DevSound for playing audio. The datatypes returned are those that the - * DevSound supports given the priority settings passed in - * aPrioritySettings. Note that if no supported data types are found this - * does not constitute failure, the function will return normally with no - * entries in aSupportedDataTypes. - * @since S60 3.0 - * @param RArray< TFourCC > &aSupportedDataTypes The array of supported - * data types that will be filled in by this function. The - * supported data types of the DevSound are in the form of an - * array of TFourCC codes. Any existing entries in the array will - * be overwritten on calling this function. If no supported data - * types are found given the priority settings, then the - * aSupportedDatatypes array will have zero entries. - * @param const TMMFPrioritySettings &aPrioritySettings The priority - * settings used to determine the supported datatypes. Note this - * does not set the priority settings. For input datatypes the - * iState member of the priority settings would be expected to be - * either EMMFStatePlaying or EMMFStatePlayingRecording. The - * priority settings may effect the supported datatypes depending - * on the audio routing. - * @return void - */ - IMPORT_C void GetSupportedInputDataTypesL( - RArray& aSupportedDataTypesconst, - const TMMFPrioritySettings& aPrioritySettings) const; - - /** - * Returns a list of the supported output dataypes that can be received - * from DevSound for recording audio. The datatypes returned are those - * that the DevSound supports given the priority settings passed in - * aPrioritySettings. Note that if no supported data types are found this - * does not constitute failure, the function will return normally with no - * entries in aSupportedDataTypes. - * @since S60 3.0 - * @param RArray< TFourCC > &aSupportedDataTypes The array of supported - * data types that will be filled in by this function. The - * supported datatypes of the DevSound are in the form of an array - * of TFourCC codes. Any existing entries in the array will be - * overwritten on calling this function. If no supported datatypes - * are found given the priority settings, then the - * aSupportedDatatypes array will have zero entries. - * @param const TMMFPrioritySettings &aPrioritySettings The priority - * settings used to determine the supported data types. Note this - * does not set the priority settings. For output data types the - * iState member of the priority settings would expected to be - * either EMMFStateRecording or EMMFStatePlayingRecording. The - * priority settings may effect the supported datatypes depending - * on the audio routing. - * @return void - */ - IMPORT_C void GetSupportedOutputDataTypesL( - RArray& aSupportedDataTypes, - const TMMFPrioritySettings& aPrioritySettings) const; - - /** - * Sets client configuration - * @since S60 3.0 - * @param TMMFClientConfig& aClientConfig A reference to client - * configuration object. - * @return void - */ - IMPORT_C void SetClientConfig(const TMMFClientConfig& aClientConfig); - - /** - * Returns client configuration - * @since S60 3.0 - * @return void - */ - IMPORT_C const TMMFClientConfig& ClientConfig() const; - - /* - * Empties the buffers below DevSound without deleting the codec - * @since S60 3.1 - * @return TInt - * - IMPORT_C TInt EmptyBuffers();*/ - - protected: - - // So that nobody can extend - CMMFDevSoundAdaptation(); - - // Second phase constructor - void ConstructL(RServer2& aPolicyServerHandle); - - protected: // Data - // Actual implementation class. - class CBody; - - //DevSoundAdaptation body implementation - CBody* iBody; - - }; - -#endif // MMFDEVSOUNDADAPTATION - -// End of File - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/inc/MmfDevSoundInfo.h --- a/audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/inc/MmfDevSoundInfo.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - -#ifndef MMF_DEVSOUNDINFO_H -#define MMF_DEVSOUNDINFO_H - -#include -#include - - -/** -* Class representing DevSound information. -* -* @lib MmfDevSoundAdaptation_Stub -* @since S60 3.0 -*/ -class TMMFDevSoundInfo - { -public: - TInt iDevSoundId; - // More to be added for OMAP server - }; - -typedef TPckgBuf TMMFDevSoundInfoPckg; - -#endif - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/rom/MmfDevSoundAdaptation.iby --- a/audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/rom/MmfDevSoundAdaptation.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - DevSound adaptation stub. -* -*/ - - -#ifndef __MMFDEVSOUNDADAPTATION_IBY__ -#define __MMFDEVSOUNDADAPTATION_IBY__ - -file=ABI_DIR\BUILD_DIR\MmfDevSoundAdaptation_Stub.dll SHARED_LIB_DIR\MmfDevSoundAdaptation.dll -data=\Epoc32\data\Z\resource\DevSound\FixedSequence.rsc Resource\DevSound\FixedSequence.rsc -data=ZSYSTEM\Data\DevSoundAdaptationStub\sample1.wav System\Data\DevSoundAdaptationStub\sample1.wav - -#endif // __MMFDEVSOUNDADAPTATION_IBY__ diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/DevSoundUtility.cpp --- a/audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/DevSoundUtility.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,625 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Implementation of the DevSound utilities. -* -*/ - - - -// INCLUDE FILES -#include -#include -#include -#include -#include -#include //needed for CleanupResetAndDestroyPushL() -#include -#include "DevSoundUtility.h" - -_LIT(KFixedSequenceResourceFile, "Z:\\Resource\\DevSound\\FixedSequence.rsc"); - -// CONSTANTS -const TUint K4ByteSeq = 4; -const TInt KFourCCStringLength = 9; - -inline TMMFRawPackage::TMMFRawPackage(TInt aDerivedSize) -#pragma warning( disable : 4355 ) -// 'this' : used in base member initializer list -: iThis((TUint8*)this,aDerivedSize,aDerivedSize) -#pragma warning( default : 4355 ) - { - } - -// ----------------------------------------------------------------------------- -// TMMFRawPackage::Package -// Returns a reference to descriptor pointer. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -inline TPtr8& TMMFRawPackage::Package() - { - ((TMMFRawPackage*)this)->iThis.Set((TUint8*)this, - iThis.Length(), - iThis.MaxLength()); - return iThis; - } - -// ----------------------------------------------------------------------------- -// TMMFRawPackage::Package -// Returns a reference to descriptor pointer. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -inline const TPtr8& TMMFRawPackage::Package() const - { - ((TMMFRawPackage*)this)->iThis.Set((TUint8*)this, - iThis.Length(), - iThis.MaxLength()); - return iThis; - } - -// ----------------------------------------------------------------------------- -// TMMFRawPackage::SetSize -// Sets the size of the raw package -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -inline void TMMFRawPackage::SetSize(TInt aDerivedSize) - { - iThis.Set((TUint8*)this,aDerivedSize,aDerivedSize); - } - -// ----------------------------------------------------------------------------- -// TMMFToneFixedSequenceNames::TMMFToneFixedSequenceNames -// Default constructor -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -inline TMMFToneFixedSequenceNames::TMMFToneFixedSequenceNames() - : TMMFRawPackage(sizeof(TMMFToneFixedSequenceNames)) - { - } - -// ----------------------------------------------------------------------------- -// TNameBuf class definition -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -#ifdef _UNICODE -class TNameBuf : public TBufCBase16 -#else -class TNameBuf : public TBufCBase8 -#endif - { - friend class HMMFToneFixedSequenceNames; - }; - -// ----------------------------------------------------------------------------- -// HMMFToneFixedSequenceNames::HMMFToneFixedSequenceNames -// Default constructor -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -HMMFToneFixedSequenceNames::HMMFToneFixedSequenceNames() - { - iCount = 0; - } - -// ----------------------------------------------------------------------------- -// HMMFToneFixedSequenceNames::AddNameL -// Append a copy of the supplied descriptor to the end of the -// current heap cell. This will involve a realloc that will normally -// result in the object moving -// ----------------------------------------------------------------------------- -// -HMMFToneFixedSequenceNames* -HMMFToneFixedSequenceNames::AddNameL(const TDesC& aName) - { - TInt size = Package().Length(); - TInt desSize = aName.Size() + sizeof(TInt); - if (desSize&3) - { - // Must round up to word boundary to keep aligned - desSize = ((desSize+4)&(~3)); - } - - HMMFToneFixedSequenceNames* self = - REINTERPRET_CAST(HMMFToneFixedSequenceNames*, - User::ReAllocL(STATIC_CAST(TAny*,this), - size + desSize)); - TUint8* newDesPtr = REINTERPRET_CAST(TUint8*,self) + size; - Mem::FillZ(newDesPtr,desSize); - TNameBuf* newDes = REINTERPRET_CAST(TNameBuf*,newDesPtr); - newDes->Copy(aName,aName.Length()); - self->SetSize(size+desSize); - self->iCount++; - return self; - } - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CMMFDevSoundUtility::CMMFDevSoundUtility -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CMMFDevSoundUtility::CMMFDevSoundUtility() - { - // No default implementation - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundUtility::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundUtility::ConstructL() - { - iFixedSequenceNames = new (ELeave) HMMFToneFixedSequenceNames; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundUtility::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CMMFDevSoundUtility* CMMFDevSoundUtility::NewL() - { - CMMFDevSoundUtility* self = NewLC(); - CleanupStack::Pop(self); - return self; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundUtility::NewLC -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CMMFDevSoundUtility* CMMFDevSoundUtility::NewLC() - { - CMMFDevSoundUtility* self = new(ELeave) CMMFDevSoundUtility(); - CleanupStack::PushL(self); - self->ConstructL(); - // Leave it on Cleanupstack - return self; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundUtility::~CMMFDevSoundUtility -// Destructor -// ----------------------------------------------------------------------------- -// -CMMFDevSoundUtility::~CMMFDevSoundUtility() - { - delete iInfo; - delete iFixedSequenceNames; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundUtility::SeekUsingFourCCLC -// Finds the ECom plugins based on FourCC. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundUtility::SeekUsingFourCCLC( - TUid aInterfaceUid, - RImplInfoPtrArray& aPlugInArray, - const TFourCC& aSrcDataType, - const TFourCC& aDstDataType, - const TDesC& aPreferredSupplier) - { - // Create a match string using the two FourCC codes. - _LIT8(KEmptyFourCCString, " , "); - TBufC8<9> fourCCString(KEmptyFourCCString); - TPtr8 fourCCPtr = fourCCString.Des(); - TPtr8 fourCCPtr1(&fourCCPtr[0], 4); - TPtr8 fourCCPtr2(&fourCCPtr[5], 4 ); - aSrcDataType.FourCC(&fourCCPtr1); - aDstDataType.FourCC(&fourCCPtr2); - - // Create a TEcomResolverParams structure. - TEComResolverParams resolverParams; - resolverParams.SetDataType(fourCCPtr); - resolverParams.SetWildcardMatch(EFalse); - - // ListImplementationsL leaves if it cannot find anything so trap the error - // and ignore it. - TRAPD(err, REComSession::ListImplementationsL(aInterfaceUid, - resolverParams, - aPlugInArray)); - - // The error above may not be KErrNotFound eg could be KErrNoMemory in which - // case leave - User::LeaveIfError(err); - - // If there are no plugins, indicate failure - if (aPlugInArray.Count() == 0) - { - User::Leave(KErrNotFound) ; - } - - // If more than one match, narrow the search by preferred supplier - if ((aPlugInArray.Count() > 1) && aPreferredSupplier.Length()) - { - SelectByPreference( aPlugInArray, aPreferredSupplier ) ; - } - } - - -// ----------------------------------------------------------------------------- -// CMMFDevSoundUtility::SelectByPreference -// local function to disable items which do not match the preferred supplier. -// Note that at least one enabled item is returned (if there was an enabled item -// to begin with) which may not match the preferred supplier. -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundUtility::SelectByPreference(RImplInfoPtrArray& aPlugInArray, - const TDesC& aPreferredSupplier) - { - - // Use the Disabled flag to eliminated all currently enabled matches that - // do not match the preferred supplier. - TInt firstEnabled = -1 ; // to ensure that we return something valid - TInt matchCount = 0 ; - - for ( TInt ii = 0 ; ii < aPlugInArray.Count() ; ii++ ) - { - if (!(aPlugInArray[ii]->Disabled())) - { - if (firstEnabled == -1) - { - firstEnabled = ii; - } - - if (aPlugInArray[ii]->DisplayName().FindF(aPreferredSupplier) == - KErrNotFound) - { - aPlugInArray[ii]->SetDisabled(ETrue) ; - } - else - { - matchCount++ ; - } - } - } - - // If there are no matches then re-enable the first enabled - if (matchCount == 0 ) - { - aPlugInArray[firstEnabled]->SetDisabled(EFalse); - } - else if (matchCount > 1) - { - // find the latest version from more than one match - TInt highestVersionIndex = -1; - - for (TInt ii = 0; ii < aPlugInArray.Count(); ii++) - { - // only interested in enabled elements - if (!(aPlugInArray[ii]->Disabled())) - { - if (highestVersionIndex == -1) - { - // first match. Store this. Keep it enabled - highestVersionIndex = ii; - } - else if (aPlugInArray[ii]->Version() > - aPlugInArray[highestVersionIndex]->Version()) - { - // A new leader. Disable the previous leader. - // Keep this one. - aPlugInArray[highestVersionIndex]->SetDisabled(ETrue); - highestVersionIndex = ii; - } - else // we already have a higher version. - aPlugInArray[ii]->SetDisabled(ETrue); - } - } - } - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundUtility::SeekHwDevicePluginsL -// This method looks for hwDevicePlugins that support the state given in aState -// which must be either EMMFStatePlaying or EMMFStateRecording. -// For each HwDevice plugin found the datatype as indicated by its fourCC code -// from the default_data field in the resource file is added to the array of -// aSupportedDataTypes -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundUtility::SeekHwDevicePluginsL( - RArray& aSupportedDataTypes, - TMMFState aState) - { - //check argument precondition for aState - if ((aState != EMMFStatePlaying) && (aState != EMMFStateRecording)) - { - User::Leave(KErrArgument); - } - - //clear any existing data in aSupportedDataTypes array - aSupportedDataTypes.Reset(); - - // Array to return hw device plugin resource info(place on cleanupstack - // _after_ ListImplementationsL() ) - RImplInfoPtrArray plugInArray; - TUid KUidMmfHWPluginInterfaceCodec = {KMmfUidPluginInterfaceHwDevice}; - - // ListImplementationsL leaves if it cannot find anything so trap the error - TRAPD(err, REComSession::ListImplementationsL(KUidMmfHWPluginInterfaceCodec, - plugInArray)); - CleanupResetAndDestroyPushL(plugInArray); - - TUint numberOfHwDevicePlugins = plugInArray.Count(); - - // if no errors and have hwdevice plugin resource entries then scan entries - // matching on a datatype of pcm16 as the destination datatype for play and - // the source datatype for record. If a match is found and isn't already in - // the list of supported data types, then add it to the list - if ((err == KErrNone) && (numberOfHwDevicePlugins)) - { - CImplementationInformation* hwDeviceResourceEntry = NULL; - _LIT8(KPCM16FourCCString, " P16"); - TBufC8 fourCCStringPCM16(KPCM16FourCCString); - TPtr8 fourCCPtrPCM16 = fourCCStringPCM16.Des(); - TUint entryNumber = 0; - - // check each resource entry for dst 4CC = P16 for play and - // src 4CC = P16 for record - for (TUint hwDeviceEntry = 0; - hwDeviceEntry < numberOfHwDevicePlugins; - hwDeviceEntry++) - { - hwDeviceResourceEntry = plugInArray[hwDeviceEntry]; - - if (IsDataTypeMatch(hwDeviceResourceEntry, fourCCPtrPCM16, aState)) - { - // resource entry data field has dest/src datatype ' P16' - // i.e. pcm16 for play/record - TPtrC8 fourCCPtr(0,0); - - if (aState == EMMFStatePlaying) - { - // datatype supported 4CC is left 4 chars - fourCCPtr.Set( - hwDeviceResourceEntry->DataType().Left(KFOURCCLENGTH)); - } - else if (aState == EMMFStateRecording) - { - // datatype supported 4CC is right 4 chars - fourCCPtr.Set( - hwDeviceResourceEntry->DataType().Right(KFOURCCLENGTH)); - } - - TFourCC fourCCEntry(fourCCPtr); - //need to check if entry already exists to prevent - // duplicate entries - TBool alreadyExists = EFalse; - - for (TUint fourCCEntryNumber = 0; - fourCCEntryNumber < entryNumber; - fourCCEntryNumber++) - { - if (aSupportedDataTypes[fourCCEntryNumber]==fourCCEntry) - { - // we already have this 4CC in the supported data types - alreadyExists = ETrue; - break; - } - } - if (!alreadyExists) - { - err = aSupportedDataTypes.Append(fourCCEntry); - if (err) - { - // note: we don't destroy array because we don't own it - // but we do reset it as it is incomplete - aSupportedDataTypes.Reset(); - User::Leave(err); - } - } - } - } - } - else - { - // if an error occured and not KErrNotFound then must be a 'real' error - // e.g. KErrNoMemory - if ((err != KErrNotFound) && (err != KErrNone)) - { - User::Leave(err); - } - } - - CleanupStack::PopAndDestroy(&plugInArray); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundUtility::IsDataTypeMatch -// This method takes a given resource entry from a hardware device and -// determines whether the hwdevice plugin is a data type match for playing or -// recording depending on the setting of aState -// The method matchs the default_data field from the hw device resource entry -// matching it with the aHwMatchFourCC code. -// ----------------------------------------------------------------------------- -// -TBool CMMFDevSoundUtility::IsDataTypeMatch( - CImplementationInformation* aHwDeviceResourceEntry, - const TDesC8& aHwMatchFourCC, - TMMFState aState) - { - TBool match = EFalse; - // extra length safety check to remove adapter plugins and incorrect ones - if (aHwDeviceResourceEntry->DataType().Length()>=KFourCCStringLength) - { - if (aState == EMMFStatePlaying) - { - //play need to match with the right four characters - match = - (!(aHwMatchFourCC.Match( - aHwDeviceResourceEntry->DataType().Right(KFOURCCLENGTH)) == - KErrNotFound)); - } - else if (aState == EMMFStateRecording) - { - //record need to match with the left four characters - match = - (!(aHwMatchFourCC.Match( - aHwDeviceResourceEntry->DataType().Left(KFOURCCLENGTH)) == - KErrNotFound)); - } - } - return match; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundUtility::InitializeFixedSequenceL -// Populate fixed sequences -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundUtility::InitializeFixedSequenceL( - CPtrC8Array** aFixedSequences) - { - - RFs fsSession; - User::LeaveIfError(fsSession.Connect()); - CleanupClosePushL(fsSession); - - // Open the resource file - RResourceFile resourceFile; - resourceFile.OpenL(fsSession, KFixedSequenceResourceFile); - CleanupClosePushL(resourceFile); - - // Allocate buffer to hold resource data in binary format - iInfo = resourceFile.AllocReadL(FIXED_TONE_SEQUENCE); - - TResourceReader reader; - reader.SetBuffer(iInfo); - - // Create array to hold fixed sequences data - CPtrC8Array* tempSequences = new(ELeave) CPtrC8Array(8); // granularity - CleanupStack::PushL(tempSequences); - - // First word gives number of entries - TInt numberOfEntries = reader.ReadUint16(); - ASSERT(!(numberOfEntries&1)); // Should have atleast one entry - - // There must be an even number entries as each sequence structure is made - // of a name string and a data string (SEQUENCE_NAME and SEQUENCE_DATA) - - HMMFToneFixedSequenceNames* names = new (ELeave) HMMFToneFixedSequenceNames; - CleanupStack::PushL(names); - - for (TInt i = 0; i < numberOfEntries; i += 2) - { - // Copy name from resource array to returnable array - HMMFToneFixedSequenceNames* newNames = - names->AddNameL(reader.ReadTPtrC()); - - if (names != newNames) - { - // May have moved so fixup cleanupstack reference - CleanupStack::Pop(names); - names = newNames; - CleanupStack::PushL(names); - } - - TInt len = reader.ReadUint16(); - TPtrC8 tempTPtrC8(REINTERPRET_CAST(const TUint8*,reader.Ptr()),len<<1); - tempSequences->AppendL(tempTPtrC8); - reader.Advance(len<<1); - } - - CleanupStack::Pop(names); - - // Delete the old fixed sequence names - delete iFixedSequenceNames; - iFixedSequenceNames = NULL; - iFixedSequenceNames = names; - - *aFixedSequences = tempSequences; - CleanupStack::Pop(tempSequences); - CleanupStack::PopAndDestroy(&resourceFile); - CleanupStack::PopAndDestroy(&fsSession); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundUtility::RecognizeSequence -// Recognizes tone sequence. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TBool CMMFDevSoundUtility::RecognizeSequence(const TDesC8& aData) - { - TBool ret = EFalse; - if (aData.Length() > K4ByteSeq) - { - //Check for Smart Message (OTA) formats - if ((aData[0x000] == 0x02) && - (aData[0x001] == 0x4a) && - (aData[0x002] == 0x3a)) - { - ret = ETrue; - } - else if ((aData[0x000] == 0x03) && - (aData[0x001] == 0x4a) && - (aData[0x002] == 0x44) && - (aData[0x003] == 0x3a)) - { - ret = ETrue; - } - else if ((aData[0] == 0x00) && - (aData[1] == 0x11)) // Check for Nokia Ring Tone format - { - ret = ETrue; - } - } - return ret; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundUtility::FixedSequenceName -// Returns a descriptor reference containing name of the fixed sequence. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -const TDesC& CMMFDevSoundUtility::FixedSequenceName(TInt aSequenceNumber) - { - ASSERT(iFixedSequenceNames); // Defect if not true when previous was true - ASSERT((aSequenceNumber>=0) && - (aSequenceNumberiCount)); - - // Ptr to first descriptor - TUint8* ptr = REINTERPRET_CAST(TUint8*, - &(iFixedSequenceNames->iCount))+sizeof(TInt); - TDesC* desPtr = REINTERPRET_CAST(TDesC*,ptr); // First des - - while (aSequenceNumber--) - { - TInt size = desPtr->Size(); - if (size&3) - { - size = ((size+4)&(~3)); - } - - ptr += sizeof(TInt) + size; - desPtr = REINTERPRET_CAST(TDesC*,ptr); // Next des - } - - return *desPtr; - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/DevSoundUtility.h --- a/audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/DevSoundUtility.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,288 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Class that provides API to list ECOM plugin implementation IDs -* -*/ - - - -#ifndef MMFDEVSOUNDUTILITY_H -#define MMFDEVSOUNDUTILITY_H - -// INCLUDES - -#include -#include - -#include "mmfutilities.h" // For TFourCC - -#define KFOURCCLENGTH 4 - -// CLASS DECLARATION - -/** -* Utility class. -* -* @lib MmfDevSoundAdaptation.lib -* @since S60 3.0 -*/ -class TMMFRawPackage - { - public: - - /** - * Returns a descriptor reference. - * @since S60 3.0 - * @return TPtr8& A descriptor reference - */ - inline TPtr8& Package(); - - /** - * Returns a constant descriptor reference. - * @since S60 3.0 - * @return TPtr8& A constant descriptor reference - */ - inline const TPtr8& Package() const; - - protected: - - /** - * Constructor. - * @since S60 3.0 - * @param TInt aDerivedSize Size of the descriptor. - */ - TMMFRawPackage(TInt aDerivedSize); - - /** - * Sets the size of the descriptor. - * @since S60 3.0 - * @param TInt aDerivedSize New descriptor size. - * @return void - */ - inline void SetSize(TInt aDerivedSize); - - protected: - TPtr8 iThis; - }; - -// CLASS DECLARATION - -/** -* Utlilty class used for Fixed Sequences. -* -* @lib MmfDevSoundAdaptation.lib -* @since S60 3.0 -*/ -class TMMFToneFixedSequenceNames : public TMMFRawPackage - { - public: - - /** - * Constructor. - * @since S60 3.0 - */ - inline TMMFToneFixedSequenceNames(); - - public: - TInt iCount; - }; - -// CLASS DECLARATION - -/** -* Utlilty class used for Fixed Sequences. -* -* @lib MmfDevSoundAdaptation.lib -* @since S60 3.0 -*/ -class HMMFToneFixedSequenceNames : public TMMFToneFixedSequenceNames - { - public: - - /** - * Constructor. - * @since S60 3.0 - */ - HMMFToneFixedSequenceNames(); - - /** - * Adds name to this object. - * @since S60 3.0 - * @param const TDesC& aName A descriptor containing name to be added. - * @return HMMFToneFixedSequenceNames* A pointer to this object. - */ - HMMFToneFixedSequenceNames* AddNameL(const TDesC& aName); - }; - - -// CLASS DECLARATION - -/** -* Utility class.used by DevSound. -* -* @lib MmfDevSoundAdaptation.lib -* @since S60 3.0 -*/ -class CMMFDevSoundUtility : public CBase - { - public: // Constructors and destructor - - /** - * Constructs, and returns a pointer to, a new CMMFDevSound object. - * Leaves on failure. - * @return CMMFDevSoundUtility* A pointer to newly created utlitly object. - */ - static CMMFDevSoundUtility* NewL(); - - /** - * Constructs, leaves object on the cleanup stack, and returns a pointer - * to, a new CMMFDevSound object. - * Leaves on failure. - * @return CMMFDevSoundUtility* A pointer to newly created utlitly object. - */ - static CMMFDevSoundUtility* NewLC(); - - /** - * Destructor. - */ - ~CMMFDevSoundUtility(); - - public: // New functions - - /** - * Finds the ECom plugins based on FourCC. - * @since S60 3.0 - * @param TUid aInterfaceUid The interface Uid where to look for the plugin. - * @param RImplInfoPtrArray& aPlugInArray The array of ECom plugins Uids - * that will be filled in by this function. - * @param const TFourCC& aSrcDataType The source data type. - * @param const TFourCC& aDstDataType The destination data type. - * @return void - */ - void SeekUsingFourCCLC(TUid aInterfaceUid, - RImplInfoPtrArray& aPlugInArray, - const TFourCC& aSrcDataType, - const TFourCC& aDstDataType, - const TDesC& aPreferredSupplier); - - /** - * local function to disable items which do not match the preferred - * supplier. Note that at least one enabled item is returned (if there - * was an enabled item to begin with) which may not match the preferred - * supplier. - * @since S60 3.0 - * @param RImplInfoPtrArray& aPlugInArray An array containing the list of - * ECom plugin Uids. - * @param const TDesC &aPreferredSupplier Additional resolution criteria - * when searching for ECom plugin. If this is provided, the list - * of matching plugins will be further searched for the latest - * version of a plugin supplied by supplier named. Note that the - * display name field is parsed for a match. - * @return void - */ - void SelectByPreference(RImplInfoPtrArray& aPlugInArray, const TDesC& aPreferredSupplier); - - /* - * This method looks for hwDevicePlugins that support the state given in - * aState which must be either EMMFStatePlaying or EMMFStateRecording for - * each HwDevice plugin found the datatype as indicated by its FourCC - * code from the default_data field in the resource file is added to the - * array of aSupportedDataTypes - * Leaves on failure. - * @since S60 3.0 - * @param RArray& aSupportedDataTypes An array of fourCC codes - * that has a fourCC code added to for each hardware device found. - * @param TMMFState aState EMMFStatePlaying if seeking HwDevice plugins - * that support play and EMMFStateRecording if seeking HwDevice - * plugins that support record * - * @return void - */ - void SeekHwDevicePluginsL(RArray& aSupportedDataTypes, TMMFState aState); - - /** - * Initializes the names of Fixed Sequences. - * Leaves on failure. - * @since S60 3.0 - * @param CPtrC8Array** aFixedSequences A pointer to a pointer reference - * which will be populated with Fixed Sequence names when this - * funtion returns. - * @return void - */ - void InitializeFixedSequenceL(CPtrC8Array** aFixedSequences); - - /** - * Recognizes tone sequence. - * @since S60 3.0 - * @param const TDesC8& aData A reference to descriptor containing tone - * sequence. - * @return ETrue of the sequence starts with 'SQNC' else EFalse. - */ - TBool RecognizeSequence(const TDesC8& aData); - - /** - * Returns a descriptor reference containing name of the fixed sequence. - * @since S60 3.0 - * @param TInt aSequenceNumber Sequence number. - * @return A constant reference to descriptor. - */ - const TDesC& FixedSequenceName(TInt aSequenceNumber); - - private: - - /* - * This method takes a given resource entry from a hardware device and - * determines whether the hwdevice plugin is a data type match for - * playing or recording depending on the setting of aState. The method - * matchs the default_data field from the hw device resource entry - * matching it with the aHwMatchFourCC code. - * @since S60 3.0 - * @param CImplementationInformation aHwDeviceResourceEntry The hw device - * resource entry that is to be checked whether it can be used to - * play or record - * @param TDesC8& aHwMatchFourCC The data type FourCC code to match to - * that the hardware device that must convert to for playing and - * convert from for recording - for the reference DevSound this - * is always ' P16' ie pcm16 - * @param TMMFState aState EMMFStatePlaying for playing and - * EMMFStateRecording for recording - * @return ETrue if a match for play or record else EFalse. - */ - TBool IsDataTypeMatch(CImplementationInformation* hwDeviceResourceEntry, - const TDesC8& fourCCPtrPCM16, - TMMFState aState); - - - private: - - /** - * C++ default constructor. - */ - CMMFDevSoundUtility(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - private: // Data - //data_declaration; - - HMMFToneFixedSequenceNames* iFixedSequenceNames; - HBufC8* iInfo; - - }; - -#endif // MMFDEVSOUNDUTILITY_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/FixedSequence.rss --- a/audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/FixedSequence.rss Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,300 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Definitions required for tone sequences -* -*/ - -// CONSTANTS - -// -// Definitions required for tone sequences -// - -// Signature definitions -#define SEQ_SIG1 0x5153 -#define SEQ_SIG2 0x434E -#define SEQ_SIG SEQ_SIG1,SEQ_SIG2, // Signature = "SQNC" ASCII - -// Commands -#define SEQ_CMD_RET -1 -#define SEQ_CMD_STARTLOOP -2, -#define SEQ_CMD_ENDLOOP -3, - -// Useful values -// Note frequencies -#define SEQ_FREQ_A0 440 -#define SEQ_FREQ_AsBf0 466 // 466.1637615 A#, Bb -#define SEQ_FREQ_B0 494 // 493.8833013 -#define SEQ_FREQ_C0 523 // 523.2511306 -#define SEQ_FREQ_CsDf0 554 // 554.365262 C#, Db, etc. -#define SEQ_FREQ_D0 587 // 587.3295358 -#define SEQ_FREQ_DsEf0 622 // 622.2539674 -#define SEQ_FREQ_E0 659 // 659.2551138 -#define SEQ_FREQ_F0 698 // 698.4564629 -#define SEQ_FREQ_FsGf0 740 // 739.9888454 -#define SEQ_FREQ_G0 784 // 783.990872 -#define SEQ_FREQ_GsAf0 831 // 830.6093952 -#define SEQ_FREQ_A1 880 -#define SEQ_FREQ_AsBf1 932 // 932.327523 -#define SEQ_FREQ_B1 988 // 987.7666025 -#define SEQ_FREQ_C1 1047 // 1046.502261 -#define SEQ_FREQ_CsDf1 1109 // 1108.730524 -#define SEQ_FREQ_D1 1175 // 1174.659072 -#define SEQ_FREQ_DsEf1 1245 // 1244.507935 -#define SEQ_FREQ_E1 1319 // 1318.510228 -#define SEQ_FREQ_F1 1397 // 1396.912926 -#define SEQ_FREQ_FsGf1 1480 // 1479.977691 -#define SEQ_FREQ_G1 1568 // 1567.981744 -#define SEQ_FREQ_GsAf1 1661 // 1661.21879 -#define SEQ_FREQ_A2 1760 -#define SEQ_FREQ_AsBf2 1865 // 1864.655046 -#define SEQ_FREQ_B2 1976 // 1975.533205 -#define SEQ_FREQ_C2 2093 // 2093.004522 -#define SEQ_FREQ_CsDf2 2217 // 2217.461048 -#define SEQ_FREQ_D2 2349 // 2349.318143 -#define SEQ_FREQ_DsEf2 2489 // 2489.01587 -#define SEQ_FREQ_E2 2673 // 2637.020455 -#define SEQ_FREQ_F2 2794 // 2793.825851 -#define SEQ_FREQ_FsGf2 2960 // 2959.955382 -#define SEQ_FREQ_G2 3136 // 3135.963488 -#define SEQ_FREQ_GsAf2 3322 // 3322.437581 -#define SEQ_FREQ_A3 3520 -#define SEQ_FREQ_AsBf3 3729 // 3729.310092 - -// Volume defines -#define SEQ_VOL_F 32767 // Forte = Loud -#define SEQ_VOL_MF 24575 // Mezzo forte = Medium loud -#define SEQ_VOL_MP 16383 // Mezzo piano = Medium soft -#define SEQ_VOL_P 8191 // Piano = Soft - -// Macros for defining sequences -#define SEQ_DATA(A) SEQ_SIG A SEQ_CMD_RET -#define SEQ_VAL(N) N, -#define SEQ_LOOP(NUMBEROFTIMES,DATA) SEQ_CMD_STARTLOOP SEQ_VAL(NUMBEROFTIMES) DATA SEQ_CMD_ENDLOOP -#define SEQ_TONE(DUR,F1,V1) SEQ_VAL(DUR) SEQ_VAL(F1) SEQ_VAL(V1) SEQ_VAL(0) SEQ_VAL(0) -#define SEQ_2TONES(DUR,F1,V1,F2,V2) SEQ_VAL(DUR) SEQ_VAL(F1) SEQ_VAL(V1) SEQ_VAL(F2) SEQ_VAL(V2) -#define SEQ_SILENCE(DUR) SEQ_VAL(DUR) SEQ_VAL(0) SEQ_VAL(0) SEQ_VAL(0) SEQ_VAL(0) -// DUR = number samples@8kHz hence 8000 = 1 second -// F1/F2 = frequency in Hz - can use note definitions above -// V1/V1 = volume in range 0-32767 - can use volume definitions above -// When playing two tones, sum of volumes should not be greater than 32767 -// e.g. can use MF+P or MP+MP - -STRUCT SEQUENCE_NAME - { - LTEXT name; // leading-byte counted text string - } - -STRUCT SEQUENCE_DATA - { - LEN WORD WORD data[]; // Array of 16bit data values - } - -STRUCT SEQUENCE_ARRAY - { - STRUCT sequences[]; - } - -// RESOURCE DEFINITIONS -// ----------------------------------------------------------------------------- -// -// fixed_tone_sequence -// Contains the sequences supported by the device (with localisable names) -// -// ----------------------------------------------------------------------------- -// -RESOURCE SEQUENCE_ARRAY fixed_tone_sequence - { - sequences = - { - SEQUENCE_NAME - { - // - // A loud piercing sequence that alternates between two toned "warbles" - // Duration: 5 seconds - // - name="Rings"; - }, - SEQUENCE_DATA - { - data = - { - SEQ_DATA - ( - SEQ_LOOP - ( - 2, - SEQ_LOOP - ( - 11, - SEQ_TONE(250,SEQ_FREQ_GsAf2,SEQ_VOL_F) - SEQ_TONE(250,SEQ_FREQ_DsEf2,SEQ_VOL_F) - ) - SEQ_LOOP - ( - 11, - SEQ_TONE(250,SEQ_FREQ_DsEf2,SEQ_VOL_F) - SEQ_TONE(250,SEQ_FREQ_GsAf1,SEQ_VOL_F) - ) - SEQ_SILENCE(6000) - ) - SEQ_SILENCE(6000) - ) - }; - }, - SEQUENCE_NAME - { - // - // A pleasant bell-like sequence based on clock chimes - // Duration: 5 seconds - // - name="Chimes"; - }, - SEQUENCE_DATA - { - data = - { - SEQ_DATA - ( - SEQ_2TONES(2500,SEQ_FREQ_E1,SEQ_VOL_MP,SEQ_FREQ_E1+5,SEQ_VOL_MP) - SEQ_2TONES(2500,SEQ_FREQ_C1,SEQ_VOL_MP,SEQ_FREQ_C1+5,SEQ_VOL_MP) - SEQ_2TONES(2500,SEQ_FREQ_D1,SEQ_VOL_MP,SEQ_FREQ_D1+5,SEQ_VOL_MP) - SEQ_2TONES(6250,SEQ_FREQ_G0,SEQ_VOL_MF,SEQ_FREQ_G0+5,SEQ_VOL_P) - SEQ_SILENCE(1250) - SEQ_2TONES(2500,SEQ_FREQ_G0,SEQ_VOL_MP,SEQ_FREQ_G0+5,SEQ_VOL_MP) - SEQ_2TONES(2500,SEQ_FREQ_D1,SEQ_VOL_MP,SEQ_FREQ_D1+5,SEQ_VOL_MP) - SEQ_2TONES(2500,SEQ_FREQ_E1,SEQ_VOL_MF,SEQ_FREQ_E1+5,SEQ_VOL_P) - SEQ_2TONES(7500,SEQ_FREQ_C1,SEQ_VOL_MP,SEQ_FREQ_C1+5,SEQ_VOL_MP) - SEQ_SILENCE(10000) - ) - }; - }, - SEQUENCE_NAME - { - // - // A quiet sequence similar to a digital watch alarm - // Duration: 2.5 seconds - // - name="Signal"; - }, - SEQUENCE_DATA - { - data = - { - SEQ_DATA - ( - SEQ_LOOP - ( - 3, - SEQ_LOOP - ( - 3, - SEQ_TONE(328,SEQ_FREQ_AsBf3,SEQ_VOL_MF) - SEQ_SILENCE(339) - ) - SEQ_SILENCE(2333) - ) - SEQ_SILENCE(6998) - ) - }; - }, - SEQUENCE_NAME - { - // - // Sounds like a fanfare played on an electric organ - // Duration: 2.6 seconds - // - name="Fanfare"; - }, - SEQUENCE_DATA - { - data = - { - SEQ_DATA - ( - SEQ_2TONES(2000,SEQ_FREQ_DsEf1,SEQ_VOL_MP,SEQ_FREQ_DsEf0,SEQ_VOL_MP) - SEQ_2TONES(2000,SEQ_FREQ_GsAf1,SEQ_VOL_MP,SEQ_FREQ_GsAf0,SEQ_VOL_MP) - SEQ_2TONES(1000,SEQ_FREQ_C2,SEQ_VOL_MP,SEQ_FREQ_C1,SEQ_VOL_MP) - SEQ_2TONES(1000,SEQ_FREQ_GsAf1,SEQ_VOL_MF,SEQ_FREQ_GsAf0,SEQ_VOL_P) - SEQ_2TONES(2000,SEQ_FREQ_DsEf1,SEQ_VOL_MP,SEQ_FREQ_DsEf0,SEQ_VOL_MP) - SEQ_2TONES(2000,SEQ_FREQ_GsAf1,SEQ_VOL_MP,SEQ_FREQ_GsAf0,SEQ_VOL_MP) - SEQ_2TONES(4000,SEQ_FREQ_C2,SEQ_VOL_MP,SEQ_FREQ_C1,SEQ_VOL_MP) - SEQ_2TONES(4000,SEQ_FREQ_GsAf1,SEQ_VOL_MF,SEQ_FREQ_GsAf0,SEQ_VOL_P) - SEQ_SILENCE(4000) - ) - }; - }, - SEQUENCE_NAME - { - // - // Pleasant two-tone chimes - // Duration: 4 seconds - // - name="Bells"; - }, - SEQUENCE_DATA - { - data = - { - SEQ_DATA - ( - SEQ_LOOP - ( - 2, - SEQ_2TONES(4000,SEQ_FREQ_E1,SEQ_VOL_MP,SEQ_FREQ_C1,SEQ_VOL_MP) - SEQ_2TONES(8000,SEQ_FREQ_C1,SEQ_VOL_MP,SEQ_FREQ_G0,SEQ_VOL_MP) - ) - SEQ_SILENCE(8000) - ) - }; - }, - SEQUENCE_NAME - { - // - // Cavalry charge - // Duration: 2 seconds - // - name="Cavalry"; - }, - SEQUENCE_DATA - { - data = - { - SEQ_DATA - ( - SEQ_LOOP - ( - 2, - SEQ_2TONES(1333,SEQ_FREQ_A2,SEQ_VOL_MP,SEQ_FREQ_A1,SEQ_VOL_MP) - SEQ_SILENCE(667) - SEQ_2TONES(333,SEQ_FREQ_A2,SEQ_VOL_MP,SEQ_FREQ_A1,SEQ_VOL_MP) - SEQ_SILENCE(333) - ) - SEQ_LOOP - ( - 2, - SEQ_2TONES(1333,SEQ_FREQ_E2,SEQ_VOL_MP,SEQ_FREQ_E1,SEQ_VOL_MP) - SEQ_SILENCE(667) - SEQ_2TONES(333,SEQ_FREQ_CsDf2,SEQ_VOL_MP,SEQ_FREQ_CsDf1,SEQ_VOL_MP) - SEQ_SILENCE(333) - ) - SEQ_2TONES(2667,SEQ_FREQ_A2,SEQ_VOL_MP,SEQ_FREQ_A1,SEQ_VOL_MP) - SEQ_SILENCE(2667) - ) - }; - } - }; - } - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/MmfDevSoundAdaptation.cpp --- a/audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/MmfDevSoundAdaptation.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,628 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Stub implementation of the MMF DevSound Server adaptation. -* -*/ - - - -// INCLUDE FILES -#include -#include "MmfDevSoundAdaptationBody.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CMMFDevSoundAdaptation -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CMMFDevSoundAdaptation::CMMFDevSoundAdaptation() - { - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::ConstructL( - RServer2& aPolicyServerHandle) - { - iBody = CBody::NewL(); - // This is needed because in iBody->ConstructL(), Adaptation need to have - // a pointer reference to iBody to call SetDevSoundInfo. - iBody->ConstructL(aPolicyServerHandle); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CMMFDevSoundAdaptation* CMMFDevSoundAdaptation::NewL( - RServer2& aPolicyServerHandle) - { - CMMFDevSoundAdaptation* self = new (ELeave)CMMFDevSoundAdaptation; - CleanupStack::PushL(self); - self->ConstructL(aPolicyServerHandle); - CleanupStack::Pop(self); - return self; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::ConstructL -// Destructor -// ----------------------------------------------------------------------------- -// -EXPORT_C CMMFDevSoundAdaptation::~CMMFDevSoundAdaptation() - { - delete iBody; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::InitializeL -// Initializes CMMFDevSoundProxy object to play and record PCM16 raw audio data -// with sampling rate of 8 KHz.On completion of Initialization, calls -// InitializeComplete() on aDevSoundObserver. -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::InitializeL( - MDevSoundAdaptationObserver& aDevSoundObserver, - TMMFState aMode) - - { - iBody->InitializeL(aDevSoundObserver, aMode); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::InitializeL -// Initializes DevSound object for the mode aMode for processing audio data -// with hardware device aHWDev. On completion of Initialization, the observer -// will be notified via call back InitializeComplete(). -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::InitializeL( - MDevSoundAdaptationObserver& aDevSoundObserver, - TUid aHWDev, - TMMFState aMode) - { - iBody->InitializeL(aDevSoundObserver, aHWDev, aMode); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::InitializeL -// Initializes DevSound object for the mode aMode for processing audio data -// using an array of Hardware devices identified by aHWDevArray identifier -// array. The hardware devices are chained together with data flow starting -// with first array element.On completion of Initialization, the observer -// will be notified via call back InitializeComplete(). -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::InitializeL( - MDevSoundAdaptationObserver& aDevSoundObserver, - TFourCC aDesiredFourCC, - TMMFState aMode) - { - iBody->InitializeL(aDevSoundObserver, aDesiredFourCC, aMode); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::Capabilities -// Returns the supported Audio settings. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TMMFCapabilities CMMFDevSoundAdaptation::Capabilities() - { - return iBody->Capabilities(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::Config -// Returns the current audio settings. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TMMFCapabilities CMMFDevSoundAdaptation::Config() const - { - return iBody->Config(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::SetConfigL -// Configure CMMFDevSoundProxy object for the settings in aConfig. -// Use this to set sampling rate, Encoding and Mono/Stereo. -// As part of defect 20796, the iRecordFormat has been set under the iPlayFormat, -// before it was not set at all. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::SetConfigL( - const TMMFCapabilities& aConfig) - { - iBody->SetConfigL(aConfig); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::MaxVolume -// Returns an integer representing the maximum volume. -// This is the maximum value which can be passed to CMMFDevSoundProxy::SetVolume. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CMMFDevSoundAdaptation::MaxVolume() - { - return iBody->MaxVolume(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::Volume -// Returns an integer representing the current volume. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CMMFDevSoundAdaptation::Volume() - { - return iBody->Volume(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::SetVolume -// Changes the current playback volume to a specified value. -// The volume can be changed before or during playback and is effective -// immediately. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::SetVolume( - TInt aVolume) - { - iBody->SetVolume(aVolume); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::MaxGain -// Returns an integer representing the maximum gain. -// This is the maximum value which can be passed to CMMFDevSoundProxy::SetGain. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CMMFDevSoundAdaptation::MaxGain() - { - return iBody->MaxGain(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::Gain -// Returns an integer representing the current gain. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CMMFDevSoundAdaptation::Gain() - { - return iBody->Gain(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::SetGain -// Changes the current recording gain to a specified value. -// The gain can be changed before or during recording and is effective -// immediately. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::SetGain( - TInt aGain) - { - iBody->SetGain(aGain); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::GetPlayBalanceL -// Returns the speaker balance set for playing. -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::GetPlayBalanceL( - TInt& aLeftPercentage, - TInt& aRightPercentage) - { - iBody->GetPlayBalanceL(aLeftPercentage, aRightPercentage); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::SetPlayBalanceL -// Sets the speaker balance for playing. The speaker balance can be changed -// before or during playback and is effective immediately. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::SetPlayBalanceL( - TInt aLeftPercentage, - TInt aRightPercentage) - { - iBody->SetPlayBalanceL(aLeftPercentage, aRightPercentage); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::GetRecordBalanceL -// Returns the microphone gain balance set for recording. -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::GetRecordBalanceL( - TInt& aLeftPercentage, - TInt& aRightPercentage) - { - iBody->GetRecordBalanceL(aLeftPercentage, aRightPercentage); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::SetRecordBalanceL -// Sets the microphone gain balance for recording. -// The microphone gain balance can be changed before or during recording and -// is effective immediately. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::SetRecordBalanceL( - TInt aLeftPercentage, - TInt aRightPercentage) - { - iBody->SetRecordBalanceL(aLeftPercentage, aRightPercentage); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::PlayInitL -// Initializes audio device and start play process. This method queries and -// acquires the audio policy before initializing audio device. If there was an -// error during policy initialization, PlayError() method will be called on -// the observer with error code KErrAccessDenied, otherwise BufferToBeFilled() -// method will be called with a buffer reference. After reading data into the -// buffer reference passed, the client should call PlayData() to play data. -// -// The amount of data that can be played is specified in -// CMMFBuffer::RequestSize(). Any data that is read into buffer beyond this -// size will be ignored. -// -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::PlayInitL() - { - iBody->PlayInitL(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::RecordInitL -// Initializes audio device and start record process. This method queries and -// acquires the audio policy before initializing audio device. If there was an -// error during policy initialization, RecordError() method will be called on -// the observer with error code KErrAccessDenied, otherwise BufferToBeEmptied() -// method will be called with a buffer reference. This buffer contains recorded -// or encoded data. After processing data in the buffer reference passed, the -// client should call RecordData() to continue recording process. -// -// The amount of data that is available is specified in -// CMMFBuffer::RequestSize(). -// -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::RecordInitL() - { - iBody->RecordInitL(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::PlayData -// Plays data in the buffer at the current volume. The client should fill -// the buffer with audio data before calling this method. The Observer gets -// reference to buffer along with callback BufferToBeFilled(). When playing of -// the audio sample is complete, successfully or otherwise, the method -// PlayError() on observer is called. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::PlayData() - { - iBody->PlayData(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::RecordData -// Contine the process of recording. Once the buffer is filled with recorded -// data, the Observer gets reference to buffer along with callback -// BufferToBeEmptied(). After processing the buffer (copying over to a -// different buffer or writing to file) the client should call this -// method to continue recording process. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::RecordData() - { - iBody->RecordData(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::Stop -// Stops the ongoing operation (Play, Record, TonePlay, Convert) -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::Stop() - { - iBody->Stop(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::Pause -// Temporarily Stops the ongoing operation (Play, Record, TonePlay, Convert) -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::Pause() - { - iBody->Pause(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::SamplesRecorded -// Returns the sample recorded so far. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CMMFDevSoundAdaptation::SamplesRecorded() - { - return iBody->SamplesRecorded(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::SamplesPlayed -// Returns the sample played so far. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CMMFDevSoundAdaptation::SamplesPlayed() - { - return iBody->SamplesPlayed(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::PlayToneL -// Initializes audio device and start playing tone. Tone is played with -// frequency and for duration specified. -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::PlayToneL( - TInt aFrequency, - const TTimeIntervalMicroSeconds& aDuration) - { - iBody->PlayToneL(aFrequency, aDuration); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::PlayDualToneL -// Initializes audio device and start playing a dual tone. -// The tone consists of two sine waves of different frequencies summed together -// Dual Tone is played with specified frequencies and for specified duration. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::PlayDualToneL( - TInt aFrequencyOne, - TInt aFrequencyTwo, - const TTimeIntervalMicroSeconds& aDuration) - { - iBody->PlayDualToneL(aFrequencyOne, aFrequencyTwo, aDuration); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::PlayDTMFStringL -// Initializes audio device and start playing DTMF string aDTMFString. -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::PlayDTMFStringL( - const TDesC& aDTMFString) - { - iBody->PlayDTMFStringL(aDTMFString); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::PlayToneSequenceL -// Initializes audio device and start playing tone sequence. -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::PlayToneSequenceL( - const TDesC8& aData) - { - iBody->PlayToneSequenceL(aData); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::PlayFixedSequenceL -// Initializes audio device and start playing the specified pre-defined tone -// sequence. -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::PlayFixedSequenceL( - TInt aSequenceNumber) - { - iBody->PlayFixedSequenceL(aSequenceNumber); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::SetToneRepeats -// Defines the number of times the audio is to be repeated during the tone -// playback operation. A period of silence can follow each playing of tone. -// The tone playing can be repeated indefinitely. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::SetToneRepeats( - TInt aRepeatCount, - const TTimeIntervalMicroSeconds& aRepeatTrailingSilence) - { - iBody->SetToneRepeats(aRepeatCount, aRepeatTrailingSilence); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::SetDTMFLengths -// Defines the duration of tone on, tone off and tone pause to be used during the -// DTMF tone playback operation. -// Supported only during tone playing. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::SetDTMFLengths( - TTimeIntervalMicroSeconds32& aToneOnLength, - TTimeIntervalMicroSeconds32& aToneOffLength, - TTimeIntervalMicroSeconds32& aPauseLength) - { - iBody->SetDTMFLengths(aToneOnLength, aToneOffLength, aPauseLength); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::SetVolumeRamp -// Defines the period over which the volume level is to rise smoothly from -// nothing to the normal volume level. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::SetVolumeRamp( - const TTimeIntervalMicroSeconds& aRampDuration) - { - iBody->SetVolumeRamp(aRampDuration); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::SetPrioritySettings -// Defines the priority settings that should be used for this instance. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::SetPrioritySettings( - const TMMFPrioritySettings& aPrioritySettings) - { - iBody->SetPrioritySettings(aPrioritySettings); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CustomInterface -// see sounddevice.h -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TAny* CMMFDevSoundAdaptation::CustomInterface( - TUid aInterfaceId) - { - return iBody->CustomInterface(aInterfaceId); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::FixedSequenceCount -// Returns the number of available pre-defined tone sequences. -// This is the number of fixed sequence supported by DevSound by default. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CMMFDevSoundAdaptation::FixedSequenceCount() - { - return iBody->FixedSequenceCount(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::FixedSequenceName -// Returns the name assigned to a specific pre-defined tone sequence. -// This is the number of fixed sequence supported by DevSound by default. -// The function raises a panic if sequence number specified invalid. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C const TDesC& CMMFDevSoundAdaptation::FixedSequenceName( - TInt aSequenceNumber) - { - return iBody->FixedSequenceName(aSequenceNumber); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::GetSupportedInputDataTypesL -// see sounddevice.h -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::GetSupportedInputDataTypesL( - RArray& aSupportedDataTypes, - const TMMFPrioritySettings& aPrioritySettings) const - { - iBody->GetSupportedInputDataTypesL(aSupportedDataTypes, aPrioritySettings); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::GetSupportedOutputDataTypesL -// see sounddevice.h -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::GetSupportedOutputDataTypesL( - RArray& aSupportedDataTypes, - const TMMFPrioritySettings& aPrioritySettings) const - { - iBody->GetSupportedOutputDataTypesL(aSupportedDataTypes, aPrioritySettings); - } - -// ----------------------------------------------------------------------------- -// SetClientConfig -// Sets client capabilities for this instance of DevSound Adaptation. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CMMFDevSoundAdaptation::SetClientConfig( - const TMMFClientConfig& aClientConfig) - { - iBody->SetClientConfig(aClientConfig); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::ClientConfig -// Returns client capabilities of this instance of DevSound Adaptation. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C const TMMFClientConfig& CMMFDevSoundAdaptation::ClientConfig() const - { - return iBody->ClientConfig(); - } - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/MmfDevSoundAdaptationBody.cpp --- a/audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/MmfDevSoundAdaptationBody.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2019 +0,0 @@ -/* -* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - DevSound adaptation stub body implementation. -* -*/ - - -// INCLUDE FILES -#include -#include - -#include "G711DecoderIntfc.h" -#include "G729DecoderIntfc.h" -#include "IlbcDecoderIntfc.h" -#include "G711EncoderIntfc.h" -#include "G729EncoderIntfc.h" -#include "IlbcEncoderIntfc.h" -#include "ErrorConcealmentIntfc.h" -#include "SpeechEncoderConfig.h" - -#include "AudioInputMessageTypes.h" -#include "AudioOutputMessageTypes.h" -//#include "AudioResourceMessageTypes.h" - -#include "AudioInputCI.h" -#include "AudioOutputCI.h" -#include "G711DecoderIntfcCI.h" -#include "G729DecoderIntfcCI.h" -#include "IlbcDecoderIntfcCI.h" -#include "G711EncoderIntfcCI.h" -#include "G729EncoderIntfcCI.h" -#include "IlbcEncoderIntfcCI.h" -#include "ErrorConcealmentIntfcCI.h" -#include "SpeechEncoderConfigCI.h" - -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include - -//#include -//#include -//#include - -#include "MmfDevSoundAdaptationBody.h" -#include "MmfHwDeviceStub.h" -#include "TonePlayCompleteTimer.h" - - -// CONSTANTS -#ifdef _DEBUG -#include "e32debug.h" - -#define DEBPRN0(str) RDebug::Print(str, this) -#define DEBPRN1(str, val1) RDebug::Print(str, this, val1) -#define DEBPRN2(str, val1, val2) RDebug::Print(str, this, val1, val2) -#else -#define DEBPRN0(str) -#define DEBPRN1(str, val1) -#define DEBPRN2(str, val1, val2) -#endif //_DEBUG - - -const TUint KMaxVolume = 10; -const TUint KToneSamplingRate = 8000; -const TUint KToneChannels = 2; -// Time to play one note 1/10th of 1/2 a second -const TUint KToneNotePlayTime = 50000; - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::CBody -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CMMFDevSoundAdaptation::CBody::CBody() - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CBody")); - iMode= EMMFStateIdle; - //Set reasonable default values for DTMF - iDTMFGen.SetToneDurations(250000,50000,250000); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::ConstructL -// Symbian 2nd phase constructor can leave. -// assumes that iParent has already been set up properly -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::ConstructL( - RServer2& /*aPolicyServerHandle*/) - { - // Default - // set the default capability - iDeviceCapabilities.iRate = EMMFSampleRate8000Hz; - iDeviceCapabilities.iEncoding = EMMFSoundEncoding16BitPCM; - iDeviceCapabilities.iChannels = EMMFMono; - iDeviceCapabilities.iBufferSize = KBufferLength; - - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::ConstructL:EXIT")); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CMMFDevSoundAdaptation::CBody* CMMFDevSoundAdaptation::CBody::NewL() - { - CMMFDevSoundAdaptation::CBody* self = new (ELeave) CBody; - return self; - } - - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBodye::~CBody -// Destructor -// ----------------------------------------------------------------------------- -// -CMMFDevSoundAdaptation::CBody::~CBody() - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::~CBody:ENTER")); - delete iToneBuffer1; - delete iToneBuffer2; - delete iDevSoundUtil; - delete iFixedSequences; - delete iCMMFHwDevice; - delete iTonePlayCompleteTimer; - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::~CBody:EXIT")); - } - - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::InitializeL -// Initializes CMMFDevSoundProxy object to play and record PCM16 raw audio data -// with sampling rate of 8 KHz. -// -// On completion of Initialization, calls InitializeComplete() on -// aDevSoundObserver. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::InitializeL( - MDevSoundAdaptationObserver& aDevSoundObserver, - TMMFState aMode) - { - // if no HwDevice id specified, load default null implementation - TUid rawUid = {0}; - InitializeL(aDevSoundObserver, rawUid, aMode); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::InitializeL -// Initializes DevSound object for the mode aMode for processing audio data -// with hardware device aHWDev. -// -// On completion of Initialization, the observer will be notified via call back -// InitializeComplete(). -// -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::InitializeL( - MDevSoundAdaptationObserver& aDevSoundObserver, - TUid aHWDev, - TMMFState aMode) - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::InitializeL:ENTER")); - TInt initError = KErrNone; - iDevSoundObserver = &aDevSoundObserver; - - if (aMode == EMMFStateIdle) - { - User::Leave(KErrNotSupported); - } - iMode= aMode; - - - iDevSoundObserver = &aDevSoundObserver; - iHwDeviceID.iUid = aHWDev.iUid; - if(iCMMFHwDevice) - { - delete iCMMFHwDevice; - iHwDeviceBuffer = NULL; // buffer is deleted by HwDevice delete - } - - iCMMFHwDevice = NULL; - iCMMFHwDevice = CMMFHwDeviceStub::NewL(); - - iDevInfo.iHwDeviceObserver = this; - initError = iCMMFHwDevice->Init(iDevInfo); - - iDevSoundObserver->InitializeComplete(initError); - - if (initError) - { - User::Leave(initError); - } - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::InitializeL:EXIT")); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::InitializeL -// Initializes DevSound object for the mode aMode for processing audio data -// with hardware device supporting FourCC aDesiredFourCC. -// -// On completion of Initialization, the observer will be notified via call back -// InitializeComplete(). -// -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::InitializeL( - MDevSoundAdaptationObserver& aDevSoundObserver, - TFourCC /*aDesiredFourCC*/, - TMMFState aMode) - { - TUid implUid = {0}; - InitializeL(aDevSoundObserver, implUid, aMode); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::Capabilities -// Returns the supported Audio settings. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TMMFCapabilities CMMFDevSoundAdaptation::CBody::Capabilities() - { - return iDeviceCapabilities; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::Config -// Returns the current audio settings. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TMMFCapabilities CMMFDevSoundAdaptation::CBody::Config() const - { - return iDeviceConfig; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::SetConfigL -// Configure CMMFDevSoundProxy object for the settings in aConfig. -// Use this to set sampling rate, Encoding and Mono/Stereo. -// As part of defect 20796, the iRecordFormat has been set under the iPlayFormat, -// before it was not set at all. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::SetConfigL( - const TMMFCapabilities& aConfig) - { - iDeviceConfig = aConfig; - - // Fix to WAV recording problem. - // A kludge to init channel number to 'something' in case the device returns 0. - if (!iDeviceConfig.iChannels) - { - iDeviceConfig.iChannels = EMMFMono; - } - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::MaxVolume -// Returns an integer representing the maximum volume. -// This is the maximum value which can be passed to CMMFDevSoundProxy::SetVolume. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CMMFDevSoundAdaptation::CBody::MaxVolume() - { - return KMaxVolume; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::Volume -// Returns an integer representing the current volume. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CMMFDevSoundAdaptation::CBody::Volume() - { - return iVolume; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::SetVolume -// Changes the current playback volume to a specified value. -// The volume can be changed before or during playback and is effective -// immediately. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::SetVolume( - TInt aVolume) - { - // Check and make sure that the volume is in valid range - if (aVolume < 0) - { - aVolume = 0; - } - if (aVolume > MaxVolume()) - { - aVolume = MaxVolume(); - } - iVolume = aVolume; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::MaxGain -// Returns an integer representing the maximum gain. -// This is the maximum value which can be passed to CMMFDevSoundProxy::SetGain. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CMMFDevSoundAdaptation::CBody::MaxGain() - { - return KMaxVolume;//uses iMaxVolume for iMaxGain - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::Gain -// Returns an integer representing the current gain. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CMMFDevSoundAdaptation::CBody::Gain() - { - return iGain; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::SetGain -// Changes the current recording gain to a specified value. -// -// The gain can be changed before or during recording and is effective -// immediately. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::SetGain(TInt aGain) - { - // make sure it falls with the correct range - if (aGain > MaxGain()) - { - aGain = MaxGain(); - } - else if (aGain < 0) - { - aGain = 0; - } - iGain = aGain; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::GetPlayBalanceL -// Returns the speaker balance set for playing. -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::GetPlayBalanceL( - TInt& aLeftPercentage, - TInt& aRightPercentage) - { - aLeftPercentage = iLeftPlayBalance; - aRightPercentage = iRightPlayBalance; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::SetPlayBalanceL -// Sets the speaker balance for playing. -// The speaker balance can be changed before or during playback and is -// effective immediately. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::SetPlayBalanceL( - TInt aLeftPercentage, - TInt aRightPercentage) - { - if (aLeftPercentage < 0) - { - aLeftPercentage = 0; - } - else if (aLeftPercentage > 100) - { - aLeftPercentage = 100; - } - if (aRightPercentage < 0) - { - aRightPercentage = 0; - } - else if (aRightPercentage > 100) - { - aRightPercentage = 100; - } - iLeftPlayBalance = aLeftPercentage; - iRightPlayBalance = aRightPercentage; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::GetRecordBalanceL -// Returns the microphone gain balance set for recording. -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::GetRecordBalanceL( - TInt& aLeftPercentage, - TInt& aRightPercentage) - { - aLeftPercentage = iLeftRecordBalance; - aRightPercentage = iRightRecordBalance; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::SetRecordBalanceL -// Sets the microphone gain balance for recording. -// The microphone gain balance can be changed before or during recording and -// is effective immediately. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::SetRecordBalanceL( - TInt aLeftPercentage, - TInt aRightPercentage) - { - if (aLeftPercentage < 0) - { - aLeftPercentage = 0; - } - else if (aLeftPercentage > 100) - { - aLeftPercentage = 100; - } - if (aRightPercentage < 0) - { - aRightPercentage = 0; - } - else if (aRightPercentage > 100) - { - aRightPercentage = 100; - } - iLeftRecordBalance = aLeftPercentage; - iRightRecordBalance = aRightPercentage; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::PlayInitL -// Initializes audio device and start play process. This method queries and -// acquires the audio policy before initializing audio device. If there was an -// error during policy initialization, PlayError() method will be called on -// the observer with error code KErrAccessDenied, otherwise BufferToBeFilled() -// method will be called with a buffer reference. After reading data into the -// buffer reference passed, the client should call PlayData() to play data. -// -// The amount of data that can be played is specified in -// CMMFBuffer::RequestSize(). Any data that is read into buffer beyond this -// size will be ignored. -// -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::PlayInitL() - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::PlayInitL")); - if (!iDevSoundObserver) - { - User::Leave(KErrNotReady); - } - - StartPlayDataL(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::RecordInitL -// Initializes audio device and start record process. This method queries and -// acquires the audio policy before initializing audio device. If there was an -// error during policy initialization, RecordError() method will be called on -// the observer with error code KErrAccessDenied, otherwise BufferToBeEmptied() -// method will be called with a buffer reference. This buffer contains recorded -// or encoded data. After processing data in the buffer reference passed, the -// client should call RecordData() to continue recording process. -// -// The amount of data that is available is specified in -// CMMFBuffer::RequestSize(). -// -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::RecordInitL() - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::RecordInitL")); - if (!iDevSoundObserver) - { - User::Leave(KErrNotReady); - } - - StartRecordDataL(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::PlayData -// Plays data in the buffer at the current volume. The client should fill -// the buffer with audio data before calling this method. The Observer gets -// reference to buffer along with callback BufferToBeFilled(). When playing of -// the audio sample is complete, successfully or otherwise, the method -// PlayError() on observer is called. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::PlayData() - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::PlayData")); - ASSERT(iDevSoundObserver); - - if (iMode== EMMFStateIdle) - { - return; - } - - TInt error = KErrNone; - - if(iCMMFHwDevice) - { - if (iPaused) - { - iPaused = EFalse; - //note PlayData does not leave or return an error code so the - //Start() fails we cannot report the error back at this point - if (iCMMFHwDevice->IsActive()) - { - iCMMFHwDevice->Cancel(); - } - //restart hw device after pause - error = iCMMFHwDevice->Start(EDevDecode, EDevOutFlow); - } - else if(iMode== EMMFStatePlaying) - { - TInt len = iHwDeviceBuffer->Data().Length(); - iPlayedBytesCount += len; - if (iHwDeviceBuffer->LastBuffer()) - { - iLastBufferReceived = ETrue; - } - - // Pass the data buffer to HwDevice - if (iMode== EMMFStatePlaying) - { - error = iCMMFHwDevice->ThisHwBufferFilled(*iHwDeviceBuffer); - } - } - } - if (error != KErrNone) - { - iDevSoundObserver->PlayError(error); - } - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::RecordData -// Contine the process of recording. Once the buffer is filled with recorded -// data, the Observer gets reference to buffer along with callback -// BufferToBeEmptied(). After processing the buffer (copying over to a -// different buffer or writing to file) the client should call this -// method to continue recording process. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::RecordData() - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::RecordData")); - ASSERT(iDevSoundObserver); - if(iCMMFHwDevice) - { - if(iMode == EMMFStateRecording) - { - // Fix to WAV recording issue. - // In case of real DevSound adaptation implementation, the - // CMMFSwCodecRecordDataPath sets the last buffer parameter when no - // more data is in the buffer to process. In case of the stub, this - // never gets set as the s/w codec is not involved - we are simply - // copying same fixed 4k block of data over and over again. So, on - // pause or stop we need to indicate to the data path that we no - // longer need processing of data by manually setting last buffer - // parameter and resetting requested data size to 0. - if (iPaused) - { - iHwDeviceBuffer->SetLastBuffer(ETrue); - iHwDeviceBuffer->Data().SetLength(0); - } - else - { - iHwDeviceBuffer->Data().SetLength(iHwDeviceBuffer->RequestSize()); - } - - iCMMFHwDevice->ThisHwBufferEmptied(*iHwDeviceBuffer); - } - } - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::Stop -// Stops the ongoing operation (Play, Record, TonePlay, Convert) -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::Stop() - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::Stop")); - - iPaused = EFalse; - - if (iMode== EMMFStateIdle) - { - return; - } - - // For custom interface - - // Stop the hw device first - this unloads sound drivers - if(iCMMFHwDevice) - { - iCMMFHwDevice->Stop(); - } - - if ((iMode== EMMFStateTonePlaying) && (iTonePlayCompleteTimer)) - { - iTonePlayCompleteTimer->Cancel(); - } - - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::Pause -// Temporarily Stops the ongoing operation (Play, Record, TonePlay, Convert) -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::Pause() - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::Pause")); - iPaused = ETrue; - - if (iMode== EMMFStateIdle) - { - return; - } - - // Pause the HW device first - if(iCMMFHwDevice) - { - iCMMFHwDevice->Pause(); - } - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::SamplesRecorded -// Returns the sample recorded so far. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CMMFDevSoundAdaptation::CBody::SamplesRecorded() - { - TInt samples = 0; - samples = iRecordedBytesCount; - if(NumberOfChannels() > 1) - { - samples /= NumberOfChannels(); - } - if(BytesPerAudioSample() > 1) - { - samples /= BytesPerAudioSample(); - } - return samples; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::SamplesPlayed -// Returns the sample played so far. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CMMFDevSoundAdaptation::CBody::SamplesPlayed() - { - TInt samples = 0; - samples = iPlayedBytesCount; - if(NumberOfChannels() > 1) - { - samples /= NumberOfChannels(); - } - - if(BytesPerAudioSample() > 1) - { - samples /= BytesPerAudioSample(); - } - return samples; //each sample is 2 bytes - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::PlayToneL -// Initializes audio device and start playing tone. Tone is played with -// frequency and for duration specified. -// -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::PlayToneL( - TInt aFrequency, - const TTimeIntervalMicroSeconds& aDuration) - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::PlayToneL")); - if (iMode!= EMMFStateTonePlaying) - { - //tone playing only supported in tone play state - User::Leave(KErrNotSupported); - } - // Check whether frequency and duration is valid or not - TInt64 zeroInt64(0); - if ((aFrequency<0) || (aDuration.Int64() < zeroInt64)) - { - User::Leave(KErrArgument); - } - if (!iDevSoundObserver) - { - User::Leave(KErrNotReady); - } - iToneGen.SetFrequencyAndDuration(aFrequency,aDuration); - - StartPlayToneL(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::PlayDualToneL -// Initializes audio device and start playing a dual tone. -// The tone consists of two sine waves of different frequencies summed together -// Dual Tone is played with specified frequencies and for specified duration. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::PlayDualToneL( - TInt aFrequencyOne, - TInt aFrequencyTwo, - const TTimeIntervalMicroSeconds& aDuration) - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::PlayDualToneL")); - - // Check whether frequencies and duration are valid or not - TInt64 zeroInt64(0); - if ((aFrequencyOne<0) || (aFrequencyTwo<0) || - (aDuration.Int64() < zeroInt64)) - { - User::Leave(KErrArgument); - } - if (!iDevSoundObserver) - { - User::Leave(KErrNotReady); - } - iDualToneGen.SetFrequencyAndDuration(aFrequencyOne, - aFrequencyTwo, - aDuration); - StartPlayDualToneL(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::PlayDTMFStringL -// Initializes audio device and start playing DTMF string aDTMFString. -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::PlayDTMFStringL( - const TDesC& aDTMFString) - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::PlayDTMFStringL")); - - if (!iDevSoundObserver) - { - User::Leave(KErrNotReady); - } - if (iMode!= EMMFStateTonePlaying) - { - //tone playing only supported in tone play state - User::Leave(KErrNotSupported); - } - iDTMFGen.SetString(aDTMFString); - StartPlayDTMFStringL(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::PlayToneSequenceL -// Initializes audio device and start playing tone sequence. -// -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::PlayToneSequenceL(const TDesC8& aData) - { - DEBPRN1( - _L("CMMFDevSoundAdaptationStub[0x%x]::CBody::PlayToneSequenceL:Length[%d]"), - aData.Length()); - - if (!iDevSoundObserver) - { - User::Leave(KErrNotReady); - } - if (iMode!= EMMFStateTonePlaying) - { - //tone playing only supported in tone play state - User::Leave(KErrNotSupported); - } - - InitializeDevSoundUtilL(); - // Check whether the sequence is valid or not - if (!iDevSoundUtil->RecognizeSequence(aData)) - { - User::Leave(KErrCorrupt); - } - - // For playing Tone sequence, we don't use PCM generator. - // We use a timer instead - // iSequenceGen.SetSequenceData(aData); - - if (!iTonePlayCompleteTimer) - { - iTonePlayCompleteTimer = - CTonePlayCompleteTimer::NewL(*iDevSoundObserver); - } - // Determine the time out based on iRepeatCount and number of notes - // in the sequence - TUint repeats = ((iRepeatCount > 0) ? iRepeatCount : 1); - TTimeIntervalMicroSeconds32 time(KToneNotePlayTime*aData.Length()*repeats); - iTonePlayCompleteTimer->SetTimeOut(time); - - StartPlayToneSequenceL(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::PlayFixedSequenceL -// Initializes audio device and start playing the specified pre-defined tone -// sequence. -// -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::PlayFixedSequenceL(TInt aSequenceNumber) - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::PlayFixedSequenceL")); - - if (!iDevSoundObserver) - { - User::Leave(KErrNotReady); - } - if (iMode!= EMMFStateTonePlaying) - { - //tone playing only supported in tone play state - User::Leave(KErrNotSupported); - } - ASSERT((aSequenceNumber >= 0) && - (aSequenceNumber < iFixedSequences->Count())); - - iFixedSequence.Set(iFixedSequences->MdcaPoint(aSequenceNumber)); - iSequenceGen.SetSequenceData(iFixedSequence); - - StartPlayToneSequenceL(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::SetToneRepeats -// Defines the number of times the audio is to be repeated during the tone -// playback operation. A period of silence can follow each playing of tone. -// The tone playing can be repeated indefinitely. -// Supported only during tone playing. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::SetToneRepeats( - TInt aRepeatCount, - const TTimeIntervalMicroSeconds& aRepeatTrailingSilence) - { - iRepeatCount = aRepeatCount; - iRepeatTrailingSilence = aRepeatTrailingSilence; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::SetDTMFLengths -// Defines the duration of tone on, tone off and tone pause to be used during the -// DTMF tone playback operation. -// Supported only during tone playing. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::SetDTMFLengths( - TTimeIntervalMicroSeconds32& aToneOnLength, - TTimeIntervalMicroSeconds32& aToneOffLength, - TTimeIntervalMicroSeconds32& aPauseLength) - { - - if(aToneOnLength.Int() < KMdaInfiniteDurationDTMFToneOnLength) - { - aToneOnLength = TTimeIntervalMicroSeconds32(0); - } - if(aToneOffLength.Int() < 0) - { - aToneOffLength = TTimeIntervalMicroSeconds32(0); - } - if(aPauseLength.Int() < 0) - { - aPauseLength = TTimeIntervalMicroSeconds32(0); - } - - iDTMFGen.SetToneDurations(aToneOnLength,aToneOffLength,aPauseLength); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::SetVolumeRamp -// Defines the period over which the volume level is to rise smoothly from -// nothing to the normal volume level. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::SetVolumeRamp( - const TTimeIntervalMicroSeconds& aRampDuration) - { - // save ramp duration for tone generator - iRampDuration = aRampDuration; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::SetPrioritySettings -// Defines the priority settings that should be used for this instance. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::SetPrioritySettings( - const TMMFPrioritySettings& /*aPrioritySettings*/) - { - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::CustomInterface -// @see sounddevice.h -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TAny* CMMFDevSoundAdaptation::CBody::CustomInterface(TUid aInterfaceId) - { -// Note: These can only be uncommented when supported by the -// MessageHandlerFactory and CustomInterfaceProxyFactory stubs. -// Will result in memory leak if re-enabled without updating of -// the proxy and message factory stubs. -// - DEBPRN1( - _L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:InterfaceId[0x%x]"), - aInterfaceId); - - if (aInterfaceId == KUidSpeechEncoderConfig) - { - TRAP_IGNORE(iSpeechEncoderConfigCI = CSpeechEncoderConfigCI::NewL()); - DEBPRN0( - _L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CSpeechEncoderConfigCI...")); - return iSpeechEncoderConfigCI; - } - else if (aInterfaceId == KUidErrorConcealmentIntfc) - { - TRAP_IGNORE(iErrorConcealmentIntfcCI = CErrorConcealmentIntfcCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CErrorConcealmentIntfcCI...")); - return iErrorConcealmentIntfcCI; - } - else if (aInterfaceId == KUidG711DecoderIntfc) - { - TRAP_IGNORE(iG711DecoderIntfcCI = CG711DecoderIntfcCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CG711DecoderIntfcCI...")); - return iG711DecoderIntfcCI; - } - else if (aInterfaceId == KUidG729DecoderIntfc) - { - TRAP_IGNORE(iG729DecoderIntfcCI = CG729DecoderIntfcCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CG729DecoderIntfcCI...")); - return iG729DecoderIntfcCI; - } - else if (aInterfaceId == KUidIlbcDecoderIntfc) - { - TRAP_IGNORE(iIlbcDecoderIntfcCI = CIlbcDecoderIntfcCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CIlbcDecoderIntfcCI...")); - return iIlbcDecoderIntfcCI; - } - else if (aInterfaceId == KUidG711EncoderIntfc) - { - TRAP_IGNORE(iG711EncoderIntfcCI = CG711EncoderIntfcCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CG711EncoderIntfcCI...")); - return iG711EncoderIntfcCI; - } - else if (aInterfaceId == KUidG729EncoderIntfc) - { - TRAP_IGNORE(iG729EncoderIntfcCI = CG729EncoderIntfcCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CG729EncoderIntfcCI...")); - return iG729EncoderIntfcCI; - } - else if (aInterfaceId == KUidIlbcEncoderIntfc) - { - TRAP_IGNORE(iIlbcEncoderIntfcCI = CIlbcEncoderIntfcCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CIlbcEncoderIntfcCI...")); - return iIlbcEncoderIntfcCI; - } - else if (aInterfaceId == KUidAudioInput) - { - CAudioInputCI* retCI(NULL); - TRAP_IGNORE(retCI = CAudioInputCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CAudioInputCI...")); - return retCI; - } - else if(aInterfaceId == KUidAudioOutput) - { - CAudioOutputCI* retCI(NULL); - TRAP_IGNORE(retCI = CAudioOutputCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CAudioOutputCI...")); - return retCI; - }/* - else if (aInterfaceId == KUidSbcEncoderIntfc) - { - TRAP_IGNORE(iSbcEncoderIntfcCI = CSbcEncoderIntfcCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CSbcEncoderIntfcCI...")); - return iSbcEncoderIntfcCI; - } - else if (aInterfaceId == KUidAudioVibraControl) - { - TRAP_IGNORE(iAudioVibraControlCI = CAudioVibraControlCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CAudioVibraControlCI...")); - return iAudioVibraControlCI; - } - else if (aInterfaceId == KUidAudioResource) - { - CAudioResourceCIStub* retCI(NULL); - TRAP_IGNORE(retCI = CAudioResourceCIStub::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CAudioResourceCIStub...")); - return retCI; - } - else if (aInterfaceId == KUidAudioEqualizerEffect) - { - CAudioEqualizerCI* retCI(NULL); - TRAP_IGNORE(retCI = CAudioEqualizerCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CAudioEqualizerCI...")); - return retCI; - } - else if (aInterfaceId == KUidEnvironmentalReverbEffect) - { - CEnvironmentalReverbCI* retCI(NULL); - TRAP_IGNORE(retCI = CEnvironmentalReverbCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CEnvironmentalReverbCI...")); - return retCI; - } - else if (aInterfaceId == KUidStereoWideningEffect) - { - CStereoWideningCI* retCI(NULL); - TRAP_IGNORE(retCI = CStereoWideningCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CStereoWideningCI...")); - return retCI; - } - else if (aInterfaceId == KUidBassBoostEffect) - { - CBassBoostCI* retCI(NULL); - TRAP_IGNORE(retCI = CBassBoostCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CBassBoostCI...")); - return retCI; - } - else if (aInterfaceId == KUidSourceDopplerEffect) - { - CSourceDopplerCI* retCI(NULL); - TRAP_IGNORE(retCI = CSourceDopplerCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CSourceDopplerCI...")); - return retCI; - } - else if (aInterfaceId == KUidListenerDopplerEffect) - { - CListenerDopplerCI* retCI(NULL); - TRAP_IGNORE(retCI = CListenerDopplerCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CListenerDopplerCI...")); - return retCI; - } - else if (aInterfaceId == KUidListenerLocationEffect) - { - CListenerLocationCI* retCI(NULL); - TRAP_IGNORE(retCI = CListenerLocationCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CListenerLocationCI...")); - return retCI; - } - else if (aInterfaceId == KUidSourceLocationEffect) - { - CSourceLocationCI* retCI(NULL); - TRAP_IGNORE(retCI = CSourceLocationCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CSourceLocationCI...")); - return retCI; - } - else if (aInterfaceId == KUidListenerOrientationEffect) - { - CListenerOrientationCI* retCI(NULL); - TRAP_IGNORE(retCI = CListenerOrientationCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CListenerOrientationCI...")); - return retCI; - } - else if (aInterfaceId == KUidSourceOrientationEffect) - { - CSourceOrientationCI* retCI(NULL); - TRAP_IGNORE(retCI = CSourceOrientationCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CSourceOrientationCI...")); - return retCI; - } - else if (aInterfaceId == KUidDistanceAttenuationEffect) - { - CDistanceAttenuationCI* retCI(NULL); - TRAP_IGNORE(retCI = CDistanceAttenuationCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CDistanceAttenuationCI...")); - return retCI; - } - else if (aInterfaceId == KUidLoudnessEffect) - { - CLoudnessCI* retCI(NULL); - TRAP_IGNORE(retCI = CLoudnessCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CLoudnessCI...")); - return retCI; - } - else if (aInterfaceId == KUidAddedDevSoundControlInterface) - { - CAddedDevSoundControlCI* retCI(NULL); - TRAP_IGNORE(retCI = CAddedDevSoundControlCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CAddedDevSoundControlCI...")); - return (MAddedDevSoundControl*)retCI; - } - else if (aInterfaceId == KUidRestrictedAudioOutput) - { - CRestrictedAudioOutputCI* retCI(NULL); - TRAP_IGNORE(retCI = CRestrictedAudioOutputCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CRestrictedAudioOutputCI...")); - return retCI; - } - else if (aInterfaceId == KUidAacDecoderConfig) - { - TRAP_IGNORE(iAacDecoderConfigCI = CAacDecoderConfigCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CAacDecoderConfigCI...")); - return iAacDecoderConfigCI; - } - else if (aInterfaceId == KUidEAacPlusDecoderIntfc) - { - TRAP_IGNORE(iEAacPlusDecoderConfigCI = CEAacPlusDecoderIntfcCI::NewL()); - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning CEAacPlusDecoderIntfcCI...")); - return iEAacPlusDecoderConfigCI; - }*/ - else - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::CustomInterface:returning NULL...")); - return NULL; - } - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::FixedSequenceCount -// Returns the number of available pre-defined tone sequences. -// This is the number of fixed sequence supported by DevSound by default. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CMMFDevSoundAdaptation::CBody::FixedSequenceCount() - { - return iFixedSequences->Count(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::FixedSequenceName -// Returns the name assigned to a specific pre-defined tone sequence. -// This is the number of fixed sequence supported by DevSound by default. -// The function raises a panic if sequence number specified invalid. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -const TDesC& CMMFDevSoundAdaptation::CBody::FixedSequenceName( - TInt aSequenceNumber) - { - ASSERT((aSequenceNumber >= 0) && - (aSequenceNumber < iFixedSequences->Count())); - - TRAPD(err, InitializeDevSoundUtilL()); - if (err == KErrNone) - { - return iDevSoundUtil->FixedSequenceName(aSequenceNumber); - } - else - { - return KNullDesC; - } - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::GetSupportedInputDataTypesL -// @see sounddevice.h -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::GetSupportedInputDataTypesL( - RArray& aSupportedDataTypes, - const TMMFPrioritySettings& /*aPrioritySettings*/) const - { - //aPrioritySettings not used on ref DevSound - //search for playing datatypes - InitializeDevSoundUtilL(); - iDevSoundUtil->SeekHwDevicePluginsL(aSupportedDataTypes, EMMFStatePlaying); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::GetSupportedOutputDataTypesL -// @see sounddevice.h -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::GetSupportedOutputDataTypesL( - RArray& aSupportedDataTypes, - const TMMFPrioritySettings& /*aPrioritySettings*/) const - { - //aPrioritySettings not used on ref DevSound - // search for recording datatypes - InitializeDevSoundUtilL(); - iDevSoundUtil->SeekHwDevicePluginsL(aSupportedDataTypes, - EMMFStateRecording); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::SetClientConfig -// Sets client capabilities for this instance of DevSound Adaptation. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::SetClientConfig( - const TMMFClientConfig& aClientConfig) - { - iClientConfig = aClientConfig; - } - -// ----------------------------------------------------------------------------- -// TMMFClientConfig& CMMFDevSoundAdaptation::CBody::ClientConfig -// Returns client capabilities of this instance of DevSound Adaptation. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -const TMMFClientConfig& CMMFDevSoundAdaptation::CBody::ClientConfig() const - { - return iClientConfig; - } - -/******************************************************************************** - * Implementations of Non Exported public functions begins here * - ********************************************************************************/ - -////////////////////////////////////////////////////////////////////////////////// -// Audio Policy specific implementation begins here // -////////////////////////////////////////////////////////////////////////////////// - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::StartPlayDataL -// Called by Audio Policy Server when a request to play is approved by the -// Audio Policy Server. -// -// Leaves on failure??. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::StartPlayDataL() - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::StartPlayDataL")); - - ASSERT(iMode== EMMFStatePlaying); - - TInt error = KErrNone; - - if(iCMMFHwDevice) - { - // Initialize attribute values - iPlayedBytesCount = 0; - iLastBufferReceived = EFalse; - - // Start HwDevice - if (iCMMFHwDevice->IsActive()) - { - iCMMFHwDevice->Cancel(); - } - error = iCMMFHwDevice->Start(EDevDecode, EDevOutFlow); - } - else - { - error = KErrNotReady; - } - - if (error != KErrNone) - { - iDevSoundObserver->PlayError(error); - } - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::StartRecordDataL -// Called by Audio Policy Server when a request to record is approved by the -// Audio Policy Server. -// -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::StartRecordDataL() - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::StartRecordDataL")); - - ASSERT(iMode== EMMFStateRecording); - - if(iCMMFHwDevice) - { - TInt error = KErrNone; - // Initialize attribute values - iRecordedBytesCount = 0; - - if (iCMMFHwDevice->IsActive()) - { - iCMMFHwDevice->Cancel(); - } - error = iCMMFHwDevice->Start(EDevEncode, EDevInFlow); - - if (iHwDeviceBuffer) - { - iHwDeviceBuffer->SetLastBuffer(EFalse); - } - if (error != KErrNone) - { - iDevSoundObserver->RecordError(error); - return; - } - } - else - { - iDevSoundObserver->RecordError(KErrNotReady); - } - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::StartPlayToneL -// Called by Audio Policy Server when a request to play tone is approved by -// the Audio Policy Server. -// -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::StartPlayToneL() - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::StartPlayToneL")); - - ASSERT(iMode== EMMFStateTonePlaying); - - if(iCMMFHwDevice) - { - // Initialize attribute values - iPlayedBytesCount = 0; - - // Configure tone generator - iToneGen.Configure( - KToneSamplingRate, - KToneChannels, - iRepeatCount, - I64LOW((iRepeatTrailingSilence.Int64()*KToneSamplingRate)/1000000), - I64LOW((iRampDuration.Int64()*KToneSamplingRate)/1000000) - ); - - iCurrentGenerator = &iToneGen; - - // Start playback - DoPlayL(); - - } - else - { - iDevSoundObserver->ToneFinished(KErrNotReady); - } - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::StartPlayDualToneL -// Called by Audio Policy Server when a request to play a dual tone is approved -// by the Audio Policy Server. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::StartPlayDualToneL() - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::StartPlayDualToneL")); - - ASSERT(iMode== EMMFStateTonePlaying); - - if(iCMMFHwDevice) - { - // Initialize attribute values - iPlayedBytesCount = 0; - - // Configure dual tone generator - iDualToneGen.Configure( - KToneSamplingRate, - KToneChannels, - iRepeatCount, - I64LOW((iRepeatTrailingSilence.Int64() - *KToneSamplingRate)/KOneMillionMicroSeconds), - I64LOW((iRampDuration.Int64() - *KToneSamplingRate)/KOneMillionMicroSeconds) - ); - - iCurrentGenerator = &iDualToneGen; - - // Start playback - DoPlayL(); - } - else - iDevSoundObserver->ToneFinished(KErrNotReady); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::StartPlayDTMFStringL -// Called by Audio Policy Server when a request to play DTMF String is approved -// by the Audio Policy Server. -// -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::StartPlayDTMFStringL() - { - DEBPRN0( - _L("CMMFDevSoundAdaptationStub[0x%x]::CBody::StartPlayDTMFStringL")); - - ASSERT(iMode== EMMFStateTonePlaying); - - if(iCMMFHwDevice) - { - TInt error = KErrNone; - // Initialize attribute values - iPlayedBytesCount = 0; - - iDTMFGen.Configure( - KToneSamplingRate, - KToneChannels, - iRepeatCount, - I64LOW((iRepeatTrailingSilence.Int64()*KToneSamplingRate)/1000000), - I64LOW((iRampDuration.Int64()*KToneSamplingRate)/1000000) - ); - - iCurrentGenerator = &iDTMFGen; - - // Start playback - //need to trap this as we can leave with KErrUnderflow - //if there was no data to play - the error has already - //been sent to the observer and we don't want to call RunError - TRAP(error,DoPlayL()); - if ((error != KErrUnderflow)&&(error != KErrNone)) - { - User::Leave(error); - } - } - else - { - iDevSoundObserver->ToneFinished(KErrNotReady); - } - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::StartPlayToneSequenceL -// Called by Audio Policy Server when a request to play tone sequence is -// approved by the Audio Policy Server. -// -// Leaves on failure. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::StartPlayToneSequenceL() - { - DEBPRN0( - _L("CMMFDevSoundAdaptationStub[0x%x]::CBody::StartPlayToneSequenceL")); - - ASSERT(iMode == EMMFStateTonePlaying); - - // For playing Tone sequence, we don't use PCM generator. - // We use a timer instead -/* - if(iCMMFHwDevice) - { - // Initialize attribute values - iPlayedBytesCount = 0; - - iSequenceGen.Configure( - KToneSamplingRate, - KToneChannels, - iRepeatCount, - I64LOW((iRepeatTrailingSilence.Int64()*KToneSamplingRate)/1000000), - I64LOW((iRampDuration.Int64()*KToneSamplingRate)/1000000) - ); - - iCurrentGenerator = &iSequenceGen; - - // Start playback - DoPlayL(); - } - else - iDevSoundObserver->ToneFinished(KErrNotReady); -*/ - if (iTonePlayCompleteTimer->IsActive()) - { - iTonePlayCompleteTimer->Cancel(); - } - iTonePlayCompleteTimer->Start(); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::FillThisHwBuffer -// MMMFHwDeviceObserver mixin implementation. -// The CMMFHwDevice implementation object calls this method during decoding -// (playing), when it needs the encoded data in the buffer -// aHwDataBuffer. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CMMFDevSoundAdaptation::CBody::FillThisHwBuffer( - CMMFBuffer& aHwDataBuffer) - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::FillThisHwBuffer")); - - TInt err = KErrNone; - // Keep a reference to this Hw data Buffer. We need to send the - // reference back to HwDevice implementation - iHwDeviceBuffer = static_cast (&aHwDataBuffer); - // Set the request length, From HwDevice this comes with buffer - // length. - TInt len = iHwDeviceBuffer->Data().MaxLength(); - // Ignore error. since buffer size = Buffer Length - TRAP(err, iHwDeviceBuffer->SetRequestSizeL(len)); - - if (iMode== EMMFStatePlaying) // Get Data from Observer - { - if (iLastBufferReceived) - { - iHwDeviceBuffer->Data().SetLength(0); - // Pass the buffer to the he device - err = iCMMFHwDevice->ThisHwBufferFilled(*iHwDeviceBuffer); - } - else - { - // Pass the buffer to the observer - iDevSoundObserver->BufferToBeFilled(&aHwDataBuffer); - } - } - else if (iMode== EMMFStateTonePlaying) - { - // Hw device will call this method right after its Start was called. - // When it calls this for the first time it hasn't played one single - // buffer yet so check that. - // In this case there's no need to set the active buffer as it's already - // waiting to be played. - if (!iFirstCallFromHwDevice) - { - SetActiveToneBuffer(); - } - - // If there is no data in the active buffer, tone play is finished. - // DevSound just have to wait for completion event from audio device. - if (iActiveToneBuffer->Data().Length() > 0) - { - len = iActiveToneBuffer->Data().Length(); - // Copy data from tone buffer to hw device buffer - Mem::Copy((TAny*)(iHwDeviceBuffer->Data().Ptr()), - (TAny*)(iActiveToneBuffer->Data().Ptr()), - len); - - iHwDeviceBuffer->Data().SetLength(len); - if (len < iHwDeviceBuffer->RequestSize()) - { - iHwDeviceBuffer->SetLastBuffer(ETrue); - } - // Play data and try to generate next data block - err = iCMMFHwDevice->ThisHwBufferFilled(*iHwDeviceBuffer); - if (err != KErrNone) - { - return err; - } - - // Check again whether this is the first call from Hw device. - // FillFreeToneBuffer assumes the iActiveToneBuffer has already - // been played. - if (!iFirstCallFromHwDevice) - { - err = FillFreeToneBuffer(); - } - else - { - iFirstCallFromHwDevice = EFalse; // Reset flag - } - } - else if (iFirstCallFromHwDevice) - { - //we have no data in the tone buffer and thus have no - //outstanding requests to play - err = KErrUnderflow; //simulate underrun - iHwDeviceBuffer->SetLastBuffer(ETrue); - // Play data and try to generate next data block - err = iCMMFHwDevice->ThisHwBufferFilled(*iHwDeviceBuffer); - if (err != KErrNone) - { - return err; - } - } - - // If there was an error filling the buffer could be corrupt data - // notify the client and stop playing.Set err to KErrNone. - if (err != KErrNone) - { - Error(err);//Updates Bytes played informs client - err = KErrNone; - iCMMFHwDevice->Stop();//unloads sound device - Stopped();//Updates policy - } - } - else - { - err = KErrGeneral; - iDevSoundObserver->PlayError(KErrGeneral); - } - return err; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer -// MMMFHwDeviceObserver mixin implementation. -// The CMMFHwDevice implementation object calls this method during encoding -// (recording), when it fills the buffer aHwDataBuffer with -// encoded data. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CMMFDevSoundAdaptation::CBody::EmptyThisHwBuffer( - CMMFBuffer& aHwDataBuffer) - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::EmptyThisHwBuffer")); - - TInt err = KErrNone; - if(iMode== EMMFStateRecording) - { - // Keep a reference to this Hw data Buffer. We need to send the - // reference back to HwDevice implementation - iHwDeviceBuffer = static_cast(&aHwDataBuffer); - - // Set the request length, From HwDevice this comes with buffer - // length. MMF will use RequestSize attribute of the buffer. - // We can avoid this by setting in HwDevice implemenation - TInt len = iHwDeviceBuffer->Data().Length(); - iRecordedBytesCount += len; - TRAP(err, iHwDeviceBuffer->SetRequestSizeL(len)); - - // if we're pausing (i.e. flushing) set the last buffer flag - // when we get an empty buffer from the logical driver - if(iPaused && iHwDeviceBuffer->Data().Length() == 0) - { - iPaused = EFalse; - iHwDeviceBuffer->SetLastBuffer(ETrue); - } - - // Send Data from Observer - iDevSoundObserver->BufferToBeEmptied(iHwDeviceBuffer); - } - else - { - err = KErrGeneral; - iDevSoundObserver->RecordError(KErrGeneral); - } - - return err; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::MsgFromHwDevice -// MMMFHwDeviceObserver mixin implementation. -// The CMMFHwDevice implementation object calls this method when a message from -// the hardware device implementation is received. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CMMFDevSoundAdaptation::CBody::MsgFromHwDevice( - TUid /*aMessageType*/, - const TDesC8& /*aMsg*/) - { - return KErrNotSupported; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::Stopped -// MMMFHwDeviceObserver mixin implementation. -// -// The CMMFHwDevice implementation object calls this method when the current -// encode or decode task is finished or stopped. The policy state is updated -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::Stopped() - { - //for swcodec wrap hw devices bytes played updated in MsgFromHwDevice - //but non Swcodec wrappers hw devices may do it differently also don't - //know if non Swcodec wrap hw device will call Stopped or Error first - iLastBufferReceived = EFalse; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::Error -// MMMFHwDeviceObserver mixin implementation -// Processes error from hw device -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::Error( - TInt aError) - { - DEBPRN1(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::Error(%d)"), aError); - - if (iMode== EMMFStatePlaying) - { - iDevSoundObserver->PlayError(aError); - } - else if (iMode== EMMFStateRecording) - { - iDevSoundObserver->RecordError(aError); - } - else if (iMode== EMMFStateTonePlaying) - { - if (aError == KErrUnderflow) - { - iDevSoundObserver->ToneFinished(KErrNone); - } - else - { - iDevSoundObserver->ToneFinished(aError); - } - } - //else can't handle error - } - -/******************************************************************************** - * Non Exported public functions ends here * - ********************************************************************************/ - - -/******************************************************************************** - * Private functions begins here * - ********************************************************************************/ - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::DoPlayL -// Creates buffer and begin playback using the specified tone generator. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::DoPlayL() - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::DoPlayL")); - - // Delete any buffer from previous call and try to create maximum buffer - // size. Double Buffer the Tone data. - if (iToneBuffer1) - { - delete iToneBuffer1; - iToneBuffer1 = NULL; - } - - iToneBuffer1 = CMMFDataBuffer::NewL(KDevSoundDefaultFrameSize); - User::LeaveIfError(iCurrentGenerator->FillBuffer(iToneBuffer1->Data())); - - if (iToneBuffer2) - { - delete iToneBuffer2; - iToneBuffer2 = NULL; - } - iToneBuffer2 = CMMFDataBuffer::NewL(KDevSoundDefaultFrameSize); - User::LeaveIfError(iCurrentGenerator->FillBuffer(iToneBuffer2->Data())); - - // Assign active buffer - iActiveToneBuffer = iToneBuffer1; - - // Hw device hasn't played anything yet so don't change - // active buffer. This is checked in FillThisHwBuffer. - iFirstCallFromHwDevice = ETrue; - - // Start HwDevice to play data - if (iCMMFHwDevice->IsActive()) - { - iCMMFHwDevice->Cancel(); - } - User::LeaveIfError(iCMMFHwDevice->Start(EDevDecode, EDevOutFlow)); - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::SetActiveToneBuffer -// This method assigns the other buffer as active buffer. The tone audio -// generator should fill data in the other buffer by now. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::SetActiveToneBuffer() - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::SetActiveToneBuffer")); - - if (iActiveToneBuffer == iToneBuffer1) - { - iActiveToneBuffer = iToneBuffer2; - } - else if (iActiveToneBuffer == iToneBuffer2) - { - iActiveToneBuffer = iToneBuffer1; - } - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::FillFreeToneBuffer -// This method fills data into the free buffer. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CMMFDevSoundAdaptation::CBody::FillFreeToneBuffer() - { - DEBPRN0(_L("CMMFDevSoundAdaptationStub[0x%x]::CBody::FillFreeToneBuffer")); - - TInt err(KErrNone); - if (iActiveToneBuffer == iToneBuffer1) - { - err = iCurrentGenerator->FillBuffer(iToneBuffer2->Data()); - } - else if (iActiveToneBuffer == iToneBuffer2) - { - err = iCurrentGenerator->FillBuffer(iToneBuffer1->Data()); - } - return err; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::InitTask -// Initializes audio device node by setting volume, and sampling rate. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CMMFDevSoundAdaptation::CBody::InitTask() - { - // No Implementation - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::SamplingFrequency -// Returns an integer representing Sampling Frequency the device is currently -// configured to. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CMMFDevSoundAdaptation::CBody::SamplingFrequency() - { - if(iDeviceConfig.iRate == EMMFSampleRate8000Hz) - { - return 8000; - } - else if(iDeviceConfig.iRate == EMMFSampleRate11025Hz) - { - return 11025; - } - else if(iDeviceConfig.iRate == EMMFSampleRate12000Hz) - { - return 12000; - } - else if(iDeviceConfig.iRate == EMMFSampleRate16000Hz) - { - return 16000; - } - else if(iDeviceConfig.iRate == EMMFSampleRate22050Hz) - { - return 22050; - } - else if(iDeviceConfig.iRate == EMMFSampleRate24000Hz) - { - return 24000; - } - else if(iDeviceConfig.iRate == EMMFSampleRate32000Hz) - { - return 32000; - } - else if(iDeviceConfig.iRate == EMMFSampleRate44100Hz) - { - return 44100; - } - else if(iDeviceConfig.iRate == EMMFSampleRate48000Hz) - { - return 48000; - } - else if(iDeviceConfig.iRate == EMMFSampleRate88200Hz) - { - return 88200; - } - else if(iDeviceConfig.iRate == EMMFSampleRate96000Hz) - { - return 96000; - } - else - { - return 8000; //default - } - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::NumberOfChannels -// Returns an integer representing number of channels the device is currently -// configured to. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CMMFDevSoundAdaptation::CBody::NumberOfChannels() - { - if(iDeviceConfig.iChannels == EMMFMono) - { - return 1; - } - else - { - return 2; - } - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::BytesPerAudioSample -// Returns an integer representing number of bytes in each audio sample -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt CMMFDevSoundAdaptation::CBody::BytesPerAudioSample() - { - TInt bytes=1; - switch (iDeviceConfig.iEncoding) - { - case EMMFSoundEncoding8BitPCM: - case EMMFSoundEncoding8BitALaw: - case EMMFSoundEncoding8BitMuLaw: - { - bytes=1; - } - break; - case EMMFSoundEncoding16BitPCM: - { - bytes=2; - } - break; - } - return bytes; - } - -// ----------------------------------------------------------------------------- -// CMMFDevSoundAdaptation::CBody::InitializeDevSoundUtilL -// Initializes DevSoundUtil object. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CMMFDevSoundAdaptation::CBody::InitializeDevSoundUtilL() const - { - if (!iDevSoundUtil) - { - DEBPRN0( - _L("CMMFDevSoundAdaptationStub[0x%x]::CBody::InitializeDevSoundUtilL:ENTER")); - - iDevSoundUtil = CMMFDevSoundUtility::NewL(); - - // Initialize Fixed sequence related - DEBPRN0( - _L("CMMFDevSoundAdaptationStub[0x%x]::CBody::InitializeDevSoundUtilL")); - iDevSoundUtil->InitializeFixedSequenceL(&iFixedSequences); - - DEBPRN0( - _L("CMMFDevSoundAdaptationStub[0x%x]::CBody::InitializeDevSoundUtilL")); - } - - } - -//End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/MmfDevSoundAdaptationBody.h --- a/audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/MmfDevSoundAdaptationBody.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,867 +0,0 @@ -/* -* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Declaration of CMMFDevSoundAdaptation::CBody. -* -*/ - - - -#ifndef MMFDEVSOUNDADAPTATIONBODY_H -#define MMFDEVSOUNDADAPTATIONBODY_H - -// INCLUDES -#include -#include -#include -//#include -#include "ToneGenerator.h" -#include "DevSoundUtility.h" - - -// CONSTANTS -const TInt KDevSoundDefaultFrameSize = 0x1000; -const TInt KDevSoundMinFrameSize = 0x800; //2K -const TInt KDevSoundMaxFrameSize = 0x4000; //16K -const TInt KDevSoundDeltaFrameSize = 0x800; //2K -const TInt KDevSoundFramesPerSecond = 4; - -// FORWARD DECLARATIONS -class CMMFHwDeviceStub; -class CTonePlayCompleteTimer; -class CBytesPlayedCIImpl; - -class CG711DecoderIntfcCI; -class CG711EncoderIntfcCI; -class CG729DecoderIntfcCI; -class CG729EncoderIntfcCI; -class CIlbcDecoderIntfcCI; -class CIlbcEncoderIntfcCI; -class CSpeechEncoderConfigCI; -class CErrorConcealmentIntfcCI; - -// CLASS DECLARATION - -/** -* Class implementing CMMFDevSoundAdaptation behaviour. -* -* @lib MmfDevSoundAdaptation_Stub.lib -* @since S60 3.0 -*/ -class CMMFDevSoundAdaptation::CBody : public CBase, - public MMMFHwDeviceObserver - { - public: // Constructors and destructor - - /** - * Constructs, and returns a pointer to, a new CBody object. - * Leaves on failure.. - * @return CBody* A pointer to newly created object. - */ - static CBody* NewL(); - - /** - * Destructor. - */ - ~CBody(); - - public: // New functions - - /** - * Initializes to raw audio data PCM16 and Sampling Rate of 8 KHz. - * On completion of Initialization, calls InitializeComplete() on - * aDevSoundObserver. - * Leaves on failure. - * @since S60 3.0 - * @param MDevSoundAdaptationObserver& aDevSoundObserver A reference - * to the DevSound adaptation observer instance. - * @param TMMFState aMode Mode for which this object will be used. - * @return void - */ - void InitializeL(MDevSoundAdaptationObserver& aDevSoundObserver, - TMMFState aMode); - - /** - * Initializes DevSound object for the mode aMode for processing audio - * data with hardware device aHWDev. - * On completion of Initialization, calls InitializeComplete() on - * aDevSoundObserver. - * Leaves on failure. - * @since S60 3.0 - * @param MDevSoundAdaptationObserver& aDevSoundObserver A reference - * to the DevSound adaptation observer instance. - * @param TUid aHWDev The CMMFHwDevice implementation identifier. - * @param TMMFState aMode The mode for which this object will be used - * @return void - */ - void InitializeL(MDevSoundAdaptationObserver& aDevSoundObserver, - TUid aHWDev, TMMFState aMode); - - /** - * Initializes DevSound object for the mode aMode for processing audio - * data with hardware device supporting FourCC aDesiredFourCC. - * Leaves on failure. - * @since S60 3.0 - * @param MDevSoundAdaptationObserver& aDevSoundObserver A reference - * to the DevSound adaptation observer instance. - * @param TFourCC aDesiredFourCC The CMMFHwDevice implementation FourCC - * code. - * @param TMMFState aMode The mode for which this object will be used - * @return KErrNone if successfull, else corresponding error code - * @return void - */ - void InitializeL(MDevSoundAdaptationObserver& aDevSoundObserver, - TFourCC aDesiredFourCC, - TMMFState aMode); - - /** - * Returns the supported Audio settings ie. encoding, sample rates, - * mono/stereo operation, buffer size etc.. - * @since S60 3.0 - * @return TMMFCapabilities The device settings. - */ - TMMFCapabilities Capabilities(); - - /** - * Returns the current device configuration. - * @since S60 3.0 - * @return TMMFCapabilities The device settings. - */ - TMMFCapabilities Config() const; - - /** - * Configure CMMFDevSound object with the settings in aConfig. Use this - * to set sampling rate, encoding and mono/stereo. - * Leaves on failure. - * @since S60 3.0 - * @param const TMMFCapabilities& aConfig The attribute values to which - * CMMFDevSound object will be configured to. - * @return void - */ - void SetConfigL(const TMMFCapabilities& aCaps); - - /** - * Returns an integer representing the maximum volume device supports. - * This is the maximum value which can be passed to - * CMMFDevSound::SetVolume. - * @since S60 3.0 - * @return TInt The maximum volume. This value is platform dependent but - * is always greater than or equal to one. - */ - TInt MaxVolume(); - - /** - * Returns an integer representing the current volume. - * @since S60 3.0 - * @return TInt The current volume level. - */ - TInt Volume(); - - /** - * Changes the current playback volume to a specified value. The volume - * can be changed before or during playback and is effective immediately. - * @since S60 3.0 - * @param TInt aVolume The volume setting. This can be any value from 0 - * to the value returned by a call to - * CMMFDevSound::MaxVolume(). If the volume is not - * within this range, the volume is automatically set - * to minimum or maximum value based on the value - * that is being passed. Setting a zero value mutes - * the sound. Setting the maximum value results in - * the loudest possible sound. - * @return void - */ - void SetVolume(TInt aVolume); - - /** - * Returns an integer representing the maximum gain the device supports. - * This is the maximum value which can be passed to CMMFDevSound::SetGain - * @since S60 3.0 - * @return TInt The maximum gain. This value is platform dependent but is - * always greater than or equal to one. - */ - TInt MaxGain(); - - /** - * Returns an integer representing the current gain. - * @since S60 3.0 - * @return TInt The current gain level. - */ - TInt Gain(); - - /** - * Changes the current recording gain to a specified value. The gain can - * be changed before or during recording and is effective immediately. - * @since S60 3.0 - * @param TInt aGain The gain setting. This can be any value from zero to - * the value returned by a call to - * CMMFDevSound::MaxGain(). If the volume - * is not within this range, the gain is automatically - * set to minimum or maximum value based on the value - * that is being passed. Setting a zero value mutes the - * sound. Setting the maximum value results in the - * loudest possible sound. - * @return void - */ - void SetGain(TInt aGain); - - /** - * Returns the speaker balance set for playing. - * Leaves on failure. - * @since S60 3.0 - * @param TInt &aLeftPercentage On return contains the left speaker - * volume percentage. - * @param TInt &aRightPercentage On return contains the right speaker - * volume percentage. - * @return void - */ - void GetPlayBalanceL(TInt& aLeftPercentage, TInt& aRightPercentage); - - /** - * Sets the speaker balance for playing. The speaker balance can be - * changed before or during playback and is effective immediately. - * Leaves on failure. - * @since S60 3.0 - * @param TInt aLeftPercentage The left speaker volume percentage. This - * can be any value from zero to 100. Setting - * a zero value mutes the sound on left - * speaker. - * @param TInt aRightPercentage The right speaker volume percentage. - * This can be any value from zero to 100. - * Setting a zero value mutes the sound on - * right speaker. - * @return void - */ - void SetPlayBalanceL(TInt aLeftPercentage, TInt aRightPercentage); - - /** - * Returns the microphone gain balance set for recording. - * Leaves on failure. - * @since S60 3.0 - * @param TInt &aLeftPercentage On return contains the left microphone - * gain percentage. - * @param TInt &aRightPercentage On return contains the right microphone - * gain percentage. - * @return void - */ - void GetRecordBalanceL(TInt& aLeftPercentage, TInt& aRightPercentage); - - /** - * Sets the microphone balance for recording. The microphone balance can - * be changed before or during recording and is effective immediately. - * Leaves on failure. - * @since S60 3.0 - * @param TInt aLeftPercentage The left microphone gain percentage. This - * can be any value from zero to 100. Setting - * a zero value mutes the sound from left - * microphone. - * @param TInt aRightPercentage The right microphone gain percentage. - * This can be any value from zero to 100. - * Setting a zero value mutes the sound from - * right microphone. - * @return void - */ - void SetRecordBalanceL(TInt aLeftPercentage, TInt aRightPercentage); - - /** - * Initializes the audio device and starts the play process. This - * function queries and acquires the audio policy before initializing - * audio device. If there was an error during policy initialization, - * PlayError() function will be called on the observer with error code - * KErrAccessDenied, otherwise BufferToBeFilled() function will be called - * with a buffer reference. After reading data into the buffer reference - * passed, the client should call PlayData() to play data. - * The amount of data that can be played is specified in - * CMMFBuffer::RequestSize(). Any data that is read into buffer beyond - * this size will be ignored. - * Leaves on failure. - * @since S60 3.0 - * @return void - */ - void PlayInitL(); - - /** - * Initializes the audio device and starts the record process. This - * function queries and acquires the audio policy before initializing - * audio device. If there was an error during policy initialization, - * RecordError() function will be called on the observer with error code - * KErrAccessDenied, otherwise BufferToBeEmptied() function will be - * called with a buffer reference. This buffer contains recorded or - * encoded data. After processing data in the buffer reference passed, - * the client should call RecordData() to continue recording process. - * The amount of data that is available is specified in - * CMMFBuffer::RequestSize(). - * Leaves on failure. - * @since S60 3.0 - * @return void - */ - void RecordInitL(); - - /** - * Plays data in the buffer at the current volume. - * The client should fill the buffer with audio data before calling this - * function. The observer gets a reference to the buffer along with the - * callback function BufferToBeFilled(). When playing of the audio sample - * is complete, successfully or otherwise, the function PlayError() on - * the observer is called. - * The last buffer of the audio stream being played should have the last - * buffer flag set using CMMFBuffer::SetLastBuffer(TBool). If a - * subsequent attempt to play the clip is made, this flag will need - * resetting by the client. - * @return void - */ - void PlayData(); - - /** - * Contine the process of recording. - * Once the buffer is filled with recorded data, the Observer gets a - * reference to the buffer along with the callback function - * BufferToBeEmptied(). After processing the buffer (copying over to a - * different buffer or writing to file) the client should call this - * function to continue the recording process. - * @return void - */ - void RecordData(); - - /** - * Stops the ongoing operation (Play, Record, TonePlay, Convert). - * @since S60 3.0 - * @return void - */ - void Stop(); - - /** - * Temporarily Stops the ongoing operation (Play, Record, TonePlay, - * Convert). - * @since S60 3.0 - * @return void - */ - void Pause(); - - /** - * Returns the Sample recorded so far - * @since S60 3.0 - * @return TInt Returns the samples recorded. - */ - TInt SamplesRecorded(); - - /** - * Returns the Sample played so far - * @since S60 3.0 - * @return TInt Returns the samples played. - */ - TInt SamplesPlayed(); - - /** - * Initializes the audio device and starts playing a tone. The tone is - * played with the frequency and duration specified. - * Leaves on failure. - * @since S60 3.0 - * @param TInt aFrequency The frequency at which the tone will be played. - * @param const TTimeIntervalMicroSeconds &aDuration The period over - * which the tone will be played. A zero value causes the no tone - * to be played. - * @return void - */ - void PlayToneL(TInt aFrequency, - const TTimeIntervalMicroSeconds& aDuration); - - /** - * Initializes audio device and starts playing a dual tone. Dual Tone is - * played with the specified frequencies and for the specified duration. - * Leaves on failure. - * @since S60 3.0 - * @param TInt aFrequencyOne The first frequency of dual tone. - * @param TInt aFrequencyTwo The second frequency of dual tone. - * @param const TTimeIntervalMicroSeconds &aDuration The period over - * which the tone will be played. A zero value causes the no tone - * to be played. - * @return void - */ - void PlayDualToneL(TInt aFrequencyOne, - TInt aFrequencyTwo, - const TTimeIntervalMicroSeconds& aDuration); - - /** - * Initializes the audio device and starts playing the DTMF string - * aDTMFString. - * Leaves on failure. - * @since S60 3.0 - * @param const TDesC &aDTMFString The DTMF sequence in a descriptor. - * @return void - */ - void PlayDTMFStringL(const TDesC& aDTMFString); - - /** - * Initializes the audio device and starts playing a tone sequence. - * Leaves on failure. - * @since S60 3.0 - * @param const TDesC8 &aData The tone sequence in a descriptor. - * @return void - */ - void PlayToneSequenceL(const TDesC8& aData); - - /** - * Initializes the audio device and starts playing the specified - * pre-defined tone sequence. - * Leaves on failure. - * @since S60 3.0 - * @param TInt aSequenceNumber The index identifying the specific - * pre-defined tone sequence. Index values are relative to zero. - * This can be any value from zero to the value returned by a call - * to FixedSequenceCount() - 1. The function raises a panic if the - * sequence number is not within this range. - * @return void - */ - void PlayFixedSequenceL(TInt aSequenceNumber); - - /** - * Defines the number of times the audio is to be repeated during the - * tone playback operation. A period of silence can follow each playing - * of a tone. The tone playing can be repeated indefinitely - * @since S60 3.0 - * @param TInt aRepeatCount The number of times the tone, together with - * the trailing silence, is to be repeated. If this is set to - * KMdaRepeatForever, then the tone, together with the trailing - * silence, is repeated indefinitely or until Stop() is called. - * If this is set to zero, then the tone is not repeated. - * @param const TTimeIntervalMicroSeconds &aRepeatTrailingSilence An - * interval of silence which will be played after each tone. - * Supported only during tone playing. - * @return void - */ - void SetToneRepeats( - TInt aRepeatCount, - const TTimeIntervalMicroSeconds& aRepeatTrailingSilence); - - /** - * Defines the duration of tone on, tone off and tone pause to be used - * during the DTMF tone playback operation. - * Supported only during tone playing. - * @since S60 3.0 - * @param TTimeIntervalMicroSeconds32 &aToneOnLength The period over - * which the tone will be played. If this is set to zero, then the - * tone is not played. - * @param TTimeIntervalMicroSeconds32 &aToneOffLength The period over - * which the no tone will be played. - * @param TTimeIntervalMicroSeconds32 &aPauseLength The period over which - * the tone playing will be paused. - * @return void - */ - void SetDTMFLengths(TTimeIntervalMicroSeconds32& aToneOnLength, - TTimeIntervalMicroSeconds32& aToneOffLength, - TTimeIntervalMicroSeconds32& aPauseLength); - - /** - * Defines the period over which the volume level is to rise smoothly - * from nothing to the normal volume level. - * The function is only available before playing. - * @since S60 3.0 - * @param const TTimeIntervalMicroSeconds &aRampDuration The period over - * which the volume is to rise. A zero value causes the tone - * sample to be played at the normal level for the full duration - * of the playback. A value, which is longer than the duration of - * the tone sample means that the sample never reaches its normal - * volume level. - * @return void - */ - void SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration); - - /** - * Defines the priority settings that should be used for this instance. - * @since S60 3.0 - * @param const TMMFPrioritySettings &aPrioritySettings A class type - * representing the client's priority, priority preference and - * state - * @return void - */ - void SetPrioritySettings(const TMMFPrioritySettings& aPrioritySettings); - - /** - * Retrieves a custom interface to the device. - * @since S60 3.0 - * @param TUid aInterfaceId The interface UID, defined with the custom - * interface. - * @return TAny* A pointer to the interface implementation, or NULL if - * the device does not implement the interface requested. The - * return value must be cast to the correct type by the user. - */ - TAny* CustomInterface(TUid aInterfaceId); - - /** - * Returns the number of available pre-defined tone sequences. - * This is the number of fixed sequence supported by DevSound by default. - * @since S60 3.0 - * @return TInt The fixed sequence count. This value is implementation - * dependent. - */ - TInt FixedSequenceCount(); - - /** - * Returns the name assigned to a specific pre-defined tone sequence. - * This is the number of the fixed sequence supported by DevSound by - * default. - * The function raises a panic if sequence number specified is invalid. - * @since S60 3.0 - * @param TInt aSequenceNumber The index identifying the specific - * pre-defined tone sequence. Index values are relative to zero. - * This can be any value from zero to the value returned by a call - * to CMdaAudioPlayerUtility::FixedSequenceCount() - 1. The - * function raises a panic if sequence number is not within this - * range. - * @return const TDesC & A reference to a Descriptor containing the fixed - * sequence name indexed by aSequenceNumber. - */ - const TDesC& FixedSequenceName(TInt aSequenceNumber); - - /** - * Returns a list of the supported input datatypes that can be sent to - * DevSound for playing audio. The datatypes returned are those that the - * DevSound supports given the priority settings passed in - * aPrioritySettings. Note that if no supported data types are found this - * does not constitute failure, the function will return normally with no - * entries in aSupportedDataTypes. - * Leaves on failure. - * @since S60 3.0 - * @param RArray< TFourCC > &aSupportedDataTypes The array of supported - * data types that will be filled in by this function. The - * supported data types of the DevSound are in the form of an - * array of TFourCC codes. Any existing entries in the array will - * be overwritten on calling this function. If no supported data - * types are found given the priority settings, then the - * aSupportedDatatypes array will have zero entries. - * @param const TMMFPrioritySettings &aPrioritySettings The priority - * settings used to determine the supported datatypes. Note this - * does not set the priority settings. For input datatypes the - * iState member of the priority settings would be expected to be - * either EMMFStatePlaying or EMMFStatePlayingRecording. The - * priority settings may effect the supported datatypes depending - * on the audio routing. - * @return void - */ - void GetSupportedInputDataTypesL( - RArray& aSupportedDataTypesconst, - const TMMFPrioritySettings& aPrioritySettings) const; - - /** - * Returns a list of the supported output dataypes that can be received - * from DevSound for recording audio. The datatypes returned are those - * that the DevSound supports given the priority settings passed in - * aPrioritySettings. Note that if no supported data types are found this - * does not constitute failure, the function will return normally with no - * entries in aSupportedDataTypes. - * Leaves on failure. - * @since S60 3.0 - * @param RArray< TFourCC > &aSupportedDataTypes The array of supported - * data types that will be filled in by this function. The - * supported datatypes of the DevSound are in the form of an array - * of TFourCC codes. Any existing entries in the array will be - * overwritten on calling this function. If no supported datatypes - * are found given the priority settings, then the - * aSupportedDatatypes array will have zero entries. - * @param const TMMFPrioritySettings &aPrioritySettings The priority - * settings used to determine the supported data types. Note this - * does not set the priority settings. For output data types the - * iState member of the priority settings would expected to be - * either EMMFStateRecording or EMMFStatePlayingRecording. The - * priority settings may effect the supported datatypes depending - * on the audio routing. - * @return void - */ - void GetSupportedOutputDataTypesL( - RArray& aSupportedDataTypes, - const TMMFPrioritySettings& aPrioritySettings) const; - - /** - * Sets client configuration - * @since S60 3.0 - * @param TMMFClientConfig& aClientConfig A reference to client - * configuration object. - * @return void - */ - void SetClientConfig(const TMMFClientConfig& aClientConfig); - - /** - * Returns client configuration - * @since S60 3.0 - * @return const TMMFClientConfig& A constant reference to client - * configuration. - */ - const TMMFClientConfig& ClientConfig() const; - - // MMMFHwDeviceObserver implementation for CMMFHwDevice - - /** - * Callback function from CMMFHwDevice when it needs data. - * @since S60 3.0 - * @param CMMFBuffer& aHwBuffer A reference to CMMFBuffer in which the - * observer need to fill data into. - * @return TInt Error code. KErrNone if success. - */ - TInt FillThisHwBuffer(CMMFBuffer& aHwBuffer); - - /** - * Callback function from CMMFHwDevice when it has data. - * @since S60 3.0 - * @param CMMFBuffer& aHwBuffer A reference to CMMFBuffer in which the - * observer need to empty data from. - * @return TInt Error code. KErrNone if success. - */ - TInt EmptyThisHwBuffer(CMMFBuffer& aHwBuffer); - - /** - * Callback function from CMMFHwDevice. - * @since S60 3.0 - * @param TUid aMessageType A Uid identifying type of message. - * @param const TDesC8& aMsg.A reference to descriptor containing message - * information. - * @return TInt Error code. KErrNone if success. - */ - TInt MsgFromHwDevice(TUid aMessageType, const TDesC8& aMsg); - - /** - * Callback function from CMMFHwDevice when playing back/ recording is - * stopped.. - * @since S60 3.0 - * @return void - */ - void Stopped(); - - /** - * Callback function from CMMFHwDevice when there is a error during - * playback and/or recording. - * @since S60 3.0 - * @param TInt aError A systemwide error code. - * @return void - */ - void Error(TInt aError); - - // CMMFHwDevice implementation ends - - private: - - /** - * Called by Audio Policy Server when play reqeust is granted - * Leaves on failure. - * @since S60 3.0 - * @return void - */ - void StartPlayDataL(); - - /** - * Called by Audio Policy Server when record reqeust is granted - * Leaves on failure. - * @since S60 3.0 - * @return void - */ - void StartRecordDataL(); - - /** - * Called by Audio Policy Server when play tone reqeust is granted - * Leaves on failure. - * @since S60 3.0 - * @return void - */ - void StartPlayToneL(); - - /** - * Called by Audio Policy Server when play dual tone request is granted - * Leaves on failure. - * @since S60 3.0 - * @return void - */ - void StartPlayDualToneL(); - - /** - * Called by Audio Policy Server when play DTMF reqeust is granted - * Leaves on failure. - * @since S60 3.0 - * @return void - */ - void StartPlayDTMFStringL(); - - /** - * Called by Audio Policy Server when play tone sequence reqeust - * is granted. - * Leaves on failure. - * @since S60 3.0 - * @return void - */ - void StartPlayToneSequenceL(); - - /** - * Play tone - * Leaves on failure. - * @since S60 3.0 - * @return void - */ - void DoPlayL(); - - /** - * Sets active tone - * @since S60 3.0 - * @return void - */ - void SetActiveToneBuffer(); - - /** - * Fills free tone buffer with tone data - * @since S60 3.0 - * @return KErrNone if succesfull, else corresponding error code. - */ - TInt FillFreeToneBuffer(); - - - // HwDevice implementation begins - - /** - * Initialize HwDevice task. - * @since S60 3.0 - * @return KErrNone if succesfull, else corresponding error code. - */ - TInt InitTask(); - - /** - * Returns Sampling Frequency the device is currently configured to - * @since S60 3.0 - * @return KErrNone if succesfull, else corresponding error code. - */ - TInt SamplingFrequency(); - - /** - * Returns number of channels the device is currently configured to - * @since S60 3.0 - * @return KErrNone if succesfull, else corresponding error code. - */ - TInt NumberOfChannels(); - - /** - * returns the number of bytes in each audio sample - * @since S60 3.0 - * @return TInt Number of of bytes in each audio sample. - */ - TInt BytesPerAudioSample(); - - // HwDevice implementation ends - - /** - * Initializes DevSound utility - * @since S60 3.0 - * @return void - */ - void InitializeDevSoundUtilL() const; - - private: - - /** - * C++ default constructor. - */ - CBody(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(RServer2& aPolicyServerHandle); - - protected: // Data - - CG711DecoderIntfcCI* iG711DecoderIntfcCI; - CG711EncoderIntfcCI* iG711EncoderIntfcCI; - CG729DecoderIntfcCI* iG729DecoderIntfcCI; - CG729EncoderIntfcCI* iG729EncoderIntfcCI; - CIlbcDecoderIntfcCI* iIlbcDecoderIntfcCI; - CIlbcEncoderIntfcCI* iIlbcEncoderIntfcCI; - CSpeechEncoderConfigCI* iSpeechEncoderConfigCI; - CErrorConcealmentIntfcCI* iErrorConcealmentIntfcCI; - - private: // Data - - //Objects (owned or referred to): - MDevSoundAdaptationObserver* iDevSoundObserver; - - // DevSound capabilities - TMMFCapabilities iDeviceCapabilities; - // Current Configuration - TMMFCapabilities iDeviceConfig; - - // Bytes of audio data played in current play cycle - TInt iPlayedBytesCount; - // Bytes of audio data recorded in current record cycle - TInt iRecordedBytesCount; - TInt iGain; - TInt iVolume; - - //Tone Stuff: - MMdaToneSynthesis* iCurrentGenerator; - TMdaSimpleToneGenerator iToneGen; - TMdaDualToneGenerator iDualToneGen; - TMdaDTMFGenerator iDTMFGen; - TMdaSequenceGenerator iSequenceGen; // Not Supported - TInt iRepeatCount; - TTimeIntervalMicroSeconds iRepeatTrailingSilence; - TTimeIntervalMicroSeconds iRampDuration; - // Double buffer tone playing - CMMFDataBuffer* iToneBuffer1; - CMMFDataBuffer* iToneBuffer2; - // Reference to current tone buffer playing - CMMFDataBuffer* iActiveToneBuffer; - - // Hardware device implementation - CMMFHwDeviceStub* iCMMFHwDevice; - // Mode in which DevSound instance will be used for - TMMFState iMode; - // Reference to hardware buffer - CMMFDataBuffer* iHwDeviceBuffer; - - TBool iLastBufferReceived; - - // Holds true of Audio data given to DevSound needs to ramped up - mutable CMMFDevSoundUtility* iDevSoundUtil; - - // Fixed sequence related - - // Holds the fixed sequence data - mutable CPtrC8Array* iFixedSequences; - // Holds reference to current sequence - TPtrC8 iFixedSequence; - - // Balance - TInt iLeftPlayBalance; - TInt iRightPlayBalance; - TInt iLeftRecordBalance; - TInt iRightRecordBalance; - TBool iPaused; - - TUid iHwDeviceID; - - // Hardware device initialization parameters - THwDeviceInitParams iDevInfo; - - TBool iFirstCallFromHwDevice; - - // Temporary CI testing only - CBytesPlayedCIImpl* iBytesPlayedCIImpl; - // Holds clients configuration - TMMFClientConfig iClientConfig; - - // Pointer to CTonePlayCompleteTimer - CTonePlayCompleteTimer* iTonePlayCompleteTimer; - - private: // Friend classes - friend class CMMFDevSoundAdaptation; - - }; - -#endif // MMFDEVSOUNDADAPTATIONBODY_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/MmfHwDeviceStub.cpp --- a/audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/MmfHwDeviceStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,493 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - - -// INCLUDE FILES -#include "MmfHwDeviceStub.h" -#ifdef _DEBUG -#include "e32debug.h" - -#define DEBPRN0(str) RDebug::Print(str, this) -#define DEBPRN1(str, val1) RDebug::Print(str, this, val1) -#define DEBPRN2(str, val1, val2) RDebug::Print(str, this, val1, val2) -#else -#define DEBPRN0(str) -#define DEBPRN1(str, val1) -#define DEBPRN2(str, val1, val2) -#endif //_DEBUG - -// CONSTANTS -const TUint KBufferLength1 = 0x1000; -const TUint KBufferLength2 = 0x1000; -//const TUint KBufferLength2 = 0x1800; // for creating second buffer with different length than the first buffer. -const TUint KTimerDuration = 200000; - -#ifdef __WINSCW__ -_LIT(KSample1,"C:\\sample1.wav"); -#else -_LIT(KSample1,"Z:\\system\\data\\DevSoundAdaptationStub\\sample1.wav"); -#endif // __WINSCW__ - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CMMFHwDeviceStub::CMMFHwDeviceStub -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CMMFHwDeviceStub::CMMFHwDeviceStub() -: CActive(EPriorityNormal), iHwDeviceState(EHWDeviceIdle), iCurPlayBuffer(NULL), - iCurRecdBuffer(NULL) - { - CActiveScheduler::Add(this); - } - -// ----------------------------------------------------------------------------- -// CMMFHwDeviceStub::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CMMFHwDeviceStub::ConstructL() - { - DEBPRN0(_L("CMMFHwDeviceStub[0x%x]::ConstructL:BEGIN")); - // Create timer - User::LeaveIfError(iTimer.CreateLocal()); - DEBPRN0(_L("CMMFHwDeviceStub[0x%x]::ConstructL:END")); - } - -// ----------------------------------------------------------------------------- -// CMMFHwDeviceStub::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CMMFHwDeviceStub* CMMFHwDeviceStub::NewL() - { - CMMFHwDeviceStub* self = new (ELeave)CMMFHwDeviceStub; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - -// ----------------------------------------------------------------------------- -// CMMFHwDeviceStub::~CMMFHwDeviceStub -// Destructor -// ----------------------------------------------------------------------------- -// -CMMFHwDeviceStub::~CMMFHwDeviceStub() - { - DEBPRN0(_L("CMMFHwDeviceStub[0x%x]::~CMMFHwDeviceStub:BEGIN")); - // Cancel A/O and close the timer - Cancel(); - iTimer.Close(); - - // Delete buffers - delete iPlayBuffer1; - delete iPlayBuffer2; - delete iRecdBuffer1; - delete iRecdBuffer2; - - DEBPRN0(_L("CMMFHwDeviceStub[0x%x]::~CMMFHwDeviceStub:END")); - } - -//----------------------------------------------------------------------------- -// CMMFHwDeviceStub::Start -// Starts playback/record based on aFuncCmd -// (other items were commented in a header). -//----------------------------------------------------------------------------- -TInt CMMFHwDeviceStub::Start(TDeviceFunc aFuncCmd, TDeviceFlow /*aFlowCmd*/) - { - DEBPRN0(_L("CMMFHwDeviceStub[0x%x]::Start:BEGIN")); - TInt status(KErrNone); - switch(aFuncCmd) - { - case EDevDecode: - iCurPlayBuffer = NULL; - - // Initialize buffers - TRAP(status, InitializePlayBufferL()); - if (status != KErrNone) - return status; - - // Reset buffers rendered count to zero only if not pause-continue - if (iHwDeviceState == EHWDeviceIdle) - iCount = 0; - // Initialize attributes - iHwDeviceState = EHWDevicePlay; - iLastBufferReceived = EFalse; - // If not already active, launch timer - if (!IsActive()) - { - iTimer.After(iStatus,TTimeIntervalMicroSeconds32(KTimerDuration) ); - SetActive(); - } - break; - case EDevEncode: - iCurRecdBuffer = NULL; - - // Initialize buffers - TRAP(status, InitializeRecdBufferL()); - if (status != KErrNone) - return status; - - // Reset buffers rendered count to zero only if not pause-continue - if (iHwDeviceState == EHWDeviceIdle) - iCount = 0; - // Initialize attributes - iHwDeviceState = EHWDeviceRecord; - // If not already active, launch timer - if (!IsActive()) - { - iTimer.After(iStatus,TTimeIntervalMicroSeconds32(KTimerDuration) ); - SetActive(); - } - break; - default: - status = KErrNotSupported; - break; - }; - DEBPRN0(_L("CMMFHwDeviceStub[0x%x]::Start:END")); - return status; - } - -//----------------------------------------------------------------------------- -// CMMFHwDeviceStub::Stop -// Stops current operation. -// (other items were commented in a header). -//----------------------------------------------------------------------------- -TInt CMMFHwDeviceStub::Stop() - { - DEBPRN0(_L("CMMFHwDeviceStub[0x%x]::Stop")); - TInt status(KErrNone); - // Cancel any outstanding requests - Cancel(); - // Reset attributes - iHwDeviceState = EHWDeviceIdle; - iLastBufferReceived = EFalse; - iCurPlayBuffer = NULL; - iCurRecdBuffer = NULL; - // Notify observer Stopped - iObserver->Stopped(); - return status; - } - -//----------------------------------------------------------------------------- -// CMMFHwDeviceStub::Pause -// Pauses current operation. -// (other items were commented in a header). -//----------------------------------------------------------------------------- -TInt CMMFHwDeviceStub::Pause() - { - DEBPRN0(_L("CMMFHwDeviceStub[0x%x]::Pause")); - TInt status(KErrNone); - - // Fix to WAV recording issue. - // Proper way to stop this A/O is by letting the data path to call back - // Stop() after detecting last buffer. -// Cancel(); - return status; - } - -//----------------------------------------------------------------------------- -// CMMFHwDeviceStub::Init -// Initializes CMMFHwDevice. -// (other items were commented in a header). -//----------------------------------------------------------------------------- -TInt CMMFHwDeviceStub::Init(THwDeviceInitParams& aDevInfo) - { - DEBPRN0(_L("CMMFHwDeviceStub[0x%x]::Init")); - TInt status(KErrNone); - iObserver = aDevInfo.iHwDeviceObserver; - return status; - } - -//----------------------------------------------------------------------------- -// CMMFHwDeviceStub::CustomInterface -// Returns a pointer to CustomInterface. -// (other items were commented in a header). -//----------------------------------------------------------------------------- -TAny* CMMFHwDeviceStub::CustomInterface(TUid /*aInterfaceId*/) - { - return NULL; - } - -//----------------------------------------------------------------------------- -// CMMFHwDeviceStub::ThisHwBufferFilled -// Returns a pointer to CustomInterface. -// (other items were commented in a header). -//----------------------------------------------------------------------------- -TInt CMMFHwDeviceStub::ThisHwBufferFilled(CMMFBuffer& aFillBufferPtr) - { - DEBPRN2(_L("CMMFHwDeviceStub[0x%x]::ThisHwBufferFilled:Addr[0x%x]Count[%d]"), iCurPlayBuffer, ++iCount); - TInt status(KErrNotReady); - if (iHwDeviceState == EHWDevicePlay) - { - status = KErrNone; - if (aFillBufferPtr.LastBuffer()) - { - iLastBufferReceived = ETrue; - DEBPRN0(_L("CMMFHwDeviceStub[0x%x]::ThisHwBufferFilled[LastBuffer]")); - } - - // If not already active, launch timer - if (!IsActive()) - { - iTimer.After(iStatus,TTimeIntervalMicroSeconds32(KTimerDuration) ); - SetActive(); - } - } - return status; - } - -//----------------------------------------------------------------------------- -// CMMFHwDeviceStub::ThisHwBufferEmptied -// Called by client when data is available during recording. -// (other items were commented in a header). -//----------------------------------------------------------------------------- -TInt CMMFHwDeviceStub::ThisHwBufferEmptied(CMMFBuffer& aEmptyBufferPtr) - { - DEBPRN1(_L("CMMFHwDeviceStub[0x%x]::ThisHwBufferEmptied[%d]"), ++iCount); - TInt status(KErrNotReady); - if (iHwDeviceState == EHWDeviceRecord) - { - status = KErrNone; - - // Fix to WAV recording issue. - // In case of real DevSound adaptation implementation, the - // CMMFSwCodecRecordDataPath sets the last buffer parameter when no - // more data is in the buffer to process. In case of the stub, this - // never gets set as the s/w codec is not involved - we are simply - // copying same fixed 4k block of data over and over again. So, on - // pause or stop we need to indicate to the data path that we no - // longer need processing of data by manually setting last buffer - // parameter and resetting requested data size to 0. - if (aEmptyBufferPtr.LastBuffer()) - { - iRecdBuffer1->SetLastBuffer(ETrue); - iRecdBuffer1->SetRequestSizeL(0); - iRecdBuffer2->SetLastBuffer(ETrue); - iRecdBuffer2->SetRequestSizeL(0); - } - - // If not already active, launch timer - if (!IsActive()) - { - iTimer.After(iStatus,TTimeIntervalMicroSeconds32(KTimerDuration) ); - SetActive(); - } - } - - return status; - } - -//----------------------------------------------------------------------------- -// CMMFHwDeviceStub::SetConfig -// Configures CMMFHwDevice. -// (other items were commented in a header). -//----------------------------------------------------------------------------- -TInt CMMFHwDeviceStub::SetConfig(TTaskConfig& /*aConfig*/) - { - DEBPRN0(_L("CMMFHwDeviceStub[0x%x]::SetConfig")); - TInt status(KErrNone); - return status; - } - -//----------------------------------------------------------------------------- -// CMMFHwDeviceStub::StopAndDeleteCodec -// Stops and deletes codec. -// (other items were commented in a header). -//----------------------------------------------------------------------------- -TInt CMMFHwDeviceStub::StopAndDeleteCodec() - { - DEBPRN0(_L("CMMFHwDeviceStub[0x%x]::StopAndDeleteCodec")); - TInt status(KErrNone); - Stop(); - return status; - } - -//----------------------------------------------------------------------------- -// CMMFHwDeviceStub::DeleteCodec -// Deletes codec. -// (other items were commented in a header). -//----------------------------------------------------------------------------- -TInt CMMFHwDeviceStub::DeleteCodec() - { - DEBPRN0(_L("CMMFHwDeviceStub[0x%x]::DeleteCodec")); - TInt status(KErrNone); - Stop(); - return status; - } - - -//----------------------------------------------------------------------------- -// CMMFHwDeviceStub::RunL -// Called by CActive object framework when local timer times out. -// (other items were commented in a header). -//----------------------------------------------------------------------------- -void CMMFHwDeviceStub::RunL() - { - DEBPRN1(_L("CMMFHwDeviceStub[0x%x]::RunL:iHwDevState[%d]"), iHwDeviceState); - switch(iHwDeviceState) - { - case EHWDevicePlay: - // If last buffer is received, send error - if (iLastBufferReceived) - { - iObserver->Error(KErrUnderflow); - Stop(); - } - else - { - SetActivePlayBufferL(); - iObserver->FillThisHwBuffer(*iCurPlayBuffer); - } - break; - case EHWDeviceRecord: - SetActiveRecdBufferL(); - iObserver->EmptyThisHwBuffer(*iCurRecdBuffer); - break; - default: - break; - } - } - -//----------------------------------------------------------------------------- -// CMMFHwDeviceStub::DoCancel -// From CActive. Called by Framework when this instance is active and is -// cancelled -//----------------------------------------------------------------------------- -void CMMFHwDeviceStub::DoCancel() - { - DEBPRN0(_L("CMMFHwDeviceStub[0x%x]::DoCancel")); - iTimer.Cancel(); - } - -//----------------------------------------------------------------------------- -// CMMFHwDeviceStub::Error -// From CActive. Called by Framework when RunL Leaves -//----------------------------------------------------------------------------- -TInt CMMFHwDeviceStub::Error(TInt /*aError*/) - { - return KErrNone; - } - -//----------------------------------------------------------------------------- -// CMMFHwDeviceStub::InitializePlayBufferL -// Initializes buffer(s) used for playback -//----------------------------------------------------------------------------- -void CMMFHwDeviceStub::InitializePlayBufferL() - { - if (!iPlayBuffer1) - { - // Create buffers - iPlayBuffer1 = CMMFDataBuffer::NewL(KBufferLength1); - } - if (!iPlayBuffer2) - { - // Create buffers - iPlayBuffer2 = CMMFDataBuffer::NewL(KBufferLength2); - } - } - -//----------------------------------------------------------------------------- -// CMMFHwDeviceStub::InitializeRecdBufferL -// Initializes buffer(s) used for recording -//----------------------------------------------------------------------------- -void CMMFHwDeviceStub::InitializeRecdBufferL() - { - if (!iRecdBuffer1) - { - DEBPRN0(_L("CMMFHwDeviceStub[0x%x]::InitializeRecdBufferL:Creating buffer...")); - // Create buffers - iRecdBuffer1 = CMMFDataBuffer::NewL(KBufferLength1); - } - - if (!iRecdBuffer2) - { - DEBPRN0(_L("CMMFHwDeviceStub[0x%x]::InitializeRecdBufferL:Creating buffer...")); - // Create buffers - iRecdBuffer2 = CMMFDataBuffer::NewL(KBufferLength2); - } - - iPosition = 0; - - } - -//----------------------------------------------------------------------------- -// CMMFHwDeviceStub::SetActiveRecdBufferL -// Reads data from the input file to the buffer -//----------------------------------------------------------------------------- -void CMMFHwDeviceStub::SetActiveRecdBufferL() - { - if ( !iCurRecdBuffer || ( iCurRecdBuffer == iRecdBuffer2 ) ) - { - iCurRecdBuffer = iRecdBuffer1; - } - else - { - iCurRecdBuffer = iRecdBuffer2; - } - - if ( !iCurRecdBuffer->LastBuffer() ) - { - RFs rFs; - RFile rFile; - User::LeaveIfError(rFs.Connect()); - User::LeaveIfError(rFile.Open(rFs, KSample1, EFileRead)); - - TInt size; - User::LeaveIfError(rFile.Size(size)); - TInt bufLength( iCurRecdBuffer->Data().MaxLength() ); - if (iPosition > (size - bufLength)) - { - iPosition = 0; //rewind file position index to the beginning - } - // Assumption, file size is more than iCurRecdBuffer->Data().MaxLength() - User::LeaveIfError(rFile.Read(iPosition, - iCurRecdBuffer->Data(), - bufLength) ); - iCurRecdBuffer->SetRequestSizeL(bufLength); - iCurRecdBuffer->SetLastBuffer(EFalse); - rFile.Close(); - rFs.Close(); - - iPosition += bufLength; - } - } - -//----------------------------------------------------------------------------- -// CMMFHwDeviceStub::SetActivePlayBufferL -// Reads data from the input file to the buffer -//----------------------------------------------------------------------------- -void CMMFHwDeviceStub::SetActivePlayBufferL() - { - if ( !iCurPlayBuffer || ( iCurPlayBuffer == iPlayBuffer2 ) ) - { - iCurPlayBuffer = iPlayBuffer1; - } - else - { - iCurPlayBuffer = iPlayBuffer2; - } - iCurPlayBuffer->SetRequestSizeL(iCurPlayBuffer->Data().MaxLength()); - iCurPlayBuffer->Data().SetLength(0); - iCurPlayBuffer->SetLastBuffer(EFalse); - } - -//End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/MmfHwDeviceStub.h --- a/audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/MmfHwDeviceStub.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,232 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - - -#ifndef MMFHWDEVSTUB_H -#define MMFHWDEVSTUB_H - -// INCLUDES -#include -#include - -// CLASS DECLARATION - -/** -* This class provides an stub interface for CMMFHwDevice - intended -* to provide non audio rendering support for MMFDevSoundAdaptation Stub -* -* @lib MmfDevSoundAdaptation_Stub.lib -* @since Series 60 3.0 -*/ -class CMMFHwDeviceStub : public CActive - { - public: - - /** - * Constructs, and returns a pointer to, a new CMMFHwDeviceStub object. - * Leaves on failure.. - * @since Series 60 3.0 - * @return CMMFHwDeviceStub* A pointer to newly created object. - */ - static CMMFHwDeviceStub* NewL(); - - /** - * Destructor. - */ - ~CMMFHwDeviceStub(); - - public: - // Methods from CMMFHwDevice - - /** - * Starts playback/record based on aFuncCmd. - * @since Series 60 3.0 - * @param TDeviceFunc aFuncCmd A function indicating decode or encode - * @param TDeviceFlow aFlowCmd Flow command, not used here - * @return TInt Error code. KErrNone if success. - */ - TInt Start(TDeviceFunc aFuncCmd, TDeviceFlow aFlowCmd); - - /** - * Stops current operation. - * @since Series 60 3.0 - * @return TInt Error code. KErrNone if success. - */ - TInt Stop(); - - /** - * Pauses current operation. - * @since Series 60 3.0 - * @return TInt Error code. KErrNone if success. - */ - TInt Pause(); - - /** - * Initializes CMMFHwDevice. - * @since Series 60 3.0 - * @param THwDeviceInitParams& aDevInfo A reference to device init - * params. - * @return TInt Error code. KErrNone if success. - */ - TInt Init(THwDeviceInitParams& aDevInfo); - - /** - * Returns a pointer to CustomInterface. - * @since Series 60 3.0 - * @param TUid aInterfaceId A uid that uniquely identifies the custom - * interface definition. - * @return TAny* NULL if no custom interface found, else object - * implementing custom interface - */ - TAny* CustomInterface(TUid aInterfaceId); - - /** - * Called by client when data is available during playback. - * @since Series 60 3.0 - * @param CMMFBuffer& aFillBufferPtr A pointer to buffer that was sent - * to client during callback FillThisHwBuffer() - * @return TInt Error code. KErrNone if success. - */ - TInt ThisHwBufferFilled(CMMFBuffer& aFillBufferPtr); - - /** - * Called by client when data is available during recording. - * @since Series 60 3.0 - * @param CMMFBuffer& aFillBufferPtr A pointer to buffer that was sent - * to client during callback EmptyThisHwBuffer() - * @return TInt Error code. KErrNone if success. - */ - TInt ThisHwBufferEmptied(CMMFBuffer& aEmptyBufferPtr); - - /** - * Configures CMMFHwDevice. - * @since Series 60 3.0 - * @param TTaskConfig& aConfig A reference to configuration objec. - * @return TInt Error code. KErrNone if success. - */ - TInt SetConfig(TTaskConfig& aConfig); - - /** - * Stops and deletes codec. - * @since Series 60 3.0 - * @return TInt Error code. KErrNone if success. - */ - TInt StopAndDeleteCodec(); - - /** - * Deletes codec. - * @since Series 60 3.0 - * @return TInt Error code. KErrNone if success. - */ - TInt DeleteCodec(); - - public:// From CActive - - /** - * Called by CActive object framework when local timer times out. - * @since Series 60 3.0 - * @return void - */ - virtual void RunL(); - - /** - * Called by CActive object framework when client cancels active object. - * @since Series 60 3.0 - * @return void - */ - virtual void DoCancel(); - - /** - * Called by CActive object framework when RunL leaves. - * @since Series 60 3.0 - * @param TInt aError Error code. - * @return KErrNone - */ - virtual TInt Error(TInt aError); - - private: - - /** - * C++ default constructor. - */ - CMMFHwDeviceStub(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - /** - * Initialize play buffer. - * Leaves on failure. - * @since Series 60 3.0 - * @return void - */ - void InitializePlayBufferL(); - - /** - * Initialize record buffer - * Leaves on failure. - * @since Series 60 3.0 - * @return void - */ - void InitializeRecdBufferL(); - - /** - * Read data from the input file to the buffer - * @since Series 60 3.0 - * @return void - */ - void SetActiveRecdBufferL(); - - void SetActivePlayBufferL(); - - private: - // Pointer reference to HwDevice observer. - MMMFHwDeviceObserver* iObserver; - - // States this object can be at any time. - enum THwDeviceStubState - { - EHWDeviceIdle, - EHWDevicePlay, - EHWDeviceRecord - }; - // HwDevice state - THwDeviceStubState iHwDeviceState; - // Local timer object - RTimer iTimer; - // Buffers used for playback - CMMFDataBuffer *iPlayBuffer1; - CMMFDataBuffer *iPlayBuffer2; - CMMFDataBuffer *iCurPlayBuffer; - // Buffers used for recording - CMMFDataBuffer *iRecdBuffer1; - CMMFDataBuffer *iRecdBuffer2; - CMMFDataBuffer *iCurRecdBuffer; - // ETrue if last buffer is received, else EFalse - TBool iLastBufferReceived; - // Count - TInt iCount; - // Index to the position within input file - TInt iPosition; -}; - -#endif // MMFHWDEVSTUB_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/ToneGenerator.cpp --- a/audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/ToneGenerator.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,993 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - This file contains an implementation of the ToneGenerator interface -* that converts all tone generation requests in to sampled audio -* data to be played through the normal local sampled audio interface -* -*/ - - - -// INCLUDE FILES -#include "ToneGenerator.h" -#include -#include - -// CONSTANTS - -/****************************************************************************** -* Tone Generators -* -* The following classes are used to generate simple frequency/duration tones, -* DTMF, and SymbianOS tone sequences in a WINS environment. The below code -* should only be considered for WINS. -******************************************************************************/ - -// this defines the maximum possible amplitude allowed for TSineGen::SetFrequency() -const TInt KMaxAmplitude = 0x8000; - -// default number of samples for trailing silence following a Tone -const TInt KDefaultTrailingSilenceSamples = 20; - -const TInt KRecalculateToneLengths = KMinTInt; - -// -// Sequence constants -// - -#ifdef _DEBUG -const TInt16 KFixedSequenceSignatureOne='S'+('Q'<<8); -const TInt16 KFixedSequenceSignatureTwo='N'+('C'<<8); -#endif // _DEBUG - -const TInt KFixedSequenceFunctionReturn=-1; -const TInt KFixedSequenceFunctionStartLoop=-2; -const TInt KFixedSequenceFunctionEndLoop=-3; - -// -// Sine tone generator -// - -const TInt16 TSineGen::SineTable[KMaxSineTable] = - { - 0, 804, 1607, 2410, 3211, 4011, 4807, 5601, - 6392, 7179, 7961, 8739, 9511, 10278, 11038, 11792, - 12539, 13278, 14009, 14732, 15446, 16150, 16845, 17530, - 18204, 18867, 19519, 20159, 20787, 21402, 22004, 22594, - 23169, 23731, 24278, 24811, 25329, 25831, 26318, 26789, - 27244, 27683, 28105, 28510, 28897, 29268, 29621, 29955, - 30272, 30571, 30851, 31113, 31356, 31580, 31785, 31970, - 32137, 32284, 32412, 32520, 32609, 32678, 32727, 32757, - 32767, 32757, 32727, 32678, 32609, 32520, 32412, 32284, - 32137, 31970, 31785, 31580, 31356, 31113, 30851, 30571, - 30272, 29955, 29621, 29268, 28897, 28510, 28105, 27683, - 27244, 26789, 26318, 25831, 25329, 24811, 24278, 23731, - 23169, 22594, 22004, 21402, 20787, 20159, 19519, 18867, - 18204, 17530, 16845, 16150, 15446, 14732, 14009, 13278, - 12539, 11792, 11038, 10278, 9511, 8739, 7961, 7179, - 6392, 5601, 4807, 4011, 3211, 2410, 1607, 804, - 0, -804, -1607, -2410, -3211, -4011, -4807, -5601, - -6392, -7179, -7961, -8739, -9511,-10278,-11038,-11792, - -12539,-13278,-14009,-14732,-15446,-16150,-16845,-17530, - -18204,-18867,-19519,-20159,-20787,-21402,-22004,-22594, - -23169,-23731,-24278,-24811,-25329,-25831,-26318,-26789, - -27244,-27683,-28105,-28510,-28897,-29268,-29621,-29955, - -30272,-30571,-30851,-31113,-31356,-31580,-31785,-31970, - -32137,-32284,-32412,-32520,-32609,-32678,-32727,-32757, - -32767,-32757,-32727,-32678,-32609,-32520,-32412,-32284, - -32137,-31970,-31785,-31580,-31356,-31113,-30851,-30571, - -30272,-29955,-29621,-29268,-28897,-28510,-28105,-27683, - -27244,-26789,-26318,-25831,-25329,-24811,-24278,-23731, - -23169,-22594,-22004,-21402,-20787,-20159,-19519,-18867, - -18204,-17530,-16845,-16150,-15446,-14732,-14009,-13278, - -12539,-11792,-11038,-10278, -9511, -8739, -7961, -7179, - -6392, -5601, -4807, -4011, -3211, -2410, -1607, -804, - }; - -const TInt16 TSineGen::IncTable[KMaxSineTable] = - { - 804, 803, 803, 801, 800, 796, 794, - 791, 787, 782, 778, 772, 767, 760, 754, - 747, 739, 731, 723, 714, 704, 695, 685, - 674, 663, 652, 640, 628, 615, 602, 590, - 575, 562, 547, 533, 518, 502, 487, 471, - 455, 439, 422, 405, 387, 371, 353, 334, - 317, 299, 280, 262, 243, 224, 205, 185, - 167, 147, 128, 108, 89, 69, 49, 30, - 10, -10, -30, -49, -69, -89, -108, -128, - -147, -167, -185, -205, -224, -243, -262, -280, - -299, -317, -334, -353, -371, -387, -405, -422, - -439, -455, -471, -487, -502, -518, -533, -547, - -562, -575, -590, -602, -615, -628, -640, -652, - -663, -674, -685, -695, -704, -714, -723, -731, - -739, -747, -754, -760, -767, -772, -778, -782, - -787, -791, -794, -796, -800, -801, -803, -803, - -804, -804, -803, -803, -801, -800, -796, -794, - -791, -787, -782, -778, -772, -767, -760, -754, - -747, -739, -731, -723, -714, -704, -695, -685, - -674, -663, -652, -640, -628, -615, -602, -590, - -575, -562, -547, -533, -518, -502, -487, -471, - -455, -439, -422, -405, -387, -371, -353, -334, - -317, -299, -280, -262, -243, -224, -205, -185, - -167, -147, -128, -108, -89, -69, -49, -30, - -10, 10, 30, 49, 69, 89, 108, 128, - 147, 167, 185, 205, 224, 243, 262, 280, - 299, 317, 334, 353, 371, 387, 405, 422, - 439, 455, 471, 487, 502, 518, 533, 547, - 562, 575, 590, 602, 615, 628, 640, 652, - 663, 674, 685, 695, 704, 714, 723, 731, - 739, 747, 754, 760, 767, 772, 778, 782, - 787, 791, 794, 796, 800, 801, 803, 803, - 804 - }; - -const TUint8 KDtmfVolumeTable[4][4]= -// -// Relative strengths to assign to different DTMF tones -// -// This is only important if DTMFs are being played through a speaker -// and need to be machine-recognisable. This table compensates for frequency -// drop-off in the speaker and can boost the relative volume of some -// frequencies so they are still within tolerance. -// -// The values normally need to be determined using a frequency analyser on -// the hardware -// -// Each column == same low frequency (697, 770, 852, 941 Hz) -// Each row == same high frequency (1209, 1336, 1477, 1633 Hz) -// -// The value are interpreted as ratios: -// 0 == 100% low -// 7f == 50% low, 50% high -// ff == 100% high -// - { - {38,27,29,37}, - {46,36,36,46}, - {62,47,49,58}, - {70,56,60,68} - }; - -const TUint8 KDtmfTone697=0x0; -const TUint8 KDtmfTone770=0x1; -const TUint8 KDtmfTone852=0x2; -const TUint8 KDtmfTone941=0x3; - -const TUint8 KDtmfTone1209=0x00; -const TUint8 KDtmfTone1336=0x10; -const TUint8 KDtmfTone1477=0x20; -const TUint8 KDtmfTone1633=0x30; - -const TUint8 KDtmfToneTable[16]= - { - KDtmfTone941|KDtmfTone1336,//0 - KDtmfTone697|KDtmfTone1209,//1 - KDtmfTone697|KDtmfTone1336,//2 - KDtmfTone697|KDtmfTone1477,//3 - KDtmfTone770|KDtmfTone1209,//4 - KDtmfTone770|KDtmfTone1336,//5 - KDtmfTone770|KDtmfTone1477,//6 - KDtmfTone852|KDtmfTone1209,//7 - KDtmfTone852|KDtmfTone1336,//8 - KDtmfTone852|KDtmfTone1477,//9 - - KDtmfTone697|KDtmfTone1633,//A - KDtmfTone770|KDtmfTone1633,//B - KDtmfTone852|KDtmfTone1633,//C - KDtmfTone941|KDtmfTone1633,//D - KDtmfTone941|KDtmfTone1209,//E or * - KDtmfTone941|KDtmfTone1477,//F or # - }; - - -// ----------------------------------------------------------------------------- -// LOCAL_C void RampVolume -// Simple function to ramp down the volume of some samples -// Typically used to prevent "clicking" artifacts at the beginning/end of tones -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -LOCAL_C void RampVolume( - TInt16* aData, - TInt aCount, - TInt aStartVol, - TInt aEndVol) - { - TInt step = (aEndVol - aStartVol)/aCount; - while (aCount--) - { - TInt data = TInt(*aData) * aStartVol; - *aData++ = TInt16(data>>15); - aStartVol += step; - } - } - -// ----------------------------------------------------------------------------- -// GenerateSineTableL -// Code to generate sine table files used by tone generator -// Optionally called from InitL() -// (other items were commented in a header). -// ----------------------------------------------------------------------------- - -// #define GENERATE_SINE_TABLES 1 -#ifdef GENERATE_SINE_TABLES -LOCAL_C GenerateSineTableL() - { - _LIT(KSineFile,"sine.txt"); - _LIT(KSineIncFile,"sineinc.txt"); - - RFile file; - file.Replace(MdaManager::Fs(),KSineFile,EFileWrite); - CleanupClosePushL(file); - - RFile file2; - file2.Replace(MdaManager::Fs(),KSineIncFile,EFileWrite); - CleanupClosePushL(file2); - - const TReal pi=3.141592653589; - const TReal twopi=pi*2; - const TReal samples = 256.0; - const TReal step = twopi/samples; - - TBuf8<128> sinebuffer; - TBuf8<128> incbuffer; - TReal res; - TInt first=0; - TInt last=KMaxTInt; - TInt current; - _LIT8(KFormat,"%6d,"); - _LIT8(KNewLine,"\n"); - - for(TReal angle=0.0;angle<=(twopi-step);) // Copes with rounding errors - { - sinebuffer.Zero(); - incbuffer.Zero(); - for (int i=0;i<8;i++) - { - User::LeaveIfError(Math::Sin(res,angle)); - current = TInt(KMaxTInt16*res); - sinebuffer.AppendFormat(KFormat,current); - if (last != KMaxTInt) - incbuffer.AppendFormat(KFormat,current-last); - else - first = current; - last = current; - angle += step; - } - sinebuffer.Append(KNewLine); - incbuffer.Append(KNewLine); - file.Write(sinebuffer); - file2.Write(incbuffer); - } - - // Write fine difference to incbuffer - differnece between first and last - incbuffer.Zero(); - incbuffer.AppendFormat(KFormat,first-last); - incbuffer.Append(KNewLine); - file2.Write(incbuffer); - - CleanupStack::PopAndDestroy(file2); - CleanupStack::PopAndDestroy(file); - } -#endif - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// TSineGen::SetFrequency -// Given the frequency set iStep. -// Reset iPosition to the equivalent of 0 degrees. -// In the special case of aFrequency==4KHz set iPosition to 90 degrees. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void TSineGen::SetFrequency( - TInt aFrequency, - TInt aAmplitude) - { - - if (aAmplitude>(1<<15)) - iAmplitude=(1<<15); - else if (aAmplitude<-(1<<15)) - iAmplitude=-(1<<15); - else - iAmplitude=aAmplitude; -// -// There are 256 entries in the sine table to traverse 360 degrees. -// The codec requires samples at a rate of 8000 per second. -// Thus for a 1Hz tone the step will be 256/8000 or 4/125. -// Now we need need the integer part of the result to end up in -// the MSB so we need to multiply by 2^24. This gives the formula -// step = (f*4*2^24)/125 or (f*2^26)/125. -// Our highest frequency is 4KHz so that the term (f*2^26) exceeds -// a 32 bit result by 4000/2^6 (2^6 is the number of significant bits -// left after a multiply by 2^26). i.e. 6 bits. We overcome this by -// having 6 bits less in the fraction, so the new formula becomes -// ((f*2^20)/125)*2^6. This still gives us 20 significant bits in the -// fraction. -// - - iStep=(((TUint)aFrequency<<20)/125)<<6; - iPosition=(aFrequency==4000 ? 0x40000000 : 0); - } - -// ----------------------------------------------------------------------------- -// TSineGen::NextSample -// Generate the next sample using linear interpolation -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt TSineGen::NextSample() - { - TUint pos=iPosition>>24; - TInt amp=((IncTable[pos]*((iPosition&0x00ffffff)>>20))); - amp>>=4; - amp+=SineTable[pos]; - amp=(amp*iAmplitude)>>15; - iPosition+=iStep; - return(amp); - } - -// ----------------------------------------------------------------------------- -// TSineWave::Generate -// Called when more samples need to be generated. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void TSineWave::Generate( - TInt16* aDest, - TInt aCount) - { - while (aCount--) - { - *aDest++=STATIC_CAST(TInt16,iGen1.NextSample()+iGen2.NextSample()); - } - } - -// ----------------------------------------------------------------------------- -// TSineWave::SetFrequency -// Set to generate a single frequency -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void TSineWave::SetFrequency( - TInt aFrequency, - TInt aAmplitude) - { - SetFrequency(aFrequency,aAmplitude,0,0); - } - -// ----------------------------------------------------------------------------- -// TSineWave::SetFrequency -// Set to generate two frequencies -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void TSineWave::SetFrequency( - TInt aFrequency1, - TInt aAmplitude1, - TInt aFrequency2, - TInt aAmplitude2) - { - iGen1.SetFrequency(aFrequency1,aAmplitude1); - iGen2.SetFrequency(aFrequency2,aAmplitude2); - } - - -// -// TMdaToneGenerator -// - -// ----------------------------------------------------------------------------- -// TMdaToneGenerator::Configure -// Set up this tone generator to generate data at the desired sample rate -// and number of channels (typically mono/stereo) -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void TMdaToneGenerator::Configure( - TInt aRate, - TInt aChannels, - TInt aRepeats, - TInt aSilence, - TInt aRampUp) - { - iRate = aRate; - iChannels = aChannels; - iSamplesLeft = 0; - iRampUp = ETrue; // Default ramping to on as it is normally useful - iRampDown = ETrue; - iRepeats = aRepeats; - iSilenceBetweenRepeats = aSilence; - iRampUpCount = aRampUp; - iRampUpLeft = aRampUp; - iAfterRepeatSilence = EFalse; - } - -// ----------------------------------------------------------------------------- -// TMdaToneGenerator::FillBuffer -// Fill the supplied buffer with tone data -// Sets the buffer length to zero if there is no more data to play -// The buffer must have a max length of at least one sample * channels -// e.g. 2 bytes mono, 4 bytes stereo -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt TMdaToneGenerator::FillBuffer( - TDes8& aBuffer) - { - ASSERT(aBuffer.MaxLength()>= (iChannels<<1)); - aBuffer.SetMax(); - - TBool silence; - TInt samples = 0; // - TInt used = 0; // Data used - TInt avail = aBuffer.Length(); // Data filled - TInt count = 0; // Data to be converted - TBool rampUp = EFalse; - - TMdaPtr8 fill; - fill.Set(aBuffer); // Pointer to data left to be filled - - // - // The rest of this function will loop around continually until the buffer - // is filled or there is no more data to play - // - -Restart: - silence = EFalse; // Reset - if (iSamplesLeft == 0) - { - if (iTrailingSilence == 0) - { - TInt error = GetNextTone(); - if (error) - return error; - - rampUp = ETrue; - if ((iSamplesLeft==0)&&(iTrailingSilence==0)) - { - if ((iSilenceBetweenRepeats)&&(!iAfterRepeatSilence)) - { - iTrailingSilence = iSilenceBetweenRepeats; - iAfterRepeatSilence = ETrue; - goto Restart; - } - else - { - if ((iRepeats>0)||(iRepeats==KMdaRepeatForever)) - { - iAfterRepeatSilence = EFalse; - if (iRepeats>0) - iRepeats--; - - Reset(); - goto Restart; - } - } - // No more to play - goto Finished; - } - goto Restart; - } - else - { - silence = ETrue; - samples = iTrailingSilence; - } - } - else - samples = iSamplesLeft; - - count = Min(samples,avail>>1); - fill.SetLength(count<<1); - - if (!silence) - { // Generate wave - iSineWave.Generate(REINTERPRET_CAST(TInt16*,&fill[0]),count); - if (iRampUp) - { // Ramp up volume at beginning of tone - const TInt KRampUpSamples = 50; - if (rampUp) - { // Fade in first few samples - TInt fadeInLength = Min(Min(KRampUpSamples,iSamplesLeft),(fill.Length()>>1)); - RampVolume(CONST_CAST(TInt16*,REINTERPRET_CAST(const TInt16*,(&fill[0]))), - fadeInLength,0,1<<15); - } - } - if (iRampDown) - { // Ramp down volume at end of tone - const TInt KRampDownSamples = 50; - if ((iSamplesLeft-count) < KRampDownSamples) - { // Fade out last few samples - TInt fadeOutLength = Min(Min(KRampDownSamples,iSamplesLeft),(fill.Length()>>1)); - RampVolume(CONST_CAST(TInt16*, - REINTERPRET_CAST(const TInt16*, - (&(fill.Right(fadeOutLength<<1))[0]))), - fadeOutLength,1<<15,0); - } - } - iSamplesLeft -= count; - } - else - { // Generate silence - fill.FillZ(count<<1); - iTrailingSilence -= count; - } - - used += count<<1; - avail -= count<<1; - fill.Shift(count<<1); - - if (avail>(iChannels<<1)) - goto Restart; - -Finished: - - aBuffer.SetLength(used); - - // Do any ramp up that is required - if (iRampUpLeft>0) - { - TInt words = iRampUpLeft * iChannels; - words = Min(words,used>>1); - if (words>0) // In case buffer has zero length... - { - TInt left = iRampUpLeft * iChannels; - TInt rampup = iRampUpCount * iChannels; - iRampUpLeft -= words/iChannels; - TInt16* sample = REINTERPRET_CAST(TInt16*,&aBuffer[0]); - while (words--) - { - *sample++ = STATIC_CAST(TInt16,(TInt32(*sample)*(rampup-(left--)))/rampup); - } - } - } - - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// TMdaToneGenerator::DurationToSamples -// Convert the given duration to a sample count using the current settings -// -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt TMdaToneGenerator::DurationToSamples( - const TTimeIntervalMicroSeconds& aDuration) - { - const TInt64 KTInt64OneMilion = 1000000; - - // Calculate duration as samples - TInt64 microSeconds(aDuration.Int64()); // MSVC doesn't like "aDuration.Int64()" in line below - TInt64 dur = ((TInt64(iRate) * TInt64(iChannels) * microSeconds) / KTInt64OneMilion); - if (I64HIGH(dur)>0) - return KMaxTInt; - else - return I64LOW(dur); - } - -// -// TMdaSimpleToneGenerator -// - -// ----------------------------------------------------------------------------- -// TMdaSimpleToneGenerator::Reset -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void TMdaSimpleToneGenerator::Reset() - { - iPlayed = EFalse; - } - -// ----------------------------------------------------------------------------- -// TMdaSimpleToneGenerator::SetFrequencyAndDuration -// Store the frequency and duration of the specified sine tone -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void TMdaSimpleToneGenerator::SetFrequencyAndDuration( - TInt aFrequency, - const TTimeIntervalMicroSeconds& aDuration) - { - iFrequency = aFrequency; - iDuration = aDuration; - iPlayed = EFalse; - } - -// ----------------------------------------------------------------------------- -// TMdaSimpleToneGenerator::GetNextTone -// Simple implementation - just sets the supplied frequency and duration -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt TMdaSimpleToneGenerator::GetNextTone() - { - // This class only plays one tone for the specified duration - if (!iPlayed) - { - iSamplesLeft = I64LOW((iDuration.Int64() * TInt64(iRate))/1000000); - iSineWave.SetFrequency(iFrequency,1<<14); - iPlayed = ETrue; - iTrailingSilence = 20; // Just to stop clicking - } - return KErrNone; - } - -// -// TMdaDualToneGenerator -// - -// ----------------------------------------------------------------------------- -// TMdaDualToneGenerator::Reset -// ?implementation_description -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void TMdaDualToneGenerator::Reset() - { - iPlayed = EFalse; - } - -// ----------------------------------------------------------------------------- -// TMdaDualToneGenerator::SetFrequencyAndDuration -// Store the frequencies and duration of the specified dual tone -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void TMdaDualToneGenerator::SetFrequencyAndDuration( - TInt aFrequencyOne, - TInt aFrequencyTwo, - const TTimeIntervalMicroSeconds& aDuration) - { - - iFrequencyOne = aFrequencyOne; - iFrequencyTwo = aFrequencyTwo; - iDuration = aDuration; - iPlayed = EFalse; - } - -// ----------------------------------------------------------------------------- -// TMdaDualToneGenerator::GetNextTone -// This is called by TMdaToneGenerator::FillBuffer() -// to calculate the number of samples (iSamplesLeft) that will be needed -// for the tone to be played and to initialize the sine wave generator. -// If the tone has already been played, then leaves iSamplesLeft -// unmodified (should be zero) to indicate that it has finished. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt TMdaDualToneGenerator::GetNextTone() - { - // This class only plays one tone for the specified duration - if (!iPlayed) - { - iSamplesLeft = I64LOW((iDuration.Int64() * TInt64(iRate))/KOneMillionMicroSeconds); - iSineWave.SetFrequency(iFrequencyOne, KMaxAmplitude/2, iFrequencyTwo, KMaxAmplitude/2); - iPlayed = ETrue; - iTrailingSilence = KDefaultTrailingSilenceSamples; // Just to stop clicking - } - return KErrNone; - } - -// -// TMdaDTMFGenerator -// - -// ----------------------------------------------------------------------------- -// TMdaDTMFGenerator::Reset -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void TMdaDTMFGenerator::Reset() - { - iChar = 0; - } - -// ----------------------------------------------------------------------------- -// TMdaDTMFGenerator::SetToneDurations -// Setup the DTMF tone durations -// aOn can be == -1 indicating should play first tone indefinately -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void TMdaDTMFGenerator::SetToneDurations( - const TTimeIntervalMicroSeconds32 aOn, - const TTimeIntervalMicroSeconds32 aOff, - const TTimeIntervalMicroSeconds32 aPause) - { - ASSERT(aOn.Int() >=-1); - ASSERT(aOff.Int()>=0); - ASSERT(aPause.Int()>=0); - - iOn = aOn; - iOff = aOff; - iPause = aPause; - - iOnSamples = KRecalculateToneLengths; // Must recalculate these later - } - -// ----------------------------------------------------------------------------- -// TMdaDTMFGenerator::SetString -// Store the DTMF string to be played -// No need to validate it as it will already have been checked -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void TMdaDTMFGenerator::SetString( - const TDesC& aDTMFString) - { - iChar = 0; - iDTMFString = &aDTMFString; - } - -// ----------------------------------------------------------------------------- -// TMdaDTMFGenerator::GetNextTone -// Setup frequency/duration/silence settings for next DTMF tone -// Supported characters are 0-9 A-F * # , and any kind of white space -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt TMdaDTMFGenerator::GetNextTone() - { - TBool onlyPlayFirstTone = EFalse; - - if (iOnSamples == KRecalculateToneLengths) - { - // Must recalculate tone durations as samples - - // Handle special case where tone on duration negative - // - meaning play first character indefinately - if (iOn.Int()>=0) - iOnSamples = DurationToSamples(TInt64(iOn.Int())); - else - { - onlyPlayFirstTone = ETrue; - iOnSamples = -1; - } - - iOffSamples = DurationToSamples(TInt64(iOff.Int())); - iPauseSamples = DurationToSamples(TInt64(iPause.Int())); - } - - ASSERT(iDTMFString); - - if (iChar==iDTMFString->Length()) - return KErrNone; // Finished. Nothing to do - - TInt highFrequency = 0; - TInt highVolume = 0; - TInt lowFrequency = 0; - TInt lowVolume =0; - -Retry: - TChar c((*iDTMFString)[iChar++]); - if ((TUint)c=='#' || (TUint)c=='*' || c.IsHexDigit()) - { - TInt tableIndex; - switch ((TUint)c) - { - case '*': - tableIndex=14; - break; - case '#': - tableIndex=15; - break; - default: - if (c.IsDigit()) - tableIndex=(TUint)c-'0'; - else //letter - { - c.UpperCase(); - tableIndex=(TUint)c-'A'+10; - } - } - TInt high=KDtmfToneTable[tableIndex]&0xf0; - TInt low=KDtmfToneTable[tableIndex]&0x0f; - switch(high) - { - case KDtmfTone1209: - highFrequency=1209; - break; - case KDtmfTone1336: - highFrequency=1336; - break; - case KDtmfTone1477: - highFrequency=1477; - break; - default://KDtmfTone1633: - highFrequency=1633; - break; - } - switch(low) - { - case KDtmfTone697: - lowFrequency=697; - break; - case KDtmfTone770: - lowFrequency=770; - break; - case KDtmfTone852: - lowFrequency=852; - break; - default://KDtmfTone941: - lowFrequency=941; - break; - } - high>>=4; - const TUint8* dtmfVolumes=&KDtmfVolumeTable[0][0]; - TInt volume=dtmfVolumes[((low)<<2)+(high)]<<7; - highVolume = volume; - lowVolume = (1<<15)-volume; - - iTrailingSilence = iOffSamples; - iSamplesLeft = iOnSamples; - } - else if ((TUint)c==',') - { - iTrailingSilence = iPauseSamples; - iSamplesLeft = 0; - } - else if (c.IsSpace()) - { - if (iChar < iDTMFString->Length()) - goto Retry; - } - else - return KErrCorrupt; - - if (iOnSamples < 0) // Play only first character for ever - { - iTrailingSilence = 0; - iSamplesLeft = iRate * iChannels; // One second of samples - iChar = 0; // Reset so this character is played again next time - iRampDown = EFalse; - if (!onlyPlayFirstTone) - { - iRampUp = EFalse; - // This is not the first time around so we should not - // reset the tone generator - it will already have the - // correct settings and setting them again would cause - // an audible discontinuity - return KErrNone; - } - } - - iSineWave.SetFrequency(highFrequency,highVolume,lowFrequency,lowVolume); - return KErrNone; - } - -// -// TMdaSequenceGenerator -// - - -// ----------------------------------------------------------------------------- -// void TMdaSequenceGenerator::Reset() -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void TMdaSequenceGenerator::Reset() - { - iInstructionPtr = REINTERPRET_CAST(const TInt16*,&((*iSequenceData)[0])); - iInstructionPtr += 2; // Skip signature - iStackIndex = 0; - } - -// ----------------------------------------------------------------------------- -// TMdaSequenceGenerator::SetSequenceData -// Store the sequence data to be played -// No need to validate it as it will already have been checked -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void TMdaSequenceGenerator::SetSequenceData( - const TDesC8& aSequenceData) - { - iSequenceData = &aSequenceData; - iInstructionPtr = REINTERPRET_CAST(const TInt16*,&aSequenceData[0]); - iLastInstruction = iInstructionPtr + (iSequenceData->Length()>>1) - 1; - - // These are asserts because this should not be called if signature not present - ASSERT(*iInstructionPtr == KFixedSequenceSignatureOne); - ASSERT(*(iInstructionPtr+1) == KFixedSequenceSignatureTwo); - - iInstructionPtr += 2; // Skip signature - - iStackIndex = 0; - } - -// ----------------------------------------------------------------------------- -// TMdaSequenceGenerator::GetNextTone -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt TMdaSequenceGenerator::GetNextTone() - { - ASSERT(iInstructionPtr); // Sanity check - - TInt ret = KRequestPending; - while (ret == KRequestPending) - { - if (iInstructionPtr > iLastInstruction) - ret = KErrCorrupt; - else if (*iInstructionPtr<=0) - { - switch (*iInstructionPtr) - { - case KFixedSequenceFunctionReturn: // End of sequence - ret = KErrNone; - break; - - case KFixedSequenceFunctionStartLoop: - if (iStackIndex>2) // Validate - can only nest twice - ret = KErrCorrupt; - else if ((iInstructionPtr+2) > iLastInstruction) - ret = KErrCorrupt; // Don't run off end of sequence - else - { - iStack[iStackIndex++]=(TInt)(iInstructionPtr+2); - iStack[iStackIndex++]=(TInt)*(iInstructionPtr+1); - iInstructionPtr+=2; - } - break; - - case KFixedSequenceFunctionEndLoop: - if (iStackIndex==0) // Validate - must already be nested - ret = KErrCorrupt; - else - { - if ((--iStack[iStackIndex-1])!=0) - iInstructionPtr=(TInt16*)iStack[iStackIndex-2]; - else - { - iStackIndex-=2; - iInstructionPtr++; - } - } - break; - - default: // Bad sequence - ret = KErrCorrupt; - } - } - else - { - if ((iInstructionPtr+5) > iLastInstruction) - ret = KErrCorrupt; // Don't run off end of sequence - else - { - iSamplesLeft = *iInstructionPtr++; - TInt freqOne = *iInstructionPtr++; - TInt volOne = *iInstructionPtr++; - TInt freqTwo = *iInstructionPtr++; - TInt volTwo = *iInstructionPtr++; - - if ((volOne> 1<<15)||(volTwo > 1<<15)) - ret = KErrCorrupt; - else - { - iSineWave.SetFrequency(freqOne,volOne,freqTwo,volTwo); - ret = KErrNone; - } - } - } - } - return ret; - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/ToneGenerator.h --- a/audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/ToneGenerator.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,438 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* -*/ - - - -#ifndef TONEGENERATOR_H -#define TONEGENERATOR_H - -// INCLUDES -#include - -// CONSTANTS -const TInt KMaxSineTable = 256; -const TUint KToneBufferSize = 8192; -// one second in microseconds -const TInt KOneMillionMicroSeconds = 1000000; -const TInt KMaxSequenceStack = 6; -const TInt KBufferLength = 0x1000; - -// CLASS DECLARATION - -/** -* Utility class used by DevSound Adaptation to generage PCM data for playing -* back tone on WINSCW Reference Implementation.. -* -* @lib MmfDevSoundAdaptation.lib -* @since Series 60 3.0 -*/ -class TSineGen - { - public: - - /** - * Sets frequency and amplitude. - * @since Series 60 3.0 - * @param TInt aFrequency Frequency to generate PCM data. - * @param TInt aAmplitude Amplitude to generate PCM data. - * @return void - */ - void SetFrequency(TInt aFrequency,TInt aAmplitude); - - /** - * Returns the next sample. - * @since Series 60 3.0 - * @return TInt Sample. - */ - TInt NextSample(); - - private: - - TUint iPosition; - TUint iStep; - TInt iAmplitude; - static const TInt16 SineTable[KMaxSineTable]; - static const TInt16 IncTable[KMaxSineTable]; - }; - -/** -* Utility class used by DevSound Adaptation to generage PCM data for playing -* back tone on WINSCW Reference Implementation.. -* -* @lib MmfDevSoundAdaptation.lib -* @since Series 60 3.0 -*/ -class TSineWave - { - public: - - /** - * Generate Sine wave representing tone. - * @since Series 60 3.0 - * @param TInt16* aDest Destination - * @param TInt aCount Count - * @return void - */ - void Generate(TInt16* aDest,TInt aCount); - - /** - * Set frequency amplitude. - * @since Series 60 3.0 - * @param TInt aFrequency Frequency to generate PCM data. - * @param TInt aAmplitude Amplitude to generate PCM data. - * @return void - */ - void SetFrequency(TInt aFrequency,TInt aAmplitude); - - /** - * Set frequency amplitude. - * @since Series 60 3.0 - * @param TInt aFrequency1 Frequency to generate PCM data. - * @param TInt aAmplitude1 Amplitude to generate PCM data. - * @param TInt aFrequency2 Frequency to generate PCM data. - * @param TInt aAmplitude2 Amplitude to generate PCM data. - * @return void - */ - void SetFrequency(TInt aFrequency1,TInt aAmplitude1,TInt aFrequency2,TInt aAmplitude2); - - private: - TSineGen iGen1; - TSineGen iGen2; - }; - - -/** -* Tone synthesis interface -* Defines the abstract interface for tone synthesis -* Capable of filling buffers with audio data -* -* @lib MmfDevSoundAdaptation.lib -* @since Series 60 3.0 -*/ -class MMdaToneSynthesis - { - public: - - /** - * Allocate necessary resources for this kind of synthesis - * @since Series 60 3.0 - * @param TInt aRate Sampling rate. - * @param TInt aChannels Mono/Stereo. - * @param TInt aRepeats Tone repeats. - * @param TInt aSilence Silence duration between repetation. - * @param TInt aRampUp Volume ramping duration. - * @return void - */ - virtual void Configure(TInt aRate, - TInt aChannels, - TInt aRepeats, - TInt aSilence, - TInt aRampUp)=0; - - /** - * Reset generator - * @since Series 60 3.0 - * @return void - */ - virtual void Reset()=0; - - /** - * Fill supplied buffer with next block of 16bit PCM audio data - * @since Series 60 3.0 - * @param TDes8& aBuffer A descriptor reference to buffer where data need - * to be filled. - * @return KErrNone if successfull, else corresponding error code - */ - virtual TInt FillBuffer(TDes8& aBuffer)=0; - }; - - -/** -* Tone generator base class -* -* @lib MmfDevSoundAdaptation.lib -* @since Series 60 3.0 -*/ -class TMdaToneGenerator : public MMdaToneSynthesis - { - public: - - /** - * Configures Tone generator. - * @since Series 60 3.0 - * @param TInt aRate Sampling rate. - * @param TInt aChannels Mono/Stereo. - * @param TInt aRepeats Tone repeats. - * @param TInt aSilence Silence duration between repetation. - * @param TInt aRampUp Volume ramping duration. - * @return void - */ - virtual void Configure(TInt aRate, - TInt aChannels, - TInt aRepeats, - TInt aSilence, - TInt aRampUp); - - /** - * Fill supplied buffer with next block of 16bit PCM audio data - * @since Series 60 3.0 - * @param TDes8& aBuffer A descriptor reference to buffer where data need - * to be filled. - * @return KErrNone if successfull, else corresponding error code - */ - virtual TInt FillBuffer(TDes8& aBuffer); - - protected: - - /** - * Gets the next tone buffer - * @since Series 60 3.0 - * @return KErrNone if successfull, else corresponding error code - */ - virtual TInt GetNextTone()=0; - - /** - * Converts duration to PCM samples. - * @since Series 60 3.0 - * @param const TTimeIntervalMicroSeconds& aDuration Duration. - * @return KErrNone if successfull, else corresponding error code - */ - TInt DurationToSamples(const TTimeIntervalMicroSeconds& aDuration); - - protected: - TSineWave iSineWave; - TInt iRate; - TInt iChannels; - TInt iSamplesLeft; - TInt iTrailingSilence; - TBool iRampUp; - TBool iRampDown; - TInt iRepeats; - TInt iSilenceBetweenRepeats; - TBool iAfterRepeatSilence; - TInt iRampUpCount; - TInt iRampUpLeft; - }; - - -/** -* Simple tone synthesis -* -* @lib MmfDevSoundAdaptation.lib -* @since Series 60 3.0 -*/ -class TMdaSimpleToneGenerator : public TMdaToneGenerator - { - public: - - /** - * Sets frequency and duration for generating PCM data. - * @since Series 60 3.0 - * @param TInt aFrequency Frequency of tone to be generated. - * @param const TTimeIntervalMicroSeconds& aDuration Duration of tone to - * be generated. - * @return void - */ - void SetFrequencyAndDuration(TInt aFrequency, - const TTimeIntervalMicroSeconds& aDuration); - - /** - * Reset generator - * @since Series 60 3.0 - * @return void - */ - virtual void Reset(); - - /** - * Gets the next tone buffer - * @since Series 60 3.0 - * @return KErrNone if successfull, else corresponding error code - */ - virtual TInt GetNextTone(); - - private: - TTimeIntervalMicroSeconds iDuration; - TInt iFrequency; - TBool iPlayed; - }; - -/** -* Dual tone synthesis -* Generates a tone consisting of two sine waves of different -* frequencies summed together. -* -* @lib MmfDevSoundAdaptation.lib -* @since Series 60 3.0 -*/ -class TMdaDualToneGenerator : public TMdaToneGenerator - { - public: - - /** - * ?member_description. - * @since Series 60 3.0 - * @param ?arg1 - */ - void SetFrequencyAndDuration(TInt aFrequencyOne, - TInt aFrequencyTwo, - const TTimeIntervalMicroSeconds& aDuration); - - /** - * Reset generator - * @since Series 60 3.0 - * @return void - */ - virtual void Reset(); - - /** - * Gets the next tone buffer - * @since Series 60 3.0 - * @return KErrNone if successfull, else corresponding error code - */ - virtual TInt GetNextTone(); - - private: - TTimeIntervalMicroSeconds iDuration; - TInt iFrequencyOne; - TInt iFrequencyTwo; - TBool iPlayed; - }; - -/** -* DTMF tone synthesis -* ?other_description_lines -* -* @lib MmfDevSoundAdaptation.lib -* @since Series 60 3.0 -*/ -class TMdaDTMFGenerator : public TMdaToneGenerator - { - public: - - /** - * Reset generator - * @since Series 60 3.0 - * @return void - */ - virtual void Reset(); - - /** - * ?member_description. - * @since Series 60 3.0 - * @param ?arg1 - */ - void SetToneDurations( const TTimeIntervalMicroSeconds32 aOn, - const TTimeIntervalMicroSeconds32 aOff, - const TTimeIntervalMicroSeconds32 aPause); - - /** - * ?member_description. - * @since Series 60 3.0 - * @param ?arg1 - */ - void SetString(const TDesC& aDTMFString); - - private: - - /** - * Gets the next tone buffer - * @since Series 60 3.0 - * @return KErrNone if successfull, else corresponding error code - */ - virtual TInt GetNextTone(); - - private: - const TDesC* iDTMFString; - TTimeIntervalMicroSeconds32 iOn; - TTimeIntervalMicroSeconds32 iOff; - TTimeIntervalMicroSeconds32 iPause; - TInt iOnSamples; - TInt iOffSamples; - TInt iPauseSamples; - TInt iChar; - TBool iPlayToneOff; - }; - -/** -* Tone sequence synthesis -* ?other_description_lines -* -* @lib MmfDevSoundAdaptation.lib -* @since Series 60 3.0 -*/ -class TMdaSequenceGenerator : public TMdaToneGenerator - { - public: - - /** - * Reset generator - * @since Series 60 3.0 - * @return void - */ - virtual void Reset(); - - /** - * ?member_description. - * @since Series 60 3.0 - * @param ?arg1 - */ - void SetSequenceData(const TDesC8& aSequenceData); - - private: - - /** - * Gets the next tone buffer - * @since Series 60 3.0 - * @return KErrNone if successfull, else corresponding error code - */ - virtual TInt GetNextTone(); - - private: - const TDesC8* iSequenceData; - const TInt16* iInstructionPtr; - const TInt16* iLastInstruction; - TInt iStack[KMaxSequenceStack]; - TInt iStackIndex; - }; - - -/** -* Public Media Server includes -* ?other_description_lines -* -* @lib MmfDevSoundAdaptation.lib -* @since Series 60 3.0 -*/ -class TMdaPtr8 : public TPtr8 //needed for this WINS Impl of Tone Gen - { - public: - TMdaPtr8() - : TPtr8(0,0,0) {}; - inline void Set(const TDes8& aDes) - { TPtr8::Set((TUint8*)(aDes.Ptr()),aDes.Length(),aDes.MaxLength()); }; - inline void SetLengthOnly(const TDes8& aDes) - { TPtr8::Set((TUint8*)(aDes.Ptr()),aDes.Length(),aDes.Length()); }; - inline void Set(const TPtrC8& aDes) - { TPtr8::Set((TUint8*)(aDes.Ptr()),aDes.Length(),aDes.Length()); }; - inline void Shift(TInt aOffset) - { SetLength(Length()-aOffset); iMaxLength-=aOffset; iPtr+=aOffset; }; - }; - -#endif // TONEGENERATOR_H - -// End of File - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/TonePlayCompleteTimer.cpp --- a/audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/TonePlayCompleteTimer.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,142 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Utility timer object used for playing tone sequence. -* -*/ - - - -// INCLUDE FILES -#include "MmfDevSoundAdaptationBody.h" -#include "TonePlayCompleteTimer.h" - -#ifdef _DEBUG -#include "e32debug.h" - -#define DEBPRN0(str) RDebug::Print(str, this) -#define DEBPRN1(str, val1) RDebug::Print(str, this, val1) -#else -#define DEBPRN0(str) -#define DEBPRN1(str, val1) -#endif //_DEBUG - - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CTonePlayCompleteTimer::CTonePlayCompleteTimer -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CTonePlayCompleteTimer::CTonePlayCompleteTimer( - MDevSoundAdaptationObserver& aObserver) : - CActive(EPriorityNormal), iObserver(aObserver) - { - CActiveScheduler::Add(this); - } - -// ----------------------------------------------------------------------------- -// CTonePlayCompleteTimer::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CTonePlayCompleteTimer::ConstructL() - { - User::LeaveIfError(iTimer.CreateLocal()); - } - -// ----------------------------------------------------------------------------- -// CTonePlayCompleteTimer::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CTonePlayCompleteTimer* CTonePlayCompleteTimer::NewL( - MDevSoundAdaptationObserver& aObserver) - { - CTonePlayCompleteTimer* self = new (ELeave)CTonePlayCompleteTimer(aObserver); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - - -// ----------------------------------------------------------------------------- -// CTonePlayCompleteTimer::~CTonePlayCompleteTimer -// Destructor -// ----------------------------------------------------------------------------- -// -CTonePlayCompleteTimer::~CTonePlayCompleteTimer() - { - // Cancel any outstanding requests - iTimer.Cancel(); - Cancel(); - iTimer.Close(); - } - -// ---------------------------------------------------------------------------- -// CTonePlayCompleteTimer::SetTimeOut -// Sets the timeout duration. -// (other items were commented in a header). -// ---------------------------------------------------------------------------- -void CTonePlayCompleteTimer::SetTimeOut(TTimeIntervalMicroSeconds32& aTimeOut) - { - iTimeOut = aTimeOut; - } - -// ---------------------------------------------------------------------------- -// CTonePlayCompleteTimer::Start -// Starts the timer for timeout duration set by SetTimeOut(). -// (other items were commented in a header). -// ---------------------------------------------------------------------------- -void CTonePlayCompleteTimer::Start() - { - if (!IsActive()) - { - SetActive(); - iTimer.After(iStatus, iTimeOut); - } - } - -// ---------------------------------------------------------------------------- -// CTonePlayCompleteTimer::RunL -// (other items were commented in a header). -// ---------------------------------------------------------------------------- -void CTonePlayCompleteTimer::RunL() - { - DEBPRN0(_L("CTonePlayCompleteTimer[0x%x]::RunL")); - iObserver.ToneFinished(KErrNone); - } - -// ---------------------------------------------------------------------------- -// CTonePlayCompleteTimer::DoCancel -// (other items were commented in a header). -// ---------------------------------------------------------------------------- -void CTonePlayCompleteTimer::DoCancel() - { - iTimer.Cancel(); - } - -// ---------------------------------------------------------------------------- -// CTonePlayCompleteTimer::RunError -// (other items were commented in a header). -// ---------------------------------------------------------------------------- -TInt CTonePlayCompleteTimer::RunError(TInt /*aError*/) - { - return KErrNone; - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/TonePlayCompleteTimer.h --- a/audiostubs/devsoundextensions_stubs/mmfdevsoundadaptation_stub/src/TonePlayCompleteTimer.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Utility timer object used for playing tone sequence. -* -*/ - - - -#ifndef TONEPLAYCOMPLETETIMER_H -#define TONEPLAYCOMPLETETIMER_H - -// INCLUDES -#include -#include - -// CLASS DECLARATION - -/** -* Utility timer object used for playing tone sequence. -* -* @lib MmfDevSoundAdaptation_Stub.lib -* @since Series 60 3.0 -*/ -class CTonePlayCompleteTimer : public CActive - { - public: // Constructors and destructor - - /** - * Constructs, and returns a pointer to, a new CTonePlayCompleteTimer - * object. - * Leaves on failure.. - * @since Series 60 3.0 - * @return CTonePlayCompleteTimer* A pointer to newly created object. - */ - static CTonePlayCompleteTimer* NewL(MDevSoundAdaptationObserver& - aDevSoundObserver); - - /** - * Destructor. - */ - ~CTonePlayCompleteTimer(); - - public: // New functions - - /** - * Sets the timeout duration. - * @since Series 60 3.0 - * @return void - */ - void SetTimeOut(TTimeIntervalMicroSeconds32& aTimeOut); - - /** - * Starts the timer for timeout duration set by SetTimeOut(). - * @since Series 60 3.0 - * @return void - */ - void Start(); - - protected: // Functions from base classes - - /** - * Called by CActive object framework when local timer times out. - * @since Series 60 3.0 - * @return void - */ - void RunL(); - - /** - * Called by CActive object framework when client cancels active object. - * @since Series 60 3.0 - * @return void - */ - void DoCancel(); - - /** - * Called by CActive object framework when RunL leaves. - * @since Series 60 3.0 - * @param TInt aError Error code. - * @return KErrNone - */ - TInt RunError(TInt aError); - - private: - - /** - * C++ default constructor. - */ - CTonePlayCompleteTimer(MDevSoundAdaptationObserver& - aDevSoundObserver); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - private: // Data - // Pointer reference to HwDevice observer. - MDevSoundAdaptationObserver& iObserver; - // Time out duration - TTimeIntervalMicroSeconds32 iTimeOut; - // Local timer object - RTimer iTimer; - - }; - -#endif // TONEPLAYCOMPLETETIMER_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/restrictedaudiooutputcistub/BWINS/RestrictedAudioOutputCIu.def --- a/audiostubs/devsoundextensions_stubs/restrictedaudiooutputcistub/BWINS/RestrictedAudioOutputCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - ?NewL@CRestrictedAudioOutputCI@@SAPAV1@XZ @ 1 NONAME ; class CRestrictedAudioOutputCI * CRestrictedAudioOutputCI::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/restrictedaudiooutputcistub/EABI/RestrictedAudioOutputCIu.def --- a/audiostubs/devsoundextensions_stubs/restrictedaudiooutputcistub/EABI/RestrictedAudioOutputCIu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -EXPORTS - _ZN24CRestrictedAudioOutputCI4NewLEv @ 1 NONAME - _ZTI24CRestrictedAudioOutputCI @ 2 NONAME ; ## - _ZTV24CRestrictedAudioOutputCI @ 3 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/restrictedaudiooutputcistub/Group/RestrictedAudioOutputCIStub.mmp --- a/audiostubs/devsoundextensions_stubs/restrictedaudiooutputcistub/Group/RestrictedAudioOutputCIStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - -* Version : %version: bh1mmcf#2.1.9 % -* -*/ - - -#include - -TARGET RestrictedAudioOutputCI_stub.dll -TARGETTYPE DLL -UID 0x1000008D 0x10207B94 -VENDORID VID_DEFAULT - - -CAPABILITY CAP_GENERAL_DLL - - -SOURCEPATH ../src -SOURCE RestrictedAudioOutputCIStub.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../inc - -OS_LAYER_SYSTEMINCLUDE - -SYSTEMINCLUDE /epoc32/include/mmf/common -SYSTEMINCLUDE /epoc32/include/mmf/server -SYSTEMINCLUDE /epoc32/include/drivers - -LIBRARY euser.lib -LIBRARY mmfserverbaseclasses.lib -LIBRARY RestrictedAudioOutput.lib -start wins -win32_library kernel32.lib -end - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY RestrictedAudioOutputCI.lib - -LINKAS RestrictedAudioOutputCI.dll diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/restrictedaudiooutputcistub/Group/bld.inf --- a/audiostubs/devsoundextensions_stubs/restrictedaudiooutputcistub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project build file for adaptation custom interface -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -RestrictedAudioOutputCIStub.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/restrictedaudiooutputcistub/inc/RestrictedAudioOutputCIStub.h --- a/audiostubs/devsoundextensions_stubs/restrictedaudiooutputcistub/inc/RestrictedAudioOutputCIStub.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - This is the definition of the RestrictedAudioOutput Custom Interface class. -* This serves as an example of how adaptation might define the -* custom interface class. -* The CRestrictedAudioOutputCI object is typically instantiated by a DevSound -* instance and return to the client when the CustomInterface() -* method is invoked. -* -* -*/ - -#ifndef RESTRICTEDAUDIOOUTPUTCI_H -#define RESTRICTEDAUDIOOUTPUTCI_H - -#include -#include -# -class CMMFDevSound; - -class CRestrictedAudioOutputCI : public CRestrictedAudioOutput - - { - public: // Constructor and Destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CRestrictedAudioOutputCI* NewL(); - - /** - * Destructor. - */ - virtual ~CRestrictedAudioOutputCI(); - - public: // From Base Class - - /** - * - * - * @since 3.2 - */ - virtual TInt Commit(); - - private: - - /** - * By default Symbian 2nd phase constructor is private. - */ - // static void ConstructL(); - /** - * C++ default constructor. - */ - - CRestrictedAudioOutputCI(); - - private: // Data - - - }; -#endif //RESTRICTEDAUDIOOUTPUTCI_H diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/devsoundextensions_stubs/restrictedaudiooutputcistub/src/RestrictedAudioOutputCIStub.cpp --- a/audiostubs/devsoundextensions_stubs/restrictedaudiooutputcistub/src/RestrictedAudioOutputCIStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Audio Stubs - Project definition file for project ?myapp -* -*/ - - -#ifdef _DEBUG -#include // Needed for RDebug Prints -#endif -#include -#include "RestrictedAudioOutputCIStub.h" -#include - -// ----------------------------------------------------------------------------- -// CRestrictedAudioOutput::NewL -// Static function for creating an instance of the CRestrictedAudioOutputCI object. -// ----------------------------------------------------------------------------- -// - -EXPORT_C CRestrictedAudioOutputCI* CRestrictedAudioOutputCI::NewL() - { -#ifdef _DEBUG - RDebug::Print(_L("CRestrictedAudioOutputCI::NewL")); -#endif - CRestrictedAudioOutputCI* self = new(ELeave) CRestrictedAudioOutputCI(); - CleanupStack::PushL(self); - self->ConstructL(); // will call base class ConstructL - CleanupStack::Pop(self); - return self; - } - - -CRestrictedAudioOutputCI::CRestrictedAudioOutputCI() - { - - } - -// Destructor - -CRestrictedAudioOutputCI::~CRestrictedAudioOutputCI() - { -#ifdef _DEBUG - RDebug::Print(_L("CRestrictedAudioOutputCI::~CRestrictedAudioOutputCI")); -#endif - - } - -// ----------------------------------------------------------------------------- -// CRestrictedAudioOutputCI::Commit -// -// Sets Observer for DevSound. -// ----------------------------------------------------------------------------- - -TInt CRestrictedAudioOutputCI::Commit() - { -#ifdef _DEBUG - RDebug::Print(_L("CRestrictedAudioOutputCI::Commit")); -#endif - return KErrNone; - } - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/fmradiotunercontrolstub/Bwins/FMRadioTunerControlU.DEF --- a/audiostubs/fmradiotunercontrolstub/Bwins/FMRadioTunerControlU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - ?NewL@CFMRadioTunerControl@@SAPAV1@AAVMFMRadioTunerControlObserver@@@Z @ 1 NONAME ; class CFMRadioTunerControl * CFMRadioTunerControl::NewL(class MFMRadioTunerControlObserver &) - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/fmradiotunercontrolstub/EABI/FMRadioTunerControlU.DEF --- a/audiostubs/fmradiotunercontrolstub/EABI/FMRadioTunerControlU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -EXPORTS - _ZN20CFMRadioTunerControl4NewLER28MFMRadioTunerControlObserver @ 1 NONAME - _ZTI11CAdaptation @ 2 NONAME ; ## - _ZTV11CAdaptation @ 3 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/fmradiotunercontrolstub/Group/FMRadioTunerControlStub.mmp --- a/audiostubs/fmradiotunercontrolstub/Group/FMRadioTunerControlStub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for RadioServer Console Test -* -*/ - - -#include - -TARGET FMRadioTunerControl.dll -CAPABILITY CAP_GENERAL_DLL -TARGETTYPE DLL -UID 0x1000008d 0x2000C0C0 -VENDORID VID_DEFAULT - -SOURCEPATH ../Src -SOURCE FMRadioTunerControlStub.cpp - -USERINCLUDE ../Src - -OS_LAYER_SYSTEMINCLUDE - -LIBRARY euser.lib - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/fmradiotunercontrolstub/Group/bld.inf --- a/audiostubs/fmradiotunercontrolstub/Group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project build file for FMRadioTunerControlStub -* -*/ - - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - - -PRJ_MMPFILES -FMRadioTunerControlStub.mmp - - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/fmradiotunercontrolstub/Src/FMRadioTunerControlStub.cpp --- a/audiostubs/fmradiotunercontrolstub/Src/FMRadioTunerControlStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1400 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Contains implementation of the CAdaptation class. -* Which holds RadioServer Console Test. -* -*/ - - - -// INCLUDE FILES -#include -#include "FMRadioTunerControlStub.h" - -// CONSTANTS -const TInt KReqTunerOn = 1; -const TInt KReqTunerOff = 2; -const TInt KReqSetFrequencyRange = 3; -const TInt KReqSetFrequency = 4; -const TInt KReqStationSeek = 5; -const TInt KReqAudioMode = 6; -const TInt KReqSetAudioMode = 7; -const TInt KReqMaxSignalStrength = 8; -const TInt KReqSignalStrength = 9; -const TInt KReqSquelch = 10; -const TInt KReqSetSquelch = 11; -//--------------------------------------- -const TInt KReqStationSeekByPTY = 12; -const TInt KReqStationSeekByTA = 13; -const TInt KReqStationSeekByTP = 14; -const TInt KReqGetFreqByPTY = 15; -const TInt KReqGetFreqByTA = 16; -const TInt KReqGetPSByPTY = 17; -const TInt KReqGetPSByTA = 18; - -const TInt KEuroAmericaMin = 87500000; -const TInt KEuroAmericaMax = 108000000; -const TInt KJapanMin = 76000000; -const TInt KJapanMax = 90000000; - -/* -KCBI 90.9 PTY = KRdsPtyReligion -KLTY 94.9 PTY = KRdsPtyReligion -KVIL 103.7 PTY = KRdsPtyLightClassical -KHKS 106.1 PTY = KRdsPtyRockMusic -*/ - -const TInt KFrequency1 = 90900000; // TA, TP -const TInt KFrequency2 = 94900000; // Alternate Frequency of KFrequency1 -const TInt KFrequency3 = 103700000; -const TInt KFrequency4 = 106100000; // TP - -// DATA TYPES -struct TRadioMessageRequestData - { - TSglQueLink iLink; - TInt iRequest; - TInt iError; - }; - -// ============================= LOCAL FUNCTIONS =============================== - -/** -* Class CTuner -* @lib FMRadioTunerControlStub.lib -* @since Series 60 3.0 -*/ -class CTuner : public CTimer - { - public: - static CTuner* NewL( MFMRadioTunerControlObserver& aObserver ) - { - CTuner* self = new( ELeave ) CTuner(aObserver); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - return self; - }; - - virtual ~CTuner() - { - iFreqList.Close(); - iPsList.Close(); - iRTplusTags.Close(); - if ( IsActive() ) - { - Cancel(); - } - TRadioMessageRequestData* data; - while ( !iRequestQue.IsEmpty() ) - { - data = iRequestQue.First(); - iRequestQue.Remove(*data); - delete data; - } - }; - - void CompleteRequest( TInt aRequest, TInt aError ) - { - TRadioMessageRequestData *data = new (ELeave) TRadioMessageRequestData; - data->iRequest = aRequest; - data->iError = aError; - // Add it to the queue - iRequestQue.AddLast(*data); - if ( !IsActive() ) - { - After(500000); // 0.5 sec by default - } - }; - - void Reset() - { - iTunerOn = EFalse; - iRange = EFMRadioFrequencyEuroAmerica; - iFrequency = KEuroAmericaMin; - iSigStrength = 0; - iMode = EFMRadioAudioStereo; - iSquelch = ETrue; - ResetRds(); - }; - - void ResetRds() - { - iNotifyOn = EFalse; - iRdsSignal = EFalse; - iRdsData = 0; - iAutoSwitch = EFalse; - iFreqList.Reset(); - iPsList.Reset(); - iPi = 0; - iPty = KRdsPtyNone; - iPs = _L8(""); - iRt = _L8(""); - iRTplusTags.Reset(); - // Hardcoded to 2007/11/10 7:35 - iCt.Set(2007,ENovember,10,7,35,0,0); - }; - - void SendRdsData() - { - // Make sure we are still in RDS channel - if ( !iRdsSignal || !iNotifyOn ) - { - return; - } - - if( iRdsData & ERdsProgrammeIdentification ) - { - iRdsObserver->RdsDataPI(iPi); - } - if( iRdsData & ERdsProgrammeType ) - { - iRdsObserver->RdsDataPTY(iPty); - } - if( iRdsData & ERdsProgrammeService ) - { - iRdsObserver->RdsDataPS(iPs); - } - if( iRdsData & ERdsRadioText ) - { - iRdsObserver->RdsDataRT(iRt, iRTplusTags); - } - if( iRdsData & ERdsClockTime ) - { - iRdsObserver->RdsDataCT(iCt); - } - }; - - void SendRdsAf(TBool aBegin) - { - if (aBegin) - { - iRdsObserver->RdsSearchBeginAF(); - } - else - { - iFrequency = KFrequency2; - iSigStrength = 2; - iPs = _L8("KLTY"); - iRdsObserver->RdsSearchEndAF(iError, iFrequency); - } - }; - - - private: - void DoCancel() - {}; - - void RunL() - { - TRadioMessageRequestData* data; - data = iRequestQue.First(); - iRequestQue.Remove(*data); - iRequest = data->iRequest; - iError = data->iError; - delete data; - - switch (iRequest) - { - case KReqTunerOn: - iObserver->TunerOnComplete(iError); - break; - case KReqTunerOff: - iObserver->TunerOffComplete(iError); - break; - case KReqSetFrequencyRange: - iObserver->SetFrequencyRangeComplete(iError); - break; - case KReqSetFrequency: - iObserver->SetFrequencyComplete(iError); - break; - case KReqStationSeek: - iObserver->StationSeekComplete(iError, iFrequency); - break; - case KReqAudioMode: - iObserver->AudioModeComplete(iError, iMode); - break; - case KReqSetAudioMode: - iObserver->SetAudioModeComplete(iError); - break; - case KReqMaxSignalStrength: - iObserver->MaxSignalStrengthComplete(iError, 15); - break; - case KReqSignalStrength: - iObserver->SignalStrengthComplete(iError, iSigStrength); - break; - case KReqSquelch: - iObserver->SquelchComplete(iError, iSquelch); - break; - case KReqSetSquelch: - iObserver->SetSquelchComplete(iError); - break; -// ----------------------------------------------------------------------------- -// RDS - case KReqStationSeekByPTY: - iRdsObserver->StationSeekByPTYComplete(iError, iFrequency); - break; - case KReqStationSeekByTA: - iRdsObserver->StationSeekByTAComplete(iError, iFrequency); - break; - case KReqStationSeekByTP: - iRdsObserver->StationSeekByTPComplete(iError, iFrequency); - break; - case KReqGetFreqByPTY: - iRdsObserver->GetFreqByPTYComplete(iError, iFreqList); - break; - case KReqGetFreqByTA: - iRdsObserver->GetFreqByTAComplete(iError, iFreqList); - break; - case KReqGetPSByPTY: - iRdsObserver->GetPSByPTYComplete(iError, iPsList); - break; - case KReqGetPSByTA: - iRdsObserver->GetPSByTAComplete(iError, iPsList); - break; -// RDS -// ----------------------------------------------------------------------------- - default: - break; - } - - // Process the next item in the queue if any - if ( !iRequestQue.IsEmpty() ) - { - // there is at least one element in the linked list - After(100000); // 0.1 sec by default - } - }; - - private: - CTuner( MFMRadioTunerControlObserver& aObserver ) - : CTimer(EPriorityStandard), - iObserver(&aObserver), - iRdsObserver(NULL), - iRequestQue(_FOFF( TRadioMessageRequestData, iLink )) - {}; - - void ConstructL() - { - CTimer::ConstructL(); - CActiveScheduler::Add(this); - Reset(); - }; - - private: // Data - // Tuner observer - MFMRadioTunerControlObserver* iObserver; - // Rds observer - MRdsControlObserver* iRdsObserver; - // Request queue - TSglQue iRequestQue; - // Outstanding request - TInt iRequest; - TInt iError; - - // Tuner data - TBool iTunerOn; - TFMRadioFrequencyRange iRange; - TInt iFrequency; - TInt iSigStrength; - TFMRadioAudioMode iMode; - TBool iSquelch; - - // RDS data - TBool iNotifyOn; - TBool iRdsSignal; - TUint32 iRdsData; - TBool iAutoSwitch; - RArray iFreqList; - RArray iPsList; - TInt iPi; - TRdsProgrammeType iPty; - TRdsPSName iPs; - TRdsRadioText iRt; - RArray iRTplusTags; - TDateTime iCt; - - private: // Friend classes - friend class CAdaptation; - friend class CRdsGenerator; - }; - -/** -* Class CRdsGenerator -* @lib FMRadioTunerControlStub.lib -* @since Series 60 3.2 -*/ -class CRdsGenerator : public CTimer - { - public: - static CRdsGenerator* NewL(CTuner& aTuner) - { - CRdsGenerator* self = new( ELeave ) CRdsGenerator(aTuner); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - return self; - }; - - virtual ~CRdsGenerator() - { - if ( IsActive() ) - { - Cancel(); - } - }; - - void Start() - { - if ( IsActive() ) - { - Cancel(); - } - After(1000000); // 1 sec - }; - - private: - void DoCancel() - {}; - - void RunL() - { - iTuner->SendRdsData(); - }; - - private: - CRdsGenerator( CTuner& aTuner ) - : CTimer(EPriorityStandard), - iTuner(&aTuner) - {}; - - void ConstructL() - { - CTimer::ConstructL(); - CActiveScheduler::Add(this); - }; - - private: // Data - // Tuner - CTuner* iTuner; - }; - -/** -* Class CAfSwitcher -* @lib FMRadioTunerControlStub.lib -* @since Series 60 3.2 -*/ -class CAfSwitcher : public CTimer - { - public: - static CAfSwitcher* NewL(CTuner& aTuner) - { - CAfSwitcher* self = new( ELeave ) CAfSwitcher(aTuner); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - return self; - }; - - virtual ~CAfSwitcher() - { - if ( IsActive() ) - { - Cancel(); - } - }; - - void Start() - { - if ( IsActive() ) - { - Cancel(); - } - iBegin = ETrue; - After(3000000); // 3 sec - }; - - private: - void DoCancel() - {}; - - void RunL() - { - iTuner->SendRdsAf(iBegin); - if (iBegin) - { - iBegin = EFalse; - After(2000000); // 2 sec - } - }; - - private: - CAfSwitcher( CTuner& aTuner ) - : CTimer(EPriorityStandard), - iTuner(&aTuner), - iBegin(EFalse) - {}; - - void ConstructL() - { - CTimer::ConstructL(); - CActiveScheduler::Add(this); - }; - - private: // Data - // Tuner - CTuner* iTuner; - TBool iBegin; - }; - -EXPORT_C CFMRadioTunerControl* CFMRadioTunerControl::NewL( - MFMRadioTunerControlObserver& aObserver ) - { - return CAdaptation::NewL(aObserver); - } - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CAdaptation::CAdaptation -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CAdaptation::CAdaptation() - : iTuner(NULL), - iRds(NULL), - iRdsAf(NULL) - { - } - -// ----------------------------------------------------------------------------- -// CAdaptation::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CAdaptation::ConstructL( - MFMRadioTunerControlObserver& aObserver ) - { - iTuner = CTuner::NewL(aObserver); - iRds = CRdsGenerator::NewL(*iTuner); - iRdsAf = CAfSwitcher::NewL(*iTuner); - } - -// ----------------------------------------------------------------------------- -// CAdaptation::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CAdaptation* CAdaptation::NewL( - MFMRadioTunerControlObserver& aObserver ) - { - CAdaptation* self = new( ELeave ) CAdaptation(); - CleanupStack::PushL( self ); - self->ConstructL(aObserver); - CleanupStack::Pop(); - return self; - } - -// Destructor -CAdaptation::~CAdaptation() - { - delete iRdsAf; - delete iRds; - delete iTuner; - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::TunerOn( - TFMRadioFrequencyRange aRange, - TInt aFrequency ) - { - if ( ValidFrequency(aRange, aFrequency) ) - { - iTuner->iTunerOn = ETrue; - iTuner->iRange = aRange; - SetFrequencySettings(aFrequency); - iTuner->CompleteRequest(KReqTunerOn, KErrNone); - } - else - { - iTuner->CompleteRequest(KReqTunerOn, KFMRadioErrFrequencyOutOfBandRange); - } - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::CancelTunerOn() - { - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::TunerOff() - { - iTuner->Reset(); - iTuner->CompleteRequest(KReqTunerOff, KErrNone); - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::CancelTunerOff() - { - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::SetFrequencyRange( - TFMRadioFrequencyRange aRange ) - { - iTuner->iRange = aRange; - iTuner->CompleteRequest(KReqSetFrequencyRange, KErrNone); - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::CancelSetFrequencyRange() - { - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::SetFrequency( - TInt aFrequency ) - { - if ( !iTuner->iTunerOn ) - { - iTuner->CompleteRequest(KReqSetFrequency, KFMRadioErrNotPermittedInCurrentState); - return; - } - - if ( ValidFrequency(iTuner->iRange, aFrequency) ) - { - SetFrequencySettings(aFrequency); - iTuner->CompleteRequest(KReqSetFrequency, KErrNone); - } - else - { - iTuner->CompleteRequest(KReqTunerOn, KFMRadioErrFrequencyNotValid); - } - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::CancelSetFrequency() - { - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::StationSeek( - TFMRadioSeekDirection aDirection ) - { - if ( !iTuner->iTunerOn ) - { - iTuner->CompleteRequest(KReqStationSeek, KFMRadioErrNotPermittedInCurrentState); - return; - } - - if ( aDirection == EFMRadioSeekUp ) - { - if ( iTuner->iFrequency < KFrequency1 ) - { - SetFrequencySettings(KFrequency1); - } - else if ( (iTuner->iFrequency >= KFrequency1) && (iTuner->iFrequency < KFrequency2) ) - { - SetFrequencySettings(KFrequency2); - } - else if ( (iTuner->iFrequency >= KFrequency2) && (iTuner->iFrequency < KFrequency3) ) - { - SetFrequencySettings(KFrequency3); - } - else if ( (iTuner->iFrequency >= KFrequency3) && (iTuner->iFrequency < KFrequency4) ) - { - SetFrequencySettings(KFrequency4); - } - else // iTuner->iFrequency >= KFrequency4 - { - SetFrequencySettings(KFrequency1); - } - } - else - { - if ( iTuner->iFrequency > KFrequency4 ) - { - SetFrequencySettings(KFrequency4); - } - else if ( (iTuner->iFrequency <= KFrequency4) && (iTuner->iFrequency > KFrequency3) ) - { - SetFrequencySettings(KFrequency3); - } - else if ( (iTuner->iFrequency <= KFrequency3) && (iTuner->iFrequency > KFrequency2) ) - { - SetFrequencySettings(KFrequency2); - } - else if ( (iTuner->iFrequency <= KFrequency2) && (iTuner->iFrequency > KFrequency1) ) - { - SetFrequencySettings(KFrequency1); - } - else // iTuner->iFrequency < KFrequency1 - { - SetFrequencySettings(KFrequency4); - } - } - - iTuner->CompleteRequest(KReqStationSeek, KErrNone); - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::CancelStationSeek() - { - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::AudioMode() - { - iTuner->CompleteRequest(KReqAudioMode, KErrNone); - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::CancelAudioMode() - { - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::SetAudioMode( - TFMRadioAudioMode aMode ) - { - iTuner->iMode = aMode; - iTuner->CompleteRequest(KReqSetAudioMode, KErrNone); - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::CancelSetAudioMode() - { - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::MaxSignalStrength() - { - iTuner->CompleteRequest(KReqMaxSignalStrength, KErrNone); - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::CancelMaxSignalStrength() - { - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::SignalStrength() - { - iTuner->CompleteRequest(KReqSignalStrength, KErrNone); - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::CancelSignalStrength() - { - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::Squelch() - { - iTuner->CompleteRequest(KReqSquelch, KErrNone); - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::CancelSquelch() - { - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::SetSquelch( - TBool aEnabled ) - { - iTuner->iSquelch = aEnabled; - iTuner->CompleteRequest(KReqSetSquelch, KErrNone); - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::CancelSetSquelch() - { - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::BufferToBeFilled( - TDes8& /*aBuffer*/ ) - { - // Not used. - } - -// ----------------------------------------------------------------------------- -// -TFMRadioCapabilities CAdaptation::Capabilities() - { - TFMRadioCapabilities cap; - cap.iSampleRate = EFMRadioSampleRate48000Hz; - cap.iChannels = EFMRadioAudioMono | EFMRadioAudioStereo; - //const TUint32 KMMFFourCCCodePCM16 = 0x36315020; //(' ', 'P', '1', '6') - cap.iEncoding = 0x36315020; - - cap.iTunerBands = EFMRadioFrequencyEuroAmerica | EFMRadioFrequencyJapan; - //cap.iTunerFunctions = ETunerAvailableInOfflineMode | ETunerRdsSupport; - cap.iTunerFunctions = 0x01 | 0x02; - return cap; - } - -/********************************************************************* -* RD_FM_RADIO_ENHANCEMENTS -**********************************************************************/ -#ifdef RD_FM_RADIO_ENHANCEMENTS - -// ----------------------------------------------------------------------------- -// -MRdsControl* CAdaptation::RdsControl( - MRdsControlObserver& aObserver ) - { - iTuner->iRdsObserver = &aObserver; - return this; - } - -// ----------------------------------------------------------------------------- -// -TInt CAdaptation::GetFrequencyRange( - TFMRadioFrequencyRange& aRange, - TInt& aMinFreq, - TInt& aMaxFreq ) const - { - aRange = iTuner->iRange; - if ( aRange == EFMRadioFrequencyEuroAmerica ) - { - aMinFreq = KEuroAmericaMin; - aMaxFreq = KEuroAmericaMax; - } - else // aRange = EFMRadioFrequencyJapan; - { - aMinFreq = KJapanMin; - aMaxFreq = KJapanMax; - } - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// -TInt CAdaptation::GetCapabilities( - TRdsCapabilities& aCaps ) const - { - aCaps.iRdsFunctions = ERdsProgrammeIdentification | ERdsProgrammeType | ERdsProgrammeService - | ERdsRadioText | ERdsClockTime | ERdsAlternateFrequency; - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// -TInt CAdaptation::GetRdsSignalStatus( - TBool& aRdsSignal ) const - { - aRdsSignal = iTuner->iRdsSignal; - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// -TInt CAdaptation::NotifyRdsDataChange( - TRdsData aRdsData ) - { - iTuner->iRdsData = aRdsData.iRdsFunctions; - // We'll only generate events for ERdsProgrammeIdentification, ERdsProgrammeType, - // ERdsProgrammeService for now. - if ( (aRdsData.iRdsFunctions & ERdsProgrammeIdentification) || - (aRdsData.iRdsFunctions & ERdsProgrammeType) || - (aRdsData.iRdsFunctions & ERdsProgrammeService) ) - { - iTuner->iNotifyOn = ETrue; - } - - if ( (iTuner->iRdsSignal) && (iTuner->iNotifyOn) ) - { - iRds->Start(); - } - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::CancelNotifyRdsDataChange() - { - iTuner->iRdsData = 0; - iTuner->iNotifyOn = EFalse; - iRds->Cancel(); - } - -// ----------------------------------------------------------------------------- -// -TInt CAdaptation::SetAutomaticSwitching( - TBool aAuto ) - { - iTuner->iAutoSwitch = aAuto; - if ( aAuto && (iTuner->iFrequency == KFrequency1) ) - { - iRdsAf->Start(); - } - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// -TInt CAdaptation::GetAutomaticSwitching( - TBool& aAuto ) - { - aAuto = iTuner->iAutoSwitch; - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::CancelAFSearch() - { - } - -// ----------------------------------------------------------------------------- -// -TInt CAdaptation::SetAutomaticTrafficAnnouncement( - TBool /*aAuto*/ ) - { - return KErrNotSupported; - }; - -// ----------------------------------------------------------------------------- -// -TInt CAdaptation::GetAutomaticTrafficAnnouncement( - TBool& aAuto ) - { - aAuto = EFalse; - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::StationSeekByPTY( - TRdsProgrammeType aPty, - TBool aSeekUp ) - { - if ( !iTuner->iTunerOn ) - { - iTuner->CompleteRequest(KReqStationSeekByPTY, KRdsErrNotPermittedInCurrentState); - return; - } - - TInt err = KErrNone; - switch ( aPty ) - { - case KRdsPtyReligion: - if ( aSeekUp ) - { - if ( iTuner->iFrequency < KFrequency1 ) - { - SetFrequencySettings(KFrequency1); - } - else if ( (iTuner->iFrequency >= KFrequency1) && (iTuner->iFrequency < KFrequency2) ) - { - SetFrequencySettings(KFrequency2); - } - else // iTuner->iFrequency >= KFrequency2 - { - SetFrequencySettings(KFrequency1); - } - } - else - { - if ( iTuner->iFrequency > KFrequency2 ) - { - SetFrequencySettings(KFrequency2); - } - else if ( (iTuner->iFrequency <= KFrequency2) && (iTuner->iFrequency > KFrequency1) ) - { - SetFrequencySettings(KFrequency1); - } - else // iTuner->iFrequency < KFrequency1 - { - SetFrequencySettings(KFrequency2); - } - } - break; - case KRdsPtyLightClassical: - SetFrequencySettings(KFrequency3); - break; - case KRdsPtyRockMusic: - SetFrequencySettings(KFrequency4); - break; - default: - err = KErrNotFound; - break; - } - iTuner->CompleteRequest(KReqStationSeekByPTY, err); - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::StationSeekByTA( - TBool aSeekUp ) - { - if ( !iTuner->iTunerOn ) - { - iTuner->CompleteRequest(KReqStationSeekByTA, KRdsErrNotPermittedInCurrentState); - return; - } - - // Just for testing purpose, if aSeekUp return KFrequency1, else return KErrNotFound. - if ( aSeekUp ) - { - SetFrequencySettings(KFrequency1); - iTuner->CompleteRequest(KReqStationSeekByTA, KErrNone); - } - else - { - iTuner->CompleteRequest(KReqStationSeekByTA, KErrNotFound); - } - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::StationSeekByTP( - TBool aSeekUp ) - { - if ( !iTuner->iTunerOn ) - { - iTuner->CompleteRequest(KReqStationSeekByTP, KRdsErrNotPermittedInCurrentState); - return; - } - - if ( aSeekUp ) - { - if ( iTuner->iFrequency < KFrequency1 ) - { - SetFrequencySettings(KFrequency1); - } - else if ( (iTuner->iFrequency >= KFrequency1) && (iTuner->iFrequency < KFrequency4) ) - { - SetFrequencySettings(KFrequency4); - } - else // iTuner->iFrequency >= KFrequency4 - { - SetFrequencySettings(KFrequency1); - } - } - else - { - if ( iTuner->iFrequency > KFrequency4 ) - { - SetFrequencySettings(KFrequency4); - } - else if ( (iTuner->iFrequency <= KFrequency4) && (iTuner->iFrequency > KFrequency1) ) - { - SetFrequencySettings(KFrequency1); - } - else // iTuner->iFrequency < KFrequency1 - { - SetFrequencySettings(KFrequency4); - } - } - - iTuner->CompleteRequest(KReqStationSeekByTP, KErrNone); - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::CancelRdsStationSeek() - { - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::GetFreqByPTY( - TRdsProgrammeType aPty ) - { - if ( !iTuner->iTunerOn ) - { - iTuner->CompleteRequest(KReqGetFreqByPTY, KRdsErrNotPermittedInCurrentState); - return; - } - - TInt err = KErrNone; - iTuner->iFreqList.Reset(); - switch ( aPty ) - { - case KRdsPtyReligion: - iTuner->iFreqList.Append(KFrequency1); - iTuner->iFreqList.Append(KFrequency2); - break; - case KRdsPtyLightClassical: - iTuner->iFreqList.Append(KFrequency3); - break; - case KRdsPtyRockMusic: - iTuner->iFreqList.Append(KFrequency4); - break; - default: - err = KErrNotFound; - break; - } - iTuner->CompleteRequest(KReqGetFreqByPTY, err); - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::CancelGetFreqByPTY() - { - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::GetFreqByTA() - { - if ( !iTuner->iTunerOn ) - { - iTuner->CompleteRequest(KReqGetFreqByTA, KRdsErrNotPermittedInCurrentState); - return; - } - - iTuner->iFreqList.Reset(); - iTuner->iFreqList.Append(KFrequency1); - iTuner->CompleteRequest(KReqGetFreqByTA, KErrNone); - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::CancelGetFreqByTA() - { - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::GetPSByPTY - ( TRdsProgrammeType aPty ) - { - if ( !iTuner->iTunerOn ) - { - iTuner->CompleteRequest(KReqGetPSByPTY, KRdsErrNotPermittedInCurrentState); - return; - } - - TInt err = KErrNone; - iTuner->iPsList.Reset(); - switch ( aPty ) - { - case KRdsPtyReligion: - iTuner->iPsList.Append(_L8("KCBI")); - iTuner->iPsList.Append(_L8("KLTY")); - break; - case KRdsPtyLightClassical: - iTuner->iPsList.Append(_L8("KVIL")); - break; - case KRdsPtyRockMusic: - iTuner->iPsList.Append(_L8("KHKS")); - break; - default: - err = KErrNotFound; - break; - } - iTuner->CompleteRequest(KReqGetPSByPTY, err); - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::CancelGetPSByPTY() - { - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::GetPSByTA() - { - if ( !iTuner->iTunerOn ) - { - iTuner->CompleteRequest(KReqGetPSByTA, KRdsErrNotPermittedInCurrentState); - return; - } - - iTuner->iPsList.Reset(); - iTuner->iPsList.Append(_L8("KCBI")); - iTuner->CompleteRequest(KReqGetPSByTA, KErrNone); - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::CancelGetPSByTA() - { - } - -// ----------------------------------------------------------------------------- -// -TInt CAdaptation::GetProgrammeIdentification( - TInt& aPi ) - { - if ( !iTuner->iTunerOn ) - { - return KRdsErrNotPermittedInCurrentState; - } - - if ( iTuner->iRdsSignal ) - { - aPi = iTuner->iPi; - return KErrNone; - } - else - { - return KErrNotFound; - } - } - -// ----------------------------------------------------------------------------- -// -TInt CAdaptation::GetProgrammeType( - TRdsProgrammeType& aPty ) - { - if ( !iTuner->iTunerOn ) - { - return KRdsErrNotPermittedInCurrentState; - } - - if ( iTuner->iRdsSignal ) - { - aPty = iTuner->iPty; - return KErrNone; - } - else - { - return KErrNotFound; - } - } - -// ----------------------------------------------------------------------------- -// -TInt CAdaptation::GetProgrammeService( - TRdsPSName& aPs ) - { - if ( !iTuner->iTunerOn ) - { - return KRdsErrNotPermittedInCurrentState; - } - - if ( iTuner->iRdsSignal ) - { - aPs = iTuner->iPs; - return KErrNone; - } - else - { - return KErrNotFound; - } - } - -// ----------------------------------------------------------------------------- -// -TInt CAdaptation::GetRadioText( - TRdsRadioText& aRt, - RArray& /*aRTplusTags*/ ) - { - if ( !iTuner->iTunerOn ) - { - return KRdsErrNotPermittedInCurrentState; - } - - if ( iTuner->iRdsSignal ) - { - aRt = iTuner->iRt; - return KErrNone; - } - else - { - return KErrNotFound; - } - } - -// ----------------------------------------------------------------------------- -// -TInt CAdaptation::GetClockTime( - TDateTime& aCt ) - { - if ( !iTuner->iTunerOn ) - { - return KRdsErrNotPermittedInCurrentState; - } - - if ( iTuner->iRdsSignal ) - { - // Hardcoded to 2007/11/10 7:35 - aCt.Set(2007,ENovember,10,7,35,0,0); - return KErrNone; - } - else - { - return KErrNotFound; - } - } - -// ----------------------------------------------------------------------------- -// -TInt CAdaptation::GetTrafficAnnouncementStatus( - TBool& aTaStatus ) - { - if ( !iTuner->iTunerOn ) - { - return KRdsErrNotPermittedInCurrentState; - } - - if ( iTuner->iFrequency == KFrequency1 ) - { - aTaStatus = ETrue; - return KErrNone; - } - else if ( iTuner->iFrequency == KFrequency4 ) - { - aTaStatus = EFalse; - return KErrNone; - } - else - { - return KErrNotFound; - - } - } - -// ----------------------------------------------------------------------------- -// -TInt CAdaptation::GetTrafficProgrammeStatus( - TBool& aTpStatus ) - { - if ( !iTuner->iTunerOn ) - { - return KRdsErrNotPermittedInCurrentState; - } - - if ( (iTuner->iFrequency == KFrequency1) || (iTuner->iFrequency == KFrequency4) ) - { - aTpStatus = ETrue; - return KErrNone; - } - else if ( (iTuner->iFrequency == KFrequency2) || (iTuner->iFrequency == KFrequency3) ) - { - aTpStatus = EFalse; - return KErrNone; - } - else - { - return KErrNotFound; - } - } - -#endif //#ifdef RD_FM_RADIO_ENHANCEMENTS - -// ----------------------------------------------------------------------------- -// -TBool CAdaptation::ValidFrequency( - TFMRadioFrequencyRange aRange, - TInt aFrequency ) - { - if ( aRange == EFMRadioFrequencyEuroAmerica ) - { - if ( (aFrequency < KEuroAmericaMin) || (aFrequency > KEuroAmericaMax) ) - { - return EFalse; - } - } - else // aRange = EFMRadioFrequencyJapan; - { - if ( (aFrequency < KJapanMin) || (aFrequency > KJapanMax) ) - { - return EFalse; - } - } - return ETrue; - } - -// ----------------------------------------------------------------------------- -// -void CAdaptation::SetFrequencySettings( - TInt aFrequency ) - { - iTuner->iFrequency = aFrequency; - switch ( aFrequency ) - { - case KFrequency1: - iTuner->iSigStrength = 1; - iTuner->iRdsSignal = ETrue; - iTuner->iPi = 1000; - iTuner->iPty = KRdsPtyReligion; - iTuner->iPs = _L8("KCBI"); - iTuner->iRt = _L8("Hail to the King"); - if ( iTuner->iAutoSwitch ) - { - iRdsAf->Start(); - } - break; - case KFrequency2: - iTuner->iSigStrength = 2; - iTuner->iRdsSignal = ETrue; - iTuner->iPi = 1000; - iTuner->iPty = KRdsPtyReligion; - iTuner->iPs = _L8("KLTY"); - iTuner->iRt = _L8("He Knows My Name"); - break; - case KFrequency3: - iTuner->iSigStrength = 3; - iTuner->iRdsSignal = ETrue; - iTuner->iPi = 2000; - iTuner->iPty = KRdsPtyLightClassical; - iTuner->iPs = _L8("KVIL"); - iTuner->iRt = _L8("Power of Love"); - break; - case KFrequency4: - iTuner->iSigStrength = 4; - iTuner->iRdsSignal = ETrue; - iTuner->iPi = 3000; - iTuner->iPty = KRdsPtyRockMusic; - iTuner->iPs = _L8("KHKS"); - iTuner->iRt = _L8("The Reason"); - break; - default: - iTuner->iSigStrength = 5; - iTuner->iRdsSignal = EFalse; - break; - } - if ( (iTuner->iRdsSignal) && (iTuner->iNotifyOn) ) - { - iRds->Start(); - } - } - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - - -// End of File - diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/fmradiotunercontrolstub/Src/FMRadioTunerControlStub.h --- a/audiostubs/fmradiotunercontrolstub/Src/FMRadioTunerControlStub.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,138 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* This header specifies the implementation of CFMRadioTunerControl. -* -*/ - - - -#ifndef FMRADIOTUNERCONTROLSTUB_H -#define FMRADIOTUNERCONTROLSTUB_H - -// INCLUDES -#include -#include -#include - -// FORWARD DECLARATIONS -class CTuner; -class CRdsGenerator; -class CAfSwitcher; - -// CLASS DECLARATION - -/** -* ?one_line_short_description. -* ?other_description_lines -* -* @lib FMRadioTunerControlStub.lib -* @since Series 60 3.0 -*/ -class CAdaptation : public CFMRadioTunerControl -#ifdef RD_FM_RADIO_ENHANCEMENTS - ,public MRdsControl -#endif // RD_FM_RADIO_ENHANCEMENTS - { - public: // New functions - static CAdaptation* NewL( MFMRadioTunerControlObserver& aObserver ); - virtual ~CAdaptation(); - - public: // From base class CFMRadioTunerControl - void TunerOn( TFMRadioFrequencyRange aRange, TInt aFrequency ); - void CancelTunerOn(); - void TunerOff(); - void CancelTunerOff(); - void SetFrequencyRange( TFMRadioFrequencyRange aRange ); - void CancelSetFrequencyRange(); - void SetFrequency( TInt aFrequency ); - void CancelSetFrequency(); - void StationSeek( TFMRadioSeekDirection aDirection ); - void CancelStationSeek(); - void AudioMode(); - void CancelAudioMode(); - void SetAudioMode( TFMRadioAudioMode aMode ); - void CancelSetAudioMode(); - void MaxSignalStrength(); - void CancelMaxSignalStrength(); - void SignalStrength(); - void CancelSignalStrength(); - void Squelch(); - void CancelSquelch(); - void SetSquelch( TBool aEnabled ); - void CancelSetSquelch(); - void BufferToBeFilled( TDes8& aBuffer ); - TFMRadioCapabilities Capabilities(); - -#ifdef RD_FM_RADIO_ENHANCEMENTS - MRdsControl* RdsControl( MRdsControlObserver& aObserver ) ; - TInt GetFrequencyRange( TFMRadioFrequencyRange& aRange, TInt& aMinFreq, TInt& aMaxFreq ) const; - - public: // From base class MRdsControl - TInt GetCapabilities( TRdsCapabilities& aCaps ) const; - TInt GetRdsSignalStatus( TBool& aRdsSignal ) const; - TInt NotifyRdsDataChange( TRdsData aRdsData ); - void CancelNotifyRdsDataChange(); - TInt SetAutomaticSwitching( TBool aAuto ); - TInt GetAutomaticSwitching( TBool& aAuto ); - void CancelAFSearch(); - TInt SetAutomaticTrafficAnnouncement( TBool aAuto ); - TInt GetAutomaticTrafficAnnouncement( TBool& aAuto ); - void StationSeekByPTY( TRdsProgrammeType aPty, TBool aSeekUp ); - void StationSeekByTA( TBool aSeekUp ); - void StationSeekByTP( TBool aSeekUp ); - void CancelRdsStationSeek(); - void GetFreqByPTY( TRdsProgrammeType aPty ); - void CancelGetFreqByPTY(); - void GetFreqByTA(); - void CancelGetFreqByTA(); - void GetPSByPTY( TRdsProgrammeType aPty ); - void CancelGetPSByPTY(); - void GetPSByTA(); - void CancelGetPSByTA(); - TInt GetProgrammeIdentification( TInt& aPi ); - TInt GetProgrammeType( TRdsProgrammeType& aPty ); - TInt GetProgrammeService( TRdsPSName& aPs ); - TInt GetRadioText( TRdsRadioText& aRt, RArray& aRTplusTags ); - TInt GetClockTime( TDateTime& aCt ); - TInt GetTrafficAnnouncementStatus( TBool& aTaStatus ); - TInt GetTrafficProgrammeStatus( TBool& aTpStatus ); - -#endif // RD_FM_RADIO_ENHANCEMENTS - - private: - - TBool ValidFrequency( TFMRadioFrequencyRange aRange, TInt aFrequency ); - void SetFrequencySettings( TInt aFrequency ); - - /** - * C++ default constructor. - */ - CAdaptation(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL( MFMRadioTunerControlObserver& aObserver ); - - private: // Data - // Tuner - CTuner* iTuner; - CRdsGenerator* iRds; - CAfSwitcher* iRdsAf; - }; - -#endif // FMRADIOTUNERCONTROLSTUB_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/group/bld.inf --- a/audiostubs/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project build file for adaptation DirectX Driver -* -*/ - - -PRJ_PLATFORMS - -PRJ_EXPORTS - -PRJ_MMPFILES - - -//DevSound Stub -#include "../devsoundextensions_stubs/group/bld.inf" - -//FM Radio Tuner Control -#include "../fmradiotunercontrolstub/Group/bld.inf" - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/layers.sysdef.xml --- a/audiostubs/layers.sysdef.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ - - -]> - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 audiostubs/sysdef_1_4_0.dtd --- a/audiostubs/sysdef_1_4_0.dtd Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/group/bld.inf --- a/drm_stubs/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build file for WM DRM Keystorage -* -*/ - - -#include - -PRJ_EXPORTS - -#if (defined __WINDOWS_MEDIA_DRM) - -../wmdrmkeystorage/armv5/urel/wmdrmkeystorage.dll /epoc32/release/armv5/urel/wmdrmkeystorage.dll -../wmdrmkeystorage/armv5/udeb/wmdrmkeystorage.dll /epoc32/release/armv5/udeb/wmdrmkeystorage.dll -../wmdrmkeystorage/armv5/lib/wmdrmkeystorage.lib /epoc32/release/armv5/lib/wmdrmkeystorage.lib -../wmdrmkeystorage/armv5/lib/wmdrmkeystorage.dso /epoc32/release/armv5/lib/wmdrmkeystorage.dso -../wmdrmkeystorage/armv5/lib/wmdrmkeystorage{000a0000}.dso /epoc32/release/armv5/lib/wmdrmkeystorage{000a0000}.dso - -../wmdrmkeystorage/winscw/urel/wmdrmkeystorage.dll /epoc32/release/winscw/urel/wmdrmkeystorage.dll -../wmdrmkeystorage/winscw/udeb/wmdrmkeystorage.dll /epoc32/release/winscw/udeb/wmdrmkeystorage.dll -../wmdrmkeystorage/winscw/udeb/wmdrmkeystorage.lib /epoc32/release/winscw/udeb/wmdrmkeystorage.lib - - -../wmdrmpd/armv5/urel/wmdrmpd.dll /epoc32/release/armv5/urel/wmdrmpd.dll -../wmdrmpd/armv5/udeb/wmdrmpd.dll /epoc32/release/armv5/udeb/wmdrmpd.dll -../wmdrmpd/armv5/lib/wmdrmpd.lib /epoc32/release/armv5/lib/wmdrmpd.lib -../wmdrmpd/armv5/lib/wmdrmpd.dso /epoc32/release/armv5/lib/wmdrmpd.dso -../wmdrmpd/armv5/lib/wmdrmpd{000a0000}.dso /epoc32/release/armv5/lib/wmdrmpd{000a0000}.dso - -../wmdrmpd/winscw/urel/wmdrmpd.dll /epoc32/release/winscw/urel/wmdrmpd.dll -../wmdrmpd/winscw/udeb/wmdrmpd.dll /epoc32/release/winscw/udeb/wmdrmpd.dll -../wmdrmpd/winscw/udeb/wmdrmpd.lib /epoc32/release/winscw/udeb/wmdrmpd.lib - -// WM DRM agent -../wmdrmpd/data/resource/plugins/wmdrmagent.rsc /epoc32/data/z/resource/plugins/wmdrmagent.rsc -../wmdrmpd/data/resource/plugins/wmdrmagent.rsc /epoc32/release/winscw/udeb/z/resource/plugins/wmdrmagent.rsc -../wmdrmpd/data/resource/plugins/wmdrmagent.rsc /epoc32/release/winscw/urel/z/resource/plugins/wmdrmagent.rsc - -../wmdrmpd/winscw/udeb/wmdrmagent.dll /epoc32/release/winscw/udeb/wmdrmagent.dll -../wmdrmpd/winscw/urel/wmdrmagent.dll /epoc32/release/winscw/urel/wmdrmagent.dll - -../wmdrmpd/armv5/udeb/wmdrmagent.dll /epoc32/release/armv5/udeb/wmdrmagent.dll -../wmdrmpd/armv5/urel/wmdrmagent.dll /epoc32/release/armv5/urel/wmdrmagent.dll - -../wmdrmpd/armv5/urel/cameseutility.dll /epoc32/release/armv5/urel/cameseutility.dll -../wmdrmpd/armv5/udeb/cameseutility.dll /epoc32/release/armv5/udeb/cameseutility.dll -../wmdrmpd/armv5/lib/cameseutility.lib /epoc32/release/armv5/lib/cameseutility.lib -../wmdrmpd/armv5/lib/cameseutility.dso /epoc32/release/armv5/lib/cameseutility.dso -../wmdrmpd/armv5/lib/cameseutility{000a0000}.dso /epoc32/release/armv5/lib/cameseutility{000a0000}.dso -../wmdrmpd/armv5/lib/cameseutility{000a0000}.lib /epoc32/release/armv5/lib/cameseutility{000a0000}.lib - -../wmdrmpd/winscw/urel/cameseutility.dll /epoc32/release/winscw/urel/cameseutility.dll -../wmdrmpd/winscw/udeb/cameseutility.dll /epoc32/release/winscw/udeb/cameseutility.dll -../wmdrmpd/winscw/udeb/cameseutility.lib /epoc32/release/winscw/udeb/cameseutility.lib - -../wmdrmpd/armv5/urel/wmdrmdla.dll /epoc32/release/armv5/urel/wmdrmdla.dll -../wmdrmpd/armv5/udeb/wmdrmdla.dll /epoc32/release/armv5/udeb/wmdrmdla.dll -../wmdrmpd/armv5/lib/wmdrmdla.lib /epoc32/release/armv5/lib/wmdrmdla.lib -../wmdrmpd/armv5/lib/wmdrmdla.dso /epoc32/release/armv5/lib/wmdrmdla.dso -../wmdrmpd/armv5/lib/wmdrmdla{000a0000}.dso /epoc32/release/armv5/lib/wmdrmdla{000a0000}.dso -../wmdrmpd/armv5/lib/wmdrmdla{000a0000}.lib /epoc32/release/armv5/lib/wmdrmdla{000a0000}.lib - -../wmdrmpd/winscw/urel/wmdrmdla.dll /epoc32/release/winscw/urel/wmdrmdla.dll -../wmdrmpd/winscw/udeb/wmdrmdla.dll /epoc32/release/winscw/udeb/wmdrmdla.dll -../wmdrmpd/winscw/udeb/wmdrmdla.lib /epoc32/release/winscw/udeb/wmdrmdla.lib - -// iby files - -../rom/wmdrmpd_dist.iby CORE_MW_LAYER_IBY_EXPORT_PATH( wmdrmpd_dist.iby ) -../rom/wmdrmkeystorage_dist.iby CORE_MW_LAYER_IBY_EXPORT_PATH( wmdrmkeystorage_dist.iby ) - -#endif // __WINDOWS_MEDIA_DRM - -PRJ_PLATFORMS -DEFAULT - -PRJ_MMPFILES \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/layers.sysdef.xml --- a/drm_stubs/layers.sysdef.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ - - -]> - - - - - - - - - - - diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/rom/wmdrmkeystorage_dist.iby --- a/drm_stubs/rom/wmdrmkeystorage_dist.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: IBY file -* -*/ - -#ifndef WMDRMKEYSTORAGE_DIST_IBY -#define WMDRMKEYSTORAGE_DIST_IBY - -#include - -#if (defined __WINDOWS_MEDIA_DRM) -file=ABI_DIR\BUILD_DIR\wmdrmkeystorage.dll SHARED_LIB_DIR\wmdrmkeystorage.dll -#endif // __WINDOWS_MEDIA_DRM - -#endif // WMDRMKEYSTORAGE_DIST_IBY diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/rom/wmdrmpd_dist.iby --- a/drm_stubs/rom/wmdrmpd_dist.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: IBY file -* -*/ - -#ifndef WMDRMPD_DIST_IBY -#define WMDRMPD_DIST_IBY - -#include - -#if (defined __WINDOWS_MEDIA_DRM) - -file=ABI_DIR\BUILD_DIR\cameseutility.dll SHARED_LIB_DIR\cameseutility.dll -ECOM_PLUGIN(wmdrmagent.dll,10205CB6.rsc) -file=ABI_DIR\BUILD_DIR\wmdrmdla.dll SHARED_LIB_DIR\wmdrmdla.dll -file=ABI_DIR\BUILD_DIR\wmdrmpd.dll SHARED_LIB_DIR\wmdrmpd.dll - -#endif // __WINDOWS_MEDIA_DRM - -#endif // WMDRMPD_DIST_IBY diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/sysdef_1_5_1.dtd --- a/drm_stubs/sysdef_1_5_1.dtd Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmkeystorage/armv5/lib/wmdrmkeystorage.dso Binary file drm_stubs/wmdrmkeystorage/armv5/lib/wmdrmkeystorage.dso has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmkeystorage/armv5/lib/wmdrmkeystorage.lib Binary file drm_stubs/wmdrmkeystorage/armv5/lib/wmdrmkeystorage.lib has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmkeystorage/armv5/lib/wmdrmkeystorage{000a0000}.dso Binary file drm_stubs/wmdrmkeystorage/armv5/lib/wmdrmkeystorage{000a0000}.dso has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmkeystorage/armv5/udeb/wmdrmkeystorage.dll Binary file drm_stubs/wmdrmkeystorage/armv5/udeb/wmdrmkeystorage.dll has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmkeystorage/armv5/urel/wmdrmkeystorage.dll Binary file drm_stubs/wmdrmkeystorage/armv5/urel/wmdrmkeystorage.dll has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmkeystorage/winscw/udeb/wmdrmkeystorage.dll Binary file drm_stubs/wmdrmkeystorage/winscw/udeb/wmdrmkeystorage.dll has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmkeystorage/winscw/udeb/wmdrmkeystorage.lib Binary file drm_stubs/wmdrmkeystorage/winscw/udeb/wmdrmkeystorage.lib has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmkeystorage/winscw/urel/wmdrmkeystorage.dll Binary file drm_stubs/wmdrmkeystorage/winscw/urel/wmdrmkeystorage.dll has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/armv5/lib/cameseutility.dso Binary file drm_stubs/wmdrmpd/armv5/lib/cameseutility.dso has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/armv5/lib/cameseutility.lib Binary file drm_stubs/wmdrmpd/armv5/lib/cameseutility.lib has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/armv5/lib/cameseutility{000a0000}.dso Binary file drm_stubs/wmdrmpd/armv5/lib/cameseutility{000a0000}.dso has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/armv5/lib/cameseutility{000a0000}.lib Binary file drm_stubs/wmdrmpd/armv5/lib/cameseutility{000a0000}.lib has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/armv5/lib/wmdrmdla.dso Binary file drm_stubs/wmdrmpd/armv5/lib/wmdrmdla.dso has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/armv5/lib/wmdrmdla.lib Binary file drm_stubs/wmdrmpd/armv5/lib/wmdrmdla.lib has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/armv5/lib/wmdrmdla{000a0000}.dso Binary file drm_stubs/wmdrmpd/armv5/lib/wmdrmdla{000a0000}.dso has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/armv5/lib/wmdrmdla{000a0000}.lib Binary file drm_stubs/wmdrmpd/armv5/lib/wmdrmdla{000a0000}.lib has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/armv5/lib/wmdrmpd.dso Binary file drm_stubs/wmdrmpd/armv5/lib/wmdrmpd.dso has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/armv5/lib/wmdrmpd.lib Binary file drm_stubs/wmdrmpd/armv5/lib/wmdrmpd.lib has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/armv5/lib/wmdrmpd{000a0000}.dso Binary file drm_stubs/wmdrmpd/armv5/lib/wmdrmpd{000a0000}.dso has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/armv5/udeb/cameseutility.dll Binary file drm_stubs/wmdrmpd/armv5/udeb/cameseutility.dll has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/armv5/udeb/wmdrmagent.dll Binary file drm_stubs/wmdrmpd/armv5/udeb/wmdrmagent.dll has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/armv5/udeb/wmdrmdla.dll Binary file drm_stubs/wmdrmpd/armv5/udeb/wmdrmdla.dll has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/armv5/udeb/wmdrmpd.dll Binary file drm_stubs/wmdrmpd/armv5/udeb/wmdrmpd.dll has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/armv5/urel/cameseutility.dll Binary file drm_stubs/wmdrmpd/armv5/urel/cameseutility.dll has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/armv5/urel/wmdrmagent.dll Binary file drm_stubs/wmdrmpd/armv5/urel/wmdrmagent.dll has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/armv5/urel/wmdrmdla.dll Binary file drm_stubs/wmdrmpd/armv5/urel/wmdrmdla.dll has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/armv5/urel/wmdrmpd.dll Binary file drm_stubs/wmdrmpd/armv5/urel/wmdrmpd.dll has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/data/resource/plugins/wmdrmagent.rsc Binary file drm_stubs/wmdrmpd/data/resource/plugins/wmdrmagent.rsc has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/winscw/udeb/cameseutility.dll Binary file drm_stubs/wmdrmpd/winscw/udeb/cameseutility.dll has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/winscw/udeb/cameseutility.lib Binary file drm_stubs/wmdrmpd/winscw/udeb/cameseutility.lib has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/winscw/udeb/wmdrmagent.dll Binary file drm_stubs/wmdrmpd/winscw/udeb/wmdrmagent.dll has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/winscw/udeb/wmdrmdla.dll Binary file drm_stubs/wmdrmpd/winscw/udeb/wmdrmdla.dll has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/winscw/udeb/wmdrmdla.lib Binary file drm_stubs/wmdrmpd/winscw/udeb/wmdrmdla.lib has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/winscw/udeb/wmdrmpd.dll Binary file drm_stubs/wmdrmpd/winscw/udeb/wmdrmpd.dll has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/winscw/udeb/wmdrmpd.lib Binary file drm_stubs/wmdrmpd/winscw/udeb/wmdrmpd.lib has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/winscw/urel/cameseutility.dll Binary file drm_stubs/wmdrmpd/winscw/urel/cameseutility.dll has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/winscw/urel/wmdrmagent.dll Binary file drm_stubs/wmdrmpd/winscw/urel/wmdrmagent.dll has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/winscw/urel/wmdrmdla.dll Binary file drm_stubs/wmdrmpd/winscw/urel/wmdrmdla.dll has changed diff -r b7e5ed8c1342 -r e71858845f73 drm_stubs/wmdrmpd/winscw/urel/wmdrmpd.dll Binary file drm_stubs/wmdrmpd/winscw/urel/wmdrmpd.dll has changed diff -r b7e5ed8c1342 -r e71858845f73 ocrsrv_stub/BWINS/ocrsrvU.DEF --- a/ocrsrv_stub/BWINS/ocrsrvU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - ?CreateOCREngineL@OCREngineFactory@@SAPAVMOCREngineInterface@@AAVMOCREngineObserver@@VTOcrEngineEnv@@W4TEngineType@1@@Z @ 1 NONAME ; class MOCREngineInterface * OCREngineFactory::CreateOCREngineL(class MOCREngineObserver &, class TOcrEngineEnv, enum OCREngineFactory::TEngineType) - ?ReleaseOCREngine@OCREngineFactory@@SAXPAVMOCREngineInterface@@@Z @ 2 NONAME ; void OCREngineFactory::ReleaseOCREngine(class MOCREngineInterface *) - diff -r b7e5ed8c1342 -r e71858845f73 ocrsrv_stub/EABI/ocrsrvU.DEF --- a/ocrsrv_stub/EABI/ocrsrvU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -EXPORTS - _ZN16OCREngineFactory16CreateOCREngineLER18MOCREngineObserver13TOcrEngineEnvNS_11TEngineTypeE @ 1 NONAME - _ZN16OCREngineFactory16ReleaseOCREngineEP19MOCREngineInterface @ 2 NONAME - _ZTI10COCREngine @ 3 NONAME ; ## - _ZTI10CShareData @ 4 NONAME ; ## - _ZTI14CEngineAdaptor @ 5 NONAME ; ## - _ZTI14COCREngineList @ 6 NONAME ; ## - _ZTI18COCREngineImplBase @ 7 NONAME ; ## - _ZTI24COCREngineRecognizeBlock @ 8 NONAME ; ## - _ZTI25COCREngineLayoutRecognize @ 9 NONAME ; ## - _ZTV10COCREngine @ 10 NONAME ; ## - _ZTV10CShareData @ 11 NONAME ; ## - _ZTV14CEngineAdaptor @ 12 NONAME ; ## - _ZTV14COCREngineList @ 13 NONAME ; ## - _ZTV18COCREngineImplBase @ 14 NONAME ; ## - _ZTV24COCREngineRecognizeBlock @ 15 NONAME ; ## - _ZTV25COCREngineLayoutRecognize @ 16 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 ocrsrv_stub/group/bld.inf --- a/ocrsrv_stub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -/* -* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Component definition file used for building the WLAN HW Init -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -PRJ_MMPFILES -ocrsrvstub.mmp diff -r b7e5ed8c1342 -r e71858845f73 ocrsrv_stub/group/ocrsrvstub.mmp --- a/ocrsrv_stub/group/ocrsrvstub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project definition file for project ocrsrv -* -*/ - - -#include -#include - -TARGET ocrsrv.dll -TARGETTYPE dll -UID 0x1000008D 0x0F41E102 - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH . -SOURCE ../src/ocrstubdllmain.cpp -SOURCE ../src/ocrstubfactory.cpp - -USERINCLUDE ../inc - -// This is a SYSTEMINCLUDE macro containing the middleware -// layer specific include directories -MW_LAYER_SYSTEMINCLUDE - -SYSTEMINCLUDE ../inc - -LIBRARY euser.lib - -LANG SC - -// End Of File diff -r b7e5ed8c1342 -r e71858845f73 ocrsrv_stub/inc/language.h --- a/ocrsrv_stub/inc/language.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,407 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: language manager definitions -* -*/ - - -#ifndef OCRLANGUAGE_H -#define OCRLANGUAGE_H - -// INCLUDES FILES -#include "languageconvertor.h" -#include "ocrthread.h" -#include -#include - -// CONSTANTS -const TInt KFileNameLength = 128; - -/** Pathes where the engine marks stores */ -_LIT(KDataPathZ, "z:\\resource\\ocrsrv\\*.dat"); -_LIT(KDataPathC, "c:\\resource\\ocrsrv\\*.dat"); - -_LIT( KExtend, "dll" ); - -/** Language Definitions */ -const TInt KEngineLangInvalid ( 0 ); -const TInt KEngineLangChineseSimp ( 1 ); -const TInt KEngineLangChineseTrad ( 2 ); -const TInt KEngineLangJapanese ( 3 ); -const TInt KEngineLangEnglish ( 101 ); -const TInt KEngineLangFinish ( 102 ); - -/** - * Internal Language Structure - * - * Map one language instance with an engine id - * - * @lib ocrsrv.lib - * @since S60 v3.1 - */ -class TOCRLanguage - { -public: - - /** - * Eninge id - */ - TInt iEngineId; - - /** - * Language - */ - TLanguage iLanguage; - }; - -/** - * Internal Language Structure - * - * Map two combined languages with an engine ID - * - * @lib ocrsrv.lib - * @since S60 v3.1 - */ -class TOCRCombinedLanguage - { -public: - - /** - * Eninge id - */ - TInt iEngineId; - - /** - * Eastern language that the engine supports - */ - TLanguage iLanguageEast; - - /** - * Western language that the engine supports - */ - TLanguage iLanguageWest; - }; - -/** - * OCR Engine Wrapper class - * - * OCR Engine wrapper which offers the abstruct of all - * OCR engines - * - * @lib ocrsrv.lib - * @since S60 v3.1 - */ -class COCREngine : public CBase - { -public: - - /** - * Default C++ Destructor - */ - virtual ~COCREngine(); - - /** - * Symbian Two-phased constructor - */ - static COCREngine* NewL(const TDesC& aEnginePathAndName,const TInt aEngineId); - - /** - * Initialize the analyze engine - * @since S60 v3.1 - * @return None - */ - void AnalyzeEngineL(); - - /** - * Empty data of current engine - * @since S60 v3.1 - * @return none - */ - void EmptyData(); - - /** - * Get engine Id - * @since S60 v3.1 - * @return Engine id - */ - inline const TInt GetEngineId() const ; - - /** - * Get unique engine name - * @since S60 v3.1 - * @param aEngineName A new engine name - * @return None - */ - void GetEngineName(TDes& aEngineName) const ; - - /** - * Get languages the engine support - * @since S60 v3.1 - * @return Supported language list - */ - inline const RArray& GetSupportLanguage() const ; - - /** - * Get language combinations the engine support - * @since S60 v3.1 - * @return Supported language combination list - */ - inline const RArray& GetSupportCombinedLanguage() const; - -private: - - /** - * By default Symbian 2nd phase constructor is private - * @since S60 v3.1 - * @param aEngineName Engine name to be constructed - * @param aEngineId Engine Id to be constructed - * @return None - */ - void ConstructL(const TDesC& aEngineName,const TInt aEngineId); - - /** - * Justify if given language is an eastern language - * @since S60 v3.1 - * @param aLanguage A language to be tested - * @return ETrue if it's an eastern language - */ - inline TBool IsEast(const TLanguage aLanguage) const; - - /** - * Combine eastern and western languages - * @since S60 v3.1 - * @param aEast eastern language to be combined - * @param aWest western language to be combined - * @param aDestination An array which holds the result - * @return None - */ - void CombineLanguage(const RArray& aEast, - const RArray& aWest, - RArray& aDestination); - - /** - * C++ default constructor - */ - COCREngine(); - -private: - - /** - * Engine id - */ - TInt iEngineId; - - /** - * Enigne name - */ - TBuf iEngineName; - - /** - * Languages that the engine support - */ - RArray iLanguageList; - - /** - * Language combinations that the engine support - */ - RArray iCombinedLanguageList; - }; - -/** - * OCR Engine Wrapper list - * - * List of all loaded engines - * - * @lib ocrsrv.lib - * @since S60 v3.1 - */ -class COCREngineList : public CBase - { -public: - - /** - * Symbian Two-phased constructor - */ - static COCREngineList* NewL(); - - /** - * Default C++ destructor - */ - virtual ~COCREngineList(); - - /** - * Justify if the language is supported - * @since S60 v3.1 - * @param aLanguage A language to be tested - * @return ETrue if supported - */ - TBool IsSupportLanguage(const TLanguage aLanguage); - - /** - * Get all supported languages - * @since S60 v3.1 - * @param aLanguages A list which holds all supported languages - * @return None - */ - void GetALLSupportLanguage(RArray &aLanguages); - - /** - * Refresh language databases, this method shall be always called - * whenever databases changed - * @since S60 v3.1 - * @return None - */ - void RefreshL(); - - /** - * Get supported engine numbers - * @since S60 v3.1 - * @return Num of engine detected - */ - inline TInt GetEngineCount() const; - - /** - * Get engine name by a given language - * @since S60 v3.1 - * @param aLanguage A language supported by the engine - * @param aEngineName The name of the engine - * @return KErrNone if no error, otherwise system level error raised - */ - TInt GetEngineName(const TLanguage aLanguage, TDes& aEngineName); - - /** - * Get engine name by language combination - * @since S60 v3.1 - * @param aLanguageFirst A language supported by the engine - * @param aLanguageSecond Another language supported by the engine - * @param aEngineName The name of the engine - * @return KErrNone if no error, otherwise system level error raised - */ - TInt GetEngineName(const TLanguage aLanguageFirst, - const TLanguage aLanguageSecond, - TDes& aEngineName); - -private: - - /** - * Empty data of the engine - * @since S60 v3.1 - * @return None - */ - void EmptyData(); - - /** - * Analyze engines information - * @since S60 v3.1 - * @return None - */ - void DoAnalyzeEnginesInfoL(); - - /** - * Set engines information - * @since S60 v3.1 - * @param aDir A directory information array - * @param aCount A number of dirs of the array - * @return None - */ - void SetEngineInfoL(const CDir* aDir, const TInt aCount); - - /** - * Default Symbian 2nd phase constructor - * @since S60 v3.1 - * @return None - */ - void ConstructL(); - - /** - * Add language array - * @since S60 v3.1 - * @param aSource A src language array - * @param aDestination A tar language array - * @return None - */ - void AddLanguageArray(const RArray& aSource, RArray& aDestination); - - /** - * Add language combination array - * @since S60 v3.1 - * @param aSource A src language array - * @param aDestination A tar language array - * @return None - */ - void AddCombinedLanguageArray(const RArray& aSource, - RArray& aDestination); - - /** - * Test if the language is within one array - * @since S60 v3.1 - * @param aLanguage A language to be tested - * @param aArray An array to be tested - * @return ETrue if the language is in language list - */ - TBool IsHaveLanguage(const TLanguage aLanguage, const RArray& aArray) const; - - /** - * Test if the language is within one combined array - * @since S60 v3.1 - * @param aLanguageFirst A language to be tested - * @param aLanguageSecond Another language to be tested - * @param aArray An array to be tested - * @return ETrue if the language is in language list - */ - TBool IsHaveCombinedLanguage(const TLanguage aLanguageFirst, - const TLanguage aLanguageSecond, - const RArray& aArray) const; - - /** - * C++ default constructor - */ - COCREngineList(); - -private: - - /** - * Pathes for searching the ocr libraries - */ - RPointerArray iPathes; - - /** - * List of all supported lanugages - */ - RArray iLanguageList; - - /** - * List of all combined languages, this generated from iLanguageList - * e.g. if we support English and Japanese, then the iCombinedLanguageList - * would have English, Japanese and EnglishJapanese languages. Note that - * only one western language and one eastern language would be combined - */ - RArray iCombinedLanguageList; - - /** - * List of all loaded OCR engine instances - */ - RPointerArray iOCREngineList; - - /** - * File session - */ - RFs iFs; - }; - -#include "language.inl" - -#endif // OCRLANGUAGE_H - -// End Of File diff -r b7e5ed8c1342 -r e71858845f73 ocrsrv_stub/inc/language.inl --- a/ocrsrv_stub/inc/language.inl Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Inline functions for language mgr -* -*/ - - -// ----------------------------------------------------------------------------- -// Get the id of the engine -// ----------------------------------------------------------------------------- -// -inline const TInt COCREngine::GetEngineId() const - { - return iEngineId; - } - -// ----------------------------------------------------------------------------- -// Get supported languages -// ----------------------------------------------------------------------------- -// -inline const RArray& COCREngine::GetSupportLanguage() const - { - return iLanguageList; - } - -// ----------------------------------------------------------------------------- -// Get supported language list -// ----------------------------------------------------------------------------- -// -inline const RArray& COCREngine::GetSupportCombinedLanguage() const - { - return iCombinedLanguageList; - } - -// ----------------------------------------------------------------------------- -// Test if the language is a eastern language -// ----------------------------------------------------------------------------- -// -inline TBool COCREngine::IsEast(const TLanguage aLanguage) const - { - return ((aLanguage == ELangPrcChinese) || - (aLanguage == ELangJapanese) || - (aLanguage == ELangHongKongChinese) || - (aLanguage == ELangTaiwanChinese)); - } - -// ----------------------------------------------------------------------------- -// ?implementation_description -// ----------------------------------------------------------------------------- -// -inline TInt COCREngineList::GetEngineCount() const - { - return iOCREngineList.Count(); - } - -// End Of File diff -r b7e5ed8c1342 -r e71858845f73 ocrsrv_stub/inc/languageconvertor.h --- a/ocrsrv_stub/inc/languageconvertor.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Language convertor definitions -* -*/ - - -#ifndef OCRLANGUAGECONVERTOR_H -#define OCRLANGUAGECONVERTOR_H - -// INCLUDE FILES -#include - -/** - * Language utils - * - * Offering language utilities - * - * @lib ocrsrv.lib - * @since S60 v3.1 - */ -class ConvertLanguage - { - public: - - /** - * Convert vendor language defination to Symbian's language definitions - * @since S60 v3.1 - * @param aLanguage A language to be converted - * @return The language converted - */ - static TLanguage ConvertToSymbian(const TInt aLanguage); - - /** - * Convert Symbian language defination to Vendor's language definitions - * @since S60 v3.1 - * @param aLanguage A language to be converted - * @return The language converted - */ - static TInt ConvertToVendor(const TLanguage aLanguage); - - /** - * Test if the language refer to multiple symbian's language definitions - * @since S60 v3.1 - * @param aLanguage A language to be tested - * @return ETrue if it is - */ - static TBool IsForMutiLanguage(const TInt aLanguage); - - /** - * Get symbian's full language list for the language - * @since S60 v3.1 - * @param aLanguage A language to be specified - * @param aArray Symbian's full language list - * @return None - */ - static void GetMutiLanguage(const TInt aLanguage, RArray& aArray); - }; - -#endif // OCRLANGUAGECONVERTOR_H - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 ocrsrv_stub/inc/ocradaptor.h --- a/ocrsrv_stub/inc/ocradaptor.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,220 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ocradapter definitions -* -*/ - - -#ifndef OCRADAPTOR_H -#define OCRADAPTOR_H - -// INCLUDES -#include - -// FORWARD DECLARATIONS -class CShareData; -enum TEngineCmd; - -// CLASS DECLARATION - -/** - * Adaptor for engines - * - * Implement concrete operation with child thread either send request - * to child thread or receive operation result from child thread - * - * @lib ocrsrv.lib - * @since S60 v3.1 - */ -class CEngineAdaptor : public CActive - { - public: - - /** - * Symbian Two-phased constructor - */ - static CEngineAdaptor* NewL(MOCREngineObserver& aObserver, - const TFileName& aTargetDll, - const TOcrEngineEnv aEngineEnv); - - /** - * C++ Default Destructor - */ - virtual ~CEngineAdaptor(); - - public: - - /** - * Issue request to child thread - * @since S60 v3.1 - * @param aCmd A command that is issued - * @return KErrNone if no error - */ - TInt IssueRequest(const TEngineCmd aCmd); - - /** - * Set image handle to be processed - * @since S60 v3.1 - * @param aHandle Handle to the image - * @return None - */ - void SetImage(const TInt aHandle); - - /** - * Set the setting for layout - * @since S60 v3.1 - * @param aSettings Layout settings - * @return None - */ - void SetLayoutSetting(const TOCRLayoutSetting& aSettings); - - /** - * Set Layout block information - * @since S60 v3.1 - * @param aSettings Layout block information - * @return None - */ - void SetLayoutBlockInfo(const TOCRLayoutBlockInfo& aLayoutInfo); - - /** - * Set special region information - * @since S60 v3.1 - * @param aSettings Special region information - * @return None - */ - void SetSpecialRegionInfo(const TRegionInfo& aRegionInfo); - - /** - * Set recognition setting - * @since S60 v3.1 - * @param aSettings Recognize settings - * @return None - */ - void SetRecognizeSetting(const TOCRRecognizeSetting& aSettings); - - /** - * Set blocks to be recognized - * @since S60 v3.1 - * @param aRecognizedBlock Blocks to be recognized - * @return None - */ - void SetRecognizeBlocksL(const RArray& aRecognizedBlock); - - /** - * Set active languages - * @since S60 v3.1 - * @param aActiveLanguage Languages to be recognized - * @return None - */ - void SetActiveLangL(const RArray& aActiveLanguage); - - /** - * Cancel the operation - * @since S60 v3.1 - * @return None - */ - void CancelOperation(); - - /** - * Test if the engine is active or not - * @since S60 v3.1 - * @return None - */ - TBool IsEngineActive() const; - - protected: // From CActive - - /** - * AO callback function - * @since S60 v3.1 - * @return None - */ - void RunL(); - - /** - * AO callback function - * @since S60 v3.1 - * @return None - */ - TInt RunError(TInt aError); - - /** - * AO callback function - * @since S60 v3.1 - * @return None - */ - void DoCancel(); - - protected: - - /** - * Send the command to exit and kill the thread - * @since S60 v3.1 - * @return None - */ - void SendExitCmd(); - - /** - * Get the current CPU tick of the thread - * @since S60 v3.1 - * @param aThreadName Name of the thread - * @return None - */ - static void GetThreadName(TDes& aThreadName); - - /** - * Test if the current thread is alive - * @since S60 v3.1 - * @return ETrue if the thread is alive - */ - TBool IsThreadAlive() const; - - private: - - /** - * C++ default constructor - */ - CEngineAdaptor(MOCREngineObserver& aObserver); - - /** - * Default Symbian 2nd phase constructor - */ - void ConstructL(const TFileName& aTargetDll, const TOcrEngineEnv aEngineEnv); - - private: // Data - - /** - * Handle of the child thread - */ - RThread iThread; - - /** - * Engine observer - */ - MOCREngineObserver& iObserver; - - /** - * Pointer to the shared data (Own) - */ - CShareData* iShareData; - - /** - * Request Status - */ - TRequestStatus iRequestStatus; - }; - -#endif // OCRADAPTOR_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 ocrsrv_stub/inc/ocrengine.h --- a/ocrsrv_stub/inc/ocrengine.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,342 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ocrengine definitions -* -*/ - - -#ifndef OCRENGINE_H -#define OCRENGINE_H - -// INCLUDES -#include "language.h" -#include - -/** Activate language selection */ -enum TLanguageSelected - { - /** One language selected to be active */ - ESignleLanguageSelected = 1, - - /** Two languages selected to be active */ - ETwoLanguageSelected = 2 - }; - -// FORWARD DECLARATIONS -class CEngineAdaptor; -class COCREngineImplBase; - -// CLASS DECLARATION - -/** - * Ocr engine wrapper implementation base - * - * Abstruct for ocr engines - * - * @lib ocrsrv.lib - * @since S60 v3.1 - */ -class COCREngineImplBase : public MOCREngineBase, - public CBase - { -public: - - /** - * Symbian Two-phased constructor. - */ - static COCREngineImplBase* NewL(MOCREngineObserver& aObserver, const TOcrEngineEnv aEngineEnv); - - /** - * Default C++ Destructor - */ - virtual ~COCREngineImplBase(); - -public: // From MOCREngineInterface - - /** - * Cancel recognition operation - * @since S60 v3.1 - * @return None - */ - virtual void CancelOperation(); - - /** - * Get the version of the ocrsrv component - * @since S60 v3.1 - * @return The version of the module - */ - virtual TVersion GetVersion() const; - - /** - * Refresh installed language databases - * @since S60 v3.1 - * @return None - */ - virtual void RefreshInstalledLanguageL(); - - /** - * Set the language for recognition - * @since S60 v3.1 - * @param aActiveLanguage A languages to be activated - * @return None - */ - virtual void SetActiveLanguageL(const RArray& aActiveLanguage); - - /** - * Get the installed file directory - * @since S60 v3.1 - * @param aLanguages Get installed languages - * @return None - */ - virtual void GetInstalledLanguage(RArray& aLanguages) const; - - /** - * Test if the language is supported - * @since S60 v3.1 - * @param aLanguage A language to be tested - * @return ETrue if it's supported - */ - virtual TBool IsLanguageSupported(const TLanguage aLanguage); - - /** - * Release the engine instance - * @since S60 v3.1 - * @return None - */ - void Release(); - - /** - * Get adaptor object - * @since S60 v3.1 - * @return Pointer to the adaptor object - */ - inline CEngineAdaptor* GetAdaptor() const; - - /** - * Test if the engine is active or not - * @since S60 v3.1 - * @return None - */ - virtual TBool IsEngineActive() const; - -protected: - - /** - * Default Symbian 2nd phase constructor - */ - void ConstructL(MOCREngineObserver& aObserver, const TOcrEngineEnv aEngineEnv); - -private: - - /** - * Reset adaptor when active language(s) is changed - * @since S60 v3.1 - * @param aActiveLanguage New language to be activated - * @return None - */ - void ResetAdaptorL(const RArray& aActiveLanguage); - -private: - - /** - * Pointer to the adaptor instance (Own) - */ - CEngineAdaptor* iAdaptor; - - /** - * Pointer to the engine observer (Not Own) - */ - MOCREngineObserver* iObserver; - - /** - * Pointer to the current engine (Own) - */ - COCREngineList* iLanguageEngine; - - /** - * File name of the current loaded Dll - */ - TFileName iCurrentDll; - - /** - * Settings of the engine working aera - */ - TOcrEngineEnv iEngineEnv; - }; - -/** - * Ocr engine wrapper for recognition with layout analysis - * - * Abstruct for ocr engines with layout analysis - * - * @lib ocrsrv.lib - * @since S60 v3.1 - */ -class COCREngineLayoutRecognize : public MOCREngineLayoutRecognize, - public CBase - { - friend class OCREngineFactory; - -public: - /** - * Symbian Two-phased constructor. - */ - static COCREngineLayoutRecognize* NewL(MOCREngineObserver& aObserver, - const TOcrEngineEnv aEngineEnv); - -public: // From MOCREngineWithLayout - - /** - * Layout analysis method - * @since S60 v3.1 - * @param aBitmapHandle An image to analyzed - * @param aSettings Setting for layout analysis - * @return None - */ - virtual void LayoutAnalysisL(const TInt aBitmapHandle, const TOCRLayoutSetting aSettings); - - /** - * Text recognition method - * @since S60 v3.1 - * @param aSetting Setting for recognition - * @param aBlock Block Ids to be recognized - * @return None - */ - virtual void RecognizeL(const TOCRRecognizeSetting aSettings, const RArray& aBlock); - - /** - * Provide base functions - * @since S60 v3.1 - * @return Pointer to the base engine instance - */ - MOCREngineBase* Base() const; - -private: - - /** - * Default Symbian 2nd phase constructor - */ - void ConstructL(MOCREngineObserver& aObserver, const TOcrEngineEnv aEngineEnv); - -protected: - - /** - * Default C++ Destructor - */ - virtual ~COCREngineLayoutRecognize(); - -private: - - /** - * Pointer to the engine base instance (Own) - */ - COCREngineImplBase* iBase; - - /** - * Pointer to the adaptor instance (Not Own) - */ - CEngineAdaptor* iAdaptor; - }; - -/** - * Ocr engine wrapper for recognition with block recognition - * - * Abstruct for ocr engines with block recognition - * - * @lib ocrsrv.lib - * @since S60 v3.1 - */ -class COCREngineRecognizeBlock : public MOCREngineRecognizeBlock, - public CBase - { - friend class OCREngineFactory; - -public: - /** - * Description: Two-phased constructor. - */ - static COCREngineRecognizeBlock* NewL(MOCREngineObserver& aObserver, - const TOcrEngineEnv aEngineEnv); - -public: // From MOCREngineWithoutLayout - - /** - * Recognize block without layout analysis - * @since S60 v3.1 - * @param aBitmapHandle An image to analyzed - * @param aLayoutInfo Layout information - * @return None - */ - virtual void RecognizeBlockL(const TInt aBitmapHandle, - const TOCRLayoutBlockInfo aLayoutInfo); - - /** - * Recognize special region - * @since S60 v3.1 - * @param aBitmapHandle An image to analyzed - * @param aRegionInfo Region information - * @return None - */ - virtual void RecognizeSpecialRegionL(const TInt aBitmapHandle, - const TRegionInfo aRegionInfo); - - /** - * Provide base functions - * @since S60 v3.1 - * @return Pointer to the base engine instance - */ - MOCREngineBase* Base() const; - -private: - - /** - * Default Symbian 2nd phase constructor - */ - void ConstructL(MOCREngineObserver& aObserver, const TOcrEngineEnv aEngineEnv); - - /** - * Check the validity of the given rect - * If the range is invalid, a leave will be raised with KErrArgument - * @since S60 v3.1 - * @param aBitmapHandle A bitmap handle - * @param aRange A given range - * @return None - */ - void CheckRangeL(const TInt aBitmapHandle, const TRect aRange); - -protected: - - /** - * Default C++ Destructor - */ - virtual ~COCREngineRecognizeBlock(); - -private: - - /** - * Pointer to the engine base instance (Own) - */ - COCREngineImplBase* iBase; - - /** - * Pointer to the adaptor instance (Not Own) - */ - CEngineAdaptor* iAdaptor; - }; - -#include "ocrengine.inl" - -#endif // OCRENGINE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 ocrsrv_stub/inc/ocrengine.inl --- a/ocrsrv_stub/inc/ocrengine.inl Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Inline functions for engine adaptor -* -*/ - - -// ----------------------------------------------------------------------------- -// Get the pointer to the instance of the engine adaptor -// ----------------------------------------------------------------------------- -// -inline CEngineAdaptor* COCREngineImplBase::GetAdaptor() const - { - return iAdaptor; - } - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 ocrsrv_stub/inc/ocrsharedata.h --- a/ocrsrv_stub/inc/ocrsharedata.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,246 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Shared data definitions -* -*/ - - -#ifndef OCRSHAREDATA_H -#define OCRSHAREDATA_H - -// INCLUDES FILES -#include - -// DATA TYPES - -/** Request definitions between main thread and child thread */ -enum TEngineCmd - { - ECmdInvalid = 0, // Invalid - ECmdLayout, // Layout - ECmdRecognize, // Recognize - ECmdRecognizeBlock, // Recognize block - ECmdRecognizeSpecialRegion, // Recognize special region - ECmdSetLanguage, // Set language - ECmdGetLanguage, // Get language - ECmdRefresh, // Refresh - ECmdExit, // Exit - ECmdLayoutComplete, // Layout complete - ECmdRecognizeComplete, // Recognize complete - ECmdRecognizeBlockComplete, // Recognize block complete - ECmdRecognizeSpecialRegionComplete, // Recognize special region complete - ECmdRecogProcess, // Recognize progress - ECmdIsLanguageSupported // Just if supporting the language - }; - -// FORWARD DECLARATIONS -class CEngineAdaptor; -class EngineThread; - -// CLASS DECLARATION - -/** - * Shared data between threads - * - * Wrapper class for share data between main thread and child thread - * - * @lib ocrsrv.lib - * @since S60 v3.1 - */ -class CShareData : public CBase - { - friend class CEngineAdaptor; - friend class EngineThread; - -public: // Constructors and destructor - - /** - * Symbian Two-phased constructor. - */ - static CShareData* NewL(); - - /** - * C++ Default Destructor. - */ - virtual ~CShareData(); - -public: // New functions - - /** - * Enter Share Section - * @since S60 v3.1 - * @return None - */ - inline void EnterShareSection(); - - /** - * Leave Share Section - * @since S60 v3.1 - * @return None - */ - inline void LeaveShareSection(); - -private: - - /** - * C++ default constructor - */ - CShareData(); - - /** - * Default Symbian 2nd phase constructor - */ - void ConstructL(); - -private: // Data - - /** - * Share data mutex - */ - RMutex iShareMutex; - - /** - * Notifier for the shared data - */ - RSemaphore iNotifier; - - /** - * Save active language information - */ - RArray iActiveLanguage; - - /** - * Save installed language information - */ - RArray iInstalledLanguage; - - /** - * Command sent to child thread - */ - TEngineCmd iCmd; - - /** - * Command sent from child thread to main thread - */ - TEngineCmd iCmdRet; - - /** - * Recognized first block's pointer (Own) - */ - TOCRBlockInfo* iFirstBlock; - - /** - * Information of selected blocks - */ - TOCRBlockInfo* iSelectedBlocks; - - /** - * Information of text region - */ - TOCRTextRgnInfo* iTextRgnInfo; - - /** - * Number of blocks recognized - */ - TInt iBlockCount; - - /** - * OCR binary image (Own) - */ - HBufC8* iBinaryImage; - - /** - * Handle to the image - */ - TInt iImageHandle; - - /** - * Layout setting - */ - TOCRLayoutSetting iLayoutSettings; - - /** - * Recognzie setting - */ - TOCRRecognizeSetting iRecognizeSettings; - - /** - * Layout block information - */ - TOCRLayoutBlockInfo iLayoutInfo; - - /** - * Region information - */ - TRegionInfo iRegionInfo; - - /** - * Cancel flag - */ - TBool iCanceled; - - /** - * Main thread id - */ - TThreadId iMainThreadId; - - /** - * Percent of the progress - */ - TUint iPercent; - - /** - * Error code from the engine - */ - TInt iError; - - /** - * Pointer to Active object's status variable (Not Own) - */ - TRequestStatus* iActiveStatus; - - /** - * Pointer to normal status variable (Not Own) - */ - TRequestStatus* iRequestStatus; - - /** - * Name of the target dll - */ - TFileName iTargetDll; - }; - -// ----------------------------------------------------------------------------- -// CShareData::EnterShareSection -// Description : Enter share section -// ----------------------------------------------------------------------------- -// -inline void CShareData::EnterShareSection() - { - iShareMutex.Wait(); - } - -// ----------------------------------------------------------------------------- -// CShareData::LeaveShareSection -// Description : Leave share section -// ----------------------------------------------------------------------------- -// -inline void CShareData::LeaveShareSection() - { - iShareMutex.Signal(); - } - -#endif // OCRSHAREDATA_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 ocrsrv_stub/inc/ocrthread.h --- a/ocrsrv_stub/inc/ocrthread.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,267 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ocr engine thread definitions -* -*/ - - -#ifndef OCRTHREAD_H -#define OCRTHREAD_H - -// INCLUDES FILES -#include "ocrsharedata.h" - -class CFbsBitmap; - -/** Global function type definitions */ -typedef TBool (*IsCanceled)( void ); -typedef TBool (*RecogProgress)(TUint aPercentage); - -/** Internal error code definition */ -const TInt KErrEngineOK ( 0 ); //no error -const TInt KErrEngineBadImage ( -1001 ); //bad image or unsupported format -const TInt KErrEngineBadLanguage ( -1002 ); //unsupported language -const TInt KErrEngineBadRgn ( -1003 ); //bad layout region -const TInt KErrEngineNoMemory ( -1004 ); //no enough memory -const TInt KErrEngineBadParam ( -1005 ); //wrong parameter -const TInt KErrEngineNotSetLang ( -1006 ); //not set any language -const TInt KErrEngineBadDicFile ( -1007 ); //bad dictionary files -const TInt KErrEngineGeneral ( -1100 ); //the other errors - -/** Number of interfaces defined in the engine DLLs */ -const TInt KNumOfInterfaces ( 14 ); - -/** Implementation interfaces definitions */ -enum TImplementationIds - { - EExitEngine = 1, - EFreeBinImage, - EFreeBlocks, - EGetInstalledLanguages, - EGetVersion, - EInitEngine, - ELayoutAnalysis, - ERecognizeWithLayout, - ERecognizeBlock, - ERefresh, - ESetActiveLanguage, - ERecognizeSpecialRegion, - EIsLanguageSupported, - EFreeTextRgns - }; - -/** - * Version of 3rd party ocr engines - * - * @lib ocrsrv.lib - * @since S60 v3.1 - */ -class TEngineVersion - { -public: - - /** - * Major version - */ - TInt8 iMajor; - - /** - * Minor version - */ - TInt8 iMinor; - - /** - * Build number - */ - TInt16 iBuild; - }; - -/** type definition of the interfaces */ -typedef TInt (*TLibFuncInitEngine)(IsCanceled aFuncIsCanceled, TAny* aParam); -typedef void (*TLibFuncExitEngine)( void ); - -typedef TInt (*TLibFuncLayout)(const CFbsBitmap* aImage, const TOCRLayoutSetting aSettings, HBufC8** aBinImage, TOCRBlockInfo** aBlock, TInt* aBlockCount); -typedef TInt (*TLibFuncRecognize)(HBufC8* aBinImage, const TOCRRecognizeSetting aSettings, TOCRBlockInfo* aBlock, const TInt aBlockCount, TOCRTextRgnInfo** aTextRgn, RecogProgress aFuncRecogProgress); - -typedef void (*TLibFuncFreeBinImage)(HBufC8* aBinImage); -typedef void (*TLibFuncFreeBlocks)(TOCRBlockInfo* aBlock); -typedef void (*TLibFuncFreeTextRgns)(TOCRTextRgnInfo *aTextRgn,const TInt aBlockCount); - -typedef TEngineVersion (*TLibFuncGetVersion)( void ); -typedef TInt (*TLibFuncSetActiveLanguage)(RArray iLanguages); -typedef TInt (*TLibFuncGetInstalledLanguages)(RArray& aLanguages); -typedef TInt (*TLibFuncRefresh)( void ); -typedef TBool (*TLibFuncIsLanguageSupported)(const TLanguage aLanguage); - -typedef TInt (*TLibFuncRecognizeBlock)(const CFbsBitmap* aImage, TOCRLayoutBlockInfo aLayoutInfo, TOCRTextRgnInfo** aTextRgn, RecogProgress aFuncRecogProgress); -typedef TInt (*TLibFuncRecognizeSpecialRegion)(const CFbsBitmap* aImage, TRegionInfo aRegionInfo, TOCRTextRgnInfo** aTextRgn, RecogProgress aFuncRecogProgress); - -// CLASS DECLARATION - -/** - * Thread for Ocr process - * - * Definition of the child thread of the engine - * - * @lib ocrsrv.lib - * @since S60 v3.1 - */ -class EngineThread - { -public: - - /** - * Thread entry function - * @since S60 v3.1 - * @param aData Thread parameter - * @return KErrNone if no error - */ - static TInt ThreadFunction(TAny* aData); - -private: - - /** - * Request Processor - * @since S60 v3.1 - * @param aShareData Pointer to the shared data - * @return None - */ - static void ProcessRequestL(CShareData* aShareData); - - /** - * Inform main thread that request is completed - * @since S60 v3.1 - * @param aShareData Pointer to the shared data - * @param aCmd A specified command - * @param aErrCode An error code - * @return None - */ - static void CompleteRequest(CShareData* aShareData, TEngineCmd aCmd, TInt aErrCode); - - /** - * Reset the vendor engine and release all memory allocated - * @since S60 v3.1 - * @param aShareData Pointer to the shared data - * @param aLibrary A reference to the loaded library - * @return None - */ - static void ResetVendorEngine(CShareData* aShareData, const RLibrary& aLibrary); - - /** - * Get the cancel flag - * @since S60 v3.1 - * @return ETrue if cancal flag is on; otherwise EFalse - */ - static TBool GetCancelFlag(); - - /** - * Get the progress information from the engine - * @since S60 v3.1 - * @param aPercentage A percentage of recognition progress - * @return KErrNone if no error - */ - static TInt RecognizeProgress(TUint aPercentage); - - /** - * Check and convert the engine error to system level error msg - * @since S60 v3.1 - * @param aError Vendor error code - * @return None - */ - static void CheckError(TInt& aError); - - /** - * Handle engine command - * @since S60 v3.1 - * @param aLibrary A handle to the engine library - * @param aCommand A command to be handled - * @param aData Pointer to the shared data - * @return None - */ - static TBool HandleCommandL(const RLibrary& aLibrary, TEngineCmd aCommand, CShareData* aData); - - /** - * Handle engine command - Layout Analysis - * @since S60 v3.1 - * @param aLibrary A handle to the engine library - * @param aCommand A command to be handled - * @param aData Pointer to the shared data - * @return None - */ - static void HandleLayoutAnalysis(const RLibrary& aLibrary, CShareData* aData); - - /** - * Handle engine command - Recognition - * @since S60 v3.1 - * @param aLibrary A handle to the engine library - * @param aCommand A command to be handled - * @param aData Pointer to the shared data - * @return None - */ - static void HandleRecognition(const RLibrary& aLibrary, CShareData* aData); - - /** - * Handle engine command - Block Recognition - * @since S60 v3.1 - * @param aLibrary A handle to the engine library - * @param aCommand A command to be handled - * @param aData Pointer to the shared data - * @return None - */ - static void HandleBlockRecognition(const RLibrary& aLibrary, CShareData* aData); - - /** - * Handle engine command - Special Region Recognition - * @since S60 v3.1 - * @param aLibrary A handle to the engine library - * @param aCommand A command to be handled - * @param aData Pointer to the shared data - * @return None - */ - static void HandleSpecialRegionRecognition(const RLibrary& aLibrary, CShareData* aData); - - /** - * Handle engine command - Getting Language - * @since S60 v3.1 - * @param aLibrary A handle to the engine library - * @param aCommand A command to be handled - * @param aData Pointer to the shared data - * @return None - */ - static void HandleGettingLanguage(const RLibrary& aLibrary, CShareData* aData); - - /** - * Handle engine command - Setting Language - * @since S60 v3.1 - * @param aLibrary A handle to the engine library - * @param aCommand A command to be handled - * @param aData Pointer to the shared data - * @return None - */ - static void HandleSettingLanguage(const RLibrary& aLibrary, CShareData* aData); - - /** - * Handle engine command - Refresh Database - * @since S60 v3.1 - * @param aLibrary A handle to the engine library - * @param aCommand A command to be handled - * @param aData Pointer to the shared data - * @return None - */ - static void HandleRefreshDatabase(const RLibrary& aLibrary, CShareData* aData); - }; - -#endif // OCRTHREAD_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 ocrsrv_stub/layers.sysdef.xml --- a/ocrsrv_stub/layers.sysdef.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - -]> - - - - - - - - - - diff -r b7e5ed8c1342 -r e71858845f73 ocrsrv_stub/src/ocrstubdllmain.cpp --- a/ocrsrv_stub/src/ocrstubdllmain.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2200 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Dll main entry -* -*/ - - -// INCLUDE FILES -#include - -#if !defined(EKA2) - -// requirement for E32 DLLs -EXPORT_C TInt E32Dll(TDllReason) - { - return KErrNone; - } - -#endif // EKA2 - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 ocrsrv_stub/src/ocrstubfactory.cpp --- a/ocrsrv_stub/src/ocrstubfactory.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,313 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Engine factory implementation -* -*/ - - -// INCLUDE FILES -#include "ocrsharedata.h" -#include "ocradaptor.h" -#include "ocrengine.h" -#include "language.h" -#include - -// ================= MEMBER FUNCTIONS ======================= - -// ---------------------------------------------------------- -// OCREngineFactory::ReleaseOCREngine -// Description : Release engine -// ---------------------------------------------------------- -// -EXPORT_C void OCREngineFactory::ReleaseOCREngine(MOCREngineInterface* /*aEngine*/) - { - } - -// ---------------------------------------------------------- -// OCREngineFactory::CreateOCREngineL -// Description : Create engine -// ---------------------------------------------------------- -// -EXPORT_C MOCREngineInterface* OCREngineFactory::CreateOCREngineL(MOCREngineObserver& /*aObserver*/, - const TOcrEngineEnv /*aEngineEnv*/, - TEngineType /*aEngineType*/) - { - User::Leave(KErrNotSupported); - return NULL; - } - -OCREngineFactory::OCREngineFactory() - { - } - -// --------------------------------------------------------------- -// COCREngine::COCREngine -// Description : self-construct -// --------------------------------------------------------------- -// -COCREngine::COCREngine() - { - } - -// --------------------------------------------------------------- -// COCREngine::~COCREngine -// Description : Destruct -// --------------------------------------------------------------- -// -COCREngine::~COCREngine() - { - } - -// ----------------------------------------------------------------------------- -// CShareData::CShareData -// Description : C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CShareData::CShareData() - { - } - -// ----------------------------------------------------------------------------- -// CShareData::~CShareData -// Description : destructor. -// ----------------------------------------------------------------------------- -// -CShareData::~CShareData() - { - } - -// ----------------------------------------------------------------------------- -// CEngineAdaptor::CEngineAdaptor -// Description : C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CEngineAdaptor::CEngineAdaptor(MOCREngineObserver& aObserver) - : CActive(EPriorityNormal), iObserver(aObserver) - { - } - -// ----------------------------------------------------------------------------- -// CEngineAdaptor::~CEngineAdaptor -// Description : Destructor -// ----------------------------------------------------------------------------- -// -CEngineAdaptor::~CEngineAdaptor() - { - } - -// --------------------------------------------------------- -// CEngineAdaptor::RunL() -// Description : callback function for request complete, -// either layout analysis complete, -// or recognize complete -// or recognize process information is given -// --------------------------------------------------------- -// -void CEngineAdaptor::RunL() - { - } - -// --------------------------------------------------------- -// CEngineAdaptor::RunError(...) -// Description : Deal with errors from RunL() -// --------------------------------------------------------- -// -TInt CEngineAdaptor::RunError(TInt /*aError*/) - { - return KErrNone; - } - -// ---------------------------------------------------------- -// CEngineAdaptor::DoCancel -// Description : from CActive -// ---------------------------------------------------------- -// -void CEngineAdaptor::DoCancel() - { - } - -// --------------------------------------------------------------- -// COCREngineList::COCREngineList -// Description : self-construct -// --------------------------------------------------------------- -// -COCREngineList::COCREngineList() - { - } - -// --------------------------------------------------------------- -// COCREngineList::~COCREngineList -// Description : destruct -// --------------------------------------------------------------- -// -COCREngineList::~COCREngineList() - { - } - -// --------------------------------------------------------------- -// COCREngineImplBase::~COCREngineImplBase -// Description : Destructor. -// --------------------------------------------------------------- -// -COCREngineImplBase::~COCREngineImplBase() - { - } - -// --------------------------------------------------------------- -// COCREngineImplBase::CancelRecognition() -// Description : Cancel recognition operation -// ------------------------------------------------------------- -// -TBool COCREngineImplBase::IsEngineActive() const - { - return EFalse; - } - -// --------------------------------------------------------------- -// COCREngineImplBase::IsLanguageSupported -// Description : IsLanguageSupported -// ------------------------------------------------------------- -// -TBool COCREngineImplBase::IsLanguageSupported(const TLanguage /*aLanguage*/) - { - return EFalse; - } - -// --------------------------------------------------------------- -// COCREngineImplBase::CancelRecognition() -// Description : Cancel recognition operation -// ------------------------------------------------------------- -// -void COCREngineImplBase::CancelOperation() - { - } - -// ------------------------------------------------------------- -// COCREngineImplBase::GetInstalledLanguageL -// Description : Get installed language information -// ------------------------------------------------------------- -// -void COCREngineImplBase::GetInstalledLanguage(RArray& /*aLanguages*/) const - { - } - -// ------------------------------------------------------------- -// COCREngineImplBase::SetActiveLanguageL -// Description : Set active language -// ------------------------------------------------------------- -// -void COCREngineImplBase::SetActiveLanguageL(const RArray& /*aActiveLanguage*/) - { - } - -// --------------------------------------------------------------- -// COCREngineImplBase::RefreshInstalledLanguageL -// Description : Refresh installed language -// ------------------------------------------------------------- -// -void COCREngineImplBase::RefreshInstalledLanguageL() - { - } - -// --------------------------------------------------------------- -// COCREngineImplBase::CancelRecognition() -// Description : Cancel recognition operation -// ------------------------------------------------------------- -// -TVersion COCREngineImplBase::GetVersion() const - { - return (TVersion(1, 0, 0)); - } - -// --------------------------------------------------------------- -// COCREngineRecognizeBlock::~COCREngineRecognizeBlock -// Description : Destructor -// --------------------------------------------------------------- -// -COCREngineRecognizeBlock::~COCREngineRecognizeBlock() - { - } - -// ------------------------------------------------------------- -// COCREngineRecognizeBlock::RecognizeBlockL -// Description : Recognize a specified block -// ------------------------------------------------------------- -// -void COCREngineRecognizeBlock::RecognizeBlockL(const TInt /*aBitmapHandle*/, - const TOCRLayoutBlockInfo /*aLayoutInfo*/) - { - } - -// --------------------------------------------------------------- -// COCREngineRecognizeBlock::Base -// Description : Provide base functions to be called -// --------------------------------------------------------------- -// -MOCREngineBase* COCREngineRecognizeBlock::Base() const - { - return NULL; - } - -// ------------------------------------------------------------- -// COCREngineRecognizeBlock::RecognizeSpecialregionL -// Description : Recognize a special region -// ------------------------------------------------------------- -// -void COCREngineRecognizeBlock::RecognizeSpecialRegionL(const TInt /*aBitmapHandle*/, - const TRegionInfo /*aRegionInfo*/) - { - } - -// --------------------------------------------------------------- -// COCREngineLayoutRecognize::~COCREngineLayoutRecognize -// Description : Destructor -// --------------------------------------------------------------- -// -COCREngineLayoutRecognize::~COCREngineLayoutRecognize() - { - } - -// --------------------------------------------------------------- -// COCREngineLayoutRecognize::LayoutAnalysisL -// Description : Layout analysis -// ------------------------------------------------------------- -// -void COCREngineLayoutRecognize::LayoutAnalysisL(const TInt /*aBitmapHandle*/, - const TOCRLayoutSetting /*aSettings*/) - { - } - -// ------------------------------------------------------------- -// COCREngineLayoutRecognize::RecognizeL -// Description : Recognize text -// ------------------------------------------------------------- -// -void COCREngineLayoutRecognize::RecognizeL(const TOCRRecognizeSetting /*aSettings*/, - const RArray& /*aBlock*/) - { - } - -// --------------------------------------------------------------- -// COCREngineLayoutRecognize::Base -// Description : Provide base functions to be called -// --------------------------------------------------------------- -// -MOCREngineBase* COCREngineLayoutRecognize::Base() const - { - return NULL; - } - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 ocrsrv_stub/sysdef_1_4_0.dtd --- a/ocrsrv_stub/sysdef_1_4_0.dtd Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/data/e4d7b7c9.rss --- a/omasuplasnconverterstubimpl/data/e4d7b7c9.rss Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description:Resource file -* -*/ - - -#include - - -RESOURCE REGISTRY_INFO theInfo - { - // UID for the DLL. - dll_uid = 0xE4D7B7C9; - interfaces = - { - INTERFACE_INFO - { - interface_uid = 0x20026773; - implementations = - { - IMPLEMENTATION_INFO - { - implementation_uid = 0xE4D72222; - version_no = 1; - display_name = "StubV01"; - default_data = "asnnokia"; - opaque_data =""; - } - }; - } - }; - } diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/group/asnimplementation.mmp --- a/omasuplasnconverterstubimpl/group/asnimplementation.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project definition for plugin implementation -* -*/ - -#include - -TARGET AsnImplementation.dll -TARGETTYPE PLUGIN -UID 0x10009d8d 0xE4D7B7C9 - -CAPABILITY CAP_ECOM_PLUGIN -VENDORID VID_DEFAULT - -START RESOURCE ../data/E4D7B7C9.rss - TARGET asnimplementation.rsc -END - -USERINCLUDE ../inc - -MW_LAYER_SYSTEMINCLUDE - -SOURCEPATH ../src - -SOURCE asnimplementation.cpp -SOURCE asnimplementationdllmain.cpp asnimplementationbase.cpp - - - -LIBRARY euser.lib -LIBRARY ecom.lib -LIBRARY epos_csuplutils.lib -LIBRARY estlib.lib -LIBRARY eposomasuplposmessageplugin.lib -LIBRARY epos_comasuplasnplugin.lib - -#ifdef ENABLE_ABIV2_MODE -DEBUGGABLE_UDEBONLY -#endif - -SOURCE cstubsuplstart.cpp cstubsuplresponse.cpp cstubsuplposinit.cpp cstubsuplpos.cpp cstubsuplinit.cpp cstubsuplend.cpp cstubsuplauthresponse.cpp cstubsuplauthrequest.cpp diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/group/bld.inf --- a/omasuplasnconverterstubimpl/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information for ASN plugin -* -*/ - -PRJ_PLATFORMS -WINSCW - -PRJ_EXPORTS - - -PRJ_MMPFILES -AsnImplementation.mmp diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/inc/asnimplementation.h --- a/omasuplasnconverterstubimpl/inc/asnimplementation.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ASN plugin -* -*/ - -// This file defines the API for AsnImplementation.dll - -#ifndef __ASNIMPLEMENTATION_H__ -#define __ASNIMPLEMENTATION_H__ - -// Include Files - -#include // CBase -#include // TBuf -#include - -// Constants - -const TInt KAsnImplementationBufferLength = 15; -typedef TBuf TAsnImplementationExampleString; - -// Class Definitions - -class CAsnImplementation : public CBase - { -public: - // new functions - IMPORT_C static CAsnImplementation* NewL(); - IMPORT_C static CAsnImplementation* NewLC(); - IMPORT_C ~CAsnImplementation(); - -public: - // new functions, example API - IMPORT_C TVersion Version() const; - IMPORT_C void ExampleFuncAddCharL(const TChar& aChar); - IMPORT_C void ExampleFuncRemoveLast(); - IMPORT_C const TPtrC ExampleFuncString() const; - -private: - // new functions - CAsnImplementation(); - void ConstructL(); - -private: - // data - TAsnImplementationExampleString* iString; - }; - -#endif // __ASNIMPLEMENTATION_H__ - diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/inc/asnimplementation.pan --- a/omasuplasnconverterstubimpl/inc/asnimplementation.pan Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ASN plugin -* -*/ - -#ifndef __ASNIMPLEMENTATION_PAN__ -#define __ASNIMPLEMENTATION_PAN__ - -// Data Types - -enum TAsnImplementationPanic - { - EAsnImplementationNullPointer - }; - -// Function Prototypes - -GLREF_C void Panic(TAsnImplementationPanic aPanic); - -#endif // __ASNIMPLEMENTATION_PAN__ - diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/inc/asnimplementationbase.h --- a/omasuplasnconverterstubimpl/inc/asnimplementationbase.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Asn ImplementationBase -* -*/ - - -#ifndef ASNIMPLEMENTATIONBASE_H_ -#define ASNIMPLEMENTATIONBASE_H_ - -#include -#include -#include -#include "epos_comasuplasnbase.h" -#include "epos_comasuplasnmessagebase.h" - - -class COMASuplAsnMessageBase; -class COMASuplAsnHandlerBase; -class CStubSuplStart; -class CStubSuplResponse; -class CStubSuplPosInit; -class CStubSuplPos; -class CStubSuplInit; -class CStubSuplEnd; -class CStubSuplAuthRequest; -class CStubSuplAuthResponse; - -class CAsnImplementationBase : public COMASuplAsnHandlerBase - { - -public: - /** - * Instanitates an object.. - */ - IMPORT_C static CAsnImplementationBase* NewL(); - - virtual HBufC8* EncodeL(COMASuplAsnMessageBase*, TInt& aErrorCode); - - virtual COMASuplAsnMessageBase* DecodeL(const TPtrC8& aPacket,TInt& aErrorCode,TInt& aUnConsumedBytes ); - - virtual COMASuplAsnMessageBase* CreateOMASuplMessageL(COMASuplAsnMessageBase::TSuplMessageType aOMASuplMessageType); - - - virtual TOMASuplVersion GetSuplMessageVersionL(TInt& aErrorCode, - const TPtrC8& aSuplAsnMessage); - /** - * Destructor - */ - IMPORT_C ~CAsnImplementationBase(); - -protected: - /** - * Constructor - */ - CAsnImplementationBase(); - /** - * Two phase construction - */ - void ConstructL(); - - -private: - - /** - * By default, prohibit copy constructor - */ - - CAsnImplementationBase( const CAsnImplementationBase& ); - - /** - * By default, Prohibit assigment operator - */ - - CAsnImplementationBase& operator= ( const CAsnImplementationBase& ); - - - }; - -#endif /* ASNIMPLEMENTATIONBASE_H_ */ diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/inc/cstubsuplauthrequest.h --- a/omasuplasnconverterstubimpl/inc/cstubsuplauthrequest.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: authrequest -* -*/ - - -#ifndef CSTUBSUPLAUTHREQUEST_H_ -#define CSTUBSUPLAUTHREQUEST_H_ - -#include -#include -#include -#include "epos_comasuplasnbase.h" -#include "epos_comasuplasnmessagebase.h" -#include "epos_comasuplauthrequest.h" -#include "asnimplementationbase.h" - -class CStubSuplAuthRequest : public COMASuplAuthRequest - { -public: - /** - * Factory function that instantiates a new object of CStubSuplAuthRequest - * - */ - IMPORT_C static CStubSuplAuthRequest* NewL(); - /** - * Destructor - */ - IMPORT_C ~CStubSuplAuthRequest(); - /** - * Method for Encoding... - */ - virtual HBufC8* EncodeL(TInt& aErrorCode); -private: - /** - * Default C++ Constructor - */ - CStubSuplAuthRequest(); - - void ConstructL(); - }; - -#endif /* CSTUBSUPLSTARTIMPLE_H_ */ diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/inc/cstubsuplauthresponse.h --- a/omasuplasnconverterstubimpl/inc/cstubsuplauthresponse.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: AuthResponse -* -*/ - - -#ifndef CSTUBSUPLAUTHRESPONSE_H_ -#define CSTUBSUPLAUTHRESPONSE_H_ - -#include -#include -#include -#include "epos_comasuplasnbase.h" -#include "epos_comasuplasnmessagebase.h" -#include "epos_comasuplresponse.h" -#include "asnimplementationbase.h" - -class CStubSuplAuthResponse : public COMASuplAuthResponse - { -public: - /** - * Factory function that instantiates a new object of CStubSuplAuthResponse - * - */ - IMPORT_C static CStubSuplAuthResponse* NewL(); - /** - * Destructor - */ - IMPORT_C ~CStubSuplAuthResponse(); - /** - * Method for Encoding... - */ - virtual HBufC8* EncodeL(TInt& aErrorCode); -private: - /** - * Default C++ Constructor - */ - CStubSuplAuthResponse(); - - void ConstructL(); - }; - -#endif /* CSTUBSUPLSTARTIMPLE_H_ */ diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/inc/cstubsuplend.h --- a/omasuplasnconverterstubimpl/inc/cstubsuplend.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Supl End -* -*/ - - -#ifndef CSTUBSUPLEND_H_ -#define CSTUBSUPLEND_H_ - -#include -#include -#include -#include "epos_comasuplasnbase.h" -#include "epos_comasuplasnmessagebase.h" -#include "epos_comasuplend.h" -#include "asnimplementationbase.h" - -class CStubSuplEnd : public COMASuplEnd - { -public: - /** - * Factory function that instantiates a new object of CStubSuplEnd - * - */ - IMPORT_C static CStubSuplEnd* NewL(); - /** - * Destructor - */ - IMPORT_C ~CStubSuplEnd(); - /** - * Method for Encoding... - */ - virtual HBufC8* EncodeL(TInt& aErrorCode); - -private: - void InitializeL(); - - void InitializePosition(); - - void InitializePositionEstimate(TOMASuplPositionEstimate& posEstimate); - - void InitializeTime(const TOMASuplUtcTime aUtcTime); - - void IntializeHorizVelocity(const COMASuplHorizVelocity* aVelocity); - - void IntializeHorizAndVertVelocity(const COMASuplHorizVelocity* aVelocity); - - void IntializeHorizUncertVelocity(const COMASuplHorizVelocity* aVelocity); - - void IntializeHorizVertUncertVelocity(const COMASuplHorizVelocity* aVelocity); -private: - /** - * Default C++ Constructor - */ - CStubSuplEnd(); - - void ConstructL(); - }; - -#endif /* CSTUBSUPLSTARTIMPLE_H_ */ diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/inc/cstubsuplinit.h --- a/omasuplasnconverterstubimpl/inc/cstubsuplinit.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description:Supl Init -* -*/ - - -#ifndef CSTUBSUPLINIT_H_ -#define CSTUBSUPLINIT_H_ - -#include -#include -#include -#include "epos_comasuplasnbase.h" -#include "epos_comasuplasnmessagebase.h" -#include "epos_comasuplinit.h" -#include "AsnImplementationBase.h" - -class CStubSuplInit : public COMASuplInit - { -public: - /** - * Factory function that instantiates a new object of CStubSuplInit - * - */ - IMPORT_C static CStubSuplInit* NewL(); - /** - * Destructor - */ - IMPORT_C ~CStubSuplInit(); - /** - * Method for Encoding... - */ - virtual HBufC8* EncodeL(TInt& aErrorCode); -private: - /** - * Default C++ Constructor - */ - CStubSuplInit(); - - void ConstructL(); - }; - -#endif /* CSTUBSUPLSTARTIMPLE_H_ */ diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/inc/cstubsuplpos.h --- a/omasuplasnconverterstubimpl/inc/cstubsuplpos.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description:SuplPos -* -*/ - - -#ifndef CSTUBSUPLPOS_H_ -#define CSTUBSUPLPOS_H_ - -#include -#include -#include -#include "epos_comasuplasnbase.h" -#include "epos_comasuplasnmessagebase.h" -#include "epos_comasuplpos.h" -#include "epos_comasuplposinit.h" -#include "asnimplementationbase.h" - -class CStubSuplPos : public COMASuplPos - { -public: - /** - * Factory function that instantiates a new object of CStubSuplPos - * - */ - IMPORT_C static CStubSuplPos* NewL(); - /** - * Destructor - */ - IMPORT_C ~CStubSuplPos(); - /** - * Method for Encoding... - */ - virtual HBufC8* EncodeL(TInt& aErrorCode); - -private: - void InitializeL(); - - void IntializeHorizVelocity(const COMASuplHorizVelocity* aVelocity); - - void IntializeHorizAndVertVelocity(const COMASuplHorizVelocity* aVelocity); - - void IntializeHorizUncertVelocity(const COMASuplHorizVelocity* aVelocity); - - void IntializeHorizVertUncertVelocity(const COMASuplHorizVelocity* aVelocity); - -private: - /** - * Default C++ Constructor - */ - CStubSuplPos(); - - void ConstructL(); - }; - -#endif /* CSTUBSUPLSTARTIMPLE_H_ */ diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/inc/cstubsuplposinit.h --- a/omasuplasnconverterstubimpl/inc/cstubsuplposinit.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description:SuplPosInit -* -*/ - - -#ifndef CSTUBSUPLPOSINIT_H_ -#define CSTUBSUPLPOSINIT_H_ - -#include -#include -#include -#include "epos_comasuplasnbase.h" -#include "epos_comasuplasnmessagebase.h" -#include "epos_comasuplposinit.h" -#include "asnimplementationbase.h" - - -class CStubSuplPosInit : public COMASuplPosInit - { -public: - /** - * Factory function that instantiates a new object of CStubSuplPosInit - * - */ - IMPORT_C static CStubSuplPosInit* NewL(); - /** - * Destructor - */ - IMPORT_C ~CStubSuplPosInit(); - /** - * Method for Encoding... - */ - virtual HBufC8* EncodeL(TInt& aErrorCode); - -private: - - void InitializeL(); - - void InitializeRequestData(); - - void InitializePosition(); - - void InitializePositionEstimate(TOMASuplPositionEstimate& posEstimate); - - void InitializeTime(const TOMASuplUtcTime aUtcTime); - - void InitializePosPayLoad(); - - void IntializeHorizVelocity(const COMASuplHorizVelocity* aVelocity); - - void IntializeHorizAndVertVelocity(const COMASuplHorizVelocity* aVelocity); - - void IntializeHorizUncertVelocity(const COMASuplHorizVelocity* aVelocity); - - void IntializeHorizVertUncertVelocity(const COMASuplHorizVelocity* aVelocity); - - /** - * Initialize SetCapabilities - */ - void InitializeSetCapabilities(); - /** - * Initialize LocationId - */ - void InitializeLocationId(); - /** - * Initialize Qop - */ - void InitializeECellId(); - /** - * Initialize GSM ECellId - */ - void InitializeGSMECellId(); - /** - * Initialize WCDMA ECellId - */ - void InitializeWCDMAECellId(); - - TInt FillFrequencyInfo(TOMASuplFrequencyInfo& aOMASuplFrequencyInfo); - - TInt FillMeasuredResultsList(TOMASuplNetworkMeasureReport aNwkMeasureReport[]); - - TInt FillCellMeasuredResult(TOMASuplCellMeasuredResult aCellMeasuredResult[]); - - TInt FillModeSpecificInfo(TOMASuplCellMeasuredResult& aCellMeasuredResult); - - void FillFrequencyInfoULInfo(TInt aFddUL,TInt& aRetErrorCode); - - void FillFrequencyInfoDT(TInt aTddDt,TInt& aRetErrorCode); -private: - /** - * Default C++ Constructor - */ - CStubSuplPosInit(); - - void ConstructL(); - - - }; - -#endif /* CSTUBSUPLSTARTIMPLE_H_ */ diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/inc/cstubsuplresponse.h --- a/omasuplasnconverterstubimpl/inc/cstubsuplresponse.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description:SuplResponse Class -* -*/ - - -#ifndef CSTUBSUPLRESPONSE_H_ -#define CSTUBSUPLRESPONSE_H_ - -#include -#include -#include -#include "epos_comasuplasnbase.h" -#include "epos_comasuplasnmessagebase.h" -#include "epos_comasuplresponse.h" -#include "asnimplementationbase.h" - -class CStubSuplResponse : public COMASuplResponse - { -public: - /** - * Factory function that instantiates a new object of CStubSuplResponse - * - */ - IMPORT_C static CStubSuplResponse* NewL(); - /** - * Destructor - */ - IMPORT_C ~CStubSuplResponse(); - /** - * Method for Encoding... - */ - virtual HBufC8* EncodeL(TInt& aErrorCode); -private: - /** - * Default C++ Constructor - */ - CStubSuplResponse(); - - void ConstructL(); - }; - -#endif /* CSTUBSUPLSTARTIMPLE_H_ */ diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/inc/cstubsuplstart.h --- a/omasuplasnconverterstubimpl/inc/cstubsuplstart.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: SuplStart -* -*/ - - -#ifndef CSTUBSUPLSTARTIMPLE_H_ -#define CSTUBSUPLSTARTIMPLE_H_ - -#include -#include -#include -#include "epos_comasuplasnbase.h" -#include "epos_comasuplasnmessagebase.h" -#include "epos_comasuplstart.h" -#include "asnimplementationbase.h" - -class CStubSuplStart : public COMASuplStart - { -public: - /** - * Factory function that instantiates a new object of CStubSuplStart - * - */ - IMPORT_C static CStubSuplStart* NewL(); - /** - * Destructor - */ - IMPORT_C ~CStubSuplStart(); - /** - * Method for Encoding... - */ - virtual HBufC8* EncodeL(TInt& aErrorCode); - /** - * initialize memory management stack - * allocate memory for structure - */ - -private: - void InitializeL(); - /** - * Initialize SetCapabilities - */ - void InitializeSetCapabilities(); - /** - * Initialize LocationId - */ - void InitializeLocationId(); - /** - * Initialize Qop - */ - void InitializeQop(); - /** - * Initialize ECellId - */ - void InitializeECellId(); - /** - * Initialize GSM ECellId - */ - void InitializeGSMECellId(); - /** - * Initialize WCDMA ECellId - */ - void InitializeWCDMAECellId(); - - TInt FillFrequencyInfo(TOMASuplFrequencyInfo& aOMASuplFrequencyInfo); - - TInt FillMeasuredResultsList(TOMASuplNetworkMeasureReport aNwkMeasureReport[]); - - TInt FillCellMeasuredResult(TOMASuplCellMeasuredResult aCellMeasuredResult[]); - - TInt FillModeSpecificInfo(TOMASuplCellMeasuredResult& aCellMeasuredResult); - - void FillFrequencyInfoULInfo(TInt aFddUL,TInt& aRetErrorCode); - - void FillFrequencyInfoDT(TInt aTddDt,TInt& aRetErrorCode); - -private: - /** - * Default C++ Constructor - */ - CStubSuplStart(); - /* - * 2 phase construction - */ - void ConstructL(); - }; - -#endif /* CSTUBSUPLSTARTIMPLE_H_ */ diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/layers.sysdef.xml --- a/omasuplasnconverterstubimpl/layers.sysdef.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - -]> - - - - - - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/src/asnimplementation.cpp --- a/omasuplasnconverterstubimpl/src/asnimplementation.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of ASN plugin -* -*/ - -// Include Files - -#include "asnimplementation.h" // CAsnImplementation -#include "asnimplementation.pan" // panic codes -#include -#include "asnimplementationBase.h" - -// Member Functions - -EXPORT_C CAsnImplementation* CAsnImplementation::NewLC() - { - CAsnImplementation* self = new (ELeave) CAsnImplementation; - CleanupStack::PushL(self); - self->ConstructL(); - return self; - } - -EXPORT_C CAsnImplementation* CAsnImplementation::NewL() - { - CAsnImplementation* self = CAsnImplementation::NewLC(); - CleanupStack::Pop(self); - return self; - } - -CAsnImplementation::CAsnImplementation() -// note, CBase initialises all member variables to zero - { - } - -void CAsnImplementation::ConstructL() - { - // second phase constructor, anything that may leave must be constructed here - iString = new (ELeave) TAsnImplementationExampleString; - } - -EXPORT_C CAsnImplementation::~CAsnImplementation() - { - delete iString; - } - -EXPORT_C TVersion CAsnImplementation::Version() const - { - // Version number of example API - const TInt KMajor = 1; - const TInt KMinor = 0; - const TInt KBuild = 1; - return TVersion(KMajor, KMinor, KBuild); - } - -EXPORT_C void CAsnImplementation::ExampleFuncAddCharL(const TChar& aChar) - { - __ASSERT_ALWAYS(iString != NULL, Panic(EAsnImplementationNullPointer)); - - if (iString->Length() >= KAsnImplementationBufferLength) - { - User::Leave(KErrTooBig); - } - - iString->Append(aChar); - } - -EXPORT_C void CAsnImplementation::ExampleFuncRemoveLast() - { - __ASSERT_ALWAYS(iString != NULL, Panic(EAsnImplementationNullPointer)); - - if (iString->Length() > 0) - { - iString->SetLength(iString->Length() - 1); - } - } - -EXPORT_C const TPtrC CAsnImplementation::ExampleFuncString() const - { - __ASSERT_ALWAYS(iString != NULL, Panic(EAsnImplementationNullPointer)); - return *iString; - } - -const TImplementationProxy ImplementationTable[] = - { - - #ifdef __EABI__ - IMPLEMENTATION_PROXY_ENTRY(0xE4D72222, CAsnImplementationBase::NewL) - #else - { { 0xE4D72222 }, CAsnImplementationBase::NewL} - #endif - - }; - -// Exported proxy for instantiation method resolution. -EXPORT_C const TImplementationProxy* ImplementationGroupProxy( - TInt& aTableCount) - { - aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); - return ImplementationTable; - } diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/src/asnimplementationbase.cpp --- a/omasuplasnconverterstubimpl/src/asnimplementationbase.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,184 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of ASN plugin -* -*/ - -#include "asnimplementationbase.h" -#include -#include "epos_comasuplstart.h" -#include "epos_comasuplresponse.h" -#include "epos_comasuplposinit.h" -#include "epos_comasuplpos.h" -#include "epos_comasuplinit.h" -#include "epos_comasuplend.h" -#include "epos_comasuplauthrequest.h" -#include "epos_comasuplauthresponse.h" -#include "cstubsuplstart.h" -#include "cstubsuplresponse.h" -#include "cstubsuplposinit.h" -#include "cstubsuplpos.h" -#include "cstubsuplinit.h" -#include "cstubsuplend.h" -#include "cstubsuplauthrequest.h" -#include "cstubsuplauthresponse.h" - -CAsnImplementationBase::CAsnImplementationBase() - { - - } -// ----------------------------------------------------------------------------- -// CAsnImplementationBase::NewL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -EXPORT_C CAsnImplementationBase* CAsnImplementationBase::NewL() - { - CAsnImplementationBase* self = new (ELeave) CAsnImplementationBase; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } -// ----------------------------------------------------------------------------- -// CAsnImplementationBase::EncodeL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -HBufC8* CAsnImplementationBase::EncodeL(COMASuplAsnMessageBase* asnMessage, TInt& aErrorCode) - { - //Initialize your library for encoding... - - //Encoding operations to be done here!! - HBufC8* encodedBuffer; - if ( asnMessage ) - encodedBuffer = asnMessage->EncodeL(aErrorCode); - else - encodedBuffer = NULL; - - return encodedBuffer; - } -// ----------------------------------------------------------------------------- -// CAsnImplementationBase::DecodeL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -COMASuplAsnMessageBase* CAsnImplementationBase::DecodeL(const TPtrC8& /*aPacket*/,TInt& aErrorCode,TInt& aUnConsumedBytes ) - { - COMASuplAsnMessageBase* self = NULL; - aErrorCode = 0; - aUnConsumedBytes = 0; - - //Decoding operations to be done here!!! - //Here you will have to decode the buffer using your own ASN library and return the object of appropriate SUPL message class. - //e.g. if you finds that decoded message is SUPL_RESPONSE,create object of SUPL_RESPONSE class and call appropriate set methods to fill its all mandatory - //and optional methods. For demostration purpose, here are some set methods for SUPL_RESPONSE - // - //CStubSuplResponse* lOMASuplResponse = CStubSuplResponse::NewL(); - //CleanupStack::PushL(lOMASuplResponse); - //TOMASuplVersion lVersion; - //TInt lMajor = 1; - //TInt lMinor = 0; - //TInt lServInd; = 0; - //lVersion.SetSuplVersion(lMajor,lMinor,lServInd); - //COMASuplSessionID* lSessionId = COMASuplSessionID::NewL();//Set all parameters needed for session id. - //lOMASuplResponse->SetMessageBase(lVersion, lSessionId); - //lOMASuplResponse->SetMessageLength(20); - //TInt lPosMethod = 1; - //lOMASuplResponse->SetSuplResponse((TOMASuplPosMethod)lPosMethod); - //CleanupStack::Pop(); - //aErrorCode = KErrNone; - //aUnConsumedBytes = 0; - // return lOMASuplResponse; - - return self; - } -// ----------------------------------------------------------------------------- -// CAsnImplementationBase::CreateOMASuplMessageL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -COMASuplAsnMessageBase* CAsnImplementationBase::CreateOMASuplMessageL(COMASuplAsnMessageBase::TSuplMessageType aOMASuplMessageType) - { - COMASuplAsnMessageBase* suplMsg = NULL; - // Creating operations!! - switch ( aOMASuplMessageType ) - { - case COMASuplAsnMessageBase::ESUPL_START : - { - suplMsg = CStubSuplStart::NewL(); - break; - } - case COMASuplAsnMessageBase::ESUPL_RESPONSE : - { - suplMsg = CStubSuplResponse::NewL(); - break; - } - case COMASuplAsnMessageBase::ESUPL_POSINIT : - { - suplMsg = CStubSuplPosInit::NewL(); - break; - } - case COMASuplAsnMessageBase::ESUPL_POS : - { - suplMsg = CStubSuplPos::NewL(); - break; - } - case COMASuplAsnMessageBase::ESUPL_INIT : - { - suplMsg = CStubSuplInit::NewL(); - break; - } - case COMASuplAsnMessageBase::ESUPL_END : - { - suplMsg = CStubSuplEnd::NewL(); - break; - } - case COMASuplAsnMessageBase::ESUPL_AUTH_REQ : - { - suplMsg = CStubSuplAuthRequest::NewL(); - break; - } - case COMASuplAsnMessageBase::ESUPL_AUTH_RESP : - { - suplMsg = CStubSuplAuthResponse::NewL(); - break; - } - default : break ; - } - return suplMsg; - } -// ----------------------------------------------------------------------------- -// CAsnImplementationBase::~CAsnImplementationBase -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -CAsnImplementationBase::~CAsnImplementationBase() - { - - } -// ----------------------------------------------------------------------------- -// CAsnImplementationBase::ConstructL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CAsnImplementationBase::ConstructL() - { - } - -TOMASuplVersion CAsnImplementationBase::GetSuplMessageVersionL(TInt& aErrorCode,const TPtrC8& aSuplAsnMessage) - { - TOMASuplVersion version; - return version; - } \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/src/asnimplementationdllmain.cpp --- a/omasuplasnconverterstubimpl/src/asnimplementationdllmain.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of Main -* -*/ - -// Include Files - -#include // GLDEF_C -#include "asnimplementation.pan" // panic codes - -// Global Functions - -GLDEF_C void Panic(TAsnImplementationPanic aPanic) -// Panics the thread with given panic code - { - User::Panic(_L("AsnImplementation"), aPanic); - } - -// Exported Functions - -#ifndef EKA2 // for EKA1 only -EXPORT_C TInt E32Dll(TDllReason /*aReason*/) -// Called when the DLL is loaded and unloaded. Note: have to define -// epoccalldllentrypoints in MMP file to get this called in THUMB. - { - return KErrNone; - } -#endif - diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/src/cstubsuplauthrequest.cpp --- a/omasuplasnconverterstubimpl/src/cstubsuplauthrequest.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Auth request -* -*/ - -#include -#include -#include -#include "epos_comasuplasnbase.h" -#include "epos_comasuplasnmessagebase.h" -#include "epos_comasuplauthrequest.h" -#include "cstubsuplauthrequest.h" - -// ----------------------------------------------------------------------------- -// CStubSuplAuthRequest::NewL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -EXPORT_C CStubSuplAuthRequest* CStubSuplAuthRequest::NewL() - { - CStubSuplAuthRequest* self = new (ELeave) CStubSuplAuthRequest; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } -// ----------------------------------------------------------------------------- -// CStubSuplAuthRequest::~CStubSuplAuthRequest -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -EXPORT_C CStubSuplAuthRequest::~CStubSuplAuthRequest() - { - - } -// ----------------------------------------------------------------------------- -// CStubSuplAuthRequest::ConstructL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CStubSuplAuthRequest::ConstructL() - { - COMASuplAuthRequest::ConstructL(); - //Allocate memory for internal usage.... - } -// ----------------------------------------------------------------------------- -// CStubSuplAuthRequest::EncodeL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -HBufC8* CStubSuplAuthRequest::EncodeL(TInt& aErrorCode) - { - aErrorCode = 0; - HBufC8* encodedBuffer = NULL; - // Do actual encoding here and return encoded buffer and put appropriate error code in aErrorCode - return encodedBuffer; - } -// ----------------------------------------------------------------------------- -// CStubSuplAuthRequest::CStubSuplAuthRequest -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -CStubSuplAuthRequest::CStubSuplAuthRequest() - { - } diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/src/cstubsuplauthresponse.cpp --- a/omasuplasnconverterstubimpl/src/cstubsuplauthresponse.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Auth Response -* -*/ - -#include -#include -#include -#include "epos_comasuplasnbase.h" -#include "epos_comasuplasnmessagebase.h" -#include "epos_comasuplauthresponse.h" -#include "cstubsuplauthresponse.h" - -// ----------------------------------------------------------------------------- -// CStubSuplAuthResponse::NewL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -EXPORT_C CStubSuplAuthResponse* CStubSuplAuthResponse::NewL() - { - CStubSuplAuthResponse* self = new (ELeave) CStubSuplAuthResponse; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } -// ----------------------------------------------------------------------------- -// CStubSuplAuthResponse::~CStubSuplAuthResponse -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -EXPORT_C CStubSuplAuthResponse::~CStubSuplAuthResponse() - { - - } -// ----------------------------------------------------------------------------- -// CStubSuplAuthResponse::ConstructL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CStubSuplAuthResponse::ConstructL() - { - COMASuplAuthResponse::ConstructL(); - //Allocate memory for internal usage.... - } -// ----------------------------------------------------------------------------- -// CStubSuplAuthResponse::EncodeL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -HBufC8* CStubSuplAuthResponse::EncodeL(TInt& aErrorCode) - { - aErrorCode = 0; - HBufC8* encodedBuffer = NULL; - // Do actual encoding here and return encoded buffer and put appropriate error code in aErrorCode - return encodedBuffer; - } -// ----------------------------------------------------------------------------- -// CStubSuplAuthResponse::CStubSuplAuthResponse -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -CStubSuplAuthResponse::CStubSuplAuthResponse() - { - } diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/src/cstubsuplend.cpp --- a/omasuplasnconverterstubimpl/src/cstubsuplend.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,352 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: Supl End - * - */ - -#include -#include -#include -#include "epos_comasuplasnbase.h" -#include "epos_comasuplasnmessagebase.h" -#include "epos_comasuplend.h" -#include "cstubsuplend.h" -#include "lbs/epos_comasuplreqasstdata.h" -#include "lbs/epos_comasuplposition.h" -#include "lbs/epos_comasuplvelocity.h" -#include "lbs/epos_comasuplsetcapabilities.h" -#include "lbs/epos_comasuplpospayload.h" -#include "epos_comasuplpos.h" -#include "epos_comasuplsessionid.h" -#include "epos_comasupllocationid.h" -// ----------------------------------------------------------------------------- -// CStubSuplEnd::NewL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -EXPORT_C CStubSuplEnd* CStubSuplEnd::NewL() - { - CStubSuplEnd* self = new (ELeave) CStubSuplEnd; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } -// ----------------------------------------------------------------------------- -// CStubSuplEnd::ConstructL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CStubSuplEnd::ConstructL() - { - COMASuplEnd::ConstructL(); - //Allocate memory for internal usage.... - } -// ----------------------------------------------------------------------------- -// CStubSuplEnd::~CStubSuplEnd -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -EXPORT_C CStubSuplEnd::~CStubSuplEnd() - { - - } -// ----------------------------------------------------------------------------- -// CStubSuplEnd::EncodeL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -HBufC8* CStubSuplEnd::EncodeL(TInt& aErrorCode) - { - aErrorCode = 0; - HBufC8* encodedBuffer = NULL ; - InitializeL(); - // Do actual encoding here and return encoded buffer and put appropriate error code in aErrorCode - return encodedBuffer; - } -// ----------------------------------------------------------------------------- -// CStubSuplEnd::CStubSuplEnd -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -CStubSuplEnd::CStubSuplEnd() - { - } -void CStubSuplEnd::InitializeL() - { - if (iPosition) //This parameter is optional in asn - { - InitializePosition(); - } - } -void CStubSuplEnd::InitializePosition() - { - // Retrieve mandatory parameters of Position - // Retrieve mandatory parameters of Position - TOMASuplUtcTime utcTime; - TOMASuplPositionEstimate posEstimate; - - iPosition->GetPosition(utcTime,posEstimate ); - - TInt error = 0; - - //Initialize Time - InitializeTime(utcTime); - - InitializePositionEstimate(posEstimate); - - if(error) - { - return; - } - else - { - COMASuplVelocity* velocity = NULL; - error = iPosition->GetVelocity(velocity); - if(error) - { - //return error - } - else - { - - TOMASuplVelocityType velocityType = velocity->VelType(); - COMASuplHorizVelocity* horizVelocity = velocity->Velocity(); - if(horizVelocity) - { - switch(velocityType) - { - case EHorizVelocity: - { - //Initialize Horizontal velocity - IntializeHorizVelocity(horizVelocity); - break; - } - case EHorizAndVertVelocity: - { - //Initialize Horizontal and Vertical velocity - IntializeHorizAndVertVelocity(horizVelocity); - break; - } - case EHorizUncertVelocity: - { - //Initialize Horizontal Uncert velocity - IntializeHorizUncertVelocity(horizVelocity); - break; - } - case EHorizAndVertUncertVelocity: - { - //Initialize Horizontal Vertical Uncert velocity - IntializeHorizVertUncertVelocity(horizVelocity); - break; - } - default: - { - //error - return; - } - } - } - else - { - //error - return; - } - } - } - } - -void CStubSuplEnd::IntializeHorizVelocity(const COMASuplHorizVelocity* aVelocity) - { - TUint16 bearing; - TUint16 horSpeed; - - aVelocity->GetHorizVel(bearing,horSpeed); - - //Initialize bearing,horSpeed - } - -void CStubSuplEnd::IntializeHorizAndVertVelocity(const COMASuplHorizVelocity* aVelocity) - { - TUint16 bearing; - TUint16 horSpeed; - TUint8 verDirect; - TUint8 verSpeed; - - COMASuplHorizAndVertVelocity* horizVertVel = (COMASuplHorizAndVertVelocity*)aVelocity; - - horizVertVel->GetHorizAndVertVel(bearing,horSpeed,verDirect,verSpeed); - - //Initialize bearing,horSpeed,verDirect,verSpeed - } - -void CStubSuplEnd::IntializeHorizUncertVelocity(const COMASuplHorizVelocity* aVelocity) - { - TUint16 bearing; - TUint16 horSpeed; - TUint8 uncertSpeed; - - COMASuplHorizUncertVelocity* horizUncertVel = (COMASuplHorizUncertVelocity*)aVelocity; - - horizUncertVel->GetHorizUncertVel(bearing,horSpeed,uncertSpeed); - //Initialize bearing,horSpeed,uncertSpeed - } - -void CStubSuplEnd::IntializeHorizVertUncertVelocity(const COMASuplHorizVelocity* aVelocity) - { - TUint16 bearing; - TUint16 horSpeed; - TUint8 verDirect; - TUint8 verSpeed; - TUint8 horizUncertSpeed; - TUint8 vertUncertSpeed; - - COMASuplHorizAndVertUncertVelocity* horizVertUncertVel = (COMASuplHorizAndVertUncertVelocity*)aVelocity; - - horizVertUncertVel->GetHorizVertUncertVel(bearing,horSpeed,verDirect,verSpeed, - horizUncertSpeed,vertUncertSpeed); - //Initialize bearing,horSpeed,verDirect,verSpeed,horizUncertSpeed,vertUncertSpeed - } - -void CStubSuplEnd::InitializePositionEstimate(TOMASuplPositionEstimate& aPosEstimate) - { - TInt error; - - // Retrieve mandatory parametrs of Position Estimate - TOMASuplPositionEstimate::TOMASuplLatitudeSign latSign; - TInt latitude; - TInt longitude; - aPosEstimate.GetPositionEstimate(latSign,latitude,longitude); - - // Set Position Estimate - if(KLatitudeMin <= latitude && latitude <= KLatitudeMax) - { - //Initialize - } - else - { - //error - } - - if(KLongitudeMin <= longitude && longitude <= KLongitudeMax) - { - //Initialize - } - else - { - //error - } - - //Initialize - - // Retrieve optional parametrs of Position Estimate - // Retrieve Uncertainity - TOMASuplUncertainty uncertainty; - error = aPosEstimate.GetUncertainty(uncertainty); - if(!error) - { - TInt uncertSemiMajor; - TInt uncertSemiMinor; - TInt orientMajorAxis; - uncertainty.GetUncertainty(uncertSemiMajor,uncertSemiMinor,orientMajorAxis); - if((KUncertSemiMajorMin <= uncertSemiMajor && uncertSemiMajor<= KUncertSemiMajorMax) - && (KUncertSemiMinorMin <= uncertSemiMinor && uncertSemiMinor<= KUncertSemiMinorMax) - && (KOrientMajorAxisMin <= orientMajorAxis && orientMajorAxis<= KOrientMajorAxisMax)) - { - //Initialize - } - else - { - //error - } - } - else - { - //return error - } - - // Retrieve Confidence - TInt confidence; - error = aPosEstimate.GetConfidence(confidence); - if(!error) - { - - if(KConfidenceMin <= confidence && confidence <= KConfidenceMax) - { - //Initialize - } - else - { - //error - } - } - else - { - //return error - } - - // Retrieve AltitudeInfo - TOMASuplAltitudeInfo altitudeInfo; - error = aPosEstimate.GetAltitudeInfo(altitudeInfo); - if(!error) - { - - TOMASuplAltitudeInfo::TOMASuplAltitudeDirection altDirection; - TInt altitude; - TInt altUncert; - altitudeInfo.GetAltitudeInfo(altDirection,altitude,altUncert); - if((KAltitudeMin <= altitude && altitude<= KAltitudeMax) && (KAltitudeUncertMin <= altUncert && altUncert<= KAltitudeUncertMax)) - { - //Initialize - } - else - { - //error - } - } - else - { - //return error - } - - } - -void CStubSuplEnd::InitializeTime(const TOMASuplUtcTime aUtcTime) - { - - TDateTime lDateTime; - TInt zoneCode; - TInt zone; - - aUtcTime.GetUtcTime(lDateTime,zoneCode,zone); - - TInt year = lDateTime.Year(); - TMonth month = lDateTime.Month(); - TInt day = lDateTime.Day(); - TInt hour = lDateTime.Hour(); - TInt minute = lDateTime.Minute(); - TInt second = lDateTime.Second(); - TInt microsec = lDateTime.MicroSecond(); - - if(0 == zoneCode || 1 == zoneCode) - { - //Initialize - } - else - { - //error - } - - - } diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/src/cstubsuplinit.cpp --- a/omasuplasnconverterstubimpl/src/cstubsuplinit.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Supl Init -* -*/ - -#include -#include -#include -#include "epos_comasuplasnbase.h" -#include "epos_comasuplasnmessagebase.h" -#include "epos_comasuplinit.h" -#include "cstubsuplinit.h" - -// ----------------------------------------------------------------------------- -// CStubSuplInit::NewL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -EXPORT_C CStubSuplInit* CStubSuplInit::NewL() - { - CStubSuplInit* self = new (ELeave) CStubSuplInit; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } -// ----------------------------------------------------------------------------- -// CStubSuplInit::~CStubSuplInit -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -EXPORT_C CStubSuplInit::~CStubSuplInit() - { - - } -// ----------------------------------------------------------------------------- -// CStubSuplInit::ConstructL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CStubSuplInit::ConstructL() - { - COMASuplInit::ConstructL(); - //Allocate memory for internal usage.... - } -// ----------------------------------------------------------------------------- -// CStubSuplInit::EncodeL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -HBufC8* CStubSuplInit::EncodeL(TInt& aErrorCode) - { - aErrorCode = KErrNotSupported; - //Encoding of SuplInit is not handled by client.. - return NULL; - } -// ----------------------------------------------------------------------------- -// CStubSuplInit::CStubSuplInit -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -CStubSuplInit::CStubSuplInit() - { - } diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/src/cstubsuplpos.cpp --- a/omasuplasnconverterstubimpl/src/cstubsuplpos.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,241 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: SuplPos - * - */ - -#include -#include -#include -#include "epos_comasuplasnbase.h" -#include "epos_comasuplasnmessagebase.h" -#include "epos_comasuplposinit.h" -#include "epos_comasuplpos.h" -#include "cstubsuplpos.h" -#include "lbs/epos_comasuplreqasstdata.h" -#include "lbs/epos_comasuplposition.h" -#include "lbs/epos_comasuplvelocity.h" -#include "lbs/epos_comasuplsetcapabilities.h" -#include "lbs/epos_comasuplpospayload.h" -#include "epos_comasuplpos.h" -#include "epos_comasuplsessionid.h" -#include "epos_comasupllocationid.h" - -// ----------------------------------------------------------------------------- -// CStubSuplPos::NewL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -EXPORT_C CStubSuplPos* CStubSuplPos::NewL() - { - CStubSuplPos* self = new (ELeave) CStubSuplPos; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } -// ----------------------------------------------------------------------------- -// CStubSuplPos::~CStubSuplPos -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -EXPORT_C CStubSuplPos::~CStubSuplPos() - { - - } -// ----------------------------------------------------------------------------- -// CStubSuplPos::ConstructL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CStubSuplPos::ConstructL() - { - COMASuplPos::ConstructL(); - //Allocate memory for internal usage.... - } -// ----------------------------------------------------------------------------- -// CStubSuplPos::EncodeL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -HBufC8* CStubSuplPos::EncodeL(TInt& aErrorCode) - { - aErrorCode = 0; - HBufC8* encodedBuffer = NULL; - InitializeL(); - // Do actual encoding here and return encoded buffer and put appropriate error code in aErrorCode - return encodedBuffer; - } -// ----------------------------------------------------------------------------- -// CStubSuplPos::CStubSuplPos -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -CStubSuplPos::CStubSuplPos() - { - } -void CStubSuplPos::InitializeL() - { - //Initialize your library - - if(iPayload) - { - HBufC8* payloadData = NULL; - COMASuplPosPayload::TOMASuplPosPayloadType payloadType; - iPayload->GetPosPayload(payloadData,payloadType); - - if(!payloadData) - { - //error - } - - TPtr8 ptr = payloadData->Des(); - - TInt len = payloadData->Length(); - - const char* lTemp = (const char *)ptr.Ptr(); - - switch(payloadType) - { - case COMASuplPosPayload::ETIA801: - { - //initialize pospayload for TIA - break; - } - case COMASuplPosPayload::ERRC: - { - //initialize pospayload for RRC - break; - } - case COMASuplPosPayload::ERRLP: - { - //initialize pospayload for RRLP - break; - } - default: - { - - } - } - - } - else - { - //error - - } - - if(iOptionalMask & (1<<(0))) //means velocity has been set - { - TOMASuplVelocityType velocityType = iVelocity->VelType(); - COMASuplHorizVelocity* horizVelocity = iVelocity->Velocity(); - if(horizVelocity) - { - switch(velocityType) - { - case EHorizVelocity: - { - //Initialize - IntializeHorizVelocity(horizVelocity); - break; - } - case EHorizAndVertVelocity: - { - //Initialize - IntializeHorizAndVertVelocity(horizVelocity); - break; - } - case EHorizUncertVelocity: - { - //Initialize - IntializeHorizUncertVelocity(horizVelocity); - break; - } - case EHorizAndVertUncertVelocity: - { - //Initialize - IntializeHorizVertUncertVelocity(horizVelocity); - break; - } - default: - { - //error - - } - } - } - else - { - //error - - } - } - else - { - //return error - } - - - } -void CStubSuplPos::IntializeHorizVelocity(const COMASuplHorizVelocity* aVelocity) - { - TUint16 bearing; - TUint16 horSpeed; - - aVelocity->GetHorizVel(bearing,horSpeed); - - //Initialize bearing,horSpeed - } - -void CStubSuplPos::IntializeHorizAndVertVelocity(const COMASuplHorizVelocity* aVelocity) - { - TUint16 bearing; - TUint16 horSpeed; - TUint8 verDirect; - TUint8 verSpeed; - - COMASuplHorizAndVertVelocity* horizVertVel = (COMASuplHorizAndVertVelocity*)aVelocity; - - horizVertVel->GetHorizAndVertVel(bearing,horSpeed,verDirect,verSpeed); - - //Initialize bearing,horSpeed,verDirect,verSpeed - } - -void CStubSuplPos::IntializeHorizUncertVelocity(const COMASuplHorizVelocity* aVelocity) - { - TUint16 bearing; - TUint16 horSpeed; - TUint8 uncertSpeed; - - COMASuplHorizUncertVelocity* horizUncertVel = (COMASuplHorizUncertVelocity*)aVelocity; - - horizUncertVel->GetHorizUncertVel(bearing,horSpeed,uncertSpeed); - //Initialize bearing,horSpeed,uncertSpeed - } - -void CStubSuplPos::IntializeHorizVertUncertVelocity(const COMASuplHorizVelocity* aVelocity) - { - TUint16 bearing; - TUint16 horSpeed; - TUint8 verDirect; - TUint8 verSpeed; - TUint8 horizUncertSpeed; - TUint8 vertUncertSpeed; - - COMASuplHorizAndVertUncertVelocity* horizVertUncertVel = (COMASuplHorizAndVertUncertVelocity*)aVelocity; - - horizVertUncertVel->GetHorizVertUncertVel(bearing,horSpeed,verDirect,verSpeed, - horizUncertSpeed,vertUncertSpeed); - //Initialize bearing,horSpeed,verDirect,verSpeed,horizUncertSpeed,vertUncertSpeed - } diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/src/cstubsuplposinit.cpp --- a/omasuplasnconverterstubimpl/src/cstubsuplposinit.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,892 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: Supl PosInit - * - */ - -#include -#include -#include -#include "epos_comasuplasnbase.h" -#include "epos_comasuplasnmessagebase.h" -#include "epos_comasuplposinit.h" -#include "cstubsuplposinit.h" -#include "cstubsuplstart.h" -#include "lbs/epos_comasuplreqasstdata.h" -#include "lbs/epos_comasuplposition.h" -#include "lbs/epos_comasuplvelocity.h" -#include "lbs/epos_comasuplsetcapabilities.h" -#include "lbs/epos_comasuplpospayload.h" -#include "epos_comasuplpos.h" -#include "epos_comasuplsessionid.h" -#include "epos_comasupllocationid.h" - -// ----------------------------------------------------------------------------- -// CStubSuplPosInit::NewL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -EXPORT_C CStubSuplPosInit* CStubSuplPosInit::NewL() - { - CStubSuplPosInit* self = new (ELeave) CStubSuplPosInit; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -// ----------------------------------------------------------------------------- -// CStubSuplPosInit::~CStubSuplPosInit -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -EXPORT_C CStubSuplPosInit::~CStubSuplPosInit() - { - - } -// ----------------------------------------------------------------------------- -// CStubSuplPosInit::ConstructL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CStubSuplPosInit::ConstructL() - { - COMASuplPosInit::ConstructL(); - //Allocate memory for internal usage.... - } -// ----------------------------------------------------------------------------- -// CStubSuplPosInit::EncodeL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -HBufC8* CStubSuplPosInit::EncodeL(TInt& aErrorCode) - { - aErrorCode = 0; - HBufC8* encodedBuffer = NULL; - InitializeL(); - // Do actual encoding here and return encoded buffer and put appropriate error code in aErrorCode - return encodedBuffer; - } -// ----------------------------------------------------------------------------- -// CStubSuplPosInit::CStubSuplPosInit -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -CStubSuplPosInit::CStubSuplPosInit() - { - } -// ----------------------------------------------------------------------------- -// CStubSuplPosInit::InitializeL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CStubSuplPosInit::InitializeL() - { - if (iReqAsstData) //This parameter is optional in asn - { - InitializeRequestData(); - } - if (iPosition) //This parameter is optional in asn - { - InitializePosition(); - } - if (iPosPayload) //This parameter is optional in asn - { - InitializePosPayLoad(); - } - if (iSETCapabilities) //This parameter is mandatory in asn - { - InitializeSetCapabilities(); - } - if (iLocationId) //This parameter is mandatory in asn - { - InitializeLocationId(); - } - if (ieCID) //This parameter is optional in asn - { - InitializeECellId(); - } - } -void CStubSuplPosInit::InitializeRequestData() - { - TBool almanac; - TBool utc; - TBool ionos; - TBool dgps; - TBool ref; - TBool refTime; - TBool acq; - TBool realTime; - iReqAsstData->GetReqAsstData(almanac,utc,ionos,dgps,ref,refTime,acq,realTime); - //Initialize structure here... - } -void CStubSuplPosInit::InitializePosition() - { - // Retrieve mandatory parametrs of Position - // Retrieve mandatory parametrs of Position - TOMASuplUtcTime utcTime; - TOMASuplPositionEstimate posEstimate; - - iPosition->GetPosition(utcTime,posEstimate ); - - TInt error = 0; - - //Initialize Time - InitializeTime(utcTime); - //InitializePositionEstimate - - InitializePositionEstimate(posEstimate); - - if(error) - { - return; - } - else - { - COMASuplVelocity* velocity = NULL; - error = iPosition->GetVelocity(velocity); - if(error) - { - - } - else - { - - TOMASuplVelocityType velocityType = velocity->VelType(); - COMASuplHorizVelocity* horizVelocity = velocity->Velocity(); - if(horizVelocity) - { - switch(velocityType) - { - case EHorizVelocity: - { - //Initialize Horizontal velocity - IntializeHorizVelocity(horizVelocity); - break; - } - case EHorizAndVertVelocity: - { - //Initialize Horizontal and Vertical velocity - IntializeHorizAndVertVelocity(horizVelocity); - break; - } - case EHorizUncertVelocity: - { - //Initialize Horizontal Uncert velocity - IntializeHorizUncertVelocity(horizVelocity); - break; - } - case EHorizAndVertUncertVelocity: - { - //Initialize Horizontal Vertical Uncert velocity - IntializeHorizVertUncertVelocity(horizVelocity); - break; - } - default: - { - //error - return; - } - } - } - else - { - //error - return; - } - } - } - } - -void CStubSuplPosInit::IntializeHorizVelocity(const COMASuplHorizVelocity* aVelocity) - { - TUint16 bearing; - TUint16 horSpeed; - - aVelocity->GetHorizVel(bearing,horSpeed); - - //Initialize bearing,horSpeed - } - -void CStubSuplPosInit::IntializeHorizAndVertVelocity(const COMASuplHorizVelocity* aVelocity) - { - TUint16 bearing; - TUint16 horSpeed; - TUint8 verDirect; - TUint8 verSpeed; - - COMASuplHorizAndVertVelocity* horizVertVel = (COMASuplHorizAndVertVelocity*)aVelocity; - - horizVertVel->GetHorizAndVertVel(bearing,horSpeed,verDirect,verSpeed); - - //Initialize bearing,horSpeed,verDirect,verSpeed - } - -void CStubSuplPosInit::IntializeHorizUncertVelocity(const COMASuplHorizVelocity* aVelocity) - { - TUint16 bearing; - TUint16 horSpeed; - TUint8 uncertSpeed; - - COMASuplHorizUncertVelocity* horizUncertVel = (COMASuplHorizUncertVelocity*)aVelocity; - - horizUncertVel->GetHorizUncertVel(bearing,horSpeed,uncertSpeed); - //Initialize bearing,horSpeed,uncertSpeed - } - -void CStubSuplPosInit::IntializeHorizVertUncertVelocity(const COMASuplHorizVelocity* aVelocity) - { - TUint16 bearing; - TUint16 horSpeed; - TUint8 verDirect; - TUint8 verSpeed; - TUint8 horizUncertSpeed; - TUint8 vertUncertSpeed; - - COMASuplHorizAndVertUncertVelocity* horizVertUncertVel = (COMASuplHorizAndVertUncertVelocity*)aVelocity; - - horizVertUncertVel->GetHorizVertUncertVel(bearing,horSpeed,verDirect,verSpeed, - horizUncertSpeed,vertUncertSpeed); - //Initialize bearing,horSpeed,verDirect,verSpeed,horizUncertSpeed,vertUncertSpeed - } - -void CStubSuplPosInit::InitializePosPayLoad() - { - // Retrieve mandatory parametrs of PosMessage - COMASuplPosPayload::TOMASuplPosPayloadType payloadType; - HBufC8* payloadData = NULL; - - iPosPayload->GetPosPayload(payloadData,payloadType); - - if(!payloadData) - { - //error - return; - } - - TPtr8 ptr = payloadData->Des(); - - TInt len = payloadData->Length(); - - const char* lTemp = (const char *)ptr.Ptr(); - - - switch(payloadType) - { - case COMASuplPosPayload::ETIA801: - { - //initialize pospayload for TIA - break; - } - case COMASuplPosPayload::ERRC: - { - //initialize pospayload for RRC - break; - } - case COMASuplPosPayload::ERRLP: - { - //initialize pospayload for RRLP - break; - } - default: - { - //error - return; - } - } - - } -void CStubSuplPosInit::InitializeSetCapabilities() - { - TOMASuplPosTechnology lPosTechnology; - COMASuplSETCapabilities::TOMASuplPrefMethod lPrefMethod; - TOMASuplPosProtocol lPosProtocol; - - iSETCapabilities->GetSETCapabilities(lPosTechnology,lPrefMethod,lPosProtocol); - - TBool lSETAssist; - TBool lGpsSETBased; - TBool lAuto; - TBool lFLT; - TBool leOTD; - TBool loTDOA; - - lPosTechnology.GetPosTechnology(lSETAssist,lGpsSETBased,lAuto, - lFLT,leOTD,loTDOA); - - //Initialize structure accordingly from here... - } -// ----------------------------------------------------------------------------- -// CStubSuplPosInit::InitializeLocationId -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CStubSuplPosInit::InitializeLocationId() - { - COMASuplLocationId::TOMASuplCellInfoType lChoice = iLocationId->SuplCellInfoType(); - - switch(lChoice) - { - case COMASuplLocationId::EGSM : - { - COMASuplGSMCellInfo* lCellInfo = NULL; - COMASuplLocationId::TOMASuplStatus lStatus; - iLocationId->SuplLocationId(lCellInfo,lStatus); - if(lCellInfo) - { - TInt lRefMNC; - TInt lRefMCC; - TInt lRefLAC; - TInt lRefCI; - lCellInfo->SuplGSMCellInfo(lRefMNC,lRefMCC,lRefCI,lRefLAC); - } - } - case COMASuplLocationId::EWCDMA: - { - COMASuplCellInfo* lCellInfo = NULL; - COMASuplLocationId::TOMASuplStatus lStatus; - iLocationId->SuplLocationId(lCellInfo,lStatus); - if(lCellInfo) - { - TInt lRefMNC; - TInt lRefMCC; - TInt lRefUC; - lCellInfo->SuplCellInfo(lRefMNC,lRefMCC,lRefUC); - if((KMncMin<=lRefMNC && lRefMNC<=KMncMax) && (KMccMin<=lRefMCC && lRefMCC<=KMccMax) && - (KRefUcMin<=lRefUC && lRefUC<=KRefUcMax)) - { - //Initialize - } - } - else - { - //error - } - - } - } - //Initialize structure accordingly from here... - } - -// ----------------------------------------------------------------------------- -// CStubSuplPosInit::InitializeECellId -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CStubSuplPosInit::InitializeECellId() - { - TOMASuplNwMode nwMode = iMmCellInfo.NetworkMode(); - - if (nwMode == EOMASuplGSM) - { - InitializeGSMECellId(); - } - else - { - InitializeWCDMAECellId(); - } - //Initialize structure accordingly... - } -// ----------------------------------------------------------------------------- -// CStubSuplPosInit::InitializeGSMECellId -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CStubSuplPosInit::InitializeGSMECellId() - { - TOMASuplGSMCellinfo omaSuplGSMCellinfo; - iMmCellInfo.GSMCellInfo(omaSuplGSMCellinfo); - if(KOMASuplOptionalParamNotSet != omaSuplGSMCellinfo.iTA) - { - if(KTAMin <= omaSuplGSMCellinfo.iTA && omaSuplGSMCellinfo.iTA <= KTAMax) - { - //Initialize - } - else - { - //error - } - } - else - { - } - - TOMASuplNmr Nmr; - TInt ARFCN; - TInt BSIC; - TInt RxLEV; - - for(TInt i = 0; i < KOMASUPLMaxNmrAmount; i++) - { - Nmr = omaSuplGSMCellinfo.iNmr[i]; - ARFCN = Nmr.iARFCN; // 0 to 1023 - BSIC = Nmr.iBSIC; // 0 to 63 - RxLEV = Nmr.iRxLEV; // 0 to 63 - - if(ARFCN == KOMASuplOptionalParamNotSet && BSIC == KOMASuplOptionalParamNotSet && RxLEV == KOMASuplOptionalParamNotSet ) - { - //error - return; - } - - if(KARFCNMin <= ARFCN && ARFCN <= KARFCNMax && - KBSICMin <= BSIC && BSIC <= KBSICMax && - KRxLEVMin <= RxLEV && RxLEV <= KRxLEVMax) - { - //initialize - } - else - { - //error - return; - } - - } - } -// ----------------------------------------------------------------------------- -// CStubSuplPosInit::InitializeWCDMAECellId -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CStubSuplPosInit::InitializeWCDMAECellId() - { - TOMASuplWCDMACellinfo omaSuplWCDMACellinfo; - iMmCellInfo.WCDMACellInfo(omaSuplWCDMACellinfo); - if(KOMASuplOptionalParamNotSet != omaSuplWCDMACellinfo.iPrimaryScrambilingCode) // means PrimaryScrambilingCode is filled - { - if(KPrimaryScrambilingCodeMin <= omaSuplWCDMACellinfo.iPrimaryScrambilingCode && omaSuplWCDMACellinfo.iPrimaryScrambilingCode <= KPrimaryScrambilingCodeMax) - { - //Initialize - } - else - { - //error - } - } - else - { - //error - } - - FillFrequencyInfo(omaSuplWCDMACellinfo.iFrequencyInfo); - - FillMeasuredResultsList(omaSuplWCDMACellinfo.iNwkMeasureReport); - } - -TInt CStubSuplPosInit::FillFrequencyInfo(TOMASuplFrequencyInfo& aOMASuplFrequencyInfo) - { - TInt FddUL = aOMASuplFrequencyInfo.iFddUL; // 0..16383 In case of fdd( iFddUL, iFddDL), - TInt FddDL = aOMASuplFrequencyInfo.iFddDL; // 0..16383 iFddUL is optional while iFddDL is mandatory. - TInt TddDt = aOMASuplFrequencyInfo.iTddNt; // 0..16383 - - TInt retError = KErrNone; - - if(FddDL != KOMASuplOptionalParamNotSet ) //means FddDL is provided... - { - if(KFddDLMin <= FddDL && FddDL <= KFddDLMax) - { - //Initialize here.. - } - else - { - //error - } - } - else - { - //error - } - - FillFrequencyInfoULInfo(FddUL,retError); - - FillFrequencyInfoDT(TddDt,retError); - - return 0; - } - -void CStubSuplPosInit::FillFrequencyInfoULInfo(TInt aFddUL,TInt& aRetErrorCode) - { - if(aFddUL != KOMASuplOptionalParamNotSet && aRetErrorCode == KErrNone ) - { - if(KFddULMin <= aFddUL && aFddUL <= KFddULMax) - { - //set to message - aRetErrorCode = KErrNone; - } - else - { - //error - } - } - } - -void CStubSuplPosInit::FillFrequencyInfoDT(TInt aTddDt,TInt& aRetErrorCode) - { - if(aTddDt != KOMASuplOptionalParamNotSet ) //means TddDt is provided... - { - if(KTddDtMin <= aTddDt && aTddDt <= KTddDtMax) - { - //Initialize - } - else - { - //error - } - } - else - { - //error - } - aRetErrorCode = KErrNone; - } - -TInt CStubSuplPosInit::FillMeasuredResultsList(TOMASuplNetworkMeasureReport aNwkMeasureReport[]) - { - - - for(TInt i = 0; i < KOMASUPLMaxNetworkMeasureReports; i++ ) - { - TOMASuplNetworkMeasureReport NwkMeasureReport = aNwkMeasureReport[i]; - TInt err = FillFrequencyInfo(NwkMeasureReport.iFrequencyInfo); - - if(KOMASuplOptionalParamNotSet != NwkMeasureReport.iCarrierRSSI) // means iCarrierRSSI is filled - { - if(KCarrierRSSIMin <= NwkMeasureReport.iCarrierRSSI && NwkMeasureReport.iCarrierRSSI <= KCarrierRSSIMax) - { - //initialize - } - else - { - //error - } - } - - err = FillCellMeasuredResult(NwkMeasureReport.iCellMeasuredResult); - } - return 0; - } - -TInt CStubSuplPosInit::FillCellMeasuredResult(TOMASuplCellMeasuredResult aCellMeasuredResult[]) - { - - TInt eleCount = 0; - for(TInt i = 0; i < KOMASUPLMaxCellMeasuredResults; i++ ) - { - TOMASuplCellMeasuredResult CellMeasuredResult = aCellMeasuredResult[i]; - TInt err = FillModeSpecificInfo(CellMeasuredResult); - if( err == KErrNone) - { - //Initialize - - if(CellMeasuredResult.iCID != KOMASuplOptionalParamNotSet) // CID is present - { - if(KCIDMin <= CellMeasuredResult.iCID && CellMeasuredResult.iCID <= KCIDMax) - { - //Set to message - } - else - { - //error - } - } - else - { - //error - } - eleCount++; - } - } - - - if(eleCount != 0 ) - return KErrNone; - else - return KErrArgument; - } - -TInt CStubSuplPosInit::FillModeSpecificInfo(TOMASuplCellMeasuredResult& aCellMeasuredResult) - { - - TOMASuplFddInfo FddInfo = aCellMeasuredResult.iFddInfo; - TOMASuplTddInfo TddInfo = aCellMeasuredResult.iTddInfo; - - if(FddInfo.iPrimaryCPICH != KOMASuplOptionalParamNotSet) // iPrimaryCPICH is present - { - - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - if(KPrimaryCPICHMin <= FddInfo.iPrimaryCPICH && FddInfo.iPrimaryCPICH <= KPrimaryCPICHMax) - { - //Set to message - //initialize - } - else - { - //error - } - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - if(FddInfo.iCpichEcN0 != KOMASuplOptionalParamNotSet) // iCpichEcN0 is present - { - if(KCpichEcN0Min <= FddInfo.iCpichEcN0 && FddInfo.iCpichEcN0 <= KCpichEcN0Max) - { - //Set to message - } - else - { - //error - } - } - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - if(FddInfo.iCichRscp != KOMASuplOptionalParamNotSet) // iCichRscp is present - { - if(KCichRscpMin <= FddInfo.iCichRscp && FddInfo.iCichRscp <= KCichRscpMax) - { - //Set to message - } - else - { - //error - } - } - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - if(FddInfo.iPathloss != KOMASuplOptionalParamNotSet) // iPathloss is present - { - if(KPathlossMin <= FddInfo.iPathloss && FddInfo.iPathloss <= KPathlossMax) - { - //Set to message - } - else - { - //error - } - } - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - return KErrNone; - } - else - { - //error - } - - if(TddInfo.iCellParamID != KOMASuplOptionalParamNotSet) // iCellParamID is present - { - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - if(KCellParamIDMin <= TddInfo.iCellParamID && TddInfo.iCellParamID <= KCellParamIDMax) - { - //Set to message - } - else - { - //error - } - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - if(TddInfo.iProposedTGSN != KOMASuplOptionalParamNotSet) // iProposedTGSN is present - { - if(KProposedTGSNMin <= TddInfo.iProposedTGSN && TddInfo.iProposedTGSN <= KProposedTGSNMax) - { - //Set to message - } - else - { - //error - } - } - - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - if(TddInfo.iPrimaryCcpchRscp != KOMASuplOptionalParamNotSet) // iPrimaryCcpchRscp is present - { - if(KPrimaryCcpchRscpMin <= TddInfo.iPrimaryCcpchRscp && TddInfo.iPrimaryCcpchRscp <= KPrimaryCcpchRscpMax) - { - //Set to message - } - else - { - //error - } - } - - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - if(TddInfo.iPathloss != KOMASuplOptionalParamNotSet) // iPathloss is present - { - if(KPathlossMin <= TddInfo.iPathloss && TddInfo.iPathloss <= KPathlossMax) - { - //Set to message - } - else - { - //error - } - } - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - TInt eleCount = 0; - for(TInt i = 0; i < KOMASUPLMaxTimeSlotIscpAmount; i++) - { - if(TddInfo.iTimeslotISCP[i] != KOMASuplOptionalParamNotSet && KTimeslotISCPMin <= TddInfo.iTimeslotISCP[i] && TddInfo.iTimeslotISCP[i] <= KTimeslotISCPMax) - { - //Set to message - //Set to message that its not optional - eleCount++; - } - else - { - //error - } - - } - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // - return KErrNone; - } - else - { - //error - } - return 0; - } - -void CStubSuplPosInit::InitializePositionEstimate(TOMASuplPositionEstimate& aPosEstimate) - { - TInt error; - - // Retrieve mandatory parametrs of Position Estimate - TOMASuplPositionEstimate::TOMASuplLatitudeSign latSign; - TInt latitude; - TInt longitude; - aPosEstimate.GetPositionEstimate(latSign,latitude,longitude); - - // Set Position Estimate - if(KLatitudeMin <= latitude && latitude <= KLatitudeMax) - { - //Initialize - } - else - { - //error - } - - if(KLongitudeMin <= longitude && longitude <= KLongitudeMax) - { - //Initialize - } - else - { - //error - } - - //Initialize - - // Retrieve optional parametrs of Position Estimate - // Retrieve Uncertainity - TOMASuplUncertainty uncertainty; - error = aPosEstimate.GetUncertainty(uncertainty); - if(!error) - { - TInt uncertSemiMajor; - TInt uncertSemiMinor; - TInt orientMajorAxis; - uncertainty.GetUncertainty(uncertSemiMajor,uncertSemiMinor,orientMajorAxis); - if((KUncertSemiMajorMin <= uncertSemiMajor && uncertSemiMajor<= KUncertSemiMajorMax) - && (KUncertSemiMinorMin <= uncertSemiMinor && uncertSemiMinor<= KUncertSemiMinorMax) - && (KOrientMajorAxisMin <= orientMajorAxis && orientMajorAxis<= KOrientMajorAxisMax)) - { - //Initialize - } - else - { - //error - } - } - else - { - //return error - } - - // Retrieve Confidence - TInt confidence; - error = aPosEstimate.GetConfidence(confidence); - if(!error) - { - - if(KConfidenceMin <= confidence && confidence <= KConfidenceMax) - { - //Initialize - } - else - { - //error - } - } - else - { - //return error - } - - // Retrieve AltitudeInfo - TOMASuplAltitudeInfo altitudeInfo; - error = aPosEstimate.GetAltitudeInfo(altitudeInfo); - if(!error) - { - - TOMASuplAltitudeInfo::TOMASuplAltitudeDirection altDirection; - TInt altitude; - TInt altUncert; - altitudeInfo.GetAltitudeInfo(altDirection,altitude,altUncert); - if((KAltitudeMin <= altitude && altitude<= KAltitudeMax) && (KAltitudeUncertMin <= altUncert && altUncert<= KAltitudeUncertMax)) - { - //Initialize - } - else - { - //error - } - } - else - { - //return error - } - } - -void CStubSuplPosInit::InitializeTime(const TOMASuplUtcTime aUtcTime) - { - - TDateTime lDateTime; - TInt zoneCode; - TInt zone; - - aUtcTime.GetUtcTime(lDateTime,zoneCode,zone); - - TInt year = lDateTime.Year(); - TMonth month = lDateTime.Month(); - TInt day = lDateTime.Day(); - TInt hour = lDateTime.Hour(); - TInt minute = lDateTime.Minute(); - TInt second = lDateTime.Second(); - TInt microsec = lDateTime.MicroSecond(); - - if(0 == zoneCode || 1 == zoneCode) - { - //Initialize - } - else - { - //error - } - - - } diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/src/cstubsuplresponse.cpp --- a/omasuplasnconverterstubimpl/src/cstubsuplresponse.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description:Supl Response -* -*/ - -#include -#include -#include -#include "epos_comasuplasnbase.h" -#include "epos_comasuplasnmessagebase.h" -#include "epos_comasuplresponse.h" -#include "cstubsuplresponse.h" - -// ----------------------------------------------------------------------------- -// CStubSuplResponse::NewL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -EXPORT_C CStubSuplResponse* CStubSuplResponse::NewL() - { - CStubSuplResponse* self = new (ELeave) CStubSuplResponse; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } -// ----------------------------------------------------------------------------- -// CStubSuplResponse::~CStubSuplResponse -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -EXPORT_C CStubSuplResponse::~CStubSuplResponse() - { - - } -// ----------------------------------------------------------------------------- -// CStubSuplResponse::ConstructL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CStubSuplResponse::ConstructL() - { - COMASuplResponse::ConstructL(); - //Allocate memory for internal usage.... - } -// ----------------------------------------------------------------------------- -// CStubSuplResponse::EncodeL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -HBufC8* CStubSuplResponse::EncodeL(TInt& aErrorCode) - { - aErrorCode = KErrNotSupported; - //Encoding of SuplResponse is not done on SET side... - return NULL; - } -// ----------------------------------------------------------------------------- -// CStubSuplResponse::CStubSuplResponse -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -CStubSuplResponse::CStubSuplResponse() - { - } diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/src/cstubsuplstart.cpp --- a/omasuplasnconverterstubimpl/src/cstubsuplstart.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,645 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description:Supl Start - * - */ - -#include -#include -#include -#include "epos_comasuplasnbase.h" -#include "epos_comasuplasnmessagebase.h" -#include "epos_comasuplstart.h" -#include "cstubsuplstart.h" -#include "lbs/epos_comasuplsetcapabilities.h" -#include "epos_comasupllocationid.h" - -// ----------------------------------------------------------------------------- -// CStubSuplStart::NewL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -EXPORT_C CStubSuplStart* CStubSuplStart::NewL() - { - CStubSuplStart* self = new (ELeave) CStubSuplStart; - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } -// ----------------------------------------------------------------------------- -// CStubSuplStart::~CStubSuplStart -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -EXPORT_C CStubSuplStart::~CStubSuplStart() - { - - } -// ----------------------------------------------------------------------------- -// CStubSuplStart::EncodeL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -HBufC8* CStubSuplStart::EncodeL(TInt& aErrorCode) - { - aErrorCode = 0; - HBufC8* encodedBuffer = NULL; - InitializeL(); - // Do actual encoding here and return encoded buffer and put appropriate error code in aErrorCode - return encodedBuffer; - } -// ----------------------------------------------------------------------------- -// CStubSuplStart::CStubSuplStart -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -CStubSuplStart::CStubSuplStart() - { -//delete all member variables here... - } -// ----------------------------------------------------------------------------- -// CStubSuplStart::ConstructL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CStubSuplStart::ConstructL() - { - COMASuplStart::ConstructL(); - //Allocate memmory for internal usage.... - } -// ----------------------------------------------------------------------------- -// CStubSuplStart::InitializeL -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CStubSuplStart::InitializeL() - { - - if(iSETCapabilities) //This parameter is mandatory in asn - { - InitializeSetCapabilities(); - } - if(iLocationId) //This parameter is mandatory in asn - { - InitializeLocationId(); - } - if (iQopSet) //This parameter is optional in asn - { - InitializeQop(); - } - if(ieCID) //This parameter is optional in asn - { - InitializeECellId(); - } - } -// ----------------------------------------------------------------------------- -// CStubSuplStart::InitializeSetCapabilities -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CStubSuplStart::InitializeSetCapabilities() - { - TOMASuplPosTechnology lPosTechnology; - COMASuplSETCapabilities::TOMASuplPrefMethod lPrefMethod; - TOMASuplPosProtocol lPosProtocol; - - iSETCapabilities->GetSETCapabilities(lPosTechnology,lPrefMethod,lPosProtocol); - - TBool lSETAssist; - TBool lGpsSETBased; - TBool lAuto; - TBool lFLT; - TBool leOTD; - TBool loTDOA; - - lPosTechnology.GetPosTechnology(lSETAssist,lGpsSETBased,lAuto, - lFLT,leOTD,loTDOA); - - //Initialize structure accordingly from here... - } -// ----------------------------------------------------------------------------- -// CStubSuplStart::InitializeLocationId -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CStubSuplStart::InitializeLocationId() - { - COMASuplLocationId::TOMASuplCellInfoType lChoice = iLocationId->SuplCellInfoType(); - - switch(lChoice) - { - case COMASuplLocationId::EGSM : - { - COMASuplGSMCellInfo* lCellInfo = NULL; - COMASuplLocationId::TOMASuplStatus lStatus; - iLocationId->SuplLocationId(lCellInfo,lStatus); - if(lCellInfo) - { - TInt lRefMNC; - TInt lRefMCC; - TInt lRefLAC; - TInt lRefCI; - lCellInfo->SuplGSMCellInfo(lRefMNC,lRefMCC,lRefCI,lRefLAC); - - //Use lRefMNC,lRefMCC,lRefCI,lRefLAC for filling asn structs for encoding. - } - break; - } - case COMASuplLocationId::EWCDMA: - { - COMASuplCellInfo* lCellInfo = NULL; - COMASuplLocationId::TOMASuplStatus lStatus; - iLocationId->SuplLocationId(lCellInfo,lStatus); - if(lCellInfo) - { - TInt lRefMNC; - TInt lRefMCC; - TInt lRefUC; - lCellInfo->SuplCellInfo(lRefMNC,lRefMCC,lRefUC); - if((KMncMin<=lRefMNC && lRefMNC<=KMncMax) && (KMccMin<=lRefMCC && lRefMCC<=KMccMax) && - (KRefUcMin<=lRefUC && lRefUC<=KRefUcMax)) - { - //Initialize - //Use RefMNC,lRefMCC,lRefUC for filling asn structs for encoding. - } - } - else - { - //error - } - break; - } - } - //Initialize structure accordingly from here... - } -// ----------------------------------------------------------------------------- -// CStubSuplStart::InitializeQop -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CStubSuplStart::InitializeQop() - { - TInt horizAccuracy = iSuplQop.SuplQop(); - if(KHorizAccuracyMin <= horizAccuracy && horizAccuracy <= KHorizAccuracyMax) - { - //initialize here - } - else - { - //error...return with error - } - - TInt vertAccuracy; - TInt error = iSuplQop.VerticalAccuracy(vertAccuracy); - if(!error) - { - if(KVertAccuracyMin <= vertAccuracy && vertAccuracy <= KVertAccuracyMax) - { - //initialize - } - else - { - //return error - - } - } - else - { - //initialize - } - - TInt maxLocAge; - error = iSuplQop.MaxLocationAge(maxLocAge); - if(!error) - { - //initialize - if(KMaxLocationAgeMin <= maxLocAge && maxLocAge <= KMaxLocationAgeMax) - { - //initialize - } - else - { - //error - return; - } - } - else - { - //initialize - } - - TInt delay; - error = iSuplQop.Delay(delay); - if(!error) - { - if(KDelayMin <= delay && delay <= KDelayMax) - { - //initialize - } - else - { - //error - return; - } - } - else - { - //initialize - } - //Initialize structure accordingly... - } -// ----------------------------------------------------------------------------- -// CStubSuplStart::InitializeECellId -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CStubSuplStart::InitializeECellId() - { - TOMASuplNwMode nwMode = iMmCellInfo.NetworkMode(); - - if (nwMode == EOMASuplGSM) - { - InitializeGSMECellId(); - } - else - { - InitializeWCDMAECellId(); - } - //Initialize structure accordingly... - } -// ----------------------------------------------------------------------------- -// CStubSuplStart::InitializeGSMECellId -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CStubSuplStart::InitializeGSMECellId() - { - // In E-Cell id structs, if any of the data field contains -1 as a value, it means that no data is available for that field. - TOMASuplGSMCellinfo omaSuplGSMCellinfo; - iMmCellInfo.GSMCellInfo(omaSuplGSMCellinfo); - if(KOMASuplOptionalParamNotSet != omaSuplGSMCellinfo.iTA) - { - if(KTAMin <= omaSuplGSMCellinfo.iTA && omaSuplGSMCellinfo.iTA <= KTAMax) - { - //Initialize - } - else - { - //error - } - } - else - { - } - - TOMASuplNmr Nmr; - TInt ARFCN; - TInt BSIC; - TInt RxLEV; - - for(TInt i = 0; i < KOMASUPLMaxNmrAmount; i++) - { - Nmr = omaSuplGSMCellinfo.iNmr[i]; - ARFCN = Nmr.iARFCN; // 0 to 1023 - BSIC = Nmr.iBSIC; // 0 to 63 - RxLEV = Nmr.iRxLEV; // 0 to 63 - - if(ARFCN == KOMASuplOptionalParamNotSet && BSIC == KOMASuplOptionalParamNotSet && RxLEV == KOMASuplOptionalParamNotSet ) - { - //initialize - } - - if(KARFCNMin <= ARFCN && ARFCN <= KARFCNMax && - KBSICMin <= BSIC && BSIC <= KBSICMax && - KRxLEVMin <= RxLEV && RxLEV <= KRxLEVMax) - { - //initialize - } - else - { - //error - } - - } - } -// ----------------------------------------------------------------------------- -// CStubSuplStart::InitializeWCDMAECellId -// Other Items were commented in a header -// ----------------------------------------------------------------------------- -// -void CStubSuplStart::InitializeWCDMAECellId() - { - // In E-Cell id structs, if any of the data field contains -1 as a value, it means that no data is available for that field. - TOMASuplWCDMACellinfo omaSuplWCDMACellinfo; - iMmCellInfo.WCDMACellInfo(omaSuplWCDMACellinfo); - if(KOMASuplOptionalParamNotSet != omaSuplWCDMACellinfo.iPrimaryScrambilingCode) // means PrimaryScrambilingCode is filled - { - if(KPrimaryScrambilingCodeMin <= omaSuplWCDMACellinfo.iPrimaryScrambilingCode && omaSuplWCDMACellinfo.iPrimaryScrambilingCode <= KPrimaryScrambilingCodeMax) - { - //Initialize - } - else - { - //error - } - } - else - { - //error - } - - FillFrequencyInfo(omaSuplWCDMACellinfo.iFrequencyInfo); - - FillMeasuredResultsList(omaSuplWCDMACellinfo.iNwkMeasureReport); - } - -TInt CStubSuplStart::FillFrequencyInfo(TOMASuplFrequencyInfo& aOMASuplFrequencyInfo) - { - TInt FddUL = aOMASuplFrequencyInfo.iFddUL; // 0..16383 In case of fdd( iFddUL, iFddDL), - TInt FddDL = aOMASuplFrequencyInfo.iFddDL; // 0..16383 iFddUL is optional while iFddDL is mandatory. - TInt TddDt = aOMASuplFrequencyInfo.iTddNt; // 0..16383 - - TInt retError = KErrNone; - - if(FddDL != KOMASuplOptionalParamNotSet ) //means FddDL is provided... - { - if(KFddDLMin <= FddDL && FddDL <= KFddDLMax) - { - //Initialize here.. - } - else - { - //error - } - } - else - { - //error - } - - FillFrequencyInfoULInfo(FddUL,retError); - - FillFrequencyInfoDT(TddDt,retError); - - return retError; - } - -void CStubSuplStart::FillFrequencyInfoULInfo(TInt aFddUL,TInt& aRetErrorCode) - { - if(aFddUL != KOMASuplOptionalParamNotSet && aRetErrorCode == KErrNone ) - { - if(KFddULMin <= aFddUL && aFddUL <= KFddULMax) - { - //set to message - aRetErrorCode = KErrNone; - } - else - { - //error - } - } - } - -void CStubSuplStart::FillFrequencyInfoDT(TInt aTddDt,TInt& aRetErrorCode) - { - if(aTddDt != KOMASuplOptionalParamNotSet ) //means TddDt is provided... - { - if(KTddDtMin <= aTddDt && aTddDt <= KTddDtMax) - { - //Initialize - } - else - { - //error - } - } - else - { - //error - } - aRetErrorCode = KErrNone; - } - -TInt CStubSuplStart::FillMeasuredResultsList(TOMASuplNetworkMeasureReport aNwkMeasureReport[]) - { - - - for(TInt i = 0; i < KOMASUPLMaxNetworkMeasureReports; i++ ) - { - TOMASuplNetworkMeasureReport NwkMeasureReport = aNwkMeasureReport[i]; - TInt err = FillFrequencyInfo(NwkMeasureReport.iFrequencyInfo); - - if(KOMASuplOptionalParamNotSet != NwkMeasureReport.iCarrierRSSI) // means iCarrierRSSI is filled - { - if(KCarrierRSSIMin <= NwkMeasureReport.iCarrierRSSI && NwkMeasureReport.iCarrierRSSI <= KCarrierRSSIMax) - { - //initialize - } - else - { - //error - } - } - - err = FillCellMeasuredResult(NwkMeasureReport.iCellMeasuredResult); - } - return 0; - //Own error code can be set... - } - -TInt CStubSuplStart::FillCellMeasuredResult(TOMASuplCellMeasuredResult aCellMeasuredResult[]) - { - - TInt eleCount = 0; - for(TInt i = 0; i < KOMASUPLMaxCellMeasuredResults; i++ ) - { - TOMASuplCellMeasuredResult CellMeasuredResult = aCellMeasuredResult[i]; - TInt err = FillModeSpecificInfo(CellMeasuredResult); - if( err == KErrNone) - { - //Initialize - - if(CellMeasuredResult.iCID != KOMASuplOptionalParamNotSet) // CID is present - { - if(KCIDMin <= CellMeasuredResult.iCID && CellMeasuredResult.iCID <= KCIDMax) - { - //Set to message - } - else - { - //error - } - } - else - { - //error - } - eleCount++; - } - } - - - if(eleCount != 0 ) - return KErrNone; - else - return KErrArgument; - } - -TInt CStubSuplStart::FillModeSpecificInfo(TOMASuplCellMeasuredResult& aCellMeasuredResult) - { - - TOMASuplFddInfo FddInfo = aCellMeasuredResult.iFddInfo; - TOMASuplTddInfo TddInfo = aCellMeasuredResult.iTddInfo; - - if(FddInfo.iPrimaryCPICH != KOMASuplOptionalParamNotSet) // iPrimaryCPICH is present - { - - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - if(KPrimaryCPICHMin <= FddInfo.iPrimaryCPICH && FddInfo.iPrimaryCPICH <= KPrimaryCPICHMax) - { - //Set to message - //initialize - } - else - { - //error - } - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - if(FddInfo.iCpichEcN0 != KOMASuplOptionalParamNotSet) // iCpichEcN0 is present - { - if(KCpichEcN0Min <= FddInfo.iCpichEcN0 && FddInfo.iCpichEcN0 <= KCpichEcN0Max) - { - //Set to message - } - else - { - //error - } - } - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - if(FddInfo.iCichRscp != KOMASuplOptionalParamNotSet) // iCichRscp is present - { - if(KCichRscpMin <= FddInfo.iCichRscp && FddInfo.iCichRscp <= KCichRscpMax) - { - //Set to message - } - else - { - //error - } - } - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - if(FddInfo.iPathloss != KOMASuplOptionalParamNotSet) // iPathloss is present - { - if(KPathlossMin <= FddInfo.iPathloss && FddInfo.iPathloss <= KPathlossMax) - { - //Set to message - } - else - { - //error - } - } - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - return KErrNone; - } - else - { - //error - } - - if(TddInfo.iCellParamID != KOMASuplOptionalParamNotSet) // iCellParamID is present - { - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - if(KCellParamIDMin <= TddInfo.iCellParamID && TddInfo.iCellParamID <= KCellParamIDMax) - { - //Set to message - } - else - { - //error - } - - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - if(TddInfo.iProposedTGSN != KOMASuplOptionalParamNotSet) // iProposedTGSN is present - { - if(KProposedTGSNMin <= TddInfo.iProposedTGSN && TddInfo.iProposedTGSN <= KProposedTGSNMax) - { - //Set to message - } - else - { - //error - } - } - - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - if(TddInfo.iPrimaryCcpchRscp != KOMASuplOptionalParamNotSet) // iPrimaryCcpchRscp is present - { - if(KPrimaryCcpchRscpMin <= TddInfo.iPrimaryCcpchRscp && TddInfo.iPrimaryCcpchRscp <= KPrimaryCcpchRscpMax) - { - //Set to message - } - else - { - //error - } - } - - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - if(TddInfo.iPathloss != KOMASuplOptionalParamNotSet) // iPathloss is present - { - if(KPathlossMin <= TddInfo.iPathloss && TddInfo.iPathloss <= KPathlossMax) - { - //Set to message - } - else - { - //error - } - } - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - TInt eleCount = 0; - for(TInt i = 0; i < KOMASUPLMaxTimeSlotIscpAmount; i++) - { - if(TddInfo.iTimeslotISCP[i] != KOMASuplOptionalParamNotSet && KTimeslotISCPMin <= TddInfo.iTimeslotISCP[i] && TddInfo.iTimeslotISCP[i] <= KTimeslotISCPMax) - { - //Set to message - //Set to message that its not optional - eleCount++; - } - else - { - //error - } - - } - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // - return KErrNone; - } - else - { - //error - } - return 0; - //Own error code can be set... - } diff -r b7e5ed8c1342 -r e71858845f73 omasuplasnconverterstubimpl/sysdef_1_4_0.dtd --- a/omasuplasnconverterstubimpl/sysdef_1_4_0.dtd Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r b7e5ed8c1342 -r e71858845f73 posmsgpluginreferenceimpl/data/1027509D.rss --- a/posmsgpluginreferenceimpl/data/1027509D.rss Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 1027 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Resource file -* -*/ - - -#include - -RESOURCE REGISTRY_INFO theInfo - { - dll_uid = 0x1027509D; - interfaces = - { - INTERFACE_INFO - { - // OMA SUPL POS Message Plugin Interface UID - interface_uid = 0x102073D4; - implementations = - { - IMPLEMENTATION_INFO - { - implementation_uid = 0x1027509C; - version_no = 1; - display_name = "Reference implementation"; - default_data = ""; - opaque_data =""; - } - }; - } - }; - } diff -r b7e5ed8c1342 -r e71858845f73 posmsgpluginreferenceimpl/group/bld.inf --- a/posmsgpluginreferenceimpl/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This file provides the information required for building the -* OMA SUPL POS Message plug-in API Dll -* -*/ - - -PRJ_PLATFORMS -DEFAULT - - -PRJ_MMPFILES -epos_omasuplposmessageplugin_ref.mmp diff -r b7e5ed8c1342 -r e71858845f73 posmsgpluginreferenceimpl/group/epos_omasuplposmessageplugin_ref.mmp --- a/posmsgpluginreferenceimpl/group/epos_omasuplposmessageplugin_ref.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for POS Message plugin reference implementation -* -*/ - -#include - -TARGET eposomasuplposrefapp.dll -TARGETTYPE PLUGIN -UID 0x10009d8d 0x1027509D - -CAPABILITY CAP_ECOM_PLUGIN -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE epos_comasuplposhandler.cpp -SOURCE epos_comasuplpossession.cpp -SOURCE epos_comasuplposhandlerproxy.cpp -SOURCE epos_comasuplposhandlermain.cpp -SOURCE epos_tomasuplposutility.cpp - -MW_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../inc - -//SYSTEMINCLUDE /epoc32/include -//SYSTEMINCLUDE /epoc32/include/ecom - -LIBRARY euser.lib -LIBRARY ecom.lib -LIBRARY eposomasuplposmessageplugin.lib - - -START RESOURCE ../data/1027509D.rss - #ifdef SYMBIAN_SECURE_ECOM - TARGET eposomasuplposrefapp.rsc - #endif -END diff -r b7e5ed8c1342 -r e71858845f73 posmsgpluginreferenceimpl/inc/epos_comasuplposhandler.h --- a/posmsgpluginreferenceimpl/inc/epos_comasuplposhandler.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of COMASuplPosHandlerBase -* -*/ - - -#ifndef C_COMASUPLPOSHANDLER_H -#define C_COMASUPLPOSHANDLER_H - - -#include - - -// Forward Declaration -class COMASuplPosSession; - -/** -* Reference implementation of COMASuplPosHandlerBase -* @since Series 60 3.1u -*/ -class COMASuplPosHandler : public COMASuplPosHandlerBase - { - - public: // Constructors and destructor - - /** - * Factory function that instantiates a new object of COMASuplPosHandler - * - * @since S60 v3.0 - */ - static COMASuplPosHandlerBase* NewL(); - - /** - * Destructor - * - * @since S60 v3.0 - */ - ~COMASuplPosHandler(); - - public: // New functions - - /** - * From COMASuplPosHandlerBase - * Initializes the instance of COMASuplPosHandler - * @since S60 v3.1u - */ - void InitializeL( TRequestStatus &aStatus ); - - /** - * From COMASuplPosHandlerBase - * Cancels an outstanding request to initialize - * @since S60 v3.1u - */ - void CancelInitialize(); - - /** - * From COMASuplPosHandlerBase - * Factory function to create a new instance of COMASuplPosSession - * @since S60 v3.1u - */ - COMASuplPosSessionBase* CreateNewSessionL( - MOMASuplObserver *aSuplObserver ); - - private: - - /** - * Constructor - * - * @since S60 v3.1u - */ - COMASuplPosHandler(); - - }; - - -#endif // C_COMASUPLPOSHANDLER_H diff -r b7e5ed8c1342 -r e71858845f73 posmsgpluginreferenceimpl/inc/epos_comasuplpossession.h --- a/posmsgpluginreferenceimpl/inc/epos_comasuplpossession.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,207 +0,0 @@ -/* -* Copyright (c) Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of COMASuplPosSessionBase -* -*/ - - -#ifndef C_COMASUPLPOSSESSION_H -#define C_COMASUPLPOSSESSION_H - - -#include - - -/** -* Reference implementation of COMASuplPosSessionBase -* @since S60 3.1u -*/ -class COMASuplPosSession : public COMASuplPosSessionBase - , public virtual CActive - { - - public: // Constructors and destructor - - /** - * Factory function that instantiates a new object of COMASuplPosSession - * - * @since S60 v3.1u - */ - static COMASuplPosSessionBase* NewL( MOMASuplObserver* aSuplObserver ); - - /** - * Destructor - * - * @since S60 v3.0 - */ - ~COMASuplPosSession(); - - public: - - /** - * From COMASuplPosSessionBase - * Initializes the instance of COMASuplPosSession - * @since S60 v3.1u - */ - void InitializeL( const TInt aRequestID, TRequestStatus &aStatus ); - - /** - * From COMASuplPosSessionBase - * Cancels an outstanding request to initialize - * @since S60 v3.1u - */ - void CancelInitialize(); - - /** - * From COMASuplPosSessionBase - * Handles SUPL POS payload - * @since S60 v3.1u - */ - void HandleSuplPosMessageL( const COMASuplPosPayload *aPosPayload ); - - /** - * From COMASuplPosSessionBase - * Provides different POS parameters to the SUPL FW - * @since S60 v3.1u - */ - void GetSuplInfoL( COMASuplInfoRequestList *aInfoRequestList, - TRequestStatus &aStatus ); - - /** - * From COMASuplPosSessionBase - * Cancels an outstanding request to GetSuplInfoL - * @since S60 v3.1u - */ - void CancelSuplInfoRequest(); - - /** - * From COMASuplPosSessionBase - * Provides position estimates to the SUPL FW - * @since S60 v3.1u - */ - void GetPositionL( TRequestStatus &aStatus, - COMASuplPosition* aPosition ); - - /** - * From COMASuplPosSessionBase - * Cancels an outstanding request to GetPositionL - * @since S60 v3.1u - */ - void CancelGetPosition(); - - /** - * From COMASuplPosSessionBase - * Terminates a SUPL POS Session - * @since S60 v3.1u - */ - void SessionEnd(); - - - private: - - /** - * Creates an IPC connection with the SUPL gateway, forwards - * the request and terminates the connection - * @since S60 v3.1u - */ - COMASuplPosSession( MOMASuplObserver* aSuplObserver ); - - /** - * From CActive - * Request completion event handler - * @since S60 v3.1u - */ - void RunL(); - - /** - * From CActive - * Called to cancel outanding requests - * @since S60 v3.1u - */ - void DoCancel(); - - /** - * From CActive - * Called to handle leave in RunL - * @since S60 v3.1u - */ - TInt RunError(TInt aError); - /** - * Completes an asynchronous request with KErrNone - * @since S60 v3.1u - */ - void IdleComplete(); - - /** - * Cancels an outstanding request - * @since S60 v3.1u - */ - void CancelRequest(); - - private: - - /** - * State information of an instance of COMASuplPosSession - */ - enum TPosSessionState - { - EInitialize, - EGetSuplInfo, - EGetPosition - }; - - /** - * Contains the client request status - */ - TRequestStatus* iClientStatus; - - /** - * Contains the request ID - */ - TInt iRequestID; - - /** - * A flag field to determine if the instance of COMASuplPosSession - * was initialized - */ - TBool iIsInitialized; - - /** - * Data field to hold the state information - */ - TPosSessionState iState; - - /** - * Data field to hold the position estimates. The ownership of this - * object is not taken. - */ - COMASuplPosition* iPosition; - - /** - * Data field to hold the SUPL Info Request List. The ownership - * of this object is not taken. - */ - COMASuplInfoRequestList* iSuplInfoReqList; - - /** - * Data field to hold the payload information. The instance of - * COMASuplPosSession instantiates this object and also takes - * ownership of the same. - */ - COMASuplPosPayload* iPosPayload; - - }; - - -#endif // C_COMASUPLPOSSESSION_H diff -r b7e5ed8c1342 -r e71858845f73 posmsgpluginreferenceimpl/inc/epos_tomasuplposutility.h --- a/posmsgpluginreferenceimpl/inc/epos_tomasuplposutility.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Helper class used to obtain supl information -* -*/ - - -#ifndef T_TOMASUPLPOSUTILITY_H -#define T_TOMASUPLPOSUTILITY_H - - -class COMASuplInfoRequest; - - -/** -* An utility class that is used by an instance of COMASuplPosSession to -* determine POS parameters -*/ -class TOmaSuplPosUtility - { - - public: - - /** - * Provides the position estimates. This is method is invoked by an - * instance of COMASuplPosSession - */ - static void GetPositionEstimatesL( COMASuplPosition*& aPosition ); - - /** - * Provides the requested POS parameters. This is method is invoked by an - * instance of COMASuplPosSession - */ - static void GetPosParametersL( COMASuplInfoRequestList*& aInfoRequestList ); - - private: - - /** - * Provides the requested assistance data - */ - static void GetRequestedAsstData( COMASuplInfoRequest*& aReqElement ); - - /** - * Provides velocity information - */ - static void GetVelocityL( COMASuplInfoRequest*& aReqElement ); - - /** - * Provides SET capabilities - */ - static void GetSetCapabilities( COMASuplInfoRequest*& aReqElement ); - - /** - * Provides the POS payload - */ - static void GetPosPayloadL( COMASuplInfoRequest*& aReqElement ); - - /** - * Provides the position estimates - */ - static void GetPositionL( COMASuplInfoRequest*& aReqElement ); - - }; - - -#endif // T_TOMASUPLPOSUTILITY_H diff -r b7e5ed8c1342 -r e71858845f73 posmsgpluginreferenceimpl/install/refimpl.pkg --- a/posmsgpluginreferenceimpl/install/refimpl.pkg Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -; -; Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -; All rights reserved. -; This component and the accompanying materials are made available -; under the terms of "Eclipse Public License v1.0" -; which accompanies this distribution, and is available -; at the URL "http://www.eclipse.org/legal/epl-v10.html". -; -; Initial Contributors: -; Nokia Corporation - initial contribution. -; -; Contributors: -; -; Description: Package file for project eposomasuplposrefapp -; - -;RefImpl.pkg - -;languages -&EN - -;packet-header (name, uid, major, minor, build, type) -#{"SuplPosRefImpl"},(0x1027509D),1,0,1,TYPE=SY - -; Localised Vendor name -%{"Nokia-EN"} - -; Unique Vendor name -:"Nokia" - -;Supports Series 60 v 1.0 -(0x101f7962), 0, 0, 0, {"Series60ProductID"} - -; For Pos Tester -"\Epoc32\release\armv5\urel\eposomasuplposrefapp.dll" - "c:\sys\bin\eposomasuplposrefapp.dll" -"\Epoc32\data\Z\Resource\plugins\eposomasuplposrefapp.rsc" - "c:\resource\plugins\eposomasuplposrefapp.rsc" - -;ENDIF \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 posmsgpluginreferenceimpl/layers.sysdef.xml --- a/posmsgpluginreferenceimpl/layers.sysdef.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - -]> - - - - - - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 posmsgpluginreferenceimpl/src/epos_comasuplposhandler.cpp --- a/posmsgpluginreferenceimpl/src/epos_comasuplposhandler.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Provides the reference implementation for the POS message -* plugin -* -*/ - - - -#include -#include "epos_comasuplposhandler.h" -#include "epos_comasuplpossession.h" - - -// ----------------------------------------------------------------------------- -// COMASuplPosHandler::NewL -// Factory function to instantiate an object of COMASuplPosHandler -// ----------------------------------------------------------------------------- -// -COMASuplPosHandlerBase* COMASuplPosHandler::NewL() - { - return new ( ELeave ) COMASuplPosHandler; - } - - -// ----------------------------------------------------------------------------- -// COMASuplPosHandler::~COMASuplPosHandler -// Destructor -// ----------------------------------------------------------------------------- -// -COMASuplPosHandler::~COMASuplPosHandler() - { - } - - -// ----------------------------------------------------------------------------- -// COMASuplPosHandler::InitializeL -// Initializes the instance of COMASuplPosHandler -// ----------------------------------------------------------------------------- -// -void COMASuplPosHandler::InitializeL( TRequestStatus& aStatus ) - { - // Initialization operations to be done - TRequestStatus* status = &aStatus; - User::RequestComplete( status, KErrNone ); - } - - -// ----------------------------------------------------------------------------- -// COMASuplPosHandler::CancelInitialize -// Cancels an outstanding request to initialize -// ----------------------------------------------------------------------------- -// -void COMASuplPosHandler::CancelInitialize() - { - - } - - -// ----------------------------------------------------------------------------- -// COMASuplPosHandler::CreateNewSessionL -// Factory function to create a new instance of COMASuplPosSession -// ----------------------------------------------------------------------------- -// -COMASuplPosSessionBase* COMASuplPosHandler::CreateNewSessionL( - MOMASuplObserver* aSuplObserver ) - { - return COMASuplPosSession::NewL( aSuplObserver ); - } - - -// ----------------------------------------------------------------------------- -// COMASuplPosHandler::COMASuplPosHandler -// Constructor -// ----------------------------------------------------------------------------- -// -COMASuplPosHandler::COMASuplPosHandler():COMASuplPosHandlerBase() - { - - } diff -r b7e5ed8c1342 -r e71858845f73 posmsgpluginreferenceimpl/src/epos_comasuplposhandlermain.cpp --- a/posmsgpluginreferenceimpl/src/epos_comasuplposhandlermain.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: DLL entry function -* -*/ - - - -#include - - -#ifndef EKA2 -GLDEF_C TInt E32Dll( /*TDllReason aReason*/ ) - { - return( KErrNone ); - } -#endif diff -r b7e5ed8c1342 -r e71858845f73 posmsgpluginreferenceimpl/src/epos_comasuplposhandlerproxy.cpp --- a/posmsgpluginreferenceimpl/src/epos_comasuplposhandlerproxy.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Provides Implementation table for ECom -* -*/ - - - -#include -#include -#include "epos_comasuplposhandler.h" - - -const TImplementationProxy ImplementationTable[] = - { - IMPLEMENTATION_PROXY_ENTRY( 0x1027509C, COMASuplPosHandler::NewL ) - }; - -EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount ) - { - aTableCount = sizeof( ImplementationTable ) / sizeof( TImplementationProxy ); - return ImplementationTable; - } diff -r b7e5ed8c1342 -r e71858845f73 posmsgpluginreferenceimpl/src/epos_comasuplpossession.cpp --- a/posmsgpluginreferenceimpl/src/epos_comasuplpossession.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,277 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Provides the reference implementation for POS message plugin -* -*/ - - - -#include -#include -#include -#include -#include "epos_comasuplpossession.h" -#include "epos_tomasuplposutility.h" - - -// ----------------------------------------------------------------------------- -// COMASuplPosSession::NewL -// Factory function to instantiate an object of COMASuplPosSession -// ----------------------------------------------------------------------------- -// -COMASuplPosSessionBase* COMASuplPosSession::NewL( - MOMASuplObserver* aSuplObserver ) - { - return new ( ELeave ) COMASuplPosSession( aSuplObserver ); - } - - -// ----------------------------------------------------------------------------- -// COMASuplPosSession::~COMASuplPosSession -// Destructor. Removes the object from the active scheduler's list -// ----------------------------------------------------------------------------- -// -COMASuplPosSession::~COMASuplPosSession() - { - delete iPosPayload; - Deque(); - } - - -// ----------------------------------------------------------------------------- -// COMASuplPosSession::COMASuplPosSession -// Constructor -// ----------------------------------------------------------------------------- -// -COMASuplPosSession::COMASuplPosSession( MOMASuplObserver* aSuplObserver ): - CActive( EPriorityStandard ) - , COMASuplPosSessionBase( aSuplObserver ) - { - iIsInitialized = EFalse; - iRequestID = 0; - CActiveScheduler::Add( this ); - } - - -// ----------------------------------------------------------------------------- -// COMASuplPosSession::InitializeL -// Initializes the instance of COMASuplPosSession -// ----------------------------------------------------------------------------- -// -void COMASuplPosSession::InitializeL( const TInt aRequestID, - TRequestStatus& aStatus ) - { - aStatus = KRequestPending; - iRequestID = aRequestID; - iClientStatus = &aStatus; - iState = EInitialize; - if ( iPosPayload ) - { - delete iPosPayload; - iPosPayload = NULL; - } - IdleComplete(); - } - - -// ----------------------------------------------------------------------------- -// COMASuplPosSession::CancelInitialize -// Cancels an outstanding request to initialize -// ----------------------------------------------------------------------------- -// -void COMASuplPosSession::CancelInitialize() - { - iIsInitialized = EFalse; - CancelRequest(); - } - - -// ----------------------------------------------------------------------------- -// COMASuplPosSession::HandleSuplPosMessageL -// Handles SUPL POS payload -// ----------------------------------------------------------------------------- -// -void COMASuplPosSession::HandleSuplPosMessageL( - const COMASuplPosPayload* aPosPayload ) - { - __ASSERT_ALWAYS( iIsInitialized, User::Leave( KErrOMASuplPosInActive ) ); - - // Delete any existing memory - if ( iPosPayload ) - { - delete iPosPayload; - iPosPayload = NULL; - } - - iPosPayload = static_cast( aPosPayload->CloneL() ); - } - - -// ----------------------------------------------------------------------------- -// COMASuplPosSession::GetSuplInfoL -// Provides different POS parameters to the SUPL FW -// ----------------------------------------------------------------------------- -// -void COMASuplPosSession::GetSuplInfoL( - COMASuplInfoRequestList* aInfoRequestList, - TRequestStatus& aStatus ) - { - TRequestStatus* status = &aStatus; - if(!iIsInitialized) - { - User::RequestComplete(status, KErrOMASuplPosInActive ); - return; - } - aStatus = KRequestPending; - iClientStatus = &aStatus; - iSuplInfoReqList = aInfoRequestList; - iState = EGetSuplInfo; - IdleComplete(); - } - - -// ----------------------------------------------------------------------------- -// COMASuplPosSession::CancelSuplInfoRequest -// Cancels an outstanding request to GetSuplInfoL -// ----------------------------------------------------------------------------- -// -void COMASuplPosSession::CancelSuplInfoRequest() - { - CancelRequest(); - } - - -// ----------------------------------------------------------------------------- -// COMASuplPosSession::GetPositionL -// Provides position estimates to the SUPL FW -// ----------------------------------------------------------------------------- -// -void COMASuplPosSession::GetPositionL( TRequestStatus& aStatus, - COMASuplPosition* aPosition ) - { - TRequestStatus* status = &aStatus; - if(!iIsInitialized) - { - User::RequestComplete(status, KErrOMASuplPosInActive ); - return; - } - aStatus = KRequestPending; - iClientStatus = &aStatus; - iPosition = aPosition; - iState = EGetPosition; - IdleComplete(); - } - - -// ----------------------------------------------------------------------------- -// COMASuplPosSession::CancelGetPosition -// Cancels an outstanding request to GetPositionL -// ----------------------------------------------------------------------------- -// -void COMASuplPosSession::CancelGetPosition() - { - CancelRequest(); - } - - -// ----------------------------------------------------------------------------- -// COMASuplPosSession::SessionEnd -// Terminates a SUPL POS Session -// ----------------------------------------------------------------------------- -// -void COMASuplPosSession::SessionEnd() - { - CancelRequest(); - iIsInitialized = EFalse; - } - - -// ----------------------------------------------------------------------------- -// COMASuplPosSession::RunL -// Inherited from CActive - called when object is active. -// ----------------------------------------------------------------------------- -// -void COMASuplPosSession::RunL() - { - switch( iState ) - { - case EInitialize: - iIsInitialized = ETrue; - User::RequestComplete( iClientStatus, KErrNone ); - // CActiveScheduler::Stop(); - break; - - case EGetSuplInfo: - TOmaSuplPosUtility::GetPosParametersL( iSuplInfoReqList ); - User::RequestComplete( iClientStatus, KErrNone ); - // CActiveScheduler::Stop(); - break; - - case EGetPosition: - TOmaSuplPosUtility::GetPositionEstimatesL( iPosition ); - User::RequestComplete( iClientStatus, KErrNone ); - // CActiveScheduler::Stop(); - break; - - default: - break; - } - } - - -// ----------------------------------------------------------------------------- -// COMASuplPosSession::DoCancel -// Inherited from CActive - called to cancel outanding requests -// ----------------------------------------------------------------------------- -// -void COMASuplPosSession::DoCancel() - { - // Cancel any outstanding requests to asynchronous service providers - TBool isActive = IsActive(); - if ( isActive ) - { - User::RequestComplete( iClientStatus, KErrCancel ); - } - } - -TInt COMASuplPosSession::RunError(TInt /*aError*/) - { - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// COMASuplPosSession::IdleComplete -// Completes an asynchronous request with KErrNone -// ----------------------------------------------------------------------------- -// -void COMASuplPosSession::IdleComplete() - { - TRequestStatus* pS = &iStatus; - User::RequestComplete( pS, KErrNone ); - if ( !IsActive() ) - { - SetActive(); - } - } - - -// ----------------------------------------------------------------------------- -// COMASuplPosSession::CancelRequest -// Cancels an outstanding request if any with KErrCancel -// ----------------------------------------------------------------------------- -// -void COMASuplPosSession::CancelRequest() - { - Cancel(); - } diff -r b7e5ed8c1342 -r e71858845f73 posmsgpluginreferenceimpl/src/epos_tomasuplposutility.cpp --- a/posmsgpluginreferenceimpl/src/epos_tomasuplposutility.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,182 +0,0 @@ -/* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Helper class that provides SUPL information -* -*/ - - - -#include -#include -#include -#include -#include -#include -#include -#include "epos_tomasuplposutility.h" - - -// ----------------------------------------------------------------------------- -// TOmaSuplPosUtility::GetPositionEstimatesL -// Determines the position estimates -// ----------------------------------------------------------------------------- -// -void TOmaSuplPosUtility::GetPositionEstimatesL( COMASuplPosition*& aPosition ) - { - TDateTime dateTime( 2006, EJanuary, 5, 00, 00, 00, 000000); - TOMASuplUtcTime utcTime; - TInt zoneCode = 0; - TInt zone = 23; - - utcTime.SetUtcTime( dateTime, zoneCode, zone); - - TOMASuplPositionEstimate posEstimate; - - TInt latitude = 100; - TInt longitude = 100; - posEstimate.SetPositionEstimate( TOMASuplPositionEstimate::ENorth, latitude, - longitude); - aPosition->SetPosition( utcTime, posEstimate ); - COMASuplInfoRequest* req = COMASuplVelocity::NewL(); - GetVelocityL(req); - aPosition->SetSuplVelocity(STATIC_CAST(COMASuplVelocity*,req)); - } - - -// ----------------------------------------------------------------------------- -// TOmaSuplPosUtility::GetPosParametersL -// Determines the POS parameters -// ----------------------------------------------------------------------------- -// -void TOmaSuplPosUtility::GetPosParametersL( COMASuplInfoRequestList*& aInfoRequestList ) - { - TInt count = aInfoRequestList->GetCount(); - for ( TInt index = 0; index < count; index ++ ) - { - // Determine the type of the element - COMASuplInfoRequest *reqElement = aInfoRequestList->GetElement( index ); - COMASuplInfoRequest::TOMASuplInfoType infoReqType = reqElement->Type(); - - // Fill up the element with appropriate values - switch( infoReqType ) - { - case COMASuplInfoRequest::EOMASuplReqAsstData: - GetRequestedAsstData( reqElement ); - break; - - case COMASuplInfoRequest::EOMASuplVelocity: - TRAPD( err, GetVelocityL( reqElement ) ); - if ( KErrNone != err ) - { - reqElement->SetStatus( KErrOMASuplParamNotSet ); - } - break; - - case COMASuplInfoRequest::EOMASuplSETCapabilities: - GetSetCapabilities( reqElement ); - break; - - case COMASuplInfoRequest::EOMASuplPosPayload: - TRAP( err, GetPosPayloadL( reqElement ) ); - if ( KErrNone != err ) - { - reqElement->SetStatus( KErrOMASuplParamNotSet ); - } - else - { - reqElement->SetStatus( KErrOMASuplLastPosMsg ); - } - break; - - case COMASuplInfoRequest::EOMASuplPosition: - GetPositionL( reqElement ); - break; - - default: - reqElement->SetStatus( KErrOMASuplParamNotSet ); - break; - } - } - } - - -// ----------------------------------------------------------------------------- -// TOmaSuplPosUtility::GetRequestedAsstData -// Determines the requested assistance data -// ----------------------------------------------------------------------------- -// -void TOmaSuplPosUtility::GetRequestedAsstData( COMASuplInfoRequest*& aReqElement ) - { - COMASuplReqAsstData* reqAsstData = static_cast(aReqElement); - - reqAsstData->SetReqAsstData( ETrue, ETrue, ETrue, ETrue, ETrue, ETrue, - ETrue, ETrue ); - } - - -// ----------------------------------------------------------------------------- -// TOmaSuplPosUtility::GetVelocity -// Determines the velocity -// ----------------------------------------------------------------------------- -// -void TOmaSuplPosUtility::GetVelocityL( COMASuplInfoRequest*& aReqElement ) - { - COMASuplVelocity* velocity = static_cast( aReqElement ); - COMASuplHorizVelocity* horizVel = COMASuplHorizVelocity::NewL(); - horizVel->SetHorizVel(1,2); - velocity->SetVelocity( horizVel ); - } - - -// ----------------------------------------------------------------------------- -// TOmaSuplPosUtility::GetSetCapabilities -// Determines the SET capabilities -// ----------------------------------------------------------------------------- -// -void TOmaSuplPosUtility::GetSetCapabilities( COMASuplInfoRequest*& aReqElement ) - { - COMASuplSETCapabilities* setCap = static_cast( aReqElement ); - TOMASuplPosTechnology posTech; - posTech.SetPosTechnology( ETrue, ETrue, ETrue, ETrue, ETrue, ETrue ); - TOMASuplPosProtocol suplProtocol; - suplProtocol.SetPosProtocol( ETrue, ETrue, ETrue ); - setCap->SetSETCapabilities( - posTech, COMASuplSETCapabilities::EOMANoPreferred, suplProtocol ); - } - - -// ----------------------------------------------------------------------------- -// TOmaSuplPosUtility::GetPosPayload -// Determines the POS payload -// ----------------------------------------------------------------------------- -// -void TOmaSuplPosUtility::GetPosPayloadL( COMASuplInfoRequest*& aReqElement ) - { - COMASuplPosPayload* payload = static_cast( aReqElement ); - HBufC8* payloadData = HBufC8::NewL(20); - payloadData->Des().Copy( _L8( "PayLoadData" ) ); - payload->SetPosPayload( payloadData, COMASuplPosPayload::ETIA801 ); - } - - -// ----------------------------------------------------------------------------- -// TOmaSuplPosUtility::GetPositionL -// Determines the position estimates -// ----------------------------------------------------------------------------- -// -void TOmaSuplPosUtility::GetPositionL( COMASuplInfoRequest*& aReqElement ) - { - COMASuplPosition* position = static_cast( aReqElement ); - GetPositionEstimatesL( position ); - } diff -r b7e5ed8c1342 -r e71858845f73 posmsgpluginreferenceimpl/sysdef_1_4_0.dtd --- a/posmsgpluginreferenceimpl/sysdef_1_4_0.dtd Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r b7e5ed8c1342 -r e71858845f73 power_save_display_mode_stub/BWINS/power_save_display_modeU.def --- a/power_save_display_mode_stub/BWINS/power_save_display_modeU.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -EXPORTS - ??1CPowerSaveDisplayMode@@UAE@XZ @ 1 NONAME ; CPowerSaveDisplayMode::~CPowerSaveDisplayMode(void) - ?Exit@CPowerSaveDisplayMode@@QAEHXZ @ 2 NONAME ; int CPowerSaveDisplayMode::Exit(void) - ?MaxLines@CPowerSaveDisplayMode@@QAEIXZ @ 3 NONAME ; unsigned int CPowerSaveDisplayMode::MaxLines(void) - ?NewL@CPowerSaveDisplayMode@@SAPAV1@H@Z @ 4 NONAME ; class CPowerSaveDisplayMode * CPowerSaveDisplayMode::NewL(int) - ?Set@CPowerSaveDisplayMode@@QAEHIIH@Z @ 5 NONAME ; int CPowerSaveDisplayMode::Set(unsigned int, unsigned int, int) - ?Status@CPowerSaveDisplayMode@@QAEHXZ @ 6 NONAME ; int CPowerSaveDisplayMode::Status(void) - ?Set@CPowerSaveDisplayMode@@QAEHIIPAGH@Z @ 7 NONAME ; int CPowerSaveDisplayMode::Set(unsigned int, unsigned int, unsigned short *, int) - ?SetPowerSaveLevel@CPowerSaveDisplayMode@@QAEHW4TPowerSaveLevel@1@@Z @ 8 NONAME ; int CPowerSaveDisplayMode::SetPowerSaveLevel(enum CPowerSaveDisplayMode::TPowerSaveLevel) - ?GetPowerSaveLevel@CPowerSaveDisplayMode@@QAE?AW4TPowerSaveLevel@1@XZ @ 9 NONAME ; enum CPowerSaveDisplayMode::TPowerSaveLevel CPowerSaveDisplayMode::GetPowerSaveLevel(void) - diff -r b7e5ed8c1342 -r e71858845f73 power_save_display_mode_stub/EABI/power_save_display_modeU.def --- a/power_save_display_mode_stub/EABI/power_save_display_modeU.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -EXPORTS - _ZN21CPowerSaveDisplayMode3SetEjji @ 1 NONAME - _ZN21CPowerSaveDisplayMode4ExitEv @ 2 NONAME - _ZN21CPowerSaveDisplayMode4NewLEi @ 3 NONAME - _ZN21CPowerSaveDisplayMode6StatusEv @ 4 NONAME - _ZN21CPowerSaveDisplayMode8MaxLinesEv @ 5 NONAME - _ZN21CPowerSaveDisplayModeD0Ev @ 6 NONAME - _ZN21CPowerSaveDisplayModeD1Ev @ 7 NONAME - _ZN21CPowerSaveDisplayModeD2Ev @ 8 NONAME - _ZTI21CPowerSaveDisplayMode @ 9 NONAME ; ## - _ZTV21CPowerSaveDisplayMode @ 10 NONAME ; ## - _ZN21CPowerSaveDisplayMode17GetPowerSaveLevelEv @ 11 NONAME - _ZN21CPowerSaveDisplayMode17SetPowerSaveLevelENS_15TPowerSaveLevelE @ 12 NONAME - _ZN21CPowerSaveDisplayMode3SetEjjPti @ 13 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 power_save_display_mode_stub/group/bld.inf --- a/power_save_display_mode_stub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS -../inc/power_save_display_mode.h OS_LAYER_PLATFORM_EXPORT_PATH(power_save_display_mode.h) - -PRJ_MMPFILES -power_save_display_mode.mmp diff -r b7e5ed8c1342 -r e71858845f73 power_save_display_mode_stub/group/power_save_display_mode.mmp --- a/power_save_display_mode_stub/group/power_save_display_mode.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - -#include - -// Create dll with _stub name to avoid confusion -TARGET power_save_display_mode_stub.dll -TARGETTYPE dll -UID 0x1000008D 0x101f6e00 - -VENDORID VID_DEFAULT - -CAPABILITY CAP_GENERAL_DLL - -// This is a SYSTEMINCLUDE macro containing the osextensions -// layer specific include directories -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../inc -SOURCEPATH ../src - -SOURCE power_save_display_mode.cpp - -LIBRARY euser.lib - -DEFFILE power_save_display_mode.def - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY power_save_display_mode.lib - -// On ROM dll name is without the _stub part so that it can easily be -// replaced with the real deal -LINKAS power_save_display_mode.dll diff -r b7e5ed8c1342 -r e71858845f73 power_save_display_mode_stub/inc/power_save_display_mode.h --- a/power_save_display_mode_stub/inc/power_save_display_mode.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,130 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Defines an API used by Series 60 to access the power save display mode -* features. -* -* -*/ - -#ifndef __POWER_SAVE_DISPLAY_MODE_H__ -#define __POWER_SAVE_DISPLAY_MODE_H__ - -// INCLUDES -#include - -// CLASS DECLARATION - -/** -* Adaptation API for power save display mode use -* -* @since Series 60 3.0 -*/ -class CPowerSaveDisplayMode : public CBase - { -public: - /** - * Power save levels define how much power should be saved. - * Note: higher settings result in lower image quality. - */ - enum TPowerSaveLevel - { - ENone = 0, //!< No power saving allowed - ELow = 1, //!< Minimal saving with high quality (default) - EMedium = 2, //!< High saving with medium quality - EHigh = 3, //!< Maximum saving with low quality - }; - - /// Destructor - IMPORT_C ~CPowerSaveDisplayMode(); - - /** - * Creates object and connects to display. - * @param aDisplayNumber Which display to connect to, default is primary display. - * @return new CPowerSaveDisplayMode, NULL on error - */ - IMPORT_C static CPowerSaveDisplayMode* NewL(TInt aDisplayNumber = 0); - - /** - * Enables power save mode. Sets lines between given parameters visible, - * other display lines are turned off and not shown. - * @pre Image to display must be drawn in videobuffer before calling Set(). - * @param aStartRow First visible line, starting from 0 - * @param aEndRow Last visible line - * @param aFullColors Full color mode if ETrue and hw supports that - * Note: full color mode consumes more power - * @return KErrNone on success - */ - IMPORT_C TInt Set(TUint aStartRow, TUint aEndRow, TBool aFullColors = EFalse); - - /** - * Enables power save mode. Sets lines between given parameters visible, - * other display lines are turned off and not shown. - * @pre Image to display must be drawn in videobuffer before calling Set(). - * @param aStartRow First visible line, starting from 0 - * @param aEndRow Last visible line - * @param aPixels Pointer to array of color of each pixel - * @param aFullColors Full color mode if ETrue and hw supports that - * Note: full color mode consumes more power - * @return KErrNone on success - */ - IMPORT_C TInt Set(TUint aStartRow, TUint aEndRow, TUint16* aPixels, TBool aFullColors = EFalse); - - /** - * Returns max number of lines that display supports in power save mode - * (e.g.50 lines or full screen). - * @return Number of supported power save mode lines. - */ - IMPORT_C TUint MaxLines(); - - /** - * Returns status of power save mode. - * @return ETrue = Enabled (on), EFalse = disabled (off, normal display) - */ - IMPORT_C TBool Status(); - - /** Turns off power save mode. All lines on display will be shown normally. - * @return KErrNone on success. - */ - IMPORT_C TInt Exit(); - - /** - * Changes the current power save level. - * @param aVal New power save level - * @return KErrNone operation succeeded, - * KErrNotSupported feature is not available. - */ - IMPORT_C TInt SetPowerSaveLevel(CPowerSaveDisplayMode::TPowerSaveLevel aVal); - - /** - * Return the current power save level. - * @return TPowerSaveLevel - */ - IMPORT_C CPowerSaveDisplayMode::TPowerSaveLevel GetPowerSaveLevel(); - -private: - /// Default constructor - CPowerSaveDisplayMode(); - - /// Second phase constructor - void ConstructL(TInt aDisplayNumber); - -private: - /// Display driver pointer - TAny* iDisplayDriver; - }; - -#endif // POWER_SAVE_DISPLAY_MODE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 power_save_display_mode_stub/layers.sysdef.xml --- a/power_save_display_mode_stub/layers.sysdef.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - -]> - - - - - - - - - - diff -r b7e5ed8c1342 -r e71858845f73 power_save_display_mode_stub/rom/power_save_display_mode.iby --- a/power_save_display_mode_stub/rom/power_save_display_mode.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef __POWER_SAVE_DISPLAY_MODE_IBY__ -#define __POWER_SAVE_DISPLAY_MODE_IBY__ - -file = ABI_DIR\BUILD_DIR\power_save_display_mode.dll sys\bin\power_save_display_mode.dll - -#endif //__POWER_SAVE_DISPLAY_MODE_IBY__ - diff -r b7e5ed8c1342 -r e71858845f73 power_save_display_mode_stub/rom/power_save_display_mode_stub.iby --- a/power_save_display_mode_stub/rom/power_save_display_mode_stub.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -#ifndef __POWER_SAVE_DISPLAY_MODE_STUB_IBY__ -#define __POWER_SAVE_DISPLAY_MODE_STUB_IBY__ - -file = ABI_DIR\BUILD_DIR\power_save_display_mode_stub.dll sys\bin\power_save_display_mode.dll - -#endif //__POWER_SAVE_DISPLAY_MODE_STUB_IBY__ - diff -r b7e5ed8c1342 -r e71858845f73 power_save_display_mode_stub/src/power_save_display_mode.cpp --- a/power_save_display_mode_stub/src/power_save_display_mode.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,214 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Defines an API used by Series 60 to access the power save display mode -* features. -* -* -*/ - - - -// INCLUDE FILES -#include "power_save_display_mode.h" -#include - -// CONSTANTS -// Stub uses a constant value for power save size -const TInt KMaxPowerSaveLinesStub = 50; - - -// ============================ MEMBER FUNCTIONS =============================== - -/** - * @see power_save_display_mode.h - */ -CPowerSaveDisplayMode::CPowerSaveDisplayMode() : - CBase(), - iDisplayDriver(NULL) - { - } - - -/** - * @see power_save_display_mode.h - */ -EXPORT_C CPowerSaveDisplayMode* CPowerSaveDisplayMode::NewL(TInt aDisplayNumber) - { - CPowerSaveDisplayMode* result = new(ELeave) CPowerSaveDisplayMode; - - CleanupStack::PushL(result); - result->ConstructL(aDisplayNumber); - CleanupStack::Pop(); - - return result; - } - - -/** - * @see power_save_display_mode.h - */ -void CPowerSaveDisplayMode::ConstructL(TInt /* aDisplayNumber */) - { - /* - * ADAPTATION IMPLEMENTATION NEEDED - * - * Create and initialize all the member variables that are needed - * in order to complete the tasks assigned to this class here. - * Note that this function may leave. - */ - } - - -/** - * @see power_save_display_mode.h - */ -EXPORT_C CPowerSaveDisplayMode::~CPowerSaveDisplayMode() - { - /* - * ADAPTATION IMPLEMENTATION NEEDED - * - * Destroy all member variables that have been created by - * ConstructL(). Close open connections. - */ - } - - -/** - * @see power_save_display_mode.h - */ -EXPORT_C TBool CPowerSaveDisplayMode::Status() - { - /* - * ADAPTATION IMPLEMENTATION NEEDED - * - * Return ETrue if the power save mode is activated, otherwise EFalse - */ - return EFalse; - } - - -/** - * @see power_save_display_mode.h - */ -EXPORT_C TInt CPowerSaveDisplayMode::Exit() - { - /* - * ADAPTATION IMPLEMENTATION NEEDED - * - * Instruct the display driver to exit power save mode. - * Return KErrNone on success, or an error code. - */ - - return KErrNone; - } - - -/** - * @see power_save_display_mode.h - */ -EXPORT_C TUint CPowerSaveDisplayMode::MaxLines() - { - /* - * ADAPTATION IMPLEMENTATION NEEDED - * - * Return the maximum number of screen display lines supported in - * power save mode. This should be queried from the display driver. - */ - return KMaxPowerSaveLinesStub; - } - - -/** - * @see power_save_display_mode.h - */ -EXPORT_C TInt CPowerSaveDisplayMode::Set( - TUint aStartRow, - TUint aEndRow, - TBool /* aFullColors */) - { - /* - * ADAPTATION IMPLEMENTATION NEEDED - * - * Instruct the display driver to enter power save mode starting from - * row "aStartRow" (0-based) and finishing at row "aEndRow". The image - * to be displayed should already be drawn in display buffer. - */ - - // Sanity-check params - if (aEndRow <= aStartRow) - { - return KErrArgument; - } - else - { - return KErrNone; - } - } - - -/** - * @see power_save_display_mode.h - */ -EXPORT_C TInt CPowerSaveDisplayMode::Set( - TUint aStartRow, - TUint aEndRow, - TUint16* aPixels, - TBool /* aFullColors */) - { - /* - * ADAPTATION IMPLEMENTATION NEEDED - * - * Instruct the display driver to enter power save mode starting from - * row "aStartRow" (0-based) and finishing at row "aEndRow". The image - * to be displayed should already be drawn in display buffer. - */ - - // Sanity-check params - if (aEndRow <= aStartRow || aPixels == NULL) - { - return KErrArgument; - } - else - { - return KErrNone; - } - } - - -/** - * @see power_save_display_mode.h - */ -EXPORT_C TInt CPowerSaveDisplayMode::SetPowerSaveLevel(CPowerSaveDisplayMode::TPowerSaveLevel aVal) - { - if ( aVal >= ENone && aVal <= EHigh ) - { - return KErrNone; - } - else - { - return KErrNotSupported; - } - } - - -/** - * @see power_save_display_mode.h - */ -EXPORT_C CPowerSaveDisplayMode::TPowerSaveLevel CPowerSaveDisplayMode::GetPowerSaveLevel() - { - return CPowerSaveDisplayMode::ELow; - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 power_save_display_mode_stub/sysdef_1_4_0.dtd --- a/power_save_display_mode_stub/sysdef_1_4_0.dtd Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r b7e5ed8c1342 -r e71858845f73 power_save_display_mode_stub/systemDefinition.xml --- a/power_save_display_mode_stub/systemDefinition.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ - - - - - - - - -]> - - - -&layer_file; - - -&targetDefinition_file; - - - - -&defaultbuild_file; - - - - - -&defaultclean_file; - - - - diff -r b7e5ed8c1342 -r e71858845f73 power_save_display_mode_stub/systemDefinitionLayer.xml --- a/power_save_display_mode_stub/systemDefinitionLayer.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/adaptationhwdevice/bwins/asrsadaptationhwdeviceu.def --- a/srsfenginestub/adaptationhwdevice/bwins/asrsadaptationhwdeviceu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -EXPORTS - ??1CASRSAdaptHwDevice@@UAE@XZ @ 1 NONAME ; CASRSAdaptHwDevice::~CASRSAdaptHwDevice(void) - ??1CASRSHwDevice@@UAE@XZ @ 2 NONAME ; CASRSHwDevice::~CASRSHwDevice(void) - ?CancelAdaptation@CASRSAdaptHwDevice@@QAEXXZ @ 3 NONAME ; void CASRSAdaptHwDevice::CancelAdaptation(void) - ?Clear@CASRSAdaptHwDevice@@UAEXXZ @ 4 NONAME ; void CASRSAdaptHwDevice::Clear(void) - ?Clear@CASRSHwDevice@@UAEXXZ @ 5 NONAME ; void CASRSHwDevice::Clear(void) - ?CustomInterface@CASRSAdaptHwDevice@@UAEPAXVTUid@@@Z @ 6 NONAME ; void * CASRSAdaptHwDevice::CustomInterface(class TUid) - ?CustomInterface@CASRSHwDevice@@UAEPAXVTUid@@@Z @ 7 NONAME ; void * CASRSHwDevice::CustomInterface(class TUid) - ?InitializeL@CASRSAdaptHwDevice@@UAEXXZ @ 8 NONAME ; void CASRSAdaptHwDevice::InitializeL(void) - ?InitializeL@CASRSHwDevice@@UAEXXZ @ 9 NONAME ; void CASRSHwDevice::InitializeL(void) - ?NewL@CASRSAdaptHwDevice@@SAPAV1@AAVMASRAdaptationHwDeviceObserver@@@Z @ 10 NONAME ; class CASRSAdaptHwDevice * CASRSAdaptHwDevice::NewL(class MASRAdaptationHwDeviceObserver &) - ?NewL@CASRSHwDevice@@SAPAV1@XZ @ 11 NONAME ; class CASRSHwDevice * CASRSHwDevice::NewL(void) - ?StartAdaptationL@CASRSAdaptHwDevice@@QAEXABVTDesC8@@AAVCSIModelBank@@AAVCSIPronunciation@@W4TLanguage@@@Z @ 12 NONAME ; void CASRSAdaptHwDevice::StartAdaptationL(class TDesC8 const &, class CSIModelBank &, class CSIPronunciation &, enum TLanguage) - diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/adaptationhwdevice/eabi/asrsadaptationhwdeviceu.def --- a/srsfenginestub/adaptationhwdevice/eabi/asrsadaptationhwdeviceu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -EXPORTS - _ZN13CASRSHwDevice11InitializeLEv @ 1 NONAME - _ZN13CASRSHwDevice15CustomInterfaceE4TUid @ 2 NONAME - _ZN13CASRSHwDevice4NewLEv @ 3 NONAME - _ZN13CASRSHwDevice5ClearEv @ 4 NONAME - _ZN13CASRSHwDeviceD0Ev @ 5 NONAME - _ZN13CASRSHwDeviceD1Ev @ 6 NONAME - _ZN13CASRSHwDeviceD2Ev @ 7 NONAME - _ZN18CASRSAdaptHwDevice11InitializeLEv @ 8 NONAME - _ZN18CASRSAdaptHwDevice15CustomInterfaceE4TUid @ 9 NONAME - _ZN18CASRSAdaptHwDevice16CancelAdaptationEv @ 10 NONAME - _ZN18CASRSAdaptHwDevice16StartAdaptationLERK6TDesC8R12CSIModelBankR16CSIPronunciation9TLanguage @ 11 NONAME - _ZN18CASRSAdaptHwDevice4NewLER30MASRAdaptationHwDeviceObserver @ 12 NONAME - _ZN18CASRSAdaptHwDevice5ClearEv @ 13 NONAME - _ZN18CASRSAdaptHwDeviceD0Ev @ 14 NONAME - _ZN18CASRSAdaptHwDeviceD1Ev @ 15 NONAME - _ZN18CASRSAdaptHwDeviceD2Ev @ 16 NONAME - _ZTI13CASRSHwDevice @ 17 NONAME ; ## - _ZTI18CASRSAdaptHwDevice @ 18 NONAME ; ## - _ZTV13CASRSHwDevice @ 19 NONAME ; ## - _ZTV18CASRSAdaptHwDevice @ 20 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/adaptationhwdevice/group/asradaptationhwdevicestub.mmp --- a/srsfenginestub/adaptationhwdevice/group/asradaptationhwdevicestub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for AdaptationHwDeviceStub -* -*/ - - - - -#include - -#if defined( WINS ) || defined( WINSCW ) -TARGET asrsadaptationhwdevice.dll -#else -TARGET asrsadaptationhwdevice_stub.dll -#endif - -TARGETTYPE DLL -UID 0x1000008D 0x101FF938 // UID: - -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE asrsadaptationhwdevice.cpp - -SOURCEPATH ../../common/src -SOURCE asrshwdevice.cpp - -USERINCLUDE ../inc ../src -USERINCLUDE ../../common/inc - -// This is a SYSTEMINCLUDE macro containing the middleware -// layer specific include directories -APP_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE ../../common/inc - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY asrsadaptationhwdevice.lib - -// On ROM dll name is without the _stub part so that it can easily be -// replaced with the real dll -LINKAS asrsadaptationhwdevice.dll - -CAPABILITY CAP_GENERAL_DLL diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/adaptationhwdevice/group/bld.inf --- a/srsfenginestub/adaptationhwdevice/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for AdaptationHwDeviceStub -* -*/ - - - - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -asradaptationhwdevicestub.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/adaptationhwdevice/src/asrsadaptationhwdevice.cpp --- a/srsfenginestub/adaptationhwdevice/src/asrsadaptationhwdevice.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,157 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: SIND hardware device for model adaptation -* -*/ - - - - - - -// INCLUDE FILES -#include "asrsadaptationhwdevice.h" - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CASRSAdaptHwDevice::CASRSAdaptHwDevice -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// - -CASRSAdaptHwDevice::CASRSAdaptHwDevice( - MASRAdaptationHwDeviceObserver& anObserver - ) -: iObserver( anObserver ), - iAlgorithm( NULL ), - iIsInitialised( EFalse ), - iReserved( 0 ) - { - // Nothing - } - -// ----------------------------------------------------------------------------- -// CASRSAdaptHwDevice::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CASRSAdaptHwDevice::ConstructL(void) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSAdaptHwDevice::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSAdaptHwDevice* CASRSAdaptHwDevice::NewL( - MASRAdaptationHwDeviceObserver& anObserver ) // The observer - { - CASRSAdaptHwDevice* self = new( ELeave ) CASRSAdaptHwDevice( anObserver ); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - - -// ----------------------------------------------------------------------------- -// CASRSAdaptHwDevice::~CASRSAdaptHwDevice -// Destructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSAdaptHwDevice::~CASRSAdaptHwDevice() - { - } - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// ----------------------------------------------------------------------------- -// CustomInterface -// Provides clients with an interface, given an UID. -// Returns: NULL - No custom interface with that UID -// ----------------------------------------------------------------------------- -// -EXPORT_C TAny* CASRSAdaptHwDevice::CustomInterface( - TUid /*aInterfaceId*/ ) // UID of the interface - { - return NULL; - } - -// ----------------------------------------------------------------------------- -// InitializeL -// Initializes the device. Subsequent calls reset the device. -// Returns: none -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSAdaptHwDevice::InitializeL(void) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// Clear -// Clears the device -// Returns: None -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSAdaptHwDevice::Clear(void) - { - } - -// ----------------------------------------------------------------------------- -// Start the adaptation. It will adapt the acoustic models given the feature vector set and phoneme sequences -// of a correctly recognized utterance -// -// Returns: None -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSAdaptHwDevice::StartAdaptationL ( const TDesC8& /*aAdaptationData*/, - CSIModelBank& /*aModelBank*/, - CSIPronunciation& /*aPronunciation*/, - TLanguage /*aLanguage*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CancelAdaptation -// Cancels Adaptation . No callback is sent to the client. -// Returns: None -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSAdaptHwDevice::CancelAdaptation() - { - } - - - -// ================================ OTHER EXPORTED FUNCTIONS =============================== - -// for DLL goodness -#ifndef EKA2 -GLDEF_C TInt E32Dll( TDllReason /*aReason*/ ) - { - return KErrNone; - } -#endif - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/adaptationhwdevice/src/asrsadaptationhwdevice.h --- a/srsfenginestub/adaptationhwdevice/src/asrsadaptationhwdevice.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,216 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ARM hardware device for grammar compiling -* -*/ - - - - - - -#ifndef ASRADAPTATIONHWDEVICE_H -#define ASRADAPTATIONHWDEVICE_H - -// INCLUDES -#include -#include - -// Implementation -class CAsrAdaptationAlgorithm; - -// CLASS DECLARATION -/** -* Callback class for adaptation. -* -* !!@lib asrsadaptationhwdevice.lib -* @since 2.8 -*/ -class MASRAdaptationHwDeviceObserver - { -public: - /**!!! - * - * @since 2.8 - * @param none - * @return - */ - - virtual void MaahdAdaptationComplete(TInt aError) = 0; -}; - - - -/** -* Adaptation class -* -* !!@lib asrsadaptationhwdevice.lib -* @since 2.8 -*/ -class CASRSAdaptHwDevice : public CASRSHwDevice - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CASRSAdaptHwDevice* NewL( - MASRAdaptationHwDeviceObserver& aObserver ); - - /** - * Destructor. - */ - IMPORT_C virtual ~CASRSAdaptHwDevice(); - - public: // New functions - - /** - * Retrieve a custom interface - * @since 2.8 - * @param none - * @return Pointer to a custom interface - */ - IMPORT_C TAny* CustomInterface(TUid aInterfaceId); - - /** - * Initializes the device. Subsequent calls reset the device. - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void InitializeL(); - - /** - * Clears the device. - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void Clear(); - - - /** - * Start the adaptation. It will adapt the acoustic models given the feature vector set and phoneme sequences - * of a correctly recognized utterance - * @since 2.8 - * @param aAdaptationData: Buffer that stores data(feature vector) for the speaker adaptation. - * @param aModelBank: Model bank, which is the acoustic model to be adapted. - * @param aPronunciation: Pronunciation of the adaptation utterance. - * @param aLanguage : adaptation language - * @return none - */ - IMPORT_C void StartAdaptationL(const TDesC8& aAdaptationData, - CSIModelBank& aModelBank, - CSIPronunciation& aPronunciation,TLanguage aLanguage); - - - - /** - * Cancel the Adaptation process. No callback is sent to the client. - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void CancelAdaptation(); - - /** - * Cancels adaptation. No callback is sent to the client. - * @since 2.8 - * @param none - * @return none - */ -/* IMPORT_C void CancelCombination();*/ - - public: // Functions from base classes - - /** - * From ?base_class ?member_description. - * @since ?Series60_version - * @param ?arg1 ?description - * @return ?description - */ - //?type ?member_function( ?type ?arg1 ); - - protected: // New functions - - /** - * ?member_description. - * @since ?Series60_version - * @param ?arg1 ?description - * @return ?description - */ - //?type ?member_function( ?type ?arg1 ); - - protected: // Functions from base classes - - /** - * From ?base_class ?member_description - */ - //?type ?member_function(); - - private: - - /** - * C++ default constructor. - */ - CASRSAdaptHwDevice(MASRAdaptationHwDeviceObserver& anObserver); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - - - - // Prohibit copy constructor if not deriving from CBase. - // CASRGrCompilerHwDevice( const CASRGrCompilerHwDevice& ); - // Prohibit assigment operator if not deriving from CBase. - // CASRGrCompilerHwDevice& operator=( const CASRGrCompilerHwDevice& ); - - public: // Data - // ?one_line_short_description_of_data - //?data_declaration; - - protected: // Data - // ?one_line_short_description_of_data - //?data_declaration; - - private: // Data - // pronunciation tree builder algorithm - // CPTBAlgorithm* iPtb; - - // The observer - MASRAdaptationHwDeviceObserver& iObserver; - - // Implementation-specific functions and data - CAsrAdaptationAlgorithm *iAlgorithm; - - // Has Initialize() been called - TBool iIsInitialised; - - // Reserved pointer for future extension. - TAny* iReserved; - - public: // Friend classes - //?friend_class_declaration; - protected: // Friend classes - //?friend_class_declaration; - private: // Friend classes - //?friend_class_declaration; - - }; -#endif // ?INCLUDE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/common/inc/asrshwdevice.h --- a/srsfenginestub/common/inc/asrshwdevice.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,149 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: TTP hardware device -* -*/ - - - - - - -#ifndef ASRHWDEVICE_H -#define ASRHWDEVICE_H - -// INCLUDES -#include - -// CLASS DECLARATION - -/** -* Base class for all hw devices -* -* -* @lib asrsadaptationhwdevice.lib -* @since 2.8 -*/ -class CASRSHwDevice : public CBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CASRSHwDevice* NewL(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CASRSHwDevice(); - - public: // New functions - - /** - * Use to initilize HW device - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C virtual void InitializeL(); - - /** - * Use to clear HW device - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C virtual void Clear(); - - /** - * Use to get custom interface - * @since 2.8 - * @param aInterfaceId Identifier of the intercace implementation - * @return Pointer to the interface implementation or NULL. - */ - IMPORT_C virtual TAny* CustomInterface( TUid aInterfaceId ); - - public: // Functions from base classes - - /** - * From ?base_class ?member_description. - * @since ?Series60_version - * @param ?arg1 ?description - * @return ?description - */ - //?type ?member_function( ?type ?arg1 ); - - protected: // New functions - - /** - * ?member_description. - * @since ?Series60_version - * @param ?arg1 ?description - * @return ?description - */ - //?type ?member_function( ?type ?arg1 ); - - protected: // Functions from base classes - - /** - * From ?base_class ?member_description - */ - //?type ?member_function(); - - - - /** - * C++ default constructor. - */ - CASRSHwDevice(); - - private: - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - // Prohibit copy constructor if not deriving from CBase. - // ?classname( const ?classname& ); - // Prohibit assigment operator if not deriving from CBase. - // ?classname& operator=( const ?classname& ); - - public: // Data - // ?one_line_short_description_of_data - //?data_declaration; - - protected: // Data - // ?one_line_short_description_of_data - //?data_declaration; - - private: // Data - // ?one_line_short_description_of_data - //?data_declaration; - - // Reserved pointer for future extension - //TAny* iReserved; - - public: // Friend classes - //?friend_class_declaration; - protected: // Friend classes - //?friend_class_declaration; - private: // Friend classes - //?friend_class_declaration; - - }; - -#endif // ?INCLUDE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/common/inc/nsssispeechrecognitiondataclient.h --- a/srsfenginestub/common/inc/nsssispeechrecognitiondataclient.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,213 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This file contains definition of the SISpeechRecognitionDataClient structure and API. -* -*/ - - - - - -#ifndef __SRSSIDATA_CLIENT_H__ -#define __SRSSIDATA_CLIENT_H__ - -// INCLUDES -#include - - -// FORWARD DECLARATION -class CSIResultSet; - - -// CLASS DECLARATION - -/** -* Class to encapsulate a client recognition result. -* The result is formulated for client consumption. -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.5 -*/ - -class CSIClientResult : public CBase -{ -public: // Constructors and destructor - /** - * Destructor. - */ - IMPORT_C ~CSIClientResult(); - /** - * Two-phased constructor. - */ - IMPORT_C static CSIClientResult* NewL(); - IMPORT_C static CSIClientResult* NewLC(); - IMPORT_C static CSIClientResult* NewL(TSIGrammarID aGrammarID, TSIRuleID aRuleID); - IMPORT_C static CSIClientResult* NewLC(TSIGrammarID aGrammarID, TSIRuleID aRuleID); - - /** - * Use to set the grammar Id on the result. - * @since 2.5 - * @param aGrammarID - grammar identifier. - * @return None. - */ - IMPORT_C void SetGrammarID(TSIGrammarID aGrammarID); - - /** - * Use to retrieve the grammar Id of the result. - * @since 2.5 - * @param None. - * @return Grammar identifier. - */ - IMPORT_C TSIGrammarID GrammarID() const; - - /** - * Use to set the rule Id of the result. - * @since 2.5 - * @param aRuleID - rule identifier. - * @return None. - */ - IMPORT_C void SetRuleID(TSIRuleID aRuleID); - - /** - * Use to retrieve the rule Id of the result. - * @since 2.5 - * @param None. - * @return Rule identifier. - */ - IMPORT_C TSIRuleID RuleID() const; - -private: - void ConstructL(); - CSIClientResult(); - CSIClientResult(TSIGrammarID aGrammarID, TSIRuleID aRuleID); - -private: - TSIGrammarID iGrammarID; - TSIRuleID iRuleID; -}; - - -/** -* Class to encapsulate a client recogntion result set -* This is a lightweight result set formulated for client consumption -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.5 -*/ - -class CSIClientResultSet : public CBase -{ -public: // Constructors and destructor - /** - * Destructor. - */ - IMPORT_C ~CSIClientResultSet(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CSIClientResultSet* NewL(); - IMPORT_C static CSIClientResultSet* NewLC(); - - /** - * Use to add a result to the result set. - * @since 2.5 - * @param aResult - reference to the result object to be added. - * @return KErrNone, if the insertion is successful, otherwise one of the system wide error codes. - */ - IMPORT_C void AddL( const CSIClientResult* aResult); - - - /** - * Use to delete a result to the result set. - * @since 2.5 - * @param aIndex Index of . - * @return - */ - IMPORT_C void DeleteL(TInt aIndex) ; - /** - * Sets the maximum number of best matches (N-best) expected in the recognition result after recognition. - * @since 2.5 - * @param aMaxResults - the maximum number of matches expected in the recognition result. - * @return None. - */ - IMPORT_C void SetMaxResultsL(TInt aMaxResults); - - /** - * Use to retrieve the current value of the max number of expected after recognition. - * @since 2.5 - * @param None. - * @return The maximum number of best matches (N-best) expected in the recognition result. - */ - IMPORT_C TInt MaxResults() const; - - /** - * Use to retrieve a result at a given index within the result set. - * @since 2.5 - * @param None. - * @return Pointer to CSIClientResult object. - */ - IMPORT_C const CSIClientResult& AtL(TInt anIndex) const; - - /** - * Use to set the number of results actually returned after recogntion. - * @since 2.5 - * @param aResultCount - number of results returned by the recognizer. - * @return None. - */ - IMPORT_C void SetResultCount(TInt aResultCount); - - /** - * Use to retrieve the number of results actually returned after recogntion. - * @since 2.5 - * @param None. - * @return Number of results actually returned after recogntion. - */ - IMPORT_C TInt ResultCount() const; - - - IMPORT_C CSIResultSet& SIResultSet() const; - - - IMPORT_C void SetSIResultSet(CSIResultSet* aSIResultSet); - - /** - * Internalize to a data stream - * @since 2.8 - * @param aStream Data stream - * @return None - */ - IMPORT_C virtual void InternalizeL( RReadStream& aStream ); - - /** - * Externalize from a data stream - * @since 2.8 - * @param None - * @return aStream Data stream - */ - IMPORT_C virtual void ExternalizeL( RWriteStream& aStream ) const; - -private: - void ConstructL(); - CSIClientResultSet(); - -private: - TInt iMaxResults; - TInt iResultCount; - RPointerArray iResultArray; - CSIResultSet* iSIResultSet; -}; - -#endif - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/common/inc/nsssispeechrecognitiondatacommon.h --- a/srsfenginestub/common/inc/nsssispeechrecognitiondatacommon.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,228 +0,0 @@ -/* -* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This file contains common data shared between SISpeechRecognitionDataClient -* %version: 10 % -* and SISpeechRecognitionDataDevASR. -* -* Copyright © 2002-2006 Nokia Corporation. -*/ - - - - - -#ifndef NSSSISPEECHRECOGNITIONDATACOMMON_H -#define NSSSISPEECHRECOGNITIONDATACOMMON_H - -// INCLUDES -#include - -// For externalize/internalize -#include -// For -#include - -// TYPEDEFS -typedef TUint16 TSIModelBankID; -typedef TUint16 TSIModelID; - -typedef TUint16 TSILexiconID; -typedef TUint32 TSIPronunciationID; - -typedef TUint16 TSIGrammarID; -typedef TUint32 TSIRuleID; -typedef TUint8 TSIRuleVariantID; - -typedef RArray TSIPronunciationIDSequence; - -// Language array which is used as an element of another RArray -typedef RArray RLanguageArray; - -// CONSTANTS -const TSIPronunciationID KUndefinedPronounciationID = 0x0; - -const TSIModelBankID KInvalidModelBankID = 0x7fff; -const TSIModelID KInvalidModelID = 0x7fff; -const TSILexiconID KInvalidLexiconID = 0x7fff; -const TSIPronunciationID KInvalidPronunciationID=0x7fffffff; -const TSIGrammarID KInvalidGrammarID = 0x7fff; -const TSIRuleID KInvalidRuleID = 0x7fffffff; -const TSIRuleVariantID KInvalidRuleVariantID = 0x7f; - -// ASCII phonemes can't be longer than this. -const TInt KMaxPhonemeLength = 7; - -const TUint8 KPhonemeSeparator = '-'; - - - -// CONSTANTS -const TInt KUidAsrEventTrainReadyVal = 0x101FBF9E; -const TInt KUidAsrEventTrainVal = 0x101FBF9F; -const TInt KUidAsrEventAddPronunciationVal = 0x101FBFA0; -const TInt KUidAsrEventAddRuleVal = 0x101FBFA1; -const TInt KUidAsrEventLoadModelsVal = 0x101FBFA2; -const TInt KUidAsrEventLoadLexiconVal = 0x101FBFA3; -const TInt KUidAsrEventLoadGrammarVal = 0x101FBFA4; -const TInt KUidAsrEventRecognitionReadyVal = 0x101FBFA5; -const TInt KUidAsrEventRecognitionVal = 0x101FBFA6; -const TInt KUidAsrEventUnloadRuleVal = 0x101FBFA7; -const TInt KUidAsrEventRecordStartedVal = 0x101FBFA8; -const TInt KUidAsrEventRecordVal = 0x101FBFA9; -const TInt KUidAsrEventEouDetectedVal = 0x101FBFAA; -const TInt KUidAsrEventPlayStartedVal = 0x101FBFAB; -const TInt KUidAsrEventPlayVal = 0x101FBFAC; -const TInt KUidAsrEventCreateGrammarVal = 0x101FBFAD; -const TInt KUidAsrEventCreateLexiconVal = 0x101FBFAE; -const TInt KUidAsrEventCreateModelBankVal = 0x101FBFAF; -const TInt KUidAsrEventRemoveGrammarVal = 0x101FBFB0; -const TInt KUidAsrEventRemoveLexiconVal = 0x101FBFB1; -const TInt KUidAsrEventRemoveModelBankVal = 0x101FBFB2; -const TInt KUidAsrEventRemoveRuleVal = 0x101FBFB3; -const TInt KUidAsrEventRemovePronunciationVal = 0x101FBFB4; -const TInt KUidAsrEventRemoveModelVal = 0x101FBFB5; -const TInt KUidAsrEventGetAvailableStorageVal = 0x101FBFB6; -const TInt KUidAsrEventGetRuleValidityVal = 0x101FBFB7; -const TInt KUidAsrEventGetUtteranceDurationVal = 0x101FBFB8; -const TInt KUidAsrEventGetModelCountVal = 0x101FBFB9; -const TInt KUidAsrEventGetAllRuleIDsVal = 0x101FBFBA; -const TInt KUidAsrEventGetAllPronunciationIDsVal = 0x101FBFBB; -const TInt KUidAsrEventGetAllModelIDsVal = 0x101FBFBC; -const TInt KUidAsrEventGetAllClientGrammarIDsVal = 0x101FBFBD; -const TInt KUidAsrEventGetAllClientLexiconIDsVal = 0x101FBFBE; -const TInt KUidAsrEventGetAllClientModelBankIDsVal = 0x101FBFBF; -const TInt KUidAsrEventGetAllGrammarIDsVal = 0x101FBFC0; -const TInt KUidAsrEventGetAllLexiconIDsVal = 0x101FBFC1; -const TInt KUidAsrEventGetAllModelBankIDsVal = 0x101FBFC2; - -// SI event values -// !!!! There are not unique! Just successors of SD numbers. -const TInt KUidAsrEventAdaptVal = 0x101FBFC3; -const TInt KUidAsrEventAddVoiceTagVal = 0x101FBFC4; -const TInt KUidAsrEventAddVoiceTagsVal = 0x101FBFC5; -const TInt KUidAsrEventSIRecognitionVal = 0x101FBFC6; -const TInt KUidAsrEventAddRuleVariantVal= 0x101FBFC7; -const TInt KUidAsrEventCreateRuleVal = 0x101FBFC8; -const TInt KUidAsrEventEndRecordVal = 0x101FBFC9; -const TInt KUidAsrEventUnloadGrammarVal = 0x101FBFCA; - - -const TInt KUidAsrEventUpdateGrammarAndLexiconVal = 0x101FBFCB; -const TInt KUidAsrEventActivateGrammarVal = 0x101FBFCC; -const TInt KUidAsrEventDeactivateGrammarVal = 0x101FBFCD; -const TInt KUidAsrEventRemoveRulesVal = 0x101FBFCE; - -const TInt KUidAsrEventGetPronunciationCountVal = 0x101FBFCF; -const TInt KUidAsrEventGetRuleCountVal = 0x101FBFD0; - -const TInt KUidAsrEventPreStartSamplingVal = 0x101FBFD1; - -const TUid KUidAsrEventTrainReady = {KUidAsrEventTrainReadyVal}; -const TUid KUidAsrEventTrain = {KUidAsrEventTrainVal}; -const TUid KUidAsrEventAddPronunciation = {KUidAsrEventAddPronunciationVal}; -const TUid KUidAsrEventAddRule = {KUidAsrEventAddRuleVal}; -const TUid KUidAsrEventLoadModels = {KUidAsrEventLoadModelsVal}; -const TUid KUidAsrEventLoadLexicon = {KUidAsrEventLoadLexiconVal}; -const TUid KUidAsrEventLoadGrammar = {KUidAsrEventLoadGrammarVal}; -const TUid KUidAsrEventRecognitionReady = {KUidAsrEventRecognitionReadyVal}; -const TUid KUidAsrEventRecognition = {KUidAsrEventRecognitionVal}; -const TUid KUidAsrEventUnloadRule = {KUidAsrEventUnloadRuleVal}; -const TUid KUidAsrEventRecordStarted = {KUidAsrEventRecordStartedVal}; -const TUid KUidAsrEventRecord = {KUidAsrEventRecordVal}; -const TUid KUidAsrEventEouDetected = {KUidAsrEventEouDetectedVal}; -const TUid KUidAsrEventPlayStarted = {KUidAsrEventPlayStartedVal}; -const TUid KUidAsrEventPlay = {KUidAsrEventPlayVal}; -const TUid KUidAsrEventCreateGrammar = {KUidAsrEventCreateGrammarVal}; -const TUid KUidAsrEventCreateLexicon = {KUidAsrEventCreateLexiconVal}; -const TUid KUidAsrEventCreateModelBank = {KUidAsrEventCreateModelBankVal}; -const TUid KUidAsrEventRemoveGrammar = {KUidAsrEventRemoveGrammarVal}; -const TUid KUidAsrEventRemoveLexicon = {KUidAsrEventRemoveLexiconVal}; -const TUid KUidAsrEventRemoveModelBank = {KUidAsrEventRemoveModelBankVal}; -const TUid KUidAsrEventRemoveRule = {KUidAsrEventRemoveRuleVal}; -const TUid KUidAsrEventRemovePronunciation = {KUidAsrEventRemovePronunciationVal}; -const TUid KUidAsrEventRemoveModel = {KUidAsrEventRemoveModelVal}; -const TUid KUidAsrEventGetAvailableStorage = {KUidAsrEventGetAvailableStorageVal}; -const TUid KUidAsrEventGetRuleValidity = {KUidAsrEventGetRuleValidityVal}; -const TUid KUidAsrEventGetUtteranceDuration = {KUidAsrEventGetUtteranceDurationVal}; - -const TUid KUidAsrEventGetModelCount = {KUidAsrEventGetModelCountVal}; -const TUid KUidAsrEventGetPronunciationCount = {KUidAsrEventGetPronunciationCountVal}; -const TUid KUidAsrEventGetRuleCount = {KUidAsrEventGetRuleCountVal}; - -const TUid KUidAsrEventGetAllRuleIDs = {KUidAsrEventGetAllRuleIDsVal}; -const TUid KUidAsrEventGetAllPronunciationIDs = {KUidAsrEventGetAllPronunciationIDsVal}; -const TUid KUidAsrEventGetAllModelIDs = {KUidAsrEventGetAllModelIDsVal}; -const TUid KUidAsrEventGetAllClientGrammarIDs = {KUidAsrEventGetAllClientGrammarIDsVal}; -const TUid KUidAsrEventGetAllClientLexiconIDs = {KUidAsrEventGetAllClientLexiconIDsVal}; -const TUid KUidAsrEventGetAllClientModelBankIDs = {KUidAsrEventGetAllClientModelBankIDsVal}; -const TUid KUidAsrEventGetAllGrammarIDs = {KUidAsrEventGetAllGrammarIDsVal}; -const TUid KUidAsrEventGetAllLexiconIDs = {KUidAsrEventGetAllLexiconIDsVal}; -const TUid KUidAsrEventGetAllModelBankIDs = {KUidAsrEventGetAllModelBankIDsVal}; - -// SI event UIDs -const TUid KUidAsrEventAdapt = {KUidAsrEventAdaptVal}; -const TUid KUidAsrEventAddVoiceTag = {KUidAsrEventAddVoiceTagVal}; -const TUid KUidAsrEventAddVoiceTags = {KUidAsrEventAddVoiceTagsVal}; -const TUid KUidAsrEventSIRecognition = {KUidAsrEventSIRecognitionVal}; -const TUid KUidAsrEventAddRuleVariant= {KUidAsrEventAddRuleVariantVal}; -const TUid KUidAsrEventCreateRule = {KUidAsrEventCreateRuleVal}; -const TUid KUidAsrEventEndRecord = {KUidAsrEventEndRecordVal}; -const TUid KUidAsrEventUnloadGrammar = {KUidAsrEventUnloadGrammarVal}; -const TUid KUidAsrEventUpdateGrammarAndLexicon = {KUidAsrEventUpdateGrammarAndLexiconVal}; - -const TUid KUidAsrEventActivateGrammar = {KUidAsrEventActivateGrammarVal}; -const TUid KUidAsrEventDeactivateGrammar = {KUidAsrEventDeactivateGrammarVal}; -const TUid KUidAsrEventRemoveRules = {KUidAsrEventRemoveRulesVal}; - -const TInt KUidMediaTypeSIVal = 0x101FF932; -const TUid KUidMediaTypeSI = {KUidMediaTypeSIVal}; - -const TUid KUidAsrEventPreStartSampling = {KUidAsrEventPreStartSamplingVal}; - -// Speech Recognition Errors -const TInt KErrAsrNoSpeech = -12050; -const TInt KErrAsrSpeechTooEarly = -12051; -const TInt KErrAsrSpeechTooLong = -12052; -const TInt KErrAsrSpeechTooShort = -12053; -const TInt KErrAsrNoMatch = -12054; -const TInt KErrAsrDataRightViolation = -12055; -const TInt KErrAsrNotRegisted = -12056; -const TInt KErrAsrInvalidState = -12057; -const TInt KErrAsrInitializationFailure = -12058; - -// Pre-defined Engine Parameter Identifiers starts from index 0x01 -// User-define Engine Parameter Identifiers starts from index 0x10000 and end at index KMaxTInt. -const TInt KRecognizerMode = 0x01; -const TInt KGrammarSupport = 0x02; -const TInt KLoadMultipleGrammars = 0x03; -const TInt KLoadMultipleLexicons = 0x04; -const TInt KLoadMultipleModelBanks = 0x05; -const TInt KModelStorageCapacity = 0x06; -const TInt KMaxLoadableModels = 0x07; -const TInt KMaxFrontEndBackEndDelay = 0x08; -const TInt KSamplingRate = 0x09; -const TInt KBitsPerSample = 0x0A; - -// Lexicon reference counter identifier -const TInt KLexiconReferenceCounter = 0x0B; - - -enum TNSSRecognitionMode -{ - ENSSSdMode, - ENSSSiMode, - ENSSSdSiMode -}; - -#endif // NSSSISPEECHRECOGNITIONDATACOMMON_H diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/common/inc/nsssispeechrecognitiondatadevasr.h --- a/srsfenginestub/common/inc/nsssispeechrecognitiondatadevasr.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1303 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This file contains definition of the SISpeechRecognitionDataDevASR structure and API. -* -*/ - - - - - -#ifndef __SRSIDATA_DEVASR_H__ -#define __SRSIDATA_DEVASR_H__ - -// INCLUDES -#include - -// FORWARD DECLARATION -class CSILexicon; -class CSICompiledGrammar; - - -// CLASS DECLARATION - -/** -* Class to encapsulate a user defined parameters -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSIParameters : public CBase - { - public: // Constructors and destructor - /** - * Destructor. - */ - IMPORT_C virtual ~CSIParameters(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CSIParameters* NewL(); - - IMPORT_C static CSIParameters* NewLC(); - public: // New functions - - /** - * Use to set an internal parameter. - * @since 2.8 - * @param aParameterIndex Parameter index - * @param aParameter Parameter value - * @return None. - */ - IMPORT_C virtual void SetParameterL( const TInt aParameterID, const TInt aParameterValue ); - - /** - * Use to retrieve an internal parameter. - * @since 2.8 - * @param aParameterIndex Parameter index - * @return Parameter value. - */ - IMPORT_C virtual TInt ParameterL( const TInt aParameterID ) const; - - /** - * Internalize to a data stream - * @since 2.8 - * @param aStream Data stream - * @return None - */ - IMPORT_C virtual void InternalizeL(RReadStream& aStream ); - - /** - * Externalize from a data stream - * @since 2.8 - * @param None - * @return aStream Data stream - */ - IMPORT_C virtual void ExternalizeL(RWriteStream& aStream ) const; - - /** - * Returns all set parameters and their values. - * @since 2.8 - * @param "RArray& aParameterIDs" This array will contain parameter IDs after call. - * @param "RArray& aParameterValues" This array will contain parameter values after call. - */ - IMPORT_C virtual void ListParametersL( RArray& aParameterIDs, RArray& aParameterValues ) const; - - protected: - IMPORT_C virtual void ConstructL(); - IMPORT_C CSIParameters(); - - private: - RArray iParameterIDs; - RArray iParameterValues; - }; - -/** -* Class to encapsulate a Speaker Independent Rule variant -* -* @lib nsssispeechRecognitionData.lib -* @since 2.8 -*/ -class CSIRuleVariant : public CSIParameters - { - public: // Constructors and destructor - /** - * Destructor. - */ - IMPORT_C virtual ~CSIRuleVariant(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CSIRuleVariant* NewL( const TSIRuleVariantID aRuleVariantID, - const TSILexiconID aLexiconID); - IMPORT_C static CSIRuleVariant* NewLC( const TSIRuleVariantID aRuleVariantID, - const TSILexiconID aLexiconID); - - public: // New functions - - /** - * Use to get the pronunciation Ids. - * @since 2.8 - * @param None. - * @return Pronunciation identifier. - */ - IMPORT_C virtual void GetPronunciationIDsL( TSIPronunciationIDSequence& aPronunciationIDs ) const; - - /** - * Use to set the pronunciation Ids. - * @since 2.8 - * @param Pronunciation identifier . - */ - IMPORT_C virtual void SetPronunciationIDsL( const TSIPronunciationIDSequence& aPronunciationIDs ); - - /** - * Get Language of the rule variant - * @since 2.8 - * @return Language of the rule variant - */ - IMPORT_C virtual TLanguage Language() const; - - /** - * Set Language of the rule variant - * @since 2.8 - * @param Language of the rule variant - * @return None - */ - IMPORT_C virtual void SetLanguage(TLanguage aLanguage); - - - /** - * Use to retrieve the lexicon Id. - * @since 2.8 - * @param None. - * @return Lexicon identifier. - */ - IMPORT_C virtual TSILexiconID LexiconID() const; - - /** - * Use to retrieve the rule variant Id. - * @since 2.8 - * @param None. - * @return Rule identifier. - */ - IMPORT_C virtual TSIRuleVariantID RuleVariantID() const; - - - - - protected: - IMPORT_C virtual void ConstructL(); - IMPORT_C CSIRuleVariant( const TSIRuleVariantID aRuleVariantID, - const TSILexiconID aLexiconID ); - - private: - TSIRuleVariantID iRuleVariantID; - TSIPronunciationIDSequence iPronunciationIDs; - TSILexiconID iLexiconID; - TLanguage iLanguage; - TInt* iParameterArray; - TInt iNParameters; - TAny* iReserved; - }; - -/** -* Class to encapsulate a Speaker Independent Rule -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSIRule : public CBase - { - public:// Constructors and destructor - /** - * Destructor. - */ - IMPORT_C virtual ~CSIRule(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CSIRule* NewL( const TSIRuleID aRuleID ); - IMPORT_C static CSIRule* NewLC( const TSIRuleID aRuleID ); - - public: // New functions - /** - * Use to retrieve the rule Id. - * @since 2.8 - * @param None. - * @return Rule identifier. - */ - IMPORT_C virtual TSIRuleID RuleID() const; - /** - * Use to retrieve number of rule variants. - * @since 2.8 - * @param None. - * @return Number of rule variants. - */ - IMPORT_C virtual TInt Count() const; - - /** - * Use to retrieve the rule variant based on index. - * @since 2.8 - * @param aIndex Index of rule variant. - * @return Rule variant. - */ - IMPORT_C virtual CSIRuleVariant& AtL(TInt aIndex) const; - - - /** - * Use to add new rule variant. - * @since 2.8 - * @param aRuleVariant New rule variant. - * @return None. - */ - IMPORT_C virtual void AddL(CSIRuleVariant* aRuleVariant); - - /** - * Use to retrieve the rule variant index based on Id. - * @since 2.8 - * @param aRuleVariantID Identifier of rule variant. - * @return Rule variant. - */ - IMPORT_C virtual TInt Find(TSIRuleVariantID aRuleVariantID) const; - - - IMPORT_C virtual CSIRuleVariant& RuleVariantL(TSIRuleVariantID aRuleVariantID) const; - - /** - * Use to delete rule variant. - * @since 2.8 - * @param aRuleVariant Rule variant identifier. - * @return None. - */ - IMPORT_C virtual void DeleteL(TSIRuleVariantID aRuleVariantID); - - /** - * Compares two CSIRule objects. - * Returns 0 if rule ids are equal. - * Returns -1 if first id is smaller. - * Returns 1 if second id is smaller. - * - * @param "const CSIRule& aFirst" First rule to compare - * @param "const CSIRule& aSecond" Second rule to compare - * @return 0, -1 or 1 - */ - static TInt Compare( const CSIRule& aFirst, const CSIRule& aSecond ); - - protected: - IMPORT_C virtual void ConstructL(); - IMPORT_C CSIRule( const TSIRuleID aRuleID ); - - private: - TSIRuleID iRuleID; - RPointerArray iRuleVariantArray; - TAny* iReserved; - }; - - -/** -* Class to encapsulate a Speaker Independent Grammar -* A grammar consist of a list of rules -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSIGrammar : public CBase - { - public:// Constructors and destructor - /** - * Destructor. - */ - IMPORT_C virtual ~CSIGrammar(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CSIGrammar* NewL(const TSIGrammarID aGrammarID); - IMPORT_C static CSIGrammar* NewLC(const TSIGrammarID aGrammarID); - - public: // New functions - - /** - * Use to add a rule to the grammar. - * @since 2.8 - * @param aRule - reference to CSIRule object. - * @return KErrNone, if the insertion is successful, otherwise one of the system wide error codes. - */ - IMPORT_C virtual void AddL(CSIRule* aRule); - - - /** - * Use to return a rule based at an index. - * @since 2.8 - * @param aIndex: an index. Value must not be negative and must not be greater than the number of rules currently in the grammar, otherwise it raises a USER-130 panic. - * @return Reference to CSIRule object. - */ - IMPORT_C virtual CSIRule& AtL(TInt aIndex) const; - - /** - * Use to delete a rule to the grammar. - * @since 2.8 - * @param aRuleID - rule identifier. - * @return None. - */ - IMPORT_C virtual void DeleteL(const TSIRuleID aRuleID); - - /** - * Use to get the number of rules in the grammar - * @since 2.8 - * @param None. - * @return Number of rules. - */ - IMPORT_C virtual TInt Count() const; - - /** - * Use to retrieve the grammar Id of the result. - * @since 2.8 - * @param None. - * @return Grammar identifier. - */ - IMPORT_C virtual TSIGrammarID GrammarID() const; - - /** - * Use to find a rule in the grammar based on rule Id. - * @since 2.8 - * @param aRuleID - rule identifier. - * @return The index of the first matching rule within the grammar. KErrNotFound, if no matching rule can be found. - */ - - IMPORT_C virtual TInt Find(const TSIRuleID aRuleID) const; - - IMPORT_C virtual CSIRule& RuleL(TSIRuleID aRuleID) const; - - /** - * Internalize to a data stream - * @since 2.8 - * @param aStream Data stream - * @return None - */ - IMPORT_C virtual void InternalizeL(RReadStream& aStream ); - - /** - * Externalize from a data stream - * @since 2.8 - * @param None - * @return aStream Data stream - */ - IMPORT_C virtual void ExternalizeL(RWriteStream& aStream ) const; - - protected: - - IMPORT_C virtual void ConstructL(); - IMPORT_C CSIGrammar(const TSIGrammarID aGrammarID); - - private: - TSIGrammarID iGrammarID; - RPointerArray iRuleArray; - TAny* iReserved; - }; - -/** -* Class to encapsulate a compiled grammar (ready for recognition) -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSICompiledGrammar : public CSIGrammar - { - public:// Constructors and destructor - /** - * Destructor. - */ - IMPORT_C virtual ~CSICompiledGrammar(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CSICompiledGrammar* NewL(const TSIGrammarID aGrammarID); - - IMPORT_C static CSICompiledGrammar* NewLC(const TSIGrammarID aGrammarID); - public: // New functions - - - /** - * Use to delete a rule to the grammar. - * @since 2.8 - * @param aRuleID - rule identifier. - * @return None. - */ - IMPORT_C virtual void DeleteL(const TSIRuleID aRuleID); - /** - * Use to add a rule to the grammar. - * @since 2.8 - * @param aRule - reference to CSIRule object. - * @return KErrNone, if the insertion is successful, otherwise one of the system wide error codes. - */ - IMPORT_C virtual void AddL(CSIRule* aRule); - - - /** - * Use to retrieve the recognition data. - * @since 2.8 - * @param None. - * @return Reference to the recognition data. - */ - IMPORT_C virtual void SetCompiledData( HBufC8* aCompilerData); - - /** - * Function to get compiler data - * @since 2.8 - * @param None - * @return Pointer to data - */ - IMPORT_C virtual TDesC8& CompiledData() const; - - /** - * Internalize to a data stream - * @since 2.8 - * @param aStream Data stream - * @return None - */ - IMPORT_C virtual void InternalizeL(RReadStream& aStream ); - - /** - * Externalize from a data stream - * @since 2.8 - * @param None - * @return aStream Data stream - */ - IMPORT_C virtual void ExternalizeL(RWriteStream& aStream ) const; - - protected: - IMPORT_C virtual void ConstructL(); - - IMPORT_C CSICompiledGrammar(const TSIGrammarID aGrammarID); - - private: - // is compiled data valid - TBool iValidData; - - // data of grammar compiler - HBufC8* iGrammarCompilerData; - TAny* iReserved; - - protected: - - }; - -/** -* Class to define rule variant info -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class TSIRuleVariantInfo - { - public: // Constructors and destructor - - /** - * C++ default constructor. - */ - IMPORT_C TSIRuleVariantInfo( const TSIGrammarID aGrammarID, - const TSIRuleID aRuleID, - const TSIRuleVariantID aRuleVariantID ); - - /** - * Destructor. - */ - IMPORT_C virtual ~TSIRuleVariantInfo(); - - public: // New functions - - /** - * Use to get Grammar ID - * @since 2.8 - * @return Identifier of Grammar - */ - IMPORT_C virtual TSIGrammarID GrammarID() const; - - - /** - * Use to get rule ID - * @since 2.8 - * @return Identifier of rule - */ - IMPORT_C virtual TSIRuleID RuleID() const; - - /** - * Use to get rule variant ID - * @since 2.8 - * @return Identifier of rule variant - */ - IMPORT_C virtual TSIRuleVariantID RuleVariantID() const; - - protected: // Data - - - // rule identifier - const TSIGrammarID iGrammarID; - // rule identifier - const TSIRuleID iRuleID; - - // rule variant identifier - const TSIRuleVariantID iRuleVariantID; - - }; - -/** -* Class to encapsulate a Speaker Independent Pronunciation -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSIPronunciation : public CSIParameters - { - public:// Constructors and destructor - /** - * Destructor. - */ - IMPORT_C virtual ~CSIPronunciation(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CSIPronunciation* NewL(const TSIPronunciationID aPronunciationID, - const TSIModelBankID aModelBankID ); - IMPORT_C static CSIPronunciation* NewLC(const TSIPronunciationID aPronunciationID, - const TSIModelBankID aModelBankID ); - - public: // New functions - /** - * Use to retrieve the model bank Id of the model bank. - * @since 2.8 - * @param None. - * @return Model bank identifier. - */ - IMPORT_C virtual TSIModelBankID ModelBankID() const; - /** - * Use to set the pronunciation Id of this lexicon entry. - * @since 2.8 - * @param Pronunciation identifier. - * @return None. - */ - IMPORT_C virtual void SetPronunciationID(TSIPronunciationID aPronunciationID); - - - /** - * Use to retrieve the pronunciation Id of this lexicon entry. - * @since 2.8 - * @param None. - * @return Pronunciation identifier. - */ - IMPORT_C virtual TSIPronunciationID PronunciationID() const; - /** - * Use to set phoneme sequence. - * @since 2.8 - * @param aPhonemeSequence Phoneme sequence. - * @return None. - */ - IMPORT_C virtual void SetPhonemeSequenceL( const TDesC8& aPhonemeSequence ); - - - /** - * Use to retrieve the phoneme sequence. - * @since 2.8 - * @param None. - * @return Phoneme sequence. - */ - IMPORT_C virtual const TDesC8& PhonemeSequence() const; - - /** - * Compares two CSIPronunciation objects. - * Returns 0 if prununciation ids are equal. - * Returns -1 if first id is smaller. - * Returns 1 if second id is smaller. - * - * @param "const CSIPronunciation& aFirst" First pronunciation to compare - * @param "const CSIPronunciation& aSecond" Second pronunciation to compare - * @return 0, -1 or 1 - */ - static TInt Compare( const CSIPronunciation& aFirst, const CSIPronunciation& aSecond ); - - /** - * Compares two CSIPronunciation objects. - * Returns 0 if phoneme sequences are equal. - * Returns -1 if first phoneme sequence is smaller. - * Returns 1 if second phoneme sequence is smaller. - * - * @param "const CSIPronunciation& aFirst" First pronunciation to compare - * @param "const CSIPronunciation& aSecond" Second pronunciation to compare - * @return 0, -1 or 1 - */ - static TInt ComparePhonemes( const CSIPronunciation& aFirst, const CSIPronunciation& aSecond ); - - - protected: - IMPORT_C virtual void ConstructL(); - IMPORT_C CSIPronunciation(const TSIPronunciationID aPronunciationID, - const TSIModelBankID aModelBankID ); - - private: - TSIPronunciationID iPronunciationID; - TSIModelBankID iModelBankID; - HBufC8* iPhonemeSequence; - TAny* iReserved; - }; - - -/** -* Class to encapsulate a Speaker Independent Lexicon -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSILexicon : public CBase - { - public:// Constructors and destructor - - /** - * Destructor. - */ - IMPORT_C virtual ~CSILexicon(); - - /** - * Two-phased constructor. - * @param aLexiconID Lexicon ID - * @return Created instance - */ - IMPORT_C static CSILexicon* NewL( const TSILexiconID aLexiconID ); - IMPORT_C static CSILexicon* NewLC( const TSILexiconID aLexiconID ); - - public: // New functions - - /** - * Use to add a lexicon entry to the lexicon. - * Leaves with KErrNoMemory if maximal allowed amount of pronunciations - * is already stored in this lexicon - * @since 2.8 - * @param aPronunciation pointer to CSIPronunciation object. - */ - IMPORT_C virtual void AddL( CSIPronunciation* aPronunciation ); - - /** - * Use to return a pronunciation based at an index. - * @since 2.8 - * @param aIndex Value must not be negative and must not be greater than - * the number of pronunciations currently in the lexicon. - * @return Reference to CSIPronunciation object. - */ - IMPORT_C virtual CSIPronunciation& AtL( TInt aIndex ) const; - - /** - * Deletes a pronunciation based on identifier. - * @since 2.8 - * @param aPronunciationID pronunciation variant identifier. - */ - IMPORT_C virtual void DeleteL( TSIPronunciationID aPronunciationID ); - - /** - * Use to find a pronunciation based on pronunciation Id. - * @since 2.8 - * @param aPronunciationID: pronunciation identifier. - * @return The index of the first matching pronunciation within the lexicon. - * KErrNotFound, if no matching pronunciation can be found. - */ - IMPORT_C virtual TInt Find( const TSIPronunciationID aPronunciationID ) const; - - /** - * Use to find a pronunciation based on phoneme sequence. - * @since 2.8 - * @param aPronunciation: phoneme sequence. - * @return The index of the first matching pronunciation within the lexicon. - * KErrNotFound, if no matching pronunciation can be found. - */ - IMPORT_C virtual TInt Find( const TDesC8& aPhonemeSequence ) const; - - /** - * Use to count the number of lexicon entries in the lexicon. - * @since 2.8 - * @return Number of pronunciations. - */ - IMPORT_C virtual TInt Count() const; - - /** - * Use to retrieve the model bank Id of the model bank. - * @since 2.8 - * @return Model bank identifier. - */ - IMPORT_C virtual TSILexiconID LexiconID() const; - - /** - * Internalize to a data stream - * @since 2.8 - * @param aStream Data stream - */ - IMPORT_C virtual void InternalizeL( RReadStream& aStream ); - - /** - * Externalize from a data stream - * @since 2.8 - * @param aStream Data stream - */ - IMPORT_C virtual void ExternalizeL( RWriteStream& aStream ) const; - - protected: - IMPORT_C void ConstructL(); - IMPORT_C CSILexicon( const TSILexiconID aLexiconID ); - - private: - - /** - * Utility function to add pronunciation to the end of ID-ordered array - * - * @param "CSIPronunciation* aPronunciation" Pronunciation which should be added. - */ - void AddPronunciationToEndL( CSIPronunciation* aPronunciation ); - - private: - // ID of the lexicon - TSILexiconID iLexiconID; - // Pronunciations in the order of IDs - RPointerArray iPronunciationArray; - // Pronunciations in the order of the phoneme sequence - RPointerArray iPronunOrder; - // For future extensions - TAny* iReserved; - }; - - -/** -* Class to encapsulate a Speaker Independent Model -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSIModel : public CSIParameters - { - public:// Constructors and destructor - /** - * Destructor. - */ - IMPORT_C virtual ~CSIModel(); - - /** - * Two-phased constructors. - */ - //IMPORT_C static CSIModel* NewL(); - //IMPORT_C static CSIModel* NewLC(); - IMPORT_C static CSIModel* NewL( const TSIModelID aModelID ); - IMPORT_C static CSIModel* NewLC( const TSIModelID aModelID ); - - public: // New functions - /** - * Use to set the phoneme Id of this model. - * @since 2.8 - * @param aModelID: phoneme identifier. - * @return None. - */ - IMPORT_C virtual void SetModelID( const TSIModelID aModelID); - - /** - * Use to retreive the phoneme Id of this model. - * @since 2.8 - * @param None. - * @return Phoneme identifier. - */ - IMPORT_C virtual TSIModelID ModelID() const; - - /** - * Use to get a pointer to the acoustic model of this model. - * @since 2.8 - * @param None. - * @return A descriptor to the acoustic model data. - */ - IMPORT_C virtual TDesC8& AcousticModel() const; - - /** - * Use to set the acoustic model of the model. - * @since 2.8 - * @param aAcousticModel: pointer descriptor containing the acoustic model (binary). - * @return None. - */ - IMPORT_C virtual void SetAcousticModel( HBufC8* aAcousticModel ); - - - protected: - IMPORT_C virtual void ConstructL(); - IMPORT_C CSIModel( ); - IMPORT_C CSIModel( const TSIModelID aModelID ); - - private: - TSIModelID iModelID; - HBufC8* iAcousticModel; - TAny* iReserved; - }; - -/** -* Class to encapsulate a Speaker Independent Model Bank -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSIModelBank : public CBase - { - public:// Constructors and destructor - /** - * Destructor. - */ - IMPORT_C virtual ~CSIModelBank(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CSIModelBank* NewL(const TSIModelBankID aModelBankID); - IMPORT_C static CSIModelBank* NewLC(const TSIModelBankID aModelBankID); - - public: // New functions - - - - /** - * Use to add a model to the model bank. - * @since 2.8 - * @param aModel: reference to CSIModel object. - * @return None - */ - IMPORT_C virtual void AddL(const CSIModel* aModel); - - /** - * Use to return a model at the given index. - * @since 2.8 - * @param Reference to CSIModel object. - * @return None - */ - IMPORT_C virtual CSIModel& AtL(TInt aIndex) const; - - /** - * Deletes a model from model bank. - * @since 2.8 - * @param ID of the model - * @return None - */ - IMPORT_C virtual void DeleteL(TSIModelID aModelID); - - /** - * Use to find a model based on phoneme Id. - * @since 2.8 - * @param None. - * @return Index of the first matching model within the model bank. KErrNotFound, if no matching model can be found.. - */ - IMPORT_C virtual TInt Find(TSIModelID aModelID) const; - - /** - * Use to retreive the number of models in the model bank. - * @since 2.8 - * @param None. - * @return Number of models in the model bank. - */ - IMPORT_C virtual TInt Count() const; - - /** - * Use to return the model bank Id of the model bank. - * @since 2.8 - * @param None. - * @return Model bank identifier. - */ - IMPORT_C virtual TSIModelBankID ModelBankID() const; - - protected: - IMPORT_C virtual void ConstructL(); - IMPORT_C CSIModelBank(const TSIModelBankID aModelBankID); - - private: - TSIModelBankID iModelBankID; - RPointerArray iModelArray; - TAny* iReserved; - }; - -/** -* Class to define pronunciation type. -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSIPronunciationInfo : public CSIParameters - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CSIPronunciationInfo* NewL(RPointerArray aPronunciationArray, - TLanguage aLanguage ); - IMPORT_C static CSIPronunciationInfo* NewLC(RPointerArray aPronunciationArray, - TLanguage aLanguage ); - - /** - * Destructor. - */ - IMPORT_C virtual ~CSIPronunciationInfo(); - - public: // New functions - - /** - * Use to get phoneme sequence data - * @since 2.8 - * @return Phoneme sequence - */ - IMPORT_C virtual TDesC8& PronunciationL(TInt aIndex) const; - - /** - * Use to set phoneme sequence data - * @since 2.8 - * @return Phoneme sequence - */ - - IMPORT_C virtual void SetPronunciationL( TInt aIndex, HBufC8* aPronunciation); - - IMPORT_C virtual TLanguage Language() const; - - IMPORT_C virtual TInt Count() const; - - - protected: - IMPORT_C virtual void ConstructL(); - IMPORT_C CSIPronunciationInfo( RPointerArray aPronunciationArray,TLanguage aLanguage); - - private: // Data - - // phoneme sequence - //HBufC8* iPronunciation; - RPointerArray iPronunciationArray; - - TLanguage iLanguage; - TAny* iReserved; - }; - -/** -* Class to define word list. The list is used as input parameter for TTP. -* -* @lib SiSpeechRecognitionData.lib -* @since 2.8 -*/ -class CSITtpWordList : public CBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CSITtpWordList* NewL(); - IMPORT_C static CSITtpWordList* NewLC(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CSITtpWordList(); - - public: // New functions - - /** - * Use to add a new word - * @since 2.8 - * @param aWord Word to be added - */ - IMPORT_C virtual void AddL( MDesCArray* aWords ); - - /** - * Use to get number of words - * @since 2.8 - * @return number of words - */ - IMPORT_C virtual TInt Count() const; - - /** - * Use to return word at an index - * @since 2.8 - * @param aIndex Index of word - * @return reference to word sequence - */ - IMPORT_C virtual MDesCArray& AtL( const TInt aIndex ) const; - - - /** - * Use to delete word at an index - * @since 2.8 - * @param aIndex Index of word - * @return None - */ - IMPORT_C virtual void DeleteL(TInt aIndex); - - - - /** - * Use to set pronunciation for a word - * @since 2.8 - * @param aIndex Index of word seqence - * @param aPronunciation Pronunciation to be added - */ - IMPORT_C virtual void AppendPronunciationL(TInt aIndex, - CSIPronunciationInfo* aPronunciation); - - - /** - * Use to get pronunciations for a word - * @since 2.8 - * @param aIndex Index of word sequence - * @param aPronunciations Array where to put pronunciations - */ - IMPORT_C virtual void GetPronunciationsL( const TInt aIndex, - RPointerArray& aPronunciations ) const; - - protected: - - /** - * C++ default constructor. - */ - IMPORT_C CSITtpWordList(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - IMPORT_C void ConstructL(); - - private: // Data - - // word array - // RArray iWordArray; - RPointerArray iWordArray; - // index array for pronunciations - RArray iIndexArray; - // pronunciation array - RPointerArray iPronunciationArray; - - // Reserved pointer for future extension - TAny* iReserved; - }; - -/** -* Class to encapsulate a Recognition Result -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSIResult : public CSIParameters - { - public:// Constructors and destructor - /** - * Destructor. - */ - IMPORT_C virtual ~CSIResult(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CSIResult* NewL(); - IMPORT_C static CSIResult* NewLC(); - - public: // New functions - /** - * Use to set the grammar Id on the result. - * @since 2.8 - * @param aGrammarID - grammar identifier. - * @return None. - */ - IMPORT_C virtual void SetGrammarID(const TSIGrammarID aGrammarID); - - /** - * Use to retrieve the grammar Id of the result. - * @since 2.8 - * @param None. - * @return Grammar identifier. - */ - IMPORT_C virtual TSIGrammarID GrammarID() const; - - /** - * Use to set the rule Id of the result. - * @since 2.8 - * @param aRuleID - rule identifier. - * @return None. - */ - IMPORT_C virtual void SetRuleID(const TSIRuleID aRuleID); - - /** - * Use to retrieve the rule Id of the result. - * @since 2.8 - * @param None. - * @return Rule identifier. - */ - IMPORT_C virtual TSIRuleID RuleID() const; - - /** - * Use to set the rule variant Id of the result. - * @since 2.8 - * @param aRuleID - rule variant identifier. - * @return None. - */ - IMPORT_C virtual void SetRuleVariantID(const TSIRuleVariantID aRuleVariantID); - - /** - * Use to retrieve the rule variant Id of the result. - * @since 2.8 - * @param None. - * @return Rule variant identifier. - */ - IMPORT_C virtual TSIRuleVariantID RuleVariantID() const; - - /** - * Use to set the score for this result. - * @since 2.8 - * @param aScore: score of this result. - * @return None. - */ - IMPORT_C virtual void SetScore(const TInt32 aScore); - - /** - * Use to retreive the score of this result. - * @since 2.8 - * @param None. - * @return Score of this result. - */ - IMPORT_C virtual TInt32 Score() const; - - /** - * Sets the pronunciation information needed for speaker adaptation and playback. - * @since 2.8 - * @param aSIPronunciationInfo Pronunciation information, needed for speaker adaptation and playback - * @return None. - */ - IMPORT_C virtual void SetPronunciation( CSIPronunciation* aSIPronunciation); - - /** - * Gets the pronunciation information needed for speaker adaptation and playback. - * @since 2.8 - * @param None - * @return aSIPronunciationInfo Pronunciation information, needed for speaker adaptation and playback - */ - IMPORT_C virtual CSIPronunciation& Pronunciation() const ; - protected: - IMPORT_C virtual void ConstructL(); - IMPORT_C CSIResult(); - - private: - TSIGrammarID iGrammarID; - TSIRuleID iRuleID; - TSIRuleVariantID iRuleVariantID; - TInt32 iScore; - CSIPronunciation* iSIPronunciation; - TAny* iReserved; - }; - - -/** -* Class to encapsulate a a set of Recognition Result -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSIResultSet : public CBase - { - public:// Constructors and destructor - /** - * Destructor. - */ - IMPORT_C virtual ~CSIResultSet(); - /** - * Two-phased constructor. - */ - IMPORT_C static CSIResultSet* NewL(); - IMPORT_C static CSIResultSet* NewLC(); - - public: // New functions - /** - * Use to add a result to the rule set. - * @since 2.8 - * @param aResult - reference to the result object to be added. - * @return KErrNone, if the insertion is successful, otherwise one of the system wide error codes. - */ - IMPORT_C virtual void AddL( const CSIResult* aResult); - - /** - * Use to return a result at a given index within the result set. - * @since 2.8 - * @param aIndex - index in the result set. - * @return A reference to CSIResult object. - */ - IMPORT_C virtual CSIResult& AtL(const TInt aIndex); - - /** - * Use to return a result at a given index within the result set. - * @since 2.8 - * @param aIndex - index in the result set. - * @return A constant reference to CSIResult object. - */ - IMPORT_C virtual const CSIResult& AtL(const TInt aIndex) const; - - /** - * Use to retreive the number of result in the result set. - * @since 2.8 - * @param None. - * @return Number of results in the result set. - */ - IMPORT_C virtual TInt Count() const; - - - /** - * Delete a result in the result set. - * @since 2.8 - * @param index of a result - * @return None - */ - IMPORT_C virtual void DeleteL(TInt aIndex); - - /** - * Sets the data needed for speaker adaptation. CSIResultSet takes ownership of the data. - * @since 2.8 - * @param Adaptation data - * @return None - */ - IMPORT_C virtual void SetAdaptationData( HBufC8* aAdaptationData ); - - - /** - * Gets the data needed for speaker adaptation. CSIResultSet takes ownership of the data. - * @since 2.8 - * @param None - * @return Adaptation data - */ - IMPORT_C virtual TDesC8& AdaptationData(); - - /** - * Stores the object to the stream. - * @since 2.8 - * @param aWriteStream The stream to write to. - * @return None - */ - IMPORT_C virtual void ExternalizeL( RWriteStream& aWriteStream ) const; - - /** - * Resurrects an object from the stream. - * @since 2.8 - * @param aReadStream The stream to read from. - * @return None - */ - IMPORT_C virtual void InternalizeL( RReadStream& aReadStream ); - - private: - /** - * By default Symbian 2nd phase constructor is private. - */ - IMPORT_C virtual void ConstructL(); - - /** - * C++ constructor - */ - IMPORT_C CSIResultSet(); - - private: - // The results - RPointerArray iResultArray; - - // Speaker adaptation data - HBufC8* iAdaptationData; - - // Reserved for future extensions - TAny* iReserved; - }; - -#endif - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/common/inc/nssttscommon.h --- a/srsfenginestub/common/inc/nssttscommon.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,437 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Data type defininitions for TTS -* %version: 13 % -* -* Copyright © 2004-2006 Nokia Corporation. -*/ - - - - - -#ifndef TTSCOMMON_H -#define TTSCOMMON_H - -// INCLUDES -#include -#include - -// CONSTANTS -// Undefined synthesizing language. The default language of TTS processor will be used. -const TLanguage KTtsUndefinedLanguage( ELangOther ); - -// Undefined duration of segment. The duration will be defined using other properties. -const TInt32 KTtsUndefinedDuration( -1 ); - -// Undefined rate -const TInt KTtsRateUndefined( -1 ); - -// Default volume, which is maximum volume (100%). -const TInt KTtsDefaultVolume( 100 ); - -// Max length of voice name -const TInt KVoiceNameMaxLength( 50 ); - -// Maximum speaking rate -const TInt KTtsMaxSpeakingRate( 100 ); - -// -_LIT( KDefaultVoiceNameMale, "DefaultMale" ); -_LIT( KDefaultVoiceNameFemale, "DefaultFemale" ); - -// DATA TYPES - -// Style identifier -typedef TUint32 TTtsStyleID; - -// Voice identifier -typedef TBuf TTtsVoice; - -// Preferred quality of TTS output -enum TTtsQuality - { - ETtsQualityLowOnly, // Low quality - ETtsQualityHighOnly, // High quality - ETtsQualityHighPreferred, // High quality preferred, low quality fall back can be used - ETtsQualityLowPreferred, // Low quality preferred - ETtsQualityUndefined // Default quality will be used - }; - -// Custom command ids for CTtsUtility::CustomCommand(As|S)ync() -enum TTtsCustomCommandId - { - ETtsCustomCommandSetAudioOutput = 0, // For setting audio output routing - ETtsCustomCommandSetPluginParameter = 1, // For setting plugin parameter - }; - -// FORWARD DECLARATIONS -class CTtsParsedTextBody; - -// CLASS DECLARATION - -/** -* Class to encapsulate speaking style -* -* @lib nssttscommon.lib -* @since 2.8 -*/ -class TTtsStyle - { - public: // Constructor and destructor - - /** - * C++ default constructor. - */ - IMPORT_C TTtsStyle(); - - public: // Data - - // Synthesizing language - TLanguage iLanguage; - - // Voice identifier - TTtsVoice iVoice; - - // Speaking rate in words-per-minute. See TTtsRate. - TInt iRate; - - // Volume scale in percentages. The range is 0..100. - // Zero means silent and 100 maximum volume. - TInt iVolume; - - // Sampling rate - TInt iSamplingRate; - - // TTS quality (preferred or exclusive) - TTtsQuality iQuality; - - // Desired time to take to read the segment in microseconds - TTimeIntervalMicroSeconds32 iDuration; - - // Natural languagege processing on/off - TBool iNlp; - - }; - -/** -* Class to store segment information -* -* @lib nssttscommon.lib -* @since 2.8 -*/ -class TTtsSegment - { - public: // Constructors and destructor - - /** - * C++ default constructor. - * @since 2.8 - * @param aStyleID Indentifier of style. - * @param aText Text for segment - * @param aPhonemeSequence Corresponding phoneme sequence for text - * @param aTrailingSilenceDuration The duration of trailing silence. - */ - IMPORT_C TTtsSegment( const TTtsStyleID aStyleID, - const TDesC& aText = KNullDesC, - const TDesC8& aPhonemeSequence = KNullDesC8, - const TTimeIntervalMicroSeconds32& aTrailingSilenceDuration = KTtsUndefinedDuration ); - - public: // New functions - - /** - * Sets duration of trailing silence. - * @since 2.8 - * @param aDuration Duration of silence. - * @return None - */ - IMPORT_C void SetTrailingSilenceL( const TTimeIntervalMicroSeconds32& aDuration ); - - /** - * Sets phoneme sequence pointer. The phoneme sequence cannot be deleted - * during the life time of this object. - * @since 2.8 - * @param aPhonemeSequence Phoneme sequence. - * @return None - */ - IMPORT_C void SetPhonemeSequencePtr( const TDesC8& aPhonemeSequence ); - - /** - * Returns phoneme sequence pointer of the segment. - * @since 2.8 - * @param None - * @return Pointer to phoneme sequence - */ - IMPORT_C const TDesC8& PhonemeSequencePtr() const; - - /** - * Sets text pointer. The text cannot be deleted - * during the life time of this object. - * @since 2.8 - * @param aText Text. - * @return None - */ - IMPORT_C void SetTextPtr( const TDesC& aText ); - - /** - * Returns text pointer of the segment. - * @since 2.8 - * @param None - * @return Pointer to text. - */ - IMPORT_C const TDesC& TextPtr() const; - - /** - * Gets duration of trailing silence. - * @since 2.8 - * @param None - * @return Duration of silence. - */ - IMPORT_C const TTimeIntervalMicroSeconds32& TrailingSilence() const; - - /** - * Sets style for segment. The style cannot be deleted - * during this object life time. - * @since 2.8 - * @param aStyleID The identifier of the style. - * @return None - */ - IMPORT_C void SetStyleID( TTtsStyleID aStyleID ); - - /** - * Returns identifier of used style. - * @since 2.8 - * @param None - * @return Identifier of style. - */ - IMPORT_C TTtsStyleID StyleID() const; - - /** - * Sets style object for segment. - * - * @since 3.1 - * @param aStyle Style reference. - */ - IMPORT_C void SetStyle( TTtsStyle& aStyle ); - - /** - * Returns style object. - * - * @since 3.1 - * @return Reference to style. - */ - IMPORT_C TTtsStyle& StyleL(); - - /** - * Resets previously set style and segment will use the style ID. - * - * @since 3.1 - */ - IMPORT_C void ResetStyle(); - - private: // Data - - // Style identifier for segment - TTtsStyleID iStyleID; - - // Pointer to text associated for segment - TPtrC iText; - - // Pointer to phoneme sequence associated for segment - TPtrC8 iPhonemeSequence; - - // Duration of trailing silence - TTimeIntervalMicroSeconds32 iTrailingSilenceDuration; - - // Style assigned directly to segment - TTtsStyle iStyle; - - // On if style is directly assigned to the segment - TBool iIncludesStyle; - }; - -/** -* Class to define functions for TTS segment stream. -* Using the class, a client can implement similar classes to CParsedText. -* -* @lib nssttscommon.lib -* @since 2.8 -*/ -class MTtsSegmentStream - { - public: // New functions - - /** - * Returns used phoneme notation of the stream. - * @since 2.8 - * @return Descriptor of used phoneme notation. - */ - virtual TDesC& MTtsPhonemeNotation() = 0; - - /** - * Returns the next segment in the stream. - * @since 2.8 - * @param aSegment The requested segment. - * @return System wide error code. KErrNone if success. - * KErrUnderflow if there is no available segment. - */ - virtual TInt MTtsReceiveSegment( TTtsSegment& aSegment ) = 0; - - /** - * Notifies that the segment has been processed and it can be released. - * @since 2.8 - * @param aSegment The processed segment. - */ - virtual void MTtsSegmentDone( TTtsSegment& aSegment ) = 0; - - }; - -/** -* Class to store parsed text for TTS. -* -* @lib nssttscommon.lib -* @since 2.8 -*/ -class CTtsParsedText : public CBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @since 2.8 - * @param aText Text to be parsed. - * @param aPhonemeSequence Corresponding phoneme sequence. - * If the sequence is not given, it will be determined automatically. - * @param aPhonemeNotation Identifier of phoneme notation. - * If the descriptor is empty, the TTS engine will use default notation. - * @return Created instance of CTtsParsedText - */ - IMPORT_C static CTtsParsedText* NewL( const TDesC& aText = KNullDesC, - const TDesC8& aPhonemeSequence = KNullDesC8, - const TDesC& aPhonemeNotation = KNullDesC ); - - /** - * Destructor. - */ - IMPORT_C virtual ~CTtsParsedText(); - - public: // New functions - - /** - * Adds new segment and takes its ownership. - * @since 2.8 - * @param aSegment A new segment. - * @param aIndex Index where to add segment. If index is equal or larger - * than NumberOfSegments(), the segment will be added into end. - */ - IMPORT_C void AddSegmentL( const TTtsSegment& aSegment, TInt aIndex = KMaxTInt ); - - /** - * Deletes a segment - * @since 2.8 - * @param aIndex The index of segment to be deleted. The index must be 0..NumberOfSegments()-1. - */ - IMPORT_C void DeleteSegmentL( TInt aIndex ); - - /** - * Checks that the internal structure is valid. - * @since 2.8 - * @return ETrue if valid and EFalse if invalid. - */ - IMPORT_C TBool IsValid() const; - - /** - * Returns the number of segments. - * @since 2.8 - * @return The number of segments - */ - IMPORT_C TInt NumberOfSegments() const; - - /** - * Returns phoneme notation definition. - * @since 2.8 - * @return Notation descriptor. KNullDesC8 if none. - */ - IMPORT_C const TDesC& PhonemeNotation() const; - - /** - * Returns phoneme sequence. - * @since 2.8 - * @return Phoneme sequence. KNullDesC8 if none. - */ - IMPORT_C const TDesC8& PhonemeSequence() const; - - /** - * Returns segment from given index - * @since 2.8 - * @param aIndex The index of segment to be returned. The index must be 0..NumberOfSegments()-1. - * @return Requested segment. - */ - IMPORT_C const TTtsSegment& SegmentL( TInt aIndex ) const; - - /** - * Sets a phoneme notation. The descriptor is copied and can be released after the function call. - * @since 2.8 - * @param aPhonemeNotation Phoneme notation. - */ - IMPORT_C void SetPhonemeNotationL( const TDesC& aPhonemeNotation ); - - /** - * Sets a phoneme sequence. The descriptor is copied and can be released after the function call. - * @since 2.8 - * @param aPhonemeSequence Phoneme sequence. - */ - IMPORT_C void SetPhonemeSequenceL( const TDesC8& aPhonemeSequence ); - - /** - * Sets a text. The descriptor is copied and can be released after the function call. - * @since 2.8 - * @param aText Text. - */ - IMPORT_C void SetTextL( const TDesC& aText ); - - /** - * Returns text. - * @since 2.8 - * @return Text. KNullDesC8 if none. - */ - IMPORT_C const TDesC& Text() const; - - private: - - /** - * C++ default constructor. - */ - CTtsParsedText(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL( const TDesC& aText, - const TDesC8& aPhonemeSequence, - const TDesC& aPhonemeNotation ); - - - private: // Data - - // Implementation for the class - CTtsParsedTextBody* iBody; - - // Reserved pointer for future extension - TAny* iReserved; - - }; -#endif // TTSCOMMON_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/common/src/asrshwdevice.cpp --- a/srsfenginestub/common/src/asrshwdevice.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hardware device base class -* -*/ - - - - - - -// INCLUDE FILES -#include "asrshwdevice.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CASRSHwDevice::CASRSHwDevice -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CASRSHwDevice::CASRSHwDevice() - { - } - -// ----------------------------------------------------------------------------- -// CASRSHwDevice::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CASRSHwDevice::ConstructL() - { - } - -// ----------------------------------------------------------------------------- -// CASRSHwDevice::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSHwDevice* CASRSHwDevice::NewL() - { - CASRSHwDevice* self = new( ELeave ) CASRSHwDevice; - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - - -// ----------------------------------------------------------------------------- -// CASRSHwDevice::~CASRSHwDevice -// Destructor -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSHwDevice::~CASRSHwDevice() - { - - } - -// ----------------------------------------------------------------------------- -// CASRSHwDevice::InitializeL() -// do nothing -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSHwDevice::InitializeL() - { - // nothing - } - -// ----------------------------------------------------------------------------- -// CASRSHwDevice::Clear() -// do nothing -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSHwDevice::Clear() - { - // nothing - } - -// ----------------------------------------------------------------------------- -// CASRSHwDevice::CustomInterface() -// return empty interface -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TAny* CASRSHwDevice::CustomInterface( TUid /*aInterfaceId*/ ) - { - return NULL; - } - diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/grcompilerhwdevice/bwins/asrsgrcompilerhwdeviceu.def --- a/srsfenginestub/grcompilerhwdevice/bwins/asrsgrcompilerhwdeviceu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -EXPORTS - ??1CASRSGrCompilerHwDevice@@UAE@XZ @ 1 NONAME ; public: virtual __thiscall CASRSGrCompilerHwDevice::~CASRSGrCompilerHwDevice(void) - ??1CASRSHwDevice@@UAE@XZ @ 2 NONAME ; public: virtual __thiscall CASRSHwDevice::~CASRSHwDevice(void) - ?CancelCombination@CASRSGrCompilerHwDevice@@QAEXXZ @ 3 NONAME ; public: void __thiscall CASRSGrCompilerHwDevice::CancelCombination(void) - ?CancelCompilation@CASRSGrCompilerHwDevice@@QAEXXZ @ 4 NONAME ; public: void __thiscall CASRSGrCompilerHwDevice::CancelCompilation(void) - ?Clear@CASRSHwDevice@@UAEXXZ @ 5 NONAME ; public: virtual void __thiscall CASRSHwDevice::Clear(void) - ?ClearL@CASRSGrCompilerHwDevice@@QAEXXZ @ 6 NONAME ; public: void __thiscall CASRSGrCompilerHwDevice::ClearL(void) - ?CombineGrammarL@CASRSGrCompilerHwDevice@@QAEXABV?$RPointerArray@VCSICompiledGrammar@@@@ABV?$RPointerArray@VTSIRuleVariantInfo@@@@@Z @ 7 NONAME ; public: void __thiscall CASRSGrCompilerHwDevice::CombineGrammarL(class RPointerArray const &,class RPointerArray const &) - ?CompileGrammarL@CASRSGrCompilerHwDevice@@QAEXAAVCSICompiledGrammar@@@Z @ 8 NONAME ; public: void __thiscall CASRSGrCompilerHwDevice::CompileGrammarL(class CSICompiledGrammar &) - ?CustomInterface@CASRSGrCompilerHwDevice@@UAEPAXVTUid@@@Z @ 9 NONAME ; public: virtual void * __thiscall CASRSGrCompilerHwDevice::CustomInterface(class TUid) - ?CustomInterface@CASRSHwDevice@@UAEPAXVTUid@@@Z @ 10 NONAME ; public: virtual void * __thiscall CASRSHwDevice::CustomInterface(class TUid) - ?InitializeL@CASRSGrCompilerHwDevice@@UAEXXZ @ 11 NONAME ; public: virtual void __thiscall CASRSGrCompilerHwDevice::InitializeL(void) - ?InitializeL@CASRSHwDevice@@UAEXXZ @ 12 NONAME ; public: virtual void __thiscall CASRSHwDevice::InitializeL(void) - ?NewL@CASRSGrCompilerHwDevice@@SAPAV1@AAVMASRSGrCompilerHwDeviceObserver@@@Z @ 13 NONAME ; public: static class CASRSGrCompilerHwDevice * __cdecl CASRSGrCompilerHwDevice::NewL(class MASRSGrCompilerHwDeviceObserver &) - ?NewL@CASRSHwDevice@@SAPAV1@XZ @ 14 NONAME ; public: static class CASRSHwDevice * __cdecl CASRSHwDevice::NewL(void) - ?ResolveResult@CASRSGrCompilerHwDevice@@QBEXABV?$RArray@I@@AAVCSIResultSet@@ABV?$RPointerArray@VCSICompiledGrammar@@@@ABVTDesC8@@@Z @ 15 NONAME ; public: void __thiscall CASRSGrCompilerHwDevice::ResolveResult(class RArray const &,class CSIResultSet &,class RPointerArray const &,class TDesC8 const &)const - diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/grcompilerhwdevice/eabi/asrsgrcompilerhwdeviceu.def --- a/srsfenginestub/grcompilerhwdevice/eabi/asrsgrcompilerhwdeviceu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -EXPORTS - _ZN13CASRSHwDevice11InitializeLEv @ 1 NONAME - _ZN13CASRSHwDevice15CustomInterfaceE4TUid @ 2 NONAME - _ZN13CASRSHwDevice4NewLEv @ 3 NONAME - _ZN13CASRSHwDevice5ClearEv @ 4 NONAME - _ZN13CASRSHwDeviceD0Ev @ 5 NONAME - _ZN13CASRSHwDeviceD1Ev @ 6 NONAME - _ZN13CASRSHwDeviceD2Ev @ 7 NONAME - _ZN23CASRSGrCompilerHwDevice11InitializeLEv @ 8 NONAME - _ZN23CASRSGrCompilerHwDevice15CombineGrammarLERK13RPointerArrayI18CSICompiledGrammarERKS0_I18TSIRuleVariantInfoE @ 9 NONAME - _ZN23CASRSGrCompilerHwDevice15CompileGrammarLER18CSICompiledGrammar @ 10 NONAME - _ZN23CASRSGrCompilerHwDevice15CustomInterfaceE4TUid @ 11 NONAME - _ZN23CASRSGrCompilerHwDevice17CancelCombinationEv @ 12 NONAME - _ZN23CASRSGrCompilerHwDevice17CancelCompilationEv @ 13 NONAME - _ZN23CASRSGrCompilerHwDevice4NewLER31MASRSGrCompilerHwDeviceObserver @ 14 NONAME - _ZN23CASRSGrCompilerHwDevice6ClearLEv @ 15 NONAME - _ZN23CASRSGrCompilerHwDeviceD0Ev @ 16 NONAME - _ZN23CASRSGrCompilerHwDeviceD1Ev @ 17 NONAME - _ZN23CASRSGrCompilerHwDeviceD2Ev @ 18 NONAME - _ZNK23CASRSGrCompilerHwDevice13ResolveResultERK6RArrayIjER12CSIResultSetRK13RPointerArrayI18CSICompiledGrammarERK6TDesC8 @ 19 NONAME - _ZTI13CASRSHwDevice @ 20 NONAME ; ## - _ZTI23CASRSGrCompilerHwDevice @ 21 NONAME ; ## - _ZTV13CASRSHwDevice @ 22 NONAME ; ## - _ZTV23CASRSGrCompilerHwDevice @ 23 NONAME ; ## diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/grcompilerhwdevice/group/asrsgrcompilerhwdevicestub.mmp --- a/srsfenginestub/grcompilerhwdevice/group/asrsgrcompilerhwdevicestub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for AsrsGrCompilerHwDeviceStub -* -*/ - - - - -#include - -#if defined( WINS ) || defined( WINSCW ) -TARGET asrsgrcompilerhwdevice.dll -#else -TARGET asrsgrcompilerhwdevice_stub.dll -#endif - -TARGETTYPE DLL -UID 0x1000008D 0x101ff929 // UID: 270530857 - -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE asrsgrcompilerhwdevice.cpp - -SOURCEPATH ../../common/src -SOURCE asrshwdevice.cpp - -USERINCLUDE ../inc ../src -USERINCLUDE ../../common/src - -// This is a SYSTEMINCLUDE macro containing the middleware -// layer specific include directories -APP_LAYER_SYSTEMINCLUDE - -SYSTEMINCLUDE ../../common/inc - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY asrsgrcompilerhwdevice.lib - -// On ROM dll name is without the _stub part so that it can easily be -// replaced with the real dll -LINKAS asrsgrcompilerhwdevice.dll - -CAPABILITY CAP_GENERAL_DLL - - - diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/grcompilerhwdevice/group/bld.inf --- a/srsfenginestub/grcompilerhwdevice/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for AsrsGrCompilerHwDeviceStub -* -*/ - - - - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -asrsgrcompilerhwdevicestub.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/grcompilerhwdevice/src/asrsgrcompilerhwdevice.cpp --- a/srsfenginestub/grcompilerhwdevice/src/asrsgrcompilerhwdevice.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,193 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ARM hardware device for grammar compiling -* -*/ - - - - - - -// INCLUDE FILES -#include "asrsgrcompilerhwdevice.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CASRSGrCompilerHwDevice::CASRSGrCompilerHwDevice -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CASRSGrCompilerHwDevice::CASRSGrCompilerHwDevice( - MASRSGrCompilerHwDeviceObserver& anObserver - ) -: iObserver( anObserver ), - iAlgorithm( NULL ), - iIsInitialised( EFalse ), - iReserved( 0 ) - { - // Nothing - } - -// ----------------------------------------------------------------------------- -// CASRSGrCompilerHwDevice::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CASRSGrCompilerHwDevice::ConstructL(void) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSGrCompilerHwDevice::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSGrCompilerHwDevice* CASRSGrCompilerHwDevice::NewL( - MASRSGrCompilerHwDeviceObserver& anObserver ) // The observer - { - CASRSGrCompilerHwDevice* self = new( ELeave ) CASRSGrCompilerHwDevice( anObserver ); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - - -// ----------------------------------------------------------------------------- -// ~CASRSGrCompilerHwDevice -// Destructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSGrCompilerHwDevice::~CASRSGrCompilerHwDevice() - { - } - -// ----------------------------------------------------------------------------- -// CustomInterface -// Provides clients with an interface, given an UID. -// Returns: NULL - No custom interface with that UID -// ----------------------------------------------------------------------------- -// -EXPORT_C TAny* CASRSGrCompilerHwDevice::CustomInterface( - TUid /*aInterfaceId*/ ) // UID of the interface - { - return NULL; - } - -// ----------------------------------------------------------------------------- -// InitializeL -// Initializes the device. Subsequent calls reset the device. -// Returns: none -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSGrCompilerHwDevice::InitializeL(void) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// ClearL -// Clears the device -// Returns: None -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSGrCompilerHwDevice::ClearL(void) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// Compiles a speaker independent grammar. -// Clears the device -// Returns: None -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSGrCompilerHwDevice::CompileGrammarL( - CSICompiledGrammar& /*aSICompiledGrammar*/ ) // The grammar - - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// Compiles a speaker independent grammar. -// Clears the device -// Returns: None -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSGrCompilerHwDevice::CombineGrammarL( - const RPointerArray& /*aCompiledGrammars*/, // The grammars - const RPointerArray& /*aExcludedRules*/) // Blacklisted variants - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CancelCompilation -// Cancels grammar compilation. No callback is sent to the client. -// Returns: None -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSGrCompilerHwDevice::CancelCompilation() - { - } - -// ----------------------------------------------------------------------------- -// CancelCombination -// Cancels grammar combination. No callback is sent to the client. -// Returns: None -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSGrCompilerHwDevice::CancelCombination() - { - } - -// ----------------------------------------------------------------------------- -// Resolves a recognition result -// Clears the device -// Returns: None -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSGrCompilerHwDevice::ResolveResult( - const RArray& /*aNBestIDs*/, - CSIResultSet& /*aSIResultSet*/, - const RPointerArray& /*aSICompiledGrammar*/, - const TDesC8& /*aCombinedData*/ - ) const - { - } - - -// ================================ OTHER EXPORTED FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// E32Dll -// DLL entry function -// ----------------------------------------------------------------------------- -// -#ifndef EKA2 -GLDEF_C TInt E32Dll( TDllReason /*aReason*/ ) - { - return KErrNone; - } -#endif - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/grcompilerhwdevice/src/asrsgrcompilerhwdevice.h --- a/srsfenginestub/grcompilerhwdevice/src/asrsgrcompilerhwdevice.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,233 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ARM hardware device for grammar compiling -* -*/ - - - - - - -#ifndef ASRSGRCOMPILERHWDEVICE_H -#define ASRSGRCOMPILERHWDEVICE_H - -// INCLUDES -#include -#include - -// FORWARD DECLARATIONS -class CAsrsGrCompilerAlgorithm; -class CSDCompiledGrammar; // For future extensions; the class doesn't exist yet. -class CSDLexicon; -class CSDModelBank; -class CSDResultSet; - -// CLASS DECLARATION -/** -* Callback class for Grammar Compiler. -* -* @lib asrgrcompilerhwdevice.lib -* @since 2.8 -*/ -class MASRSGrCompilerHwDeviceObserver - { -public: // New functions - - /** - * Called after grammar compilation has finished or stopped. - * @since 2.8 - * @param aError KErrNone or a system-wide error code - * @return none - */ - virtual void MghdoGrammarCompilerComplete(TInt aError) = 0; - - /** - * Called after grammar combination has finished or stopped. - * @since 2.8 - * @param aResult The compiled grammar. Format dependes on the technology provider. - * @param aError KErrNone or a system-wide error code - * @return none - */ - virtual void MghdoGrammarCombinerComplete(HBufC8* aResult, TInt aError) = 0; - - /** - * Combination and compilation operations require lexicons. To provide those - * lexicons when needed, the client must implement these functions. - * CASRGrCompilerHwDevice takes ownership of the data. - * @since 2.8 - * @param aID The lexicon identifier - * @return The lexicon. CASRGrCompiler takes ownership. - */ - virtual CSILexicon* MghdoSILexiconL(TSILexiconID aID) = 0; - - /** - * Callback function to load configuration data. - * Client provides an implementation. - * - * @param aPackageType Type identifier. - * @param aPackageID Package identifier. - * @param aStartPosition First byte. - * @param aEndPosition Last byte. If greater than the size of - * the data, rest of the data is given. - * @return Pointer to the data buffer, HW Device takes ownership. - */ - virtual HBufC8* MghdoConfigurationData( TUint32 aPackageType, - TUint32 aPackageID, - TUint32 aStartPosition = 0, - TUint32 aEndPosition = KMaxTUint32 ) = 0; - - }; - -/** -* Grammar compilation algortithms -* -* @lib asrgrcompilerhwdevice.lib -* @since 2.8 -*/ -class CASRSGrCompilerHwDevice : public CASRSHwDevice - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CASRSGrCompilerHwDevice* NewL( - MASRSGrCompilerHwDeviceObserver& aObserver - ); - - /** - * Destructor. - */ - IMPORT_C virtual ~CASRSGrCompilerHwDevice(); - - public: // New functions - - /** - * Compiles a speaker independent grammar. Asynchronous. - * Callback is MghdoGrammarCompilerComplete. - * @since 2.8 - * @param aSICompiledGrammar The grammar to be compiled. - * @return none - */ - IMPORT_C void CompileGrammarL( CSICompiledGrammar& aSICompiledGrammar ); - - /** - * Combines several speaker independent grammars. The result is a combined grammar - * in internal data format. - * If some rules are excluded (blacklisted), then they are absent from the combined - * grammar, but the compiled grammars are left untouched. - * @since 2.8 - * @param aCompiledGrammars Array of previously compiled grammar - * @param aExcludedRules Rules to be blacklisted. - * @return none - */ - IMPORT_C void CombineGrammarL(const RPointerArray& aCompiledGrammars, - const RPointerArray& aExcludedRules); - - /** - * Cancels grammar compilation. No callback is sent to the client. - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void CancelCompilation(); - - /** - * Cancels grammar combination. No callback is sent to the client. - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void CancelCombination(); - - /** - * Decodes an N-Best list from internal format into a recognition result. - * @since 2.8 - * @param aNBestIDs - N-Best result, as it came from the Recognition HW Device - * @param aSIResultSet - Empty recognition result to be populated. - * @param aSICompiledGrammar - The grammars, which were combined to get aCombinedGrammar - * @param aCombinedData - The combined grammar, which was used in recognition - * @return none - */ - IMPORT_C void ResolveResult(const RArray& aNBestIDs, - CSIResultSet& aSIResultSet, - const RPointerArray& aSICompiledGrammar, - const TDesC8& aCombinedData - ) const; - - public: // Functions from base classes - - /** - * From CASRSHwDevice - * Retrieve a custom interface - * @since 2.8 - * @param aInterfaceId - UID of the interface - * @return Pointer to a custom interface - */ - IMPORT_C TAny* CustomInterface(TUid aInterfaceId); - - /** - * From CASRSHwDevice - * Initializes the device. Subsequent calls reset the device. - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void InitializeL(); - - /** - * From CASRSHwDevice - * Clears the device. - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void ClearL(); - - private: - - /** - * C++ default constructor. - */ - CASRSGrCompilerHwDevice(MASRSGrCompilerHwDeviceObserver& aObserver); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - // Prohibit copy constructor if not deriving from CBase. - CASRSGrCompilerHwDevice( const CASRSGrCompilerHwDevice& ); - // Prohibit assigment operator if not deriving from CBase. - CASRSGrCompilerHwDevice& operator=( const CASRSGrCompilerHwDevice& ); - - private: // Data - - // The observer - MASRSGrCompilerHwDeviceObserver& iObserver; - - // Implementation-specific functions and data - CAsrsGrCompilerAlgorithm *iAlgorithm; - - // Has Initialize() been called - TBool iIsInitialised; - - // Reserved pointer for future extension. - TAny* iReserved; - }; - -#endif // ASRSGRCOMPILERHWDEVICE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/group/bld.inf --- a/srsfenginestub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for all SRSF hardware device stubs. -* -*/ - - - - - -#include -#include "srsfenginestubbldvariant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS -../rom/srsfenginestub.iby CORE_IBY_EXPORT_PATH(stubs, srsfenginestub.iby) - -PRJ_MMPFILES -../grcompilerhwdevice/group/asrsgrcompilerhwdevicestub.mmp -../ttphwdevice/group/asrsttphwdevicestub.mmp -../recognitionhwdevice/group/asrsrecognitionhwdevicestub.mmp -../adaptationhwdevice/group/asradaptationhwdevicestub.mmp -../vocmanhwdevice/group/asrvocmanhwdevicestub.mmp -../ttshwdevice/group/ttshwdevicestub.mmp -../nlphwdevice/group/asrsnlphwdevicestub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/group/srsfenginestubbldvariant.hrh --- a/srsfenginestub/group/srsfenginestubbldvariant.hrh Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Flags for SRSFEngineStub build -* -*/ - - - - - -#ifndef SRSFENGINESTUBBLDVARIANT_HRH -#define SRSFENGINESTUBBLDVARIANT_HRH - -// Define these flags in ProductVariant.hrh if non-default configuration is needed - -#endif // SRSFENGINESTUBBLDVARIANT - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/layers.sysdef.xml --- a/srsfenginestub/layers.sysdef.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - -]> - - - - - - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/nlphwdevice/bwins/asrsnlphwdeviceu.def --- a/srsfenginestub/nlphwdevice/bwins/asrsnlphwdeviceu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -EXPORTS - ??1CASRSHwDevice@@UAE@XZ @ 1 NONAME ; CASRSHwDevice::~CASRSHwDevice(void) - ??1CNlpHwDevice@@UAE@XZ @ 2 NONAME ; CNlpHwDevice::~CNlpHwDevice(void) - ?Clear@CASRSHwDevice@@UAEXXZ @ 3 NONAME ; void CASRSHwDevice::Clear(void) - ?CustomInterface@CASRSHwDevice@@UAEPAXVTUid@@@Z @ 4 NONAME ; void * CASRSHwDevice::CustomInterface(class TUid) - ?InitializeL@CASRSHwDevice@@UAEXXZ @ 5 NONAME ; void CASRSHwDevice::InitializeL(void) - ?IsLanguageSupported@CNlpHwDevice@@QAEHW4TLanguage@@@Z @ 6 NONAME ; int CNlpHwDevice::IsLanguageSupported(enum TLanguage) - ?NewL@CASRSHwDevice@@SAPAV1@XZ @ 7 NONAME ; class CASRSHwDevice * CASRSHwDevice::NewL(void) - ?NewL@CNlpHwDevice@@SAPAV1@AAVMNlpHwDeviceObserver@@@Z @ 8 NONAME ; class CNlpHwDevice * CNlpHwDevice::NewL(class MNlpHwDeviceObserver &) - ?NormalizeAndSegmentTextL@CNlpHwDevice@@QAEXAAVCTtsParsedText@@@Z @ 9 NONAME ; void CNlpHwDevice::NormalizeAndSegmentTextL(class CTtsParsedText &) - ?NormalizeTextL@CNlpHwDevice@@QAEXAAVCTtsParsedText@@@Z @ 10 NONAME ; void CNlpHwDevice::NormalizeTextL(class CTtsParsedText &) - ?NormalizeAndSegmentTextAsyncL@CNlpHwDevice@@QAEXAAVCTtsParsedText@@@Z @ 11 NONAME ; void CNlpHwDevice::NormalizeAndSegmentTextAsyncL(class CTtsParsedText &) - ?NormalizeTextAsyncL@CNlpHwDevice@@QAEXAAVCTtsParsedText@@@Z @ 12 NONAME ; void CNlpHwDevice::NormalizeTextAsyncL(class CTtsParsedText &) - diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/nlphwdevice/eabi/asrsnlphwdeviceu.def --- a/srsfenginestub/nlphwdevice/eabi/asrsnlphwdeviceu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -EXPORTS - _ZN12CNlpHwDevice14NormalizeTextLER14CTtsParsedText @ 1 NONAME - _ZN12CNlpHwDevice19IsLanguageSupportedE9TLanguage @ 2 NONAME - _ZN12CNlpHwDevice24NormalizeAndSegmentTextLER14CTtsParsedText @ 3 NONAME - _ZN12CNlpHwDevice4NewLER20MNlpHwDeviceObserver @ 4 NONAME - _ZN12CNlpHwDeviceD0Ev @ 5 NONAME - _ZN12CNlpHwDeviceD1Ev @ 6 NONAME - _ZN12CNlpHwDeviceD2Ev @ 7 NONAME - _ZN13CASRSHwDevice11InitializeLEv @ 8 NONAME - _ZN13CASRSHwDevice15CustomInterfaceE4TUid @ 9 NONAME - _ZN13CASRSHwDevice4NewLEv @ 10 NONAME - _ZN13CASRSHwDevice5ClearEv @ 11 NONAME - _ZN13CASRSHwDeviceD0Ev @ 12 NONAME - _ZN13CASRSHwDeviceD1Ev @ 13 NONAME - _ZN13CASRSHwDeviceD2Ev @ 14 NONAME - _ZTI12CNlpHwDevice @ 15 NONAME ; ## - _ZTI13CASRSHwDevice @ 16 NONAME ; ## - _ZTV12CNlpHwDevice @ 17 NONAME ; ## - _ZTV13CASRSHwDevice @ 18 NONAME ; ## - _ZN12CNlpHwDevice19NormalizeTextAsyncLER14CTtsParsedText @ 19 NONAME - _ZN12CNlpHwDevice29NormalizeAndSegmentTextAsyncLER14CTtsParsedText @ 20 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/nlphwdevice/group/asrsnlphwdevicestub.mmp --- a/srsfenginestub/nlphwdevice/group/asrsnlphwdevicestub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for AsrsNlpHwDeviceStub -* -*/ - - - - -#include - -#if defined( WINS ) || defined( WINSCW ) -TARGET asrsnlphwdevice.dll -#else -TARGET asrsnlphwdevice_stub.dll -#endif - -TARGETTYPE DLL -UID 0x1000008D 0x10201AF3 // UID: 270539507 - -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE asrsnlphwdevice.cpp - -SOURCEPATH ../../common/src -SOURCE asrshwdevice.cpp - -USERINCLUDE ../inc ../src -USERINCLUDE ../../common/src - -// This is a SYSTEMINCLUDE macro containing the middleware -// layer specific include directories -APP_LAYER_SYSTEMINCLUDE - -SYSTEMINCLUDE ../../common/inc - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY asrsnlphwdevice.lib - -// On ROM dll name is without the _stub part so that it can easily be -// replaced with the real dll -LINKAS asrsnlphwdevice.dll - -CAPABILITY CAP_GENERAL_DLL - - - diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/nlphwdevice/group/bld.inf --- a/srsfenginestub/nlphwdevice/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for AsrsNlpHwDeviceStub -* -*/ - - - - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -asrsnlphwdevicestub.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/nlphwdevice/src/asrsnlphwdevice.cpp --- a/srsfenginestub/nlphwdevice/src/asrsnlphwdevice.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,139 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: HW device stub of NLP -* -*/ - - - - - -// INCLUDE FILES -#include "asrsnlphwdevice.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CNlpHwDevice::CNlpHwDevice -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CNlpHwDevice::CNlpHwDevice(): - iAlgorithm( NULL ), - iReserved( NULL ) - { - // nothing - } - -// ----------------------------------------------------------------------------- -// CNlpHwDevice::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CNlpHwDevice::ConstructL( MNlpHwDeviceObserver& /*aObserver*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CNlpHwDevice::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CNlpHwDevice* CNlpHwDevice::NewL( MNlpHwDeviceObserver& aObserver ) - { - CNlpHwDevice* self = new( ELeave ) CNlpHwDevice; - - CleanupStack::PushL( self ); - self->ConstructL( aObserver); - CleanupStack::Pop(); - - return self; - } - -// ----------------------------------------------------------------------------- -// CNlpHwDevice::~CNlpHwDevice -// Destructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CNlpHwDevice::~CNlpHwDevice() - { - } - -// ----------------------------------------------------------------------------- -// CNlpHwDevice::IsLanguageSupported -// Tells if given language is supported by NLP module or not. -// ----------------------------------------------------------------------------- -// -EXPORT_C TBool CNlpHwDevice::IsLanguageSupported( TLanguage /*aLanguage*/ ) - { - return EFalse; - } - -// ----------------------------------------------------------------------------- -// CNlpHwDevice::NormalizeTextL -// Processes text. -// ----------------------------------------------------------------------------- -// -EXPORT_C void CNlpHwDevice::NormalizeTextL( CTtsParsedText& /*aText*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CNlpHwDevice::NormalizeAndSegmentTextL -// Processes text and divides it to segments. -// ----------------------------------------------------------------------------- -// -EXPORT_C void CNlpHwDevice::NormalizeAndSegmentTextL( CTtsParsedText& /*aText*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CNlpHwDevice::NormalizeTextL -// Processes text. -// ----------------------------------------------------------------------------- -// -EXPORT_C void CNlpHwDevice::NormalizeTextAsyncL( CTtsParsedText& /*aText*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CNlpHwDevice::NormalizeAndSegmentTextL -// Processes text and divides it to segments. -// ----------------------------------------------------------------------------- -// -EXPORT_C void CNlpHwDevice::NormalizeAndSegmentTextAsyncL( CTtsParsedText& /*aText*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// ----------------------------------------------------------------------------- -// for DLL goodness -// ----------------------------------------------------------------------------- -// - -#ifndef EKA2 -GLDEF_C TInt E32Dll( TDllReason ) -{ - return KErrNone; -} -#endif - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/nlphwdevice/src/asrsnlphwdevice.h --- a/srsfenginestub/nlphwdevice/src/asrsnlphwdevice.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,171 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Algorithms for text normalization -* -*/ - - - - - -#ifndef NLPHWDEVICE_H -#define NLPHWDEVICE_H - -// INCLUDES -#include -#include -#include -#include - -// FORWARD DECLARATIONS -class CNlpAlgorithm; - -// CLASS DECLARATION -/** -* Class to define callback functions -* -* @lib asrsttshwdevice.lib -* @since 3.0 -*/ -class MNlpHwDeviceObserver - { - public: // New functions - - /** - * Called by the HW device when the asynchronous text processing - * has been completed. - * @since 3.0 - * @param aStatus Error code, KErrNone if success - * @return none - */ - virtual void MnhdoNlpCompleted( TInt aStatus ) = 0; - - - /** - * Invoked by Nlp Hw Device when it needs a configuration data package. - * @since 3.0 - * @param aPackageType Type identifier. - * @param aPackageID Identifier of package - * @param aStartPosition Start index in bytes - * @param aEndPosition End index in bytes. If the position is bigger - * than the size of data package, the end part will be returned. - * @return Data package in a buffer - */ - virtual HBufC8* MnhdoConfigurationData( TUint32 aPackageType, - TUint32 aPackageID, - TUint32 aStartPosition = 0, - TUint32 aEndPosition = KMaxTUint32 - ) = 0; - - - /** - * Returns style given the style id. - * @since 3.0 - * @param aStyleID The style id. - * @return A reference to TTtsStyle. - */ - virtual const TTtsStyle& MnhdoStyleL( TTtsStyleID aStyleID ) = 0; - - }; - - -/** -* Class to provide text normalization -* -* @lib asrsnlphwdevice.lib -* @since 3.0 -*/ -class CNlpHwDevice : public CASRSHwDevice - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @param aObserver Observer which implements callback functions. - * @param aSamplingRate Sampling rate for output audio - * @param aBufferSize Buffer size for output audio - */ - IMPORT_C static CNlpHwDevice* NewL( MNlpHwDeviceObserver& aObserver ); - - /** - * Destructor. - */ - IMPORT_C virtual ~CNlpHwDevice(); - - public: // New functions - - /** - * Ask if a language is supported or not. - * @since 3.0 - * @param aLanguage Synthesizing language. - * @return ETrue language is supported otherwise EFalse - */ - IMPORT_C TBool IsLanguageSupported( TLanguage aLanguage ); - - - /** - * Normalize given text, text is not splits into segments. - * @since 3.0 - * @param aText - */ - IMPORT_C void NormalizeTextL( CTtsParsedText& aText ); - - - /** - * Normalize given text asynchronously, text is not splits into segments. - * @since 3.0 - * @param aText - */ - IMPORT_C void NormalizeTextAsyncL( CTtsParsedText& aText ); - - - /** - * Normalize given text, text is split into segments - * @since 3.0 - * @param aText - */ - IMPORT_C void NormalizeAndSegmentTextL( CTtsParsedText& aText ); - - /** - * Normalize given text asynchronously, text is split into segments - * @since 3.0 - * @param aText - */ - IMPORT_C void NormalizeAndSegmentTextAsyncL( CTtsParsedText& aText ); - - private: - - /** - * C++ default constructor. - */ - CNlpHwDevice(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL( MNlpHwDeviceObserver& aObserver ); - - private: // Data - - // Actual algorithm where all processing happens - CNlpAlgorithm* iAlgorithm; - - // Reserved pointer for future extension - TAny* iReserved; - - }; - -#endif // NLPHWDEVICE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/recognitionhwdevice/bwins/asrsrecognitionhwdeviceu.def --- a/srsfenginestub/recognitionhwdevice/bwins/asrsrecognitionhwdeviceu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -EXPORTS - ??1CASRSHwDevice@@UAE@XZ @ 1 NONAME ; CASRSHwDevice::~CASRSHwDevice(void) - ??1CASRSRecognitionHwDevice@@UAE@XZ @ 2 NONAME ; CASRSRecognitionHwDevice::~CASRSRecognitionHwDevice(void) - ?Clear@CASRSHwDevice@@UAEXXZ @ 3 NONAME ; void CASRSHwDevice::Clear(void) - ?Clear@CASRSRecognitionHwDevice@@UAEXXZ @ 4 NONAME ; void CASRSRecognitionHwDevice::Clear(void) - ?CustomInterface@CASRSHwDevice@@UAEPAXVTUid@@@Z @ 5 NONAME ; void * CASRSHwDevice::CustomInterface(class TUid) - ?CustomInterface@CASRSRecognitionHwDevice@@UAEPAXVTUid@@@Z @ 6 NONAME ; void * CASRSRecognitionHwDevice::CustomInterface(class TUid) - ?GetRejection@CASRSRecognitionHwDevice@@QAEKXZ @ 7 NONAME ; unsigned long CASRSRecognitionHwDevice::GetRejection(void) - ?InitRecognizerBEL@CASRSRecognitionHwDevice@@QAEXABVTDesC8@@ABVCSIModelBank@@@Z @ 8 NONAME ; void CASRSRecognitionHwDevice::InitRecognizerBEL(class TDesC8 const &, class CSIModelBank const &) - ?InitRecognizerFEL@CASRSRecognitionHwDevice@@QAEXH@Z @ 9 NONAME ; void CASRSRecognitionHwDevice::InitRecognizerFEL(int) - ?InitializeL@CASRSHwDevice@@UAEXXZ @ 10 NONAME ; void CASRSHwDevice::InitializeL(void) - ?InitializeL@CASRSRecognitionHwDevice@@UAEXXZ @ 11 NONAME ; void CASRSRecognitionHwDevice::InitializeL(void) - ?NewL@CASRSHwDevice@@SAPAV1@XZ @ 12 NONAME ; class CASRSHwDevice * CASRSHwDevice::NewL(void) - ?NewL@CASRSRecognitionHwDevice@@SAPAV1@AAVMASRSRecognitionHwDeviceObserver@@@Z @ 13 NONAME ; class CASRSRecognitionHwDevice * CASRSRecognitionHwDevice::NewL(class MASRSRecognitionHwDeviceObserver &) - ?SendSpeechData@CASRSRecognitionHwDevice@@QAEXAAVTPtrC8@@H@Z @ 14 NONAME ; void CASRSRecognitionHwDevice::SendSpeechData(class TPtrC8 &, int) - ?SetNBest@CASRSRecognitionHwDevice@@QAEXK@Z @ 15 NONAME ; void CASRSRecognitionHwDevice::SetNBest(unsigned long) - ?SetRejection@CASRSRecognitionHwDevice@@QAEXK@Z @ 16 NONAME ; void CASRSRecognitionHwDevice::SetRejection(unsigned long) - ?StartRecognitionL@CASRSRecognitionHwDevice@@QAEXAAV?$RArray@I@@AAV?$RArray@H@@@Z @ 17 NONAME ; void CASRSRecognitionHwDevice::StartRecognitionL(class RArray &, class RArray &) - ?StopRecognition@CASRSRecognitionHwDevice@@QAEXXZ @ 18 NONAME ; void CASRSRecognitionHwDevice::StopRecognition(void) - diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/recognitionhwdevice/eabi/asrsrecognitionhwdeviceu.def --- a/srsfenginestub/recognitionhwdevice/eabi/asrsrecognitionhwdeviceu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -EXPORTS - _ZN13CASRSHwDevice11InitializeLEv @ 1 NONAME - _ZN13CASRSHwDevice15CustomInterfaceE4TUid @ 2 NONAME - _ZN13CASRSHwDevice4NewLEv @ 3 NONAME - _ZN13CASRSHwDevice5ClearEv @ 4 NONAME - _ZN13CASRSHwDeviceD0Ev @ 5 NONAME - _ZN13CASRSHwDeviceD1Ev @ 6 NONAME - _ZN13CASRSHwDeviceD2Ev @ 7 NONAME - _ZN24CASRSRecognitionHwDevice11InitializeLEv @ 8 NONAME - _ZN24CASRSRecognitionHwDevice12GetRejectionEv @ 9 NONAME - _ZN24CASRSRecognitionHwDevice12SetRejectionEm @ 10 NONAME - _ZN24CASRSRecognitionHwDevice14SendSpeechDataER6TPtrC8i @ 11 NONAME - _ZN24CASRSRecognitionHwDevice15CustomInterfaceE4TUid @ 12 NONAME - _ZN24CASRSRecognitionHwDevice15StopRecognitionEv @ 13 NONAME - _ZN24CASRSRecognitionHwDevice17InitRecognizerBELERK6TDesC8RK12CSIModelBank @ 14 NONAME - _ZN24CASRSRecognitionHwDevice17InitRecognizerFELEi @ 15 NONAME - _ZN24CASRSRecognitionHwDevice17StartRecognitionLER6RArrayIjERS0_IiE @ 16 NONAME - _ZN24CASRSRecognitionHwDevice4NewLER32MASRSRecognitionHwDeviceObserver @ 17 NONAME - _ZN24CASRSRecognitionHwDevice5ClearEv @ 18 NONAME - _ZN24CASRSRecognitionHwDevice8SetNBestEm @ 19 NONAME - _ZN24CASRSRecognitionHwDeviceD0Ev @ 20 NONAME - _ZN24CASRSRecognitionHwDeviceD1Ev @ 21 NONAME - _ZN24CASRSRecognitionHwDeviceD2Ev @ 22 NONAME - _ZTI13CASRSHwDevice @ 23 NONAME ; ## - _ZTI24CASRSRecognitionHwDevice @ 24 NONAME ; ## - _ZTV13CASRSHwDevice @ 25 NONAME ; ## - _ZTV24CASRSRecognitionHwDevice @ 26 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/recognitionhwdevice/group/asrsrecognitionhwdevicestub.mmp --- a/srsfenginestub/recognitionhwdevice/group/asrsrecognitionhwdevicestub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for recognition algorithm stub. -* -*/ - - - - -#include - -#if defined( WINS ) || defined( WINSCW ) -TARGET asrsrecognitionhwdevice.dll -#else -TARGET asrsrecognitionhwdevice_stub.dll -#endif - -TARGETTYPE DLL -UID 0x1000008D 0x101FF92F // 270530863 - -VENDORID VID_DEFAULT - -SOURCEPATH ../src - -SOURCE asrsrecognitionhwdevice.cpp - -SOURCEPATH ../../common/src -SOURCE asrshwdevice.cpp - -USERINCLUDE ../inc ../src - -// This is a SYSTEMINCLUDE macro containing the middleware -// layer specific include directories -APP_LAYER_SYSTEMINCLUDE - -SYSTEMINCLUDE ../../common/inc - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY asrsrecognitionhwdevice.lib - -// On ROM dll name is without the _stub part so that it can easily be -// replaced with the real dll -LINKAS asrsrecognitionhwdevice.dll - -CAPABILITY CAP_GENERAL_DLL diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/recognitionhwdevice/group/bld.inf --- a/srsfenginestub/recognitionhwdevice/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information for recognition algorithm stub. -* -*/ - - - - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -asrsrecognitionhwdevicestub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/recognitionhwdevice/src/asrsrecognitionhwdevice.cpp --- a/srsfenginestub/recognitionhwdevice/src/asrsrecognitionhwdevice.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,204 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Recognition HW device -* -*/ - - - - - -// INCLUDE FILES -#include "asrsrecognitionhwdevice.h" -#include - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::CASRSRecognitionHwDevice -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CASRSRecognitionHwDevice::CASRSRecognitionHwDevice() - : iRecAlgorithm( NULL ), - iReserved( NULL ) - { - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CASRSRecognitionHwDevice::ConstructL( - MASRSRecognitionHwDeviceObserver& /*aObserver*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSRecognitionHwDevice* CASRSRecognitionHwDevice::NewL( - MASRSRecognitionHwDeviceObserver& aObserver ) - { - CASRSRecognitionHwDevice* self = new( ELeave ) CASRSRecognitionHwDevice; - - CleanupStack::PushL( self ); - self->ConstructL( aObserver ); - CleanupStack::Pop(); - - return self; - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::~CASRSRecognitionHwDevice -// Destructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSRecognitionHwDevice::~CASRSRecognitionHwDevice() - { - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::InitRecognizerBEL -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSRecognitionHwDevice::InitRecognizerBEL( - const TDesC8& /*aRecognitionData*/, - const CSIModelBank& /*aModels*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::InitRecognizerFEL -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSRecognitionHwDevice::InitRecognizerFEL( - TBool /*aSendFeatureVectors*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::SetNBest -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSRecognitionHwDevice::SetNBest( - TUint32 /*aNBest*/ ) - { - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::StartRecognitionL -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSRecognitionHwDevice::StartRecognitionL( - RArray& /*aNBestList*/, - RArray& /*aScore*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::StopRecognition -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSRecognitionHwDevice::StopRecognition() - { - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::SendSpeechData -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSRecognitionHwDevice::SendSpeechData( - TPtrC8& /*aBuffer*/, - TBool /*aEnd*/ ) - { - } - - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::InitializeL -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSRecognitionHwDevice::InitializeL() - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::Clear -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSRecognitionHwDevice::Clear() - { - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::CustomInterface -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TAny* CASRSRecognitionHwDevice::CustomInterface( - TUid /*aInterfaceId*/ ) - { - return NULL; - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::SetRejection -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSRecognitionHwDevice::SetRejection( TUint32 /*aRejection*/ ) - { - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::GetRejection -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TUint32 CASRSRecognitionHwDevice::GetRejection() - { - return 0; - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/recognitionhwdevice/src/asrsrecognitionhwdevice.h --- a/srsfenginestub/recognitionhwdevice/src/asrsrecognitionhwdevice.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,254 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: HW Device for speech recognition -* -*/ - - - - - - -#ifndef ASRSRECOGNITIONHWDEVICE_H -#define ASRSRECOGNITIONHWDEVICE_H - -// INCLUDES -#include - -// FORWARD DECLARATIONS -class CSDModelBank; -class CSIModelBank; -class CRecognitionAlgorithm; - -// CLASS DECLARATION -/** -* Observer for recognition HW device -* -* @lib asrsrecognitionhwdevice.lib -* @since 2.8 -*/ -class MASRSRecognitionHwDeviceObserver - { - - public: // New functions - - /** - * Called by the hardware device when the InitializeL() method has completed. - * @since 2.8 - * @param aError Initialization result code. - * KErrNone if successful otherwise a system-wide error code. - * @return none - */ - virtual void MarhdoInitializationComplete( TInt aError ) = 0; - - /** - * Called by the hardware device when the InitializeL() method has completed. - * @since 2.8 - * @param aError Initialization result code. - * KErrNone if successful otherwise a system-wide error code. - * @return none - */ - virtual void MarhdoInitRecognizerFEComplete( TInt aError ) = 0; - - /** - * Called by the hardware device when backend initialization is completed. - * @since 2.8 - * @param aError Initialization result code. - * KErrNone if successful otherwise a system-wide error code. - * @return none - */ - virtual void MarhdoInitRecognizerBEComplete( TInt aError ) = 0; - - /** - * Called by the hardware device when recognition result is available. - * @since 2.8 - * @param aError Recognition result code. KErrNone if successful. - * KErrRejected if the recognition result is rejected, - * otherwise a system-wide error code - * @return none - */ - virtual void MarhdoRecognitionComplete( TInt aError ) = 0; - - /** - * Called by the hardware device when end-of-utterance is detected by the - * acoustic frontend. This method must be called before MarhdoRecognitionComplete(). - * @since 2.8 - * @param aError Recognition result code. KErrNone if successful, otherwise KErrTooLong, - * KErrTooShort, KErrAsrSpeechTooEarly, KErrNoSpeech - * @return none - */ - virtual void MarhdoEouDetected( TInt aError ) = 0; - - /** - * Called by the hardware device when a feature vector is extracted by acoustic frontend. - * @since 2.8 - * @param aFV A buffer containing a feature vector. - * @param aSNR Signal-to-noise ratio. - * @param aPosition Indicates whether this is the first, subsequent or last feature vector in a series. - * @return none - */ - virtual void MarhdoFeatureVector( const TDesC8& aFV, TInt32 aSNR, TInt32 aPosition ) = 0; - - /** - * Called by the hardware device to request for utterance data. - * The response to the request is sent in SendSpeechData(). - * @since 2.8 - * @param none - * @return none - */ - virtual void MarhdoRequestSpeechData () = 0; - }; - -/** -* Recognition HW Device -* -* @lib asrsrecognitionhwdevice.lib -* @since 2.8 -*/ -class CASRSRecognitionHwDevice : public CASRSHwDevice - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CASRSRecognitionHwDevice* NewL( MASRSRecognitionHwDeviceObserver& aObserver ); - - /** - * Destructor. - */ - IMPORT_C virtual ~CASRSRecognitionHwDevice(); - - public: // New functions - - /** - * This method initializes the backend of the recognition Hw device. - * @since 2.8 - * @param aRecognitionData A recognition data generated by grammar compilation. - * @param aModels A model bank containing acoustic models - * @return none - */ - IMPORT_C void InitRecognizerBEL( const TDesC8& aRecognitionData, - const CSIModelBank& aModels ); - - /** - * This method initialize the frontend of the recognition Hwdevice - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void InitRecognizerFEL( TBool aSendFeatureVectors = EFalse ); - - /** - * Sets the maximum number of entries wanted in the ranked list of recognition results. - * @since 2.8 - * @param aNBest The n-best number. - * @return none - */ - IMPORT_C void SetNBest( TUint32 aNBest ); - - /** - * Sets the rejection threshold. - * @since 3.2 - * @param aRejection Rejection threshold value. - * @return none - */ - IMPORT_C void SetRejection( TUint32 aRejection ); - - /** - * Gets the rejection threshold. - * @since 2.8 - * @param none - * @return Rejection threshold value. - */ - IMPORT_C TUint32 GetRejection(); - - /** - * Start recognition - * @since 2.8 - * @param aNBestList At the end of recognition, this object will contain Nbest list IDs. - * @param aScore At the end of recognition, this object will contain scores for Nbest list. - * @param aSendFeatureVectors ETrue send feature vector to client, EFalse do not send feature vector to client. - * @return none - */ - IMPORT_C void StartRecognitionL( RArray& aNBestList, RArray& aScore ); - - /** - * Stop a started recognition process. - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void StopRecognition(); - - /** - * Use to send utterance data - * @since 2.8 - * @param aBuffer Buffer containing utterance data. - * @param aEnd End of utterance data indicator. ETrue indicates end of data or no data. - * @return none - */ - IMPORT_C void SendSpeechData( TPtrC8& aBuffer, TBool aEnd ); - - public: // Functions from base classes - - /** - * From CASRSHwDevice Use to initilize HW device - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C virtual void InitializeL(); - - /** - * From CASRSHwDevice Use to clear HW device - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C virtual void Clear(); - - /** - * From CASRSHwDevice Use to get custom interface - * @since 2.8 - * @param aInterfaceId Identifier of the intercace implementation - * @return Pointer to the interface implementation or NULL. - */ - IMPORT_C virtual TAny* CustomInterface( TUid aInterfaceId ); - - private: - - /** - * C++ default constructor. - */ - CASRSRecognitionHwDevice(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL( MASRSRecognitionHwDeviceObserver& aObserver ); - - private: // Data - - // Actual implementation of recognition - CRecognitionAlgorithm* iRecAlgorithm; - - // Reserved pointer for future extension - TAny* iReserved; - - }; - -#endif // ASRSRECOGNITIONHWDEVICE - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/rom/srsfenginestub.iby --- a/srsfenginestub/rom/srsfenginestub.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - -#ifndef __SRSFENGINESTUB_IBY__ -#define __SRSFENGINESTUB_IBY__ - -#ifdef __SIND - -file=ABI_DIR\BUILD_DIR\asrsadaptationhwdevice_stub.dll SHARED_LIB_DIR\asrsadaptationhwdevice.dll -file=ABI_DIR\BUILD_DIR\asrsgrcompilerhwdevice_stub.dll SHARED_LIB_DIR\asrsgrcompilerhwdevice.dll -file=ABI_DIR\BUILD_DIR\asrsrecognitionhwdevice_stub.dll SHARED_LIB_DIR\asrsrecognitionhwdevice.dll -file=ABI_DIR\BUILD_DIR\asrsttphwdevice_stub.dll SHARED_LIB_DIR\asrsttphwdevice.dll -file=ABI_DIR\BUILD_DIR\asrsttshwdevice_stub.dll SHARED_LIB_DIR\asrsttshwdevice.dll -file=ABI_DIR\BUILD_DIR\asrsvocmanhwdevice_stub.dll SHARED_LIB_DIR\asrsvocmanhwdevice.dll -// New addition starting from 3.1 -file=ABI_DIR\BUILD_DIR\asrsnlphwdevice_stub.dll SHARED_LIB_DIR\asrsnlphwdevice.dll - -#endif // __SIND - -#endif // __SRSFENGINESTUB_IBY__ diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/sysdef_1_4_0.dtd --- a/srsfenginestub/sysdef_1_4_0.dtd Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/ttphwdevice/bwins/asrsttphwdeviceu.def --- a/srsfenginestub/ttphwdevice/bwins/asrsttphwdeviceu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -EXPORTS - ??1CASRSHwDevice@@UAE@XZ @ 1 NONAME ; CASRSHwDevice::~CASRSHwDevice(void) - ??1CASRSTtpHwDevice@@UAE@XZ @ 2 NONAME ; CASRSTtpHwDevice::~CASRSTtpHwDevice(void) - ?CancelWordListConversion@CASRSTtpHwDevice@@QAEXXZ @ 3 NONAME ; void CASRSTtpHwDevice::CancelWordListConversion(void) - ?Clear@CASRSHwDevice@@UAEXXZ @ 4 NONAME ; void CASRSHwDevice::Clear(void) - ?Clear@CASRSTtpHwDevice@@UAEXXZ @ 5 NONAME ; void CASRSTtpHwDevice::Clear(void) - ?ConvertTextL@CASRSTtpHwDevice@@QAEPAVHBufC8@@ABVTDesC16@@AAW4TLanguage@@@Z @ 6 NONAME ; class HBufC8 * CASRSTtpHwDevice::ConvertTextL(class TDesC16 const &, enum TLanguage &) - ?ConvertWordListL@CASRSTtpHwDevice@@QAEXAAVCSITtpWordList@@V?$RArray@W4TLanguage@@@@V?$RArray@K@@@Z @ 7 NONAME ; void CASRSTtpHwDevice::ConvertWordListL(class CSITtpWordList &, class RArray, class RArray) - ?CustomInterface@CASRSHwDevice@@UAEPAXVTUid@@@Z @ 8 NONAME ; void * CASRSHwDevice::CustomInterface(class TUid) - ?CustomInterface@CASRSTtpHwDevice@@UAEPAXVTUid@@@Z @ 9 NONAME ; void * CASRSTtpHwDevice::CustomInterface(class TUid) - ?InitializeL@CASRSHwDevice@@UAEXXZ @ 10 NONAME ; void CASRSHwDevice::InitializeL(void) - ?InitializeL@CASRSTtpHwDevice@@UAEXXZ @ 11 NONAME ; void CASRSTtpHwDevice::InitializeL(void) - ?NewL@CASRSHwDevice@@SAPAV1@XZ @ 12 NONAME ; class CASRSHwDevice * CASRSHwDevice::NewL(void) - ?NewL@CASRSTtpHwDevice@@SAPAV1@AAVMASRSTtpHwDeviceObserver@@@Z @ 13 NONAME ; class CASRSTtpHwDevice * CASRSTtpHwDevice::NewL(class MASRSTtpHwDeviceObserver &) - ?PhonemeNotation@CASRSTtpHwDevice@@QAEABVTDesC16@@XZ @ 14 NONAME ; class TDesC16 const & CASRSTtpHwDevice::PhonemeNotation(void) - ?SetPhonemeNotationL@CASRSTtpHwDevice@@QAEXABVTDesC16@@@Z @ 15 NONAME ; void CASRSTtpHwDevice::SetPhonemeNotationL(class TDesC16 const &) - ?LanguageIdentificationL@CASRSTtpHwDevice@@QAEXABVTDesC16@@HAAV?$RArray@W4TLanguage@@@@AAV?$RArray@H@@@Z @ 16 NONAME ; public: void __thiscall CASRSTtpHwDevice::LanguageIdentificationL(class TDesC16 const &,int,class RArray &,class RArray &) - diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/ttphwdevice/eabi/asrsttphwdeviceu.def --- a/srsfenginestub/ttphwdevice/eabi/asrsttphwdeviceu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -EXPORTS - _ZN13CASRSHwDevice11InitializeLEv @ 1 NONAME - _ZN13CASRSHwDevice15CustomInterfaceE4TUid @ 2 NONAME - _ZN13CASRSHwDevice4NewLEv @ 3 NONAME - _ZN13CASRSHwDevice5ClearEv @ 4 NONAME - _ZN13CASRSHwDeviceD0Ev @ 5 NONAME - _ZN13CASRSHwDeviceD1Ev @ 6 NONAME - _ZN13CASRSHwDeviceD2Ev @ 7 NONAME - _ZN16CASRSTtpHwDevice11InitializeLEv @ 8 NONAME - _ZN16CASRSTtpHwDevice12ConvertTextLERK7TDesC16R9TLanguage @ 9 NONAME - _ZN16CASRSTtpHwDevice15CustomInterfaceE4TUid @ 10 NONAME - _ZN16CASRSTtpHwDevice15PhonemeNotationEv @ 11 NONAME - _ZN16CASRSTtpHwDevice16ConvertWordListLER14CSITtpWordList6RArrayI9TLanguageES2_ImE @ 12 NONAME - _ZN16CASRSTtpHwDevice19SetPhonemeNotationLERK7TDesC16 @ 13 NONAME - _ZN16CASRSTtpHwDevice24CancelWordListConversionEv @ 14 NONAME - _ZN16CASRSTtpHwDevice4NewLER24MASRSTtpHwDeviceObserver @ 15 NONAME - _ZN16CASRSTtpHwDevice5ClearEv @ 16 NONAME - _ZN16CASRSTtpHwDeviceD0Ev @ 17 NONAME - _ZN16CASRSTtpHwDeviceD1Ev @ 18 NONAME - _ZN16CASRSTtpHwDeviceD2Ev @ 19 NONAME - _ZTI13CASRSHwDevice @ 20 NONAME ; ## - _ZTI16CASRSTtpHwDevice @ 21 NONAME ; ## - _ZTV13CASRSHwDevice @ 22 NONAME ; ## - _ZTV16CASRSTtpHwDevice @ 23 NONAME ; ## - _ZN16CASRSTtpHwDevice23LanguageIdentificationLERK7TDesC16iR6RArrayI9TLanguageERS3_IiE @ 24 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/ttphwdevice/group/asrsttphwdevicestub.mmp --- a/srsfenginestub/ttphwdevice/group/asrsttphwdevicestub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for AsrTtpHwDeviceStub. -* -*/ - - - - -#include -#include "../../group/srsfenginestubbldvariant.hrh" - -#if defined( WINS ) || defined( WINSCW ) -TARGET asrsttphwdevice.dll -#else -TARGET asrsttphwdevice_stub.dll -#endif - -TARGETTYPE DLL -UID 0x1000008D 0x101F8CA9 // UID: 270503081 - -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE asrsttphwdevice.cpp - -SOURCEPATH ../../common/src -SOURCE asrshwdevice.cpp - -USERINCLUDE ../inc ../src ../../group - -// This is a SYSTEMINCLUDE macro containing the middleware -// layer specific include directories -APP_LAYER_SYSTEMINCLUDE - -SYSTEMINCLUDE ../../common/inc - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY asrsttphwdevice.lib - -// On ROM dll name is without the _stub part so that it can easily be -// replaced with the real dll -LINKAS asrsttphwdevice.dll - -CAPABILITY CAP_GENERAL_DLL diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/ttphwdevice/group/bld.inf --- a/srsfenginestub/ttphwdevice/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for AsrsTtpHwDeviceStub -* -*/ - - - - - -#include "../../Group/SRSFEngineStubBldVariant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -asrsttphwdevicestub.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/ttphwdevice/src/asrsttphwdevice.cpp --- a/srsfenginestub/ttphwdevice/src/asrsttphwdevice.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,219 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: TTP hardware device stub. -* -*/ - - - - - -// INCLUDE FILES -#include "srsfenginestubbldvariant.hrh" -#include "asrsttphwdevice.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::CASRSTtpHwDevice -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CASRSTtpHwDevice::CASRSTtpHwDevice( MASRSTtpHwDeviceObserver& aObserver ) : - iObserver( aObserver ), - iTTPAlgorithm( NULL ), - iTTPAlgObserver( NULL ) - { - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CASRSTtpHwDevice::ConstructL() - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSTtpHwDevice* CASRSTtpHwDevice::NewL( MASRSTtpHwDeviceObserver& aObserver ) - { - CASRSTtpHwDevice* self = new( ELeave ) CASRSTtpHwDevice( aObserver ); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::~CASRSTtpHwDevice -// Destructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSTtpHwDevice::~CASRSTtpHwDevice() - { - } - - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::InitializeL -// Initialize TTP module -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSTtpHwDevice::InitializeL() - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::ConvertTextL -// Perform TTP for text. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C HBufC8* CASRSTtpHwDevice::ConvertTextL( const TDesC& /*aText*/, - TLanguage& /*aLanguage*/ ) - { - User::Leave( KErrNotSupported ); - return NULL; - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::ConvertWordListL -// Perform TTP for word list. Asynchronous. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSTtpHwDevice::ConvertWordListL( CSITtpWordList& /*aWordList*/, - const RArray /*aDefaultLanguage*/, - const RArray /*aMaxNPronunsForWord*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::CancelWordListConversion -// Cancel TTP for word list. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSTtpHwDevice::CancelWordListConversion() - { - } - - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::SetPhonemeNotationL -// Sets the output phoneme notation. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSTtpHwDevice::SetPhonemeNotationL( const TDesC& /*aNotation*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::PhonemeNotation -// Returns the phoneme notation in use. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C const TDesC& CASRSTtpHwDevice::PhonemeNotation() - { - _LIT( KError, "Error" ); - return KError; - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::Clear -// Clears HW Device. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSTtpHwDevice::Clear() - { - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::CustomInterface -// Returns pointer to wanted custom interface. Returns NULL pointer if not found. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TAny* CASRSTtpHwDevice::CustomInterface( TUid /*aInterfaceId*/ ) - { - return NULL; - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::WordListReady -// Notify that word list is ready -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CASRSTtpHwDevice::WordListReady( const TInt /*aError*/ ) - { - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::ConfigurationData -// Notify that configuration data is needed. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -HBufC8* CASRSTtpHwDevice::ConfigurationData( TUint32 /*aPackageType*/, - TUint32 /*aPackageID*/, - TUint32 /*aStartPosition*/, - TUint32 /*aEndPosition*/ ) - { - return NULL; - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::LanguageIdentificationL -// Tries to guess the language of given text. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSTtpHwDevice::LanguageIdentificationL( const TDesC& /*aText*/, - TInt /*aNumberOfGuesses*/, - RArray& /*aLanguages*/, - RArray& /*aScores*/ ) - { - User::Leave( KErrNotSupported ); - } - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// For DLL goodness -#ifndef EKA2 -GLDEF_C TInt E32Dll( TDllReason /*aReason*/ ) - { - return KErrNone; - } -#endif - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/ttphwdevice/src/asrsttphwdevice.h --- a/srsfenginestub/ttphwdevice/src/asrsttphwdevice.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,237 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Exported interface towards TTP HW Device. -* -*/ - - - - - -#ifndef ASRSTTPHWDEVICE_H -#define ASRSTTPHWDEVICE_H - -// INCLUDES -// Base class for all HW Devices -#include -// SI Data -#include - -// FORWARD DECLARATIONS -class CTTPAlgorithm; -class CTtpCallback; - - -// CLASS DECLARATION - -/** -* Class which defines callback functions. Client must implement this in order -* to receive callbacks. -* -* @lib asrsttphwdevice.lib -*/ -class MASRSTtpHwDeviceObserver - { - public: // New functions - - /** - * Callback function to load configuration data. - * Client provides an implementation. - * - * @param aPackageType Type identifier. - * @param aPackageID Package identifier. - * @param aStartPosition First byte. - * @param aEndPosition Last byte. If greater than the size of - * the data, rest of the data is given. - * @return Pointer to the data buffer, TTP HW Device takes ownership. - */ - virtual HBufC8* MathdoConfigurationData( TUint32 aPackageType, TUint32 aPackageID, - TUint32 aStartPosition = 0, - TUint32 aEndPosition = KMaxTUint32 ) = 0; - - /** - * Callback function to notify that word list is converted. - * Client provides an implementation. - * - * @param aError Error code, KErrNone if successful. - */ - virtual void MathdoWordListReady( const TInt aError ) = 0; - }; - -/** -* TTP HW Device interface. -* -* @lib asrsttphwdevice.lib -*/ -class CASRSTtpHwDevice : public CASRSHwDevice - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * - * @param aObserver Reference to callback observer. - */ - IMPORT_C static CASRSTtpHwDevice* NewL( MASRSTtpHwDeviceObserver& aObserver ); - - /** - * Destructor. - */ - IMPORT_C virtual ~CASRSTtpHwDevice(); - - public: // New functions - - /** - * Use to convert text to phonemes. - * - * @param aText Text to be converted - * @param aLanguage Used language - * @return Phoneme sequence, client gains ownership - */ - IMPORT_C HBufC8* ConvertTextL( const TDesC& aText, - TLanguage& aLanguage ); - - /** - * Use to convert list of words to pronunciation sequences. - * - * @param aWordList Initialized word list to where - * pronunciations will be added. Client will keep the ownership - * of CSITtpWordList also after this call. - * @param aDefaultLanguage Language which overrides the first identified language. - * Iflanguage is ELangOther, language identification will be used. - * @param aMaxNPronunsForWord Maximum number of pronunciations (languages) for each word. - */ - IMPORT_C void ConvertWordListL( CSITtpWordList& aWordList, - const RArray aDefaultLanguage, - const RArray aMaxNPronunsForWord ); - - /** - * Use to cancel running word list conversion. - */ - IMPORT_C void CancelWordListConversion(); - - /** - * Sets the phoneme notation used in output. - * - * @param aNotation Phoneme notation identifier. - */ - IMPORT_C void SetPhonemeNotationL( const TDesC& aNotation ); - - /** - * Gets the current phoneme notation indentifier. - * - * @return Phoneme notation identifier. - */ - IMPORT_C const TDesC& PhonemeNotation(); - - public: // From CASRSHwDevice - - /** - * From CASRSHwDevice - * Custom interface - * - * @param aInterfaceId ID of wanted custom interface - * @return A pointer to the interface implementation, NULL if not found. - */ - IMPORT_C TAny* CustomInterface( TUid aInterfaceId ); - - /** - * From CASRSHwDevice - * Initializes Hw Device. - */ - IMPORT_C void InitializeL(); - - /** - * From CASRSHwDevice - * Clears Hw Device, counter part for InitializeL() - */ - IMPORT_C void Clear(); - - public: // New methods for SIND increment 3 - - /** - * Tries to identify the language of given text - * - * @param "const TDesC& aText" Text - * @param "TInt aNumberOfGuesses" Maximum number of guesses that will be provided - * @param "RArray& aLanguages" Output parameter, will contain list of guessed languages - * @param "RArray& aScores" Output parameter, scores - */ - IMPORT_C void LanguageIdentificationL( const TDesC& aText, - TInt aNumberOfGuesses, - RArray& aLanguages, - RArray& aScores ); - - private: - - /** - * C++ default constructor. - * @param aObserver Reference to observer. - */ - CASRSTtpHwDevice( MASRSTtpHwDeviceObserver& aObserver ); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - // Prohibit copy constructor if not deriving from CBase. - CASRSTtpHwDevice( const CASRSTtpHwDevice& ); - // Prohibit assigment operator if not deriving from CBase. - CASRSTtpHwDevice& operator=( const CASRSTtpHwDevice& ); - - /** - * Function to notify that word list is converted - * Called by CTtpCallback. - * - * @param aError Error code - */ - void WordListReady( const TInt aError ); - - /** - * Function to notify that configuration data is needed. - * Called by CTtpCallback. - * - * @param aPackageType Type identifier. - * @param aPackageID Package identifier. - * @param aStartPosition First byte. - * @param aEndPosition Last byte. If greater than the size of - * the data, rest of the data is given. - * @return Pointer to the data buffer. - */ - virtual HBufC8* ConfigurationData( TUint32 aPackageType, TUint32 aPackageID, - TUint32 aStartPosition = 0, - TUint32 aEndPosition = KMaxTUint32 ); - - private: // Data - // Observer - MASRSTtpHwDeviceObserver& iObserver; - - // algorithm implementation - CTTPAlgorithm* iTTPAlgorithm; - - // Implements call backs from CTTPAlgorithm - CTtpCallback* iTTPAlgObserver; - - // Reserved pointer for future extension - TAny* iReserved; - - private: // Friend classes - friend class CTtpCallback; - - }; - -#endif // ASRSTTPHWDEVICE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/ttshwdevice/bwins/asrsttshwdeviceu.def --- a/srsfenginestub/ttshwdevice/bwins/asrsttshwdeviceu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -EXPORTS - ??1CASRSHwDevice@@UAE@XZ @ 1 NONAME ; CASRSHwDevice::~CASRSHwDevice(void) - ??1CTtsHwDevice@@UAE@XZ @ 2 NONAME ; CTtsHwDevice::~CTtsHwDevice(void) - ?AddStyleL@CTtsHwDevice@@QAEKABVTTtsStyle@@@Z @ 3 NONAME ; unsigned long CTtsHwDevice::AddStyleL(class TTtsStyle const &) - ?AnalyzeProsodyL@CTtsHwDevice@@QAEXAAVCTtsParsedText@@@Z @ 4 NONAME ; void CTtsHwDevice::AnalyzeProsodyL(class CTtsParsedText &) - ?AnalyzeStructureL@CTtsHwDevice@@QAEXAAVCTtsParsedText@@@Z @ 5 NONAME ; void CTtsHwDevice::AnalyzeStructureL(class CTtsParsedText &) - ?BufferProcessed@CTtsHwDevice@@QAEXABVTDesC8@@@Z @ 6 NONAME ; void CTtsHwDevice::BufferProcessed(class TDesC8 const &) - ?Clear@CASRSHwDevice@@UAEXXZ @ 7 NONAME ; void CASRSHwDevice::Clear(void) - ?CustomInterface@CASRSHwDevice@@UAEPAXVTUid@@@Z @ 8 NONAME ; void * CASRSHwDevice::CustomInterface(class TUid) - ?DeleteStyleL@CTtsHwDevice@@QAEXK@Z @ 9 NONAME ; void CTtsHwDevice::DeleteStyleL(unsigned long) - ?GetPositionL@CTtsHwDevice@@QAEXAAVTTimeIntervalMicroSeconds@@@Z @ 10 NONAME ; void CTtsHwDevice::GetPositionL(class TTimeIntervalMicroSeconds &) - ?GetPositionL@CTtsHwDevice@@QAEXAAVTTtsSegment@@AAH@Z @ 11 NONAME ; void CTtsHwDevice::GetPositionL(class TTtsSegment &, int &) - ?InitializeL@CASRSHwDevice@@UAEXXZ @ 12 NONAME ; void CASRSHwDevice::InitializeL(void) - ?IsLanguageSupported@CTtsHwDevice@@QAEHW4TLanguage@@@Z @ 13 NONAME ; int CTtsHwDevice::IsLanguageSupported(enum TLanguage) - ?NewL@CASRSHwDevice@@SAPAV1@XZ @ 14 NONAME ; class CASRSHwDevice * CASRSHwDevice::NewL(void) - ?NewL@CTtsHwDevice@@SAPAV1@AAVMTtsHwDeviceObserver@@II@Z @ 15 NONAME ; class CTtsHwDevice * CTtsHwDevice::NewL(class MTtsHwDeviceObserver &, unsigned int, unsigned int) - ?NumberOfStyles@CTtsHwDevice@@QBEGXZ @ 16 NONAME ; unsigned short CTtsHwDevice::NumberOfStyles(void) const - ?Pause@CTtsHwDevice@@QAEXXZ @ 17 NONAME ; void CTtsHwDevice::Pause(void) - ?PrimeSynthesisL@CTtsHwDevice@@QAEXAAVCTtsParsedText@@@Z @ 18 NONAME ; void CTtsHwDevice::PrimeSynthesisL(class CTtsParsedText &) - ?PrimeSynthesisL@CTtsHwDevice@@QAEXAAVMTtsSegmentStream@@@Z @ 19 NONAME ; void CTtsHwDevice::PrimeSynthesisL(class MTtsSegmentStream &) - ?SetPositionL@CTtsHwDevice@@QAEXABVTTimeIntervalMicroSeconds@@@Z @ 20 NONAME ; void CTtsHwDevice::SetPositionL(class TTimeIntervalMicroSeconds const &) - ?SetPositionL@CTtsHwDevice@@QAEXABVTTtsSegment@@H@Z @ 21 NONAME ; void CTtsHwDevice::SetPositionL(class TTtsSegment const &, int) - ?Stop@CTtsHwDevice@@QAEXXZ @ 22 NONAME ; void CTtsHwDevice::Stop(void) - ?StyleL@CTtsHwDevice@@QAEAAVTTtsStyle@@G@Z @ 23 NONAME ; class TTtsStyle & CTtsHwDevice::StyleL(unsigned short) - ?StyleL@CTtsHwDevice@@QAEAAVTTtsStyle@@K@Z @ 24 NONAME ; class TTtsStyle & CTtsHwDevice::StyleL(unsigned long) - ?SynthesizeL@CTtsHwDevice@@QAEXXZ @ 25 NONAME ; void CTtsHwDevice::SynthesizeL(void) - diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/ttshwdevice/eabi/asrsttshwdeviceu.def --- a/srsfenginestub/ttshwdevice/eabi/asrsttshwdeviceu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -EXPORTS - _ZN12CTtsHwDevice11SynthesizeLEv @ 1 NONAME - _ZN12CTtsHwDevice12DeleteStyleLEm @ 2 NONAME - _ZN12CTtsHwDevice12GetPositionLER11TTtsSegmentRi @ 3 NONAME - _ZN12CTtsHwDevice12GetPositionLER25TTimeIntervalMicroSeconds @ 4 NONAME - _ZN12CTtsHwDevice12SetPositionLERK11TTtsSegmenti @ 5 NONAME - _ZN12CTtsHwDevice12SetPositionLERK25TTimeIntervalMicroSeconds @ 6 NONAME - _ZN12CTtsHwDevice15AnalyzeProsodyLER14CTtsParsedText @ 7 NONAME - _ZN12CTtsHwDevice15BufferProcessedERK6TDesC8 @ 8 NONAME - _ZN12CTtsHwDevice15PrimeSynthesisLER14CTtsParsedText @ 9 NONAME - _ZN12CTtsHwDevice15PrimeSynthesisLER17MTtsSegmentStream @ 10 NONAME - _ZN12CTtsHwDevice17AnalyzeStructureLER14CTtsParsedText @ 11 NONAME - _ZN12CTtsHwDevice19IsLanguageSupportedE9TLanguage @ 12 NONAME - _ZN12CTtsHwDevice4NewLER20MTtsHwDeviceObserverjj @ 13 NONAME - _ZN12CTtsHwDevice4StopEv @ 14 NONAME - _ZN12CTtsHwDevice5PauseEv @ 15 NONAME - _ZN12CTtsHwDevice6StyleLEm @ 16 NONAME - _ZN12CTtsHwDevice6StyleLEt @ 17 NONAME - _ZN12CTtsHwDevice9AddStyleLERK9TTtsStyle @ 18 NONAME - _ZN12CTtsHwDeviceD0Ev @ 19 NONAME - _ZN12CTtsHwDeviceD1Ev @ 20 NONAME - _ZN12CTtsHwDeviceD2Ev @ 21 NONAME - _ZN13CASRSHwDevice11InitializeLEv @ 22 NONAME - _ZN13CASRSHwDevice15CustomInterfaceE4TUid @ 23 NONAME - _ZN13CASRSHwDevice4NewLEv @ 24 NONAME - _ZN13CASRSHwDevice5ClearEv @ 25 NONAME - _ZN13CASRSHwDeviceD0Ev @ 26 NONAME - _ZN13CASRSHwDeviceD1Ev @ 27 NONAME - _ZN13CASRSHwDeviceD2Ev @ 28 NONAME - _ZNK12CTtsHwDevice14NumberOfStylesEv @ 29 NONAME - _ZTI12CTtsHwDevice @ 30 NONAME ; ## - _ZTI13CASRSHwDevice @ 31 NONAME ; ## - _ZTV12CTtsHwDevice @ 32 NONAME ; ## - _ZTV13CASRSHwDevice @ 33 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/ttshwdevice/group/bld.inf --- a/srsfenginestub/ttshwdevice/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information for TTS HWDevice Stub. -* -*/ - - - - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -TTSHwDeviceStub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/ttshwdevice/group/ttshwdevicestub.mmp --- a/srsfenginestub/ttshwdevice/group/ttshwdevicestub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for TtsHwDeviceStub. -* -*/ - - - - -#include - -#if defined( WINS ) || defined( WINSCW ) -TARGET asrsttshwdevice.dll -#else -TARGET asrsttshwdevice_stub.dll -#endif - -TARGETTYPE DLL -UID 0x1000008D 0x101F8CA5 - -VENDORID VID_DEFAULT - -USERINCLUDE . ../inc -// This is a SYSTEMINCLUDE macro containing the middleware -// layer specific include directories -APP_LAYER_SYSTEMINCLUDE - -SYSTEMINCLUDE ../../common/inc -SYSTEMINCLUDE ../../common/src - -SOURCEPATH ../src -SOURCE asrsttshwdevice.cpp - -SOURCEPATH ../../common/src -SOURCE asrshwdevice.cpp - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY asrsttshwdevice.lib - -// On ROM dll name is without the _stub part so that it can easily be -// replaced with the real dll -LINKAS asrsttshwdevice.dll - -CAPABILITY CAP_GENERAL_DLL diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/ttshwdevice/src/asrsttshwdevice.cpp --- a/srsfenginestub/ttshwdevice/src/asrsttshwdevice.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,300 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Stub algorithms for Speech Synthesis -* -*/ - - - - - -// INCLUDE FILES -#include "asrsttshwdevice.h" -#include - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::CTtsHwDevice -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CTtsHwDevice::CTtsHwDevice(): iAlgorithm( NULL ), iReserved( NULL ) - { - // nothing - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CTtsHwDevice::ConstructL( MTtsHwDeviceObserver& /*aObserver*/, - TUint /*aSamplingRate*/, - TUint /*aBufferSize*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CTtsHwDevice* CTtsHwDevice::NewL( MTtsHwDeviceObserver& aObserver, - TUint aSamplingRate, - TUint aBufferSize ) - { - CTtsHwDevice* self = new ( ELeave ) CTtsHwDevice; - - CleanupStack::PushL( self ); - self->ConstructL( aObserver, aSamplingRate, aBufferSize ); - CleanupStack::Pop(); - - return self; - } - - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::~CTtsHwDevice -// Destructor; -// ----------------------------------------------------------------------------- -// -EXPORT_C CTtsHwDevice::~CTtsHwDevice() - { - } - - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::AddStyleL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TTtsStyleID CTtsHwDevice::AddStyleL( const TTtsStyle& /*aStyle*/ ) - { - User::Leave( KErrNotSupported ); - return 0; - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::AnalyzeProsodyL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::AnalyzeProsodyL( CTtsParsedText& /*aText*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::AnalyzeStructureL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::AnalyzeStructureL( CTtsParsedText& /*aText*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::BufferProcessed -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::BufferProcessed( const TDesC8& /*aBuffer*/ ) - { - } - - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::DeleteStyleL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::DeleteStyleL( TTtsStyleID /*aStyleID*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::GetPositionL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::GetPositionL( TTimeIntervalMicroSeconds& /*aTime*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::GetPositionL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::GetPositionL( TTtsSegment& /*aSegment*/, - TInt& /*aWordIndex*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::IsLanguageSupported -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TBool CTtsHwDevice::IsLanguageSupported( TLanguage /*aLanguage*/ ) - { - return EFalse; - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::NumberOfStyles -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TUint16 CTtsHwDevice::NumberOfStyles() const - { - return 0; - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::Pause -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::Pause() - { - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::PrimeSynthesisL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::PrimeSynthesisL( MTtsSegmentStream& /*aStream*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::PrimeSynthesisL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::PrimeSynthesisL( CTtsParsedText& /*aText*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::SetPositionL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::SetPositionL( const TTimeIntervalMicroSeconds& /*aTime*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::SetPositionL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::SetPositionL( const TTtsSegment& /*aSegment*/, - TInt /*aWordIndex*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::Stop -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::Stop() - { - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::StyleL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TTtsStyle& CTtsHwDevice::StyleL( TTtsStyleID /*aStyleID*/ ) - { - User::Leave( KErrNotSupported ); - // Just for removing errors & warning, we never get here - TInt* dummy = new ( ELeave ) TInt; - TTtsStyle* style = (TTtsStyle*) dummy; - return *style; - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::StyleL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TTtsStyle& CTtsHwDevice::StyleL( TUint16 /*aIndex*/ ) - { - User::Leave( KErrNotSupported ); - // Just for removing errors & warning, we never get here - TInt* dummy = new ( ELeave ) TInt; - TTtsStyle* style = (TTtsStyle*) dummy; - return *style; - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::SynthesizeL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::SynthesizeL() - { - User::Leave( KErrNotSupported ); - } - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// ----------------------------------------------------------------------------- -// for DLL goodness -// ----------------------------------------------------------------------------- -// -#ifndef EKA2 -GLDEF_C TInt E32Dll( TDllReason /*aReason*/ ) - { - return KErrNone; - } -#endif - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/ttshwdevice/src/asrsttshwdevice.h --- a/srsfenginestub/ttshwdevice/src/asrsttshwdevice.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,293 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Algorithms for Speech Synthesis -* -*/ - - - - - -#ifndef TTSHWDEVICE_H -#define TTSHWDEVICE_H - -// INCLUDES -#include -#include -#include -#include - -// FORWARD DECLARATIONS -class CTtsAlgorithm; - -// CLASS DECLARATION -/** -* Class to define callback functions -* -* @lib asrsttshwdevice.lib -* @since 2.8 -*/ -class MTtsHwDeviceObserver - { - public: // New functions - - /** - * Called by the HW device when the synthesis has been completed. - * @since 2.8 - * @param aStatus Error code, KErrNone if success - * @return none - */ - virtual void MthdTtsCompleted( TInt aStatus ) = 0; - - /** - * Invoked by TTS HW Device when it needs a configuration data package. - * @since 2.8 - * @param aPackageType Type identifier. - * @param aPackageID Identifier of package - * @param aStartPosition Start index in bytes - * @param aEndPosition End index in bytes. If the position is bigger - * than the size of data package, the end part will be returned. - * @return Data package in a buffer - */ - virtual HBufC8* MthdoConfigurationData( TUint32 aPackageType, - TUint32 aPackageID, - TUint32 aStartPosition, - TUint32 aEndPosition) = 0; - /** - * Called by the HW device when custom command implementation wants to notify a client. - * @since 2.8 - * @param aEvent Event code aStatus Error code, KErrNone if success. - * @param aParameter Optional parameter - * @return none - */ - virtual void MthdCustomEvent( TInt aEvent, - TInt aStatus, - const TDesC8& aParameter = KNullDesC8 ) = 0; - - /** - * Called by the HW device when the HW device has synthesized a new audio buffer. - * @since 2.8 - * @param aBuffer Synthesized audio buffer. - * @return none - */ - virtual void MthdProcessBuffer( const TDesC8& aBuffer ) = 0; - - }; - - - -/** -* Class to provide speech synthesis -* -* @lib asrsttshwdevice.lib -* @since 2.8 -*/ -class CTtsHwDevice : public CASRSHwDevice - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @param aObserver Observer which implements callback functions. - * @param aSamplingRate Sampling rate for output audio - * @param aBufferSize Buffer size for output audio - */ - IMPORT_C static CTtsHwDevice* NewL( MTtsHwDeviceObserver& aObserver, - TUint aSamplingRate, - TUint aBufferSize ); - - /** - * Destructor. - */ - IMPORT_C virtual ~CTtsHwDevice(); - - public: // New functions - - /** - * Adds new style to the collection. If equal style exists already, new style is not added. - * @since 2.8 - * @param aStyle Style to be added. - * @return Identifier of added style. If equal style exists already, identifier to the old style will be returned. - */ - IMPORT_C TTtsStyleID AddStyleL( const TTtsStyle& aStyle ); - - /** - * Analyses stucture of text and adds style information. - * @since 2.8 - * @param aText Updates text object by dividing it into segments with new styles. - * @return none - */ - IMPORT_C void AnalyzeProsodyL( CTtsParsedText& aText ); - - /** - * Analyses stucture of text by finding paragraphs and sentences. - * @since 2.8 - * @param aText Updates text object by segmenting it into paragraphs and sentences. - * @return none - */ - IMPORT_C void AnalyzeStructureL( CTtsParsedText& aText ); - - /** - * Notifies that the buffer has been processed - * @since 2.8 - * @param aBuffer The buffer which has been processed - * @return none - */ - IMPORT_C void BufferProcessed( const TDesC8& aBuffer ); - - /** - * Deletes style. - * @since 2.8 - * @param aStyleID Identifier of style to be deleted. - * @return none - */ - IMPORT_C void DeleteStyleL( TTtsStyleID aStyleID ); - - /** - * Gives current position of synthesizing. - * @since 2.8 - * @param aTime Time of the synthesizing position. - * @return none - */ - IMPORT_C void GetPositionL( TTimeIntervalMicroSeconds& aTime ); - - /** - * Gives current position of synthesizing. - * @since 2.8 - * @param aSegment The segment being synthesizing - * @param aWordIndex The index of word being synthesizing - * @return none - */ - IMPORT_C void GetPositionL( TTtsSegment& aSegment, - TInt& aWordIndex ); - - /** - * Ask if a language is supported or not. - * @since 2.8 - * @param aLanguage Synthesizing language. - * @return ETrue language is supported otherwise EFalse - */ - IMPORT_C TBool IsLanguageSupported( TLanguage aLanguage ); - - /** - * Gives number of styles. - * @since 2.8 - * @param none - * @return Number of styles. - */ - IMPORT_C TUint16 NumberOfStyles() const; - - /** - * Pauses synthesizing. - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void Pause(); - - /** - * Prepares for synthesizing. - * @since 2.8 - * @param aStream Stream to be synthesized. - * @return none - */ - IMPORT_C void PrimeSynthesisL( MTtsSegmentStream& aStream ); - - /** - * Prepares for synthesizing. - * @since 2.8 - * @param aText Text containing segments to be synthesized. - * @return none - */ - IMPORT_C void PrimeSynthesisL( CTtsParsedText& aText ); - - /** - * Sets new position for synthesizing. - * @since 2.8 - * @param aTime Time of the synthesizing postion. - * @return none - */ - IMPORT_C void SetPositionL( const TTimeIntervalMicroSeconds& aTime ); - - /** - * Sets new position for synthesizing. - * @since 2.8 - * @param aSegment The segment being synthesizing - * @param aWordIndex The index of word being synthesizing - * @return none - */ - IMPORT_C void SetPositionL( const TTtsSegment& aSegment, - TInt aWordIndex ); - - /** - * Stops synthesizing and releases resources of synthesizing. - * The method does nothing if already stopped. - * @since 2.8 - * @param - * @return none - */ - IMPORT_C void Stop(); - - /** - * Receives style information - * @since 2.8 - * @param aStyleID Style identifier - * @return Style - */ - IMPORT_C TTtsStyle& StyleL( TTtsStyleID aStyleID ); - - /** - * Receives style information - * @since 2.8 - * @param aIndex Index to style: 0..NumberOfStyles() - * @return Style - */ - IMPORT_C TTtsStyle& StyleL( TUint16 aIndex ); - - /** - * Starts waveform production. The synthesized audio buffers are send back - * to client using MthdProcessBuffer(). - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void SynthesizeL(); - - private: - - /** - * C++ default constructor. - */ - CTtsHwDevice(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL( MTtsHwDeviceObserver& aObserver, - TUint aSamplingRate, - TUint aBufferSize ); - - private: // Data - - // Actual algorithm where all processing happens - CTtsAlgorithm* iAlgorithm; - - // Reserved pointer for future extension - TAny* iReserved; - - }; - -#endif // TTSHWDEVICE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/vocmanhwdevice/bwins/asrsvocmanhwdeviceu.def --- a/srsfenginestub/vocmanhwdevice/bwins/asrsvocmanhwdeviceu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -EXPORTS - ??1CASRSHwDevice@@UAE@XZ @ 1 NONAME ; CASRSHwDevice::~CASRSHwDevice(void) - ??1CASRSVocManHwDevice@@UAE@XZ @ 2 NONAME ; CASRSVocManHwDevice::~CASRSVocManHwDevice(void) - ?AdaptL@CASRSVocManHwDevice@@QAEXEAAVCSIRule@@@Z @ 3 NONAME ; void CASRSVocManHwDevice::AdaptL(unsigned char, class CSIRule &) - ?Clear@CASRSHwDevice@@UAEXXZ @ 4 NONAME ; void CASRSHwDevice::Clear(void) - ?ComputeNRuleVariantsL@CASRSVocManHwDevice@@QAEXABVCSIGrammar@@KKABV?$RArray@I@@AAV3@AAK@Z @ 5 NONAME ; void CASRSVocManHwDevice::ComputeNRuleVariantsL(class CSIGrammar const &, unsigned long, unsigned long, class RArray const &, class RArray &, unsigned long &) - ?CustomInterface@CASRSHwDevice@@UAEPAXVTUid@@@Z @ 6 NONAME ; void * CASRSHwDevice::CustomInterface(class TUid) - ?InitializeL@CASRSHwDevice@@UAEXXZ @ 7 NONAME ; void CASRSHwDevice::InitializeL(void) - ?NewL@CASRSHwDevice@@SAPAV1@XZ @ 8 NONAME ; class CASRSHwDevice * CASRSHwDevice::NewL(void) - ?NewL@CASRSVocManHwDevice@@SAPAV1@XZ @ 9 NONAME ; class CASRSVocManHwDevice * CASRSVocManHwDevice::NewL(void) - ?Prune@CASRSVocManHwDevice@@QAEHABVCSIGrammar@@KAAV?$RArray@VTSIRuleVariantInfo@@@@@Z @ 10 NONAME ; int CASRSVocManHwDevice::Prune(class CSIGrammar const &, unsigned long, class RArray &) - diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/vocmanhwdevice/eabi/asrsvocmanhwdeviceu.def --- a/srsfenginestub/vocmanhwdevice/eabi/asrsvocmanhwdeviceu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -EXPORTS - _ZN13CASRSHwDevice11InitializeLEv @ 1 NONAME - _ZN13CASRSHwDevice15CustomInterfaceE4TUid @ 2 NONAME - _ZN13CASRSHwDevice4NewLEv @ 3 NONAME - _ZN13CASRSHwDevice5ClearEv @ 4 NONAME - _ZN13CASRSHwDeviceD0Ev @ 5 NONAME - _ZN13CASRSHwDeviceD1Ev @ 6 NONAME - _ZN13CASRSHwDeviceD2Ev @ 7 NONAME - _ZN19CASRSVocManHwDevice21ComputeNRuleVariantsLERK10CSIGrammarmmRK6RArrayIjERS4_Rm @ 8 NONAME - _ZN19CASRSVocManHwDevice4NewLEv @ 9 NONAME - _ZN19CASRSVocManHwDevice5PruneERK10CSIGrammarmR6RArrayI18TSIRuleVariantInfoE @ 10 NONAME - _ZN19CASRSVocManHwDevice6AdaptLEhR7CSIRule @ 11 NONAME - _ZN19CASRSVocManHwDeviceD0Ev @ 12 NONAME - _ZN19CASRSVocManHwDeviceD1Ev @ 13 NONAME - _ZN19CASRSVocManHwDeviceD2Ev @ 14 NONAME - _ZTI13CASRSHwDevice @ 15 NONAME ; ## - _ZTI19CASRSVocManHwDevice @ 16 NONAME ; ## - _ZTV13CASRSHwDevice @ 17 NONAME ; ## - _ZTV19CASRSVocManHwDevice @ 18 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/vocmanhwdevice/group/asrvocmanhwdevicestub.mmp --- a/srsfenginestub/vocmanhwdevice/group/asrvocmanhwdevicestub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for AsrsVocManHwDeviceStub -* -*/ - - - - -#include - -#if defined( WINS ) || defined( WINSCW ) -TARGET asrsvocmanhwdevice.dll -#else -TARGET asrsvocmanhwdevice_stub.dll -#endif - -TARGETTYPE DLL -UID 0x1000008D 0x101FF92E // UID: 270530862 - -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE asrsvocmanhwdevice.cpp - -SOURCEPATH ../../common/src -SOURCE asrshwdevice.cpp - -USERINCLUDE ../inc ../src - -// This is a SYSTEMINCLUDE macro containing the middleware -// layer specific include directories -APP_LAYER_SYSTEMINCLUDE - -SYSTEMINCLUDE ../../common/inc - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY asrsvocmanhwdevice.lib - -// On ROM dll name is without the _stub part so that it can easily be -// replaced with the real dll -LINKAS asrsvocmanhwdevice.dll - -CAPABILITY CAP_GENERAL_DLL diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/vocmanhwdevice/group/bld.inf --- a/srsfenginestub/vocmanhwdevice/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for AsrVocManHwDeviceStub. -* -*/ - - - - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -asrvocmanhwdevicestub.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/vocmanhwdevice/src/asrsvocmanhwdevice.cpp --- a/srsfenginestub/vocmanhwdevice/src/asrsvocmanhwdevice.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,165 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Vocabulary handling stub functions. -* -*/ - - - - - - -// INCLUDE FILES -#include "asrsvocmanhwdevice.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CASRSVocManHwDevice::CASRSVocManHwDevice -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CASRSVocManHwDevice::CASRSVocManHwDevice() -: iVMAlgorithm( NULL ) - { - } - -// ----------------------------------------------------------------------------- -// CASRSVocManHwDevice::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CASRSVocManHwDevice::ConstructL() - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSVocManHwDevice::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSVocManHwDevice* CASRSVocManHwDevice::NewL() - { - CASRSVocManHwDevice* self = new ( ELeave ) CASRSVocManHwDevice; - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - - -// ----------------------------------------------------------------------------- -// CASRSVocManHwDevice::~CASRSVocManHwDevice -// Destructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSVocManHwDevice::~CASRSVocManHwDevice() - { - } - - -// ----------------------------------------------------------------------------- -// CASRSVocManHwDevice::AdaptL -// Updates given scores -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSVocManHwDevice::AdaptL( - const TSIRuleVariantID /*aCorrectRuleVariantID*/, - CSIRule& /*aRule*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSVocManHwDevice::Prune -// Give information which items can be pruned -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TBool CASRSVocManHwDevice::Prune( - const CSIGrammar& /*aGrammar*/, - const TUint32 /*aMinNumber*/, - RArray& /*aPrunedItems*/ ) - { - return EFalse; - } - -// ----------------------------------------------------------------------------- -// CASRSVocManHwDevice::ComputeNRuleVariantsL -// Determine how many rule variants can be added to grammar -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSVocManHwDevice::ComputeNRuleVariantsL( - const CSIGrammar& /*aGrammar*/, - const TUint32 /*aTargetNRuleVariants*/, - const TUint32 /*aMaxNRuleVariants*/, - const RArray& /*aNewRuleScores*/, - RArray& /*aNNewRuleVariants*/, - TUint32& /*aNPrune*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSVocManHwDevice::InitializeL -// Initializes the HW device. -// You only need this function, if you have called ClearL(). -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CASRSVocManHwDevice::InitializeL() - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSVocManHwDevice::Clear -// Clears the HW device. -// You don't need this function, destructor does the same better -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CASRSVocManHwDevice::Clear() - { - } - -// ----------------------------------------------------------------------------- -// CASRSVocManHwDevice::CustomInterface -// Returns a custom interface. None implemented yet. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TAny* CASRSVocManHwDevice::CustomInterface(TUid /*aInterfaceUid*/) - { - return( NULL ); - } - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// for DLL goodness -#ifndef EKA2 -GLDEF_C TInt E32Dll( TDllReason /*aReason*/ ) - { - return KErrNone; - } -#endif - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 srsfenginestub/vocmanhwdevice/src/asrsvocmanhwdevice.h --- a/srsfenginestub/vocmanhwdevice/src/asrsvocmanhwdevice.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,187 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Vocabulary pruning functions for speech recognition -* -*/ - - - - - - -#ifndef ASRSVOCMANHWDEVICE_H -#define ASRSVOCMANHWDEVICE_H - -// INCLUDES -#include -#include - -// FORWARD DECLARATIONS -class CVocManAlgorithm; - -// CLASS DECLARATION - -/** -* Class for pruning -* When the grammar starts to get big, this class can prune -* least used rule variants away before adding new rules. -* -* @lib AsrsVocmanHwDevice.dll -* @since ?Series60_version -*/ -class CASRSVocManHwDevice : public CASRSHwDevice - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CASRSVocManHwDevice* NewL(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CASRSVocManHwDevice(); - - public: // Functions from base classes - - /** - * From CASRHwDevice - * Gets a custom interface - * @since 2.8 - * @param aInterfaceUid Uid of the interface. - * @return Pointer to the interface. Ownership depends on UID. - */ - TAny* CustomInterface(TUid aInterfaceUid); - - /** - * From CASRHwDevice - * Initializes the HW Device - * @since 2.8 - * @return None - */ - void InitializeL(); - - /** - * From CASRHwDevice - * Clear HW Device's allocated memory - * @since 2.8 - * @return None - */ - void Clear(); - - public: // New functions - - /** - * Use to adapt rule after recognition - * @since 2.6 - * @param aCorrectRuleVariantID Correctly recognized rule variant - * @param aRule Rule including correct variant - */ - IMPORT_C void AdaptL( const TSIRuleVariantID aCorrectRuleVariantID, - CSIRule& aRule ); - - /** - * Use to prune grammar. - * @since 2.6 - * @param aGrammar Grammar to be pruned - * @param aMinNumber Minimum number of items to be pruned - * @param aPrunedItems Information which items can be removed - * @return ETrue pruning successful, EFalse cannot be pruned - */ - IMPORT_C TBool Prune( const CSIGrammar& aGrammar, - TUint32 aMinNumber, - RArray& aPrunedItems); - - /** - * Use to determine number of new rule variants - * @since 2.6 - * @param aGrammar Grammar where new variants should be added to - * @param aTargetNRuleVariants Target number of rule variants in the grammar - * @param aMaxNRuleVariants Maximum number of rule variants in the grammar - * @param aNewRuleScores Score for each new rule - * @param aNNRuleVariants Number of rule variants for each rule. - * Array must be initialized as maximum number of rule variants per a rule. - * @return None - */ - IMPORT_C void ComputeNRuleVariantsL( const CSIGrammar& aGrammar, - const TUint32 aTargetNRuleVariants, - const TUint32 aMaxNRuleVariants, - const RArray& aNewRuleScores, - RArray& aNNewRuleVariants, - TUint32& aNPrune ); - public: // Functions from base classes - - /** - * From ?base_class ?member_description. - * @since ?Series60_version - * @param ?arg1 ?description - * @return ?description - */ - //?type ?member_function( ?type ?arg1 ); - - protected: // New functions - - /** - * ?member_description. - * @since ?Series60_version - * @param ?arg1 ?description - * @return ?description - */ - //?type ?member_function( ?type ?arg1 ); - - protected: // Functions from base classes - - /** - * From ?base_class ?member_description - */ - //?type ?member_function(); - - private: - - /** - * C++ default constructor. - */ - CASRSVocManHwDevice(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - // Prohibit copy constructor if not deriving from CBase. - // CASRVocManHwDevice( const CASRVocManHwDevice& ); - // Prohibit assigment operator if not deriving from CBase. - // CASRVocManHwDevice& operator=( const CASRVocManHwDevice& ); - - public: // Data - // ?one_line_short_description_of_data - //?data_declaration; - - protected: // Data - // ?one_line_short_description_of_data - //?data_declaration; - - private: // Data - // ?one_line_short_description_of_data - CVocManAlgorithm* iVMAlgorithm; - - // Reserved pointer for future extension - TAny* iReserved; - - }; - -#endif // ASRSVOCMANHWDEVICE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/TVOutConfig/BWINS/TvOutConfigU.DEF --- a/systemswstubs/TVOutConfig/BWINS/TvOutConfigU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - ?NewL@CTvOutConfig@@SAPAV1@XZ @ 1 NONAME ; class CTvOutConfig * CTvOutConfig::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/TVOutConfig/EABI/TvOutConfigU.DEF --- a/systemswstubs/TVOutConfig/EABI/TvOutConfigU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - _ZN12CTvOutConfig4NewLEv @ 1 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/TVOutConfig/Inc/tvoutconfigimp.h --- a/systemswstubs/TVOutConfig/Inc/tvoutconfigimp.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* -* Copyright (c) 2003-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This file provides the headers used in -* TVOutConfig Dummy Implementation. -* -*/ - - -#ifndef __TVOUTCONFIGIMP_H__ -#define __TVOUTCONFIGIMP_H__ - -//- Include Files ---------------------------------------------------------- - -#include -#include "tvoutconfig.h" - -//- Class Definitions ------------------------------------------------------- - -/** -Inherited implementation of CTvOutConfig -*/ -NONSHARABLE_CLASS(CTvOutConfigImp) : public CTvOutConfig - { - public: - CTvOutConfigImp(); - virtual ~CTvOutConfigImp(); - virtual TInt GetNumberOfHdmiModes(TUint& aNumberOfModes); - virtual TInt GetSupportedHdmiMode(TUint aModeNumber, TSupportedHdmiDviMode& aReadMode); - virtual TInt GetTvHwCapabilities(TTvSettings::TOutput aConnector, THwCapabilities& aReadCapabilities); - virtual TInt SetConfig(const TTvSettings& aTvSettings); - virtual TInt SetConfig(const THdmiDviTimings& aTvSettings); - virtual TInt GetConfig(TTvSettings& aTvSettings); - virtual TInt GetConfig(THdmiDviTimings& aTvSettings); - virtual TInt SettingsChangedListener(TRequestStatus& aListenerRequest); - virtual TInt SettingsChangedListenerCancel(); - virtual TInt StandByFigureMaxSizeInBytes(TUint& aMaxFigureSize); - virtual TInt StandByFigure(const TStandByFigure& aStandByFigure); - virtual TInt GetStandByFigure(TStandByFigure& aStandByFigure); - virtual TInt Enable(); - virtual TInt Disable(); - virtual TInt OnOffListener(TRequestStatus& aListenerRequest); - virtual TInt OnOffListenerCancel(); - virtual TBool Enabled(); - virtual TInt HdmiCableListener(TRequestStatus& aListenerRequest); - virtual TInt HdmiCableListenerCancel(); - virtual TBool HdmiCableConnected(); - virtual TInt SetAvailableTvConfigList(const RArray& aAnalogConfigs, const RArray& aHdmiConfigs); - virtual TInt GetAvailableTvConfigList(RArray& aAnalogConfigs, RArray& aHdmiConfigs); - virtual TInt AvailableTvConfigListListener(TRequestStatus& aListenerRequest); - virtual TInt AvailableTvConfigListListenerCancel(); - virtual TInt CopyProtectionStatusListener(TRequestStatus& aListenerRequest); - virtual TInt CopyProtectionStatusCancel(); - virtual TBool CopyProtectionStatus(); - virtual TInt CopyProtection(TBool aCopyProtectEnabled); - virtual void ConstructL(); - }; - -#endif //__TVOUTCONFIGIMP_H__ - -// End of File - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/TVOutConfig/Src/tvoutconfig.cpp --- a/systemswstubs/TVOutConfig/Src/tvoutconfig.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -/* -* Copyright (c) 2003-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This file implements the needed functions defined in - tvoutconfig.h part of TVOutConfig Dummy Implementation. -* -*/ - - -//- Include Files ---------------------------------------------------------- - -#include "tvoutconfig.h" -#include "tvoutconfigimp.h" - -//- External Data ----------------------------------------------------------- - -//- External Function Prototypes -------------------------------------------- - -//- Constants --------------------------------------------------------------- - -//- Macros ------------------------------------------------------------------ - -//- Global and Local Variables ---------------------------------------------- - -//- Local Function Prototypes ----------------------------------------------- - -//- Local Functions --------------------------------------------------------- - -//- Member Functions -------------------------------------------------------- - -//============================================================================= - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -EXPORT_C CTvOutConfig* CTvOutConfig::NewL() - { - - CTvOutConfigImp* result = new ( ELeave ) CTvOutConfigImp; - - CleanupStack::PushL( result ); - result->ConstructL(); - CleanupStack::Pop(); - - return result; - - } - -// End of File - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/TVOutConfig/Src/tvoutconfigimp.cpp --- a/systemswstubs/TVOutConfig/Src/tvoutconfigimp.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,321 +0,0 @@ -/* -* Copyright (c) 2003-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implements the all the virtual functions derived from - CTvOutConfig TVOutConfig Dummy Implementation. -* -*/ - - -//- Include Files ---------------------------------------------------------- - -#include "tvoutconfigimp.h" - -//- External Data ----------------------------------------------------------- - -//- External Function Prototypes -------------------------------------------- - -//- Constants --------------------------------------------------------------- - -//- Macros ------------------------------------------------------------------ - -//- Global and Local Variables ---------------------------------------------- - -//- Local Function Prototypes ----------------------------------------------- - -//- Local Functions --------------------------------------------------------- - -//- Member Functions -------------------------------------------------------- - -//============================================================================= - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -CTvOutConfigImp::CTvOutConfigImp(): - CTvOutConfig() - { - - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -CTvOutConfigImp::~CTvOutConfigImp() - { - } - -//--------------------------------------------------------------------------- -/** - Dummy implementation. -*/ -void CTvOutConfigImp::ConstructL() - { - //This is dummy implementation. does nothing - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::SetConfig( const TTvSettings& /*aTvSettings*/ ) - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::StandByFigureMaxSizeInBytes( TUint& /*aMaxFigureSize*/ ) - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::StandByFigure( const TStandByFigure& /*aStandByFigure*/ ) - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::Enable() - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::Disable() - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TBool CTvOutConfigImp::Enabled() - { - return EFalse; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::OnOffListener( TRequestStatus& /*aListenerRequest*/ ) - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::OnOffListenerCancel() - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::HdmiCableListener(TRequestStatus& /*aListenerRequest*/ ) - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::HdmiCableListenerCancel() - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::SetConfig( const THdmiDviTimings& /*aTvSettings*/ ) - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TBool CTvOutConfigImp::HdmiCableConnected() - { - return EFalse; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::GetNumberOfHdmiModes(TUint& /*aNumberOfModes*/ ) - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::GetSupportedHdmiMode(TUint /*aModeNumber*/, TSupportedHdmiDviMode& /*aReadMode*/ ) - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::GetTvHwCapabilities(TTvSettings::TOutput /*aConnector*/, THwCapabilities& /*aReadCapabilities*/ ) - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::GetConfig(TTvSettings& /*aTvSettings*/ ) - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::GetConfig(THdmiDviTimings& /*aTvSettings*/ ) - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::GetStandByFigure(TStandByFigure& /*aStandByFigure*/ ) - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::SetAvailableTvConfigList(const RArray& /*aAnalogConfigs*/, const RArray& /*aHdmiConfigs*/) - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h - */ -TInt CTvOutConfigImp::GetAvailableTvConfigList( RArray& /*aAnalogConfigs*/, RArray& /*aHdmiConfigs*/ ) - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::AvailableTvConfigListListener(TRequestStatus& /*aListenerRequest*/) - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::AvailableTvConfigListListenerCancel() - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::SettingsChangedListener(TRequestStatus& /*aListenerRequest*/) - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::SettingsChangedListenerCancel() - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::CopyProtection( TBool /*aCopyProtectEnabled*/ ) - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TBool CTvOutConfigImp::CopyProtectionStatus() - { - return EFalse; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::CopyProtectionStatusCancel() - { - return KErrNotReady; - } - -//--------------------------------------------------------------------------- -/** - @see TvOutConfig.h -*/ -TInt CTvOutConfigImp::CopyProtectionStatusListener( TRequestStatus& /*aListenerRequest*/ ) - { - return KErrNotReady; - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/TVOutConfig/group/bld.inf --- a/systemswstubs/TVOutConfig/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* Copyright (c) 2003-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This file provides the information required for building -* TVOutConfig Dummy Implementation. -* -*/ - - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -tvoutconfig - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/TVOutConfig/group/tvoutconfig.mmp --- a/systemswstubs/TVOutConfig/group/tvoutconfig.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2003-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This file provides the information required for building -* TVOutConfig Dummy Implementation. -* -*/ - - -#include - -target TvOutConfig.dll -targettype dll -uid 0x1000008D 0x101f6e00 - -vendorid VID_DEFAULT - -capability all -tcb - -//----------------------------- -// include paths -> -//----------------------------- - -MW_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../Inc - -//----------------------------- -// sources -> -//----------------------------- -sourcepath ../Src -source tvoutconfig.cpp -source tvoutconfigimp.cpp - -//----------------------------- -// needed libraries -> -//----------------------------- -library euser.lib - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/TVOutConfig/rom/TvOutConfig.iby --- a/systemswstubs/TVOutConfig/rom/TvOutConfig.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: TvOutConfig ROM files. -* -*/ - -#ifndef TVOUTCONFIG_IBY -#define TVOUTCONFIG_IBY - - // GS TvOutConfig library: - file=ABI_DIR\BUILD_DIR\TvOutConfig.dll sys\bin\TvOutConfig.dll - -#endif // TVOUTCONFIG_IBY -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/AccPolCapRules.ini diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/AccPolGIDInt.dat --- a/systemswstubs/accessorypolicyreference/data/AccPolGIDInt.dat Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -HEADSET 999999 1 1 0 1 2440 0 0 0,0 0 0 0 0 0 0 0 0 2 0 2 diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/DBS_10205030_accpolicydb.db Binary file systemswstubs/accessorypolicyreference/data/DBS_10205030_accpolicydb.db has changed diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/ApplicationProtocol.xml --- a/systemswstubs/accessorypolicyreference/data/XML/ApplicationProtocol.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,142 +0,0 @@ - - - -12 - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa33.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa33.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa34.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa34.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa35.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa35.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa36.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa36.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa37.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa37.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa38.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa38.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa39.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa39.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa40.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa40.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa41.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa41.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa42.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa42.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa43.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa43.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa44.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa44.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa45.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa45.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa46.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa46.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa47.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa47.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa48.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa48.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa49.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa49.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa50.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa50.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa51.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa51.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa52.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa52.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa53.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa53.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa54.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa54.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa55.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa55.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa56.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa56.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa57.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa57.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa58.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa58.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa59.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa59.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa60.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa60.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa61.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa61.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa62.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa62.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa63.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa63.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/Capa64.xml --- a/systemswstubs/accessorypolicyreference/data/XML/Capa64.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1078 +0,0 @@ - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - -1 - - - - 1 - - - - 2 - - - - 4 - - - - 8 - - - - 16 - - - - 32 - - - - 64 - - - - 128 - - - - 256 - - - - 512 - - - - - 1024 - - - - 2048 - - - - 4096 - - - - 8192 - - - - 16384 - - - - 32768 - - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/CapaInfo.dta diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/CapabilityGroups.xml --- a/systemswstubs/accessorypolicyreference/data/XML/CapabilityGroups.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,271 +0,0 @@ - - - - 13 - - - 4294967296 - - - - 8589934592 - - - - 17179869184 - - - - 34359738368 - - - - 68719476736 - - - - 137438953472 - - - - 274877906944 - - - - 549755813888 - - - - 1099511627776 - - - - - 2199023255552 - - - - 4398046511104 - - - - 8796093022208 - - - - 17592186044416 - - - - 35184372088832 - - - - 70368744177664 - - - - 140737488355328 - - - - 281474976710656 - - - - 562949953421312 - - - - 1125899906842624 - - - - 2251799813685248 - - - - 4503599627370496 - - - - 9007199254740992 - - - - 18014398509481984 - - - - 36028797018963968 - - - - 72057594037927936 - - - - 144115188075855872 - - - - 288230376151711744 - - - - 576460752303423488 - - - - 1152921504606846976 - - - - 2305843009213693952 - - - - 4611686018427387904 - - - - 9223372036854775808 - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/DeviceType.xml --- a/systemswstubs/accessorypolicyreference/data/XML/DeviceType.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,145 +0,0 @@ - - - - - - 10 - - - 65536 - - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/PhysicalConnection.xml --- a/systemswstubs/accessorypolicyreference/data/XML/PhysicalConnection.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,141 +0,0 @@ - - - -11 - - - 65536 - - - - 131072 - - - - 262144 - - - - 524288 - - - - 1048576 - - - - 2097152 - - - - 4194304 - - - - 8388608 - - - - 16777216 - - - - 33554432 - - - - 67108864 - - - - 134217728 - - - - 268435456 - - - - 536870912 - - - - 1073741824 - - - - 2147483648 - - - - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/XML/additional.dta diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/data/rules.dat --- a/systemswstubs/accessorypolicyreference/data/rules.dat Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -SELECTION 1 TTY 010001 1 1 0 1 2444 0 0 0,0 0 0 0 0 0 0 0 0 0 0 0 2 0 2 -SELECTION 2 Loopset 010201 32 1 0 1 2320 0 0 0,1 -19 1 0 0 0 2 1 2 -SELECTION 4 Headset 010001 1 1 0 1 2444 0 0 0,0 0 0 0 0 0 0 0 0 0 0 0 2 0 2 -SELECTION 8 Headphones 010001 1 1 0 1 2188 0 0 0,0 0 0 0 0 0 0 0 0 2 0 2 -SELECTION 16 LineOut 010001 1 1 0 1 2188 0 0 0,0 0 0 0 0 0 0 0 0 2 1 2 -SELECTION 32 TVOut 000004 512 1 0 17 2188 0 0 0 1 0 0 0,0 0 0 0 0 0 0 0 0 2 1 2 0 0 0 -SELECTION 64 MusicStand 00000 4 1 0 1 2188 0 0 0,0 0 0 0 0 0 0 0 0 2 1 2 diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/group/bld.inf --- a/systemswstubs/accessorypolicyreference/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -PRJ_PLATFORMS -DEFAULT - -#include - -PRJ_EXPORTS -#ifdef __ACCESSORY_FW - -../rom/AccRefPolicy.iby CORE_OS_LAYER_IBY_EXPORT_PATH(AccRefPolicy.iby) -../inc/AccPolProprietaryNameValuePairs.h OS_LAYER_PLATFORM_EXPORT_PATH( AccPolProprietaryNameValuePairs.h ) -../inc/AccPolPropGenericID.h OS_LAYER_PLATFORM_EXPORT_PATH( AccPolPropGenericID.h ) -../data/AccPolGIDInt.dat /epoc32/winscw/c/private/1020504A/AccPolGIDInt.dat -../data/AccPolCapRules.ini /epoc32/winscw/c/private/1020504A/AccPolCapRules.ini -../data/rules.dat /epoc32/winscw/c/private/1020504A/rules.dat - -../data/DBS_10205030_accpolicydb.db /epoc32/RELEASE/winscw/UDEB/Z/private/100012a5/DBS_10205030_accpolicydb.db -../data/DBS_10205030_accpolicydb.db /epoc32/RELEASE/winscw/UREL/Z/private/100012a5/DBS_10205030_accpolicydb.db -../data/DBS_10205030_accpolicydb.db /epoc32/data/z/private/100012a5/DBS_10205030_accpolicydb.db - -#endif // __ACCESSORY_FW - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/inc/AccPolPropGenericID.h --- a/systemswstubs/accessorypolicyreference/inc/AccPolPropGenericID.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: These definitions define the proprietary Generic ID features. -* -*/ - - -#ifndef ACCPOLPROPGENERICID_H -#define ACCPOLPROPGENERICID_H - -#include - -/** -* Proprietary Generic ID bit mask definitions. -* These definitions define the proprietary Generic ID features, e.g. -* -Device type bit mask definitions -* -Physical connection bit mask definitions -* -Application protocol bit mask definitions -* -Subblock definitions -* -* Proprietary NAME-VALUE PAIRS are defined in -* AccPolProprietaryNameValuePairs.h-file. -*/ - -// Device type bit mask definitions - -// Physical connection bit mask definitions - -// Application protocol bit mask definitions - -// Proprietary subblock -// const TUint64 KSBProprietaryCapabilityGroup = 0x100000000; // 00000 00100 00000 00000 00000 00000 00000 00000 - -#endif // ACCPOLPROPGENERICID - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/inc/AccPolProprietaryNameValuePairs.h --- a/systemswstubs/accessorypolicyreference/inc/AccPolProprietaryNameValuePairs.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This header provides the proprietary Name/Value defintions of Name/Value pairs. -* -*/ - - -#ifndef ACCPOLPROPRIETARYNAMEVALUEPAIRS_H -#define ACCPOLPROPRIETARYNAMEVALUEPAIRS_H - -// INCLUDES -#include - -// CONSTANTS - -// Accessory capabilities can be described as name/value pairs. To use accessorys -// capabilities from generic identification, the user needs constants. These -// constants are referenced with name/value pairs. -// Name constants are defined to a certain numerical space. -// In this numerical space each of these constats is presented with a term called -// "name const literal". E.g. For name KAccAcousticEchoControl name const literal is -// "1#1#1". -// Accessory capabilities can be described the following values: name, value type, -// dynamic type, I/O type, description and bitmask. -// Name: Acoustic Echo Control -// --------------> Name of the capability -// Value Type: TBool -// --------------> Type of the value -// Dynamic Type: Dynamic/Static -// --------------> Indicates if value can change while accessory is connected. -// If value is dynamic type the client should registrate for -// listening indications for value changes. -// I/O Type: From accessory to terminal, input. -// --------------> I/O type indicates the direction how the state update is done. -// E.g.output indicated that user can use setValueL method. If -// accessory updates the value I/O type is input and if it done -// by the terminal I/O type is output. -// Description: Accessory supports acoustic echo control. If value is true terminal -// must disable its own echo control. To indicate if accessory has -// internal acoustic echo control. -// --------------> Description of the capability. - -// Format of capability: -// ===================== -// -// 0b 000001 00000 00010 -// ------ ----- ----- -// | | | -// | | |_5 bits for capability. Tells which bit is one (*). -// | |_5 bits for namespace, -// |_6 bits for capability group. Tells which bit is one (*). -// -// (*): -// 0b00 -> bit number 1 is one -> value is 0b0001=1 -// 0b01 -> bit number 2 is one -> value is 0b0010=2 -// 0b10 -> bit number 3 is one -> value is 0b0100=4 -// 0b11 -> bit number 4 is one -> value is 0b1000=8 -// - -// Proprietary NAME-VALUE PAIRS: - -// Name: Proprietary capability. -// Value: N/A -// Dynamic Type: N/A -// I/O Type: N/A -// Description: N/A -//const TUint32 KAccProprietaryCapability = 0x8000; - -#endif // ACCPOLPROPRIETARYNAMEVALUEPAIRS_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/accessorypolicyreference/rom/AccRefPolicy.iby --- a/systemswstubs/accessorypolicyreference/rom/AccRefPolicy.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef ACCREFPOLICY_IBY -#define ACCREFPOLICY_IBY - -#ifdef __ACCESSORY_FW - -data=ZPRIVATE\100012a5\DBS_10205030_accpolicydb.db \Private\100012a5\DBS_10205030_accpolicydb.db - -#endif // __ACCESSORY_FW - -#endif // ACCREFPOLICY_IBY - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/asyreference/data/101F5500.rss --- a/systemswstubs/asyreference/data/101F5500.rss Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used as an reference implementation -* Declaration of ASYReferencePlugin ECom resource -* -*/ - - -// RESOURCE IDENTIFIER - -// INCLUDES -#include "ecom/registryinfov2.rh" -#include "AsyServiceUids.h" - -// CONSTANTS - -// MACROS - -// RESOURCE DEFINITIONS -// ----------------------------------------------------------------------------- -// -// 101F5500.rss -// Declares info for ASYReference implementations -// -// ----------------------------------------------------------------------------- -// - -RESOURCE REGISTRY_INFO ASYReferencePlugin - { - // UID for the DLL. See ASYReferencePlugin.mmp - resource_format_version = RESOURCE_FORMAT_VERSION_2; - dll_uid = 0x101F5500; - interfaces = - { - INTERFACE_INFO - { - // UID of interface that is implemented - interface_uid = KACCESSORYPLUGINAPIUID; - implementations = - { - IMPLEMENTATION_INFO - { - implementation_uid = 0x1000B000; - version_no = 1; - display_name = "0x101F5500"; - default_data = KACCESSORYPLUGINAPIMAINSERVICE; - opaque_data = "Heap=0x2BCD|Stack=0x1F00"; - rom_only = 1; - }, - IMPLEMENTATION_INFO - { - implementation_uid = 0x1000B001; - version_no = 1; - display_name = "0x101F5500"; - default_data = KACCESSORYPLUGINAPIHANDLER; - opaque_data = ""; - rom_only = 1; - } - }; - } - }; - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/asyreference/group/ASYReferencePlugin.mmp --- a/systemswstubs/asyreference/group/ASYReferencePlugin.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for ASYReferencePlugin.dll -* -*/ - - -#include - -TARGET ASYReferencePlugin.dll -TARGETTYPE PLUGIN -VENDORID VID_DEFAULT - -// ECom Dll recognition UID followed by the unique UID for this dll -UID 0x10009D8D 0x101F5500 - -CAPABILITY CAP_ECOM_PLUGIN - -SOURCEPATH ../src - -SOURCE ASYReferencePluginProxy.cpp -SOURCE ASYReferenceCmdHandlerBase.cpp -SOURCE ASYReferenceMainServiceBase.cpp -SOURCE ASYmessage.cpp - -USERINCLUDE ../inc - -OS_LAYER_SYSTEMINCLUDE - -// The resource name should have to be same as the third UID above - -START RESOURCE ../data/101F5500.rss -#ifdef SYMBIAN_SECURE_ECOM -TARGET ASYReferencePlugin.rsc -#endif // SYMBIAN_SECURE_ECOM -END - -LIBRARY euser.lib -LIBRARY ASYProxy.lib -LIBRARY AccPolicy.lib -LIBRARY accclient.lib -LIBRARY acccontrol.lib -LIBRARY accpolicy.lib -LIBRARY accsrvutil.lib -LIBRARY asyproxy.lib - -MACRO API_TRACE_FLAG -MACRO COMPONENT_TRACE_FLAG diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/asyreference/group/bld.inf --- a/systemswstubs/asyreference/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used as an reference implementation -* -*/ - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -../rom/ASYReference.iby CORE_OS_LAYER_IBY_EXPORT_PATH(ASYReference.iby) - -PRJ_MMPFILES -#ifdef __ACCESSORY_FW -ASYReferencePlugin.mmp -#endif // __ACCESSORY_FW - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/asyreference/inc/ASYAdaptation.h --- a/systemswstubs/asyreference/inc/ASYAdaptation.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of MASYAdaptation class. MASYAdaptation class -* defines an example interface to receive events from lower layer and also command sending. -* -*/ - - - -#ifndef MASYADAPTATION_H -#define MASYADAPTATION_H - -// INCLUDES -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -class TASYMessage; - -// CLASS DECLARATION - -/** -* MASYAdaptation -*/ -class MASYAdaptation - { - - public: // New functions - - /** - * Indicates ASY about received response message - * @return none - */ - virtual void ProcessResponseL( TASYMessage& aMessage ) = 0; - - /** - * Indicates ASY about received error response message - * @return none - */ - virtual void ProcessErrorResponseL( TInt aErrorCode, TASYMessage& aMessage ) = 0; - - /** - * Indicates ASY about received event message - * @return none - */ - virtual void RaiseEventL( TASYMessage& aMessage ) = 0; - }; - -#endif // MASYADAPTATION_H - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/asyreference/inc/ASYReferenceCmdHandlerBase.h --- a/systemswstubs/asyreference/inc/ASYReferenceCmdHandlerBase.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used as an reference implementation. -* -*/ - - -#ifndef CASYREFERENCECMDHANDLERBASE_H -#define CASYREFERENCECMDHANDLERBASE_H - -// INCLUDES -#include -#include "ASYAdaptation.h" -#include "ASYmessage.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -//class CSACSession; -class CASYReferenceMainServiceBase; - -// CLASS DECLARATION - -/** -* CSACAccessoryCommandHandler -* This class declarates the CSACAccessoryCommandHandler -*/ - -class CASYReferenceCmdHandlerBase : public CASYCommandHandlerBase, public MASYAdaptation - { - public: // constructor and destructor - - /** - * Constructor - */ - static CASYReferenceCmdHandlerBase* NewL(); - - /** - * Destructor. - */ - virtual ~CASYReferenceCmdHandlerBase(); - - private: // constuctors - - /** - * C++ constructor. - */ - CASYReferenceCmdHandlerBase(); - - /** - * 2nd phase constructor. - */ - void ConstructL(); - - /** - * Maps ASY command parameter to internal accessory feature - * @param aCommandParamRecord Accessory Server parameter - * @param aAccessoryFeature Internal accessory feature - */ - void MapCommandToAccessoryFeatureL( const TASYCommandParamRecord& aCommandParamRecord, - AccessoryFeature::TAccessoryFeature& aAccessoryFeature ); - - private: // functions from base classes - - /** - * From CASYCommandHandlerBase - * Processes command from Accessory FW - * @param aCommand Command - * @param aCmdParams Parameters - * @return none - */ - void ProcessCommandL( const TProcessCmdId aCommand, const TASYCmdParams& aCmdParams ); - - private: // functions from base classes - - /** - * From MASYAdaptation - * Indicates ASY about received response message - * @param aMessage Reference to a received message - * @return none - */ - void ProcessResponseL( TASYMessage& aMessage ); - - /** - * From MASYAdaptation - * Indicates ASY about received error response message - * @param aErrorCode Error code for current message - * @param aMessage Reference to a received message - * @return none - */ - void ProcessErrorResponseL( TInt aErrorCode, TASYMessage& aMessage ); - - /** - * From MASYAdaptation - * Indicates ASY about received accessory event message - * @param aMessage Reference to a received message - * @return none - */ - void RaiseEventL( TASYMessage& aMessage ); - - private: // data - - }; - -#endif //CASYREFERENCECMDHANDLERBASE_H - -// End of File - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/asyreference/inc/ASYReferenceMainServiceBase.h --- a/systemswstubs/asyreference/inc/ASYReferenceMainServiceBase.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,169 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used as an reference implementation -* -*/ - - -#ifndef CASYREFERENCEMAINSERVICEBASE_H -#define CASYREFERENCEMAINSERVICEBASE_H - -// INCLUDES -#include -#include "ASYAdaptation.h" -#include "ASYmessage.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -class CAccConfigFileParser; -class RAccessoryControl; -class CAccConGenericID; - -// CLASS DECLARATION - -/** -* Declaration of CSACAccessoryConnectionHandler class. -*/ - -class CASYReferenceMainServiceBase : public CASYMainServiceBase, public MASYAdaptation - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - static CASYReferenceMainServiceBase* NewL(); - - /** - * Destructor. - */ - virtual ~CASYReferenceMainServiceBase(); - - private: // Constructors - - /** - * C++ constructor. - */ - CASYReferenceMainServiceBase(); - - /** - * Symbian 2nd phase constructor. - */ - void ConstructL(); - - private: // Functions from base classes - - /** - * From CASYMainServiceBase - * @return Error code. - */ - TInt StartL(); - - private: // Functions from base classes - - /** - * From MASYAdaptation - * Indicates ASY about received response message - * @param aMessage Reference to a received message - * @return none - */ - void ProcessResponseL( TASYMessage& aMessage ); - - /** - * From MASYAdaptation - * Indicates ASY about received error response message - * @param aErrorCode Error code for current message - * @param aMessage Reference to a received message - * @return none - */ - void ProcessErrorResponseL( TInt aErrorCode, TASYMessage& aMessage ); - - /** - * From MASYAdaptation - * Indicates ASY about received event message - * @param aMessage Reference to a received message - * @return none - */ - void RaiseEventL( TASYMessage& aMessage ); - - public: // Enumerations - - // internal states - enum TState - { - EStateUnknown = 1, - EStateInitWait, - EStateInitOngoing, - EStateInitOk, - }; - - public: // New functions - - /** - * Signals that an accessory connection state has changed. - * @param aState Accessory Connection state - * @return void - */ - void ConnectionStateChangedL( AccessoryConnection::TConnectionStateInfoStruct& aState ); - - /** - * Changes internal state. - * @param aState Internal state - */ - void StateChangeL( TState aState ); - - /** - * Maps internal accessory feature to ASY command parameter - * @param aAccessoryFeature Internal accessory feature - * @param aCommandParamRecord Accessory Server parameter - */ - void MapAccessoryFeatureL( AccessoryFeature::TAccessoryFeature& aAccessoryFeature, - TASYCommandParamRecord& aCommandParamRecord ); - - - - private: // New functions - - /** - * Signals that an accessory feature state has changed. - * @param aState Feature State - * @return void - */ - void AccessoryFeatureStateBooleanChangedL( AccessoryFeature::TFeatureStateBooleanStruct& aState ); - - private: // Data - - // handle to accessory server subsession - RAccessoryControl* iAccessoryControl; - - // accessory configuration file parser - CAccConfigFileParser* iAccConfigFileParser; - - // internal state - TState iState; - - // Generic ID - CAccConGenericID* iConnectedAccessory; - }; - -#endif // CASYREFERENCEMAINSERVICEBASE_H - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/asyreference/inc/ASYmessage.h --- a/systemswstubs/asyreference/inc/ASYmessage.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used as an reference implementation -* -*/ - - - -#ifndef ASYMESSAGE_H -#define ASYMESSAGE_H - -// INCLUDES -#include -#include "ASYmessagedefinitions.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION -NONSHARABLE_CLASS( TASYMessage ); - -/** -* TASYMessage -* This class declarates the TASYMessage, which is a generic message class example. -* message class. -* -*/ -class TASYMessage - { - public: // Constructors and destructor - - /** - * Constructor. - * @param aGroup Message group. - * @param aID Message ID. - * @param aData Pointer to data. - */ - TASYMessage( const TUint32 aGroupId, const TUint32 aMessageId, - TDesC8& aData ); - - public: // New functions - - /** - * Returns message group - * @return Message group - */ - TUint32 GroupId(); - - /** - * Returns message id - * @return Message id - */ - TUint32 MessageId(); - - /** - * Returns message data - * @return Message data - */ - TDesC8& Data(); - - - private: // Data - // Group id - TUint32 iGroupId; - - // Message id - TUint32 iMessageId; - - // Message data - TDesC8& iData; - - }; - -#endif // ASYMESSAGE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/asyreference/inc/ASYmessagedefinitions.h --- a/systemswstubs/asyreference/inc/ASYmessagedefinitions.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,153 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used as an reference implementation -* -*/ - - -#ifndef ASYMESSAGEDEFINITIONS_H -#define ASYMESSAGEDEFINITIONS_H - -// INCLUDES -#include -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -const TUint32 KASYMessageGroupAccessoryMessage = 0x00010001; /* Message group for Accessory messages */ -const TUint32 KASYMessageGroupAccessoryEvent = 0x00010002; /* Message group for Accessory events */ - - -typedef TBuf8< 15 > TASYAccessoryFeatureData; // Data - -namespace AccessoryConnection - { - enum TConnectionState - { - EStateNotConnected = 1, - EStateConnected - }; - - NONSHARABLE_STRUCT( TConnectionStateInfoStruct ) - { - TInt32 iAccessoryId; // specific accessory ID - TConnectionState iState; // Accessory connection state - }; - - NONSHARABLE_STRUCT( TConnectionStateInfoRetStruct ) - { - TConnectionStateInfoStruct iStateInfo; - TInt iErrorCode; - }; - } - -namespace AccessoryFeature - { - enum TAccessoryFeatureType - { - ETypeNotSupported = 0, - ETypeBoolean, - ETypeData - }; - - enum TAccessoryFeature - { - ENotSupported = 0, - EHeadphonesConnected, - EExternalPowerSourceConnected, - }; - - // Data type for getter (boolean and data) - NONSHARABLE_STRUCT( TFeatureStateGetStruct ) - { - TInt32 iAccessoryId; // specific accessory ID - TAccessoryFeature iFeature; // Feature - }; - - // Data type for boolean feature - NONSHARABLE_STRUCT( TFeatureStateBooleanStruct ) - { - TInt32 iAccessoryId; // specific accessory ID - TAccessoryFeature iFeature; // Feature - TBool iState; // Feature state (boolean) - }; - - NONSHARABLE_STRUCT( TFeatureStateBooleanRetStruct ) - { - TFeatureStateBooleanStruct iFeatureState; - TInt iErrorCode; - }; - - } - -// Example messages -// ----------------------------------------------------------------------------- - const TUint32 KASYMsgAccessoryConnectionHandlerInitCmd = 0x00000001; - -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- - const TUint32 KASYMsgAccessoryConnectionHandlerInitRet = 0x00000002; - typedef TPckgBuf< AccessoryConnection::TConnectionStateInfoRetStruct > TASYMsgAccessoryConnectionHandlerInitRetBuf; -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- - const TUint32 KASYMsgAccessoryGetValueBooleanCmd = 0x00000003; - - typedef TPckgBuf< AccessoryFeature::TFeatureStateGetStruct > TASYMsgAccessoryGetValueBooleanCmdBuf; -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- - const TUint32 KASYMsgAccessoryGetValueBooleanRet = 0x00000004; - - typedef TPckgBuf< AccessoryFeature::TFeatureStateBooleanRetStruct > TASYMsgAccessoryGetValueBooleanRetBuf; -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- - const TUint32 KASYMsgAccessorySetValueBooleanCmd = 0x00000005; - - typedef TPckgBuf< AccessoryFeature::TFeatureStateBooleanStruct > TASYMsgAccessorySetValueBooleanCmdBuf; -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- - const TUint32 KASYMsgAccessorySetValueBooleanRet = 0x00000006; - - typedef TPckgBuf< AccessoryFeature::TFeatureStateBooleanRetStruct > TASYMsgAccessorySetValueBooleanRetBuf; -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- - const TUint32 KASYMsgAccessoryConnectionStateChangedEvent = 0x00000007; - - typedef TPckgBuf< AccessoryConnection::TConnectionStateInfoStruct > TASYMsgAccessoryConnectionStateChangedEventBuf; -// ----------------------------------------------------------------------------- - -// ----------------------------------------------------------------------------- - const TUint32 KASYMsgAccessoryFeatureStateChangedEvent = 0x00000008; - - typedef TPckgBuf< AccessoryFeature::TFeatureStateBooleanStruct > TASYMsgAccessoryFeatureStateChangedEventBuf; -// ----------------------------------------------------------------------------- - -#endif // ASYMESSAGEDEFINITIONS_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/asyreference/inc/acc_debug.h --- a/systemswstubs/asyreference/inc/acc_debug.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,234 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Macro definitions for tracing and debugging purposes. -* -*/ - - -#ifndef ACC_DEBUG_H -#define ACC_DEBUG_H - -#ifdef _DEBUG - -// INCLUDES -#include - -// CONSTANTS -_LIT( KComponent, "[AccFW:Component]" ); -_LIT( KThisFile, "[AccFW:Component] - Trace this file: %s, line: %d, compiled: %s %s" ); -_LIT( KAssertion, "[AccFW:Component] - Assertion failed: File: %s, line: %d, compiled: %s %s" ); -_LIT( KPanic, "[AccFW:Component] - Panic occurred: File: %s, line: %d, compiled: %s %s" ); -_LIT8( KDATE, __DATE__ ); -_LIT8( KTIME, __TIME__ ); - -// DATA TYPES -enum TTraceType - { - ETraceInit, - ETraceAssert, - ETracePanic - }; - -// INLINE FUNCTIONS - - // ----------------------------------------------------------------------------- - // ThisFileFunc - // ----------------------------------------------------------------------------- - inline void ThisFileFunc( const TDesC8& aFile, - TInt aLine, - TTraceType aType = ETraceInit ) - { - HBufC* fileBuf = HBufC::New( aFile.Length() + 1 ); - HBufC* dateBuf = HBufC::New( 32 ); - HBufC* timeBuf = HBufC::New( 32 ); - - if ( fileBuf != NULL && dateBuf != NULL && timeBuf != NULL ) - { - fileBuf->Des().Copy( aFile ); - timeBuf->Des().Copy( KTIME ); - dateBuf->Des().Copy( KDATE ); - - if ( aType == ETraceInit ) - { - RDebug::Print( KThisFile, - fileBuf->Des().PtrZ(), - aLine, - dateBuf->Des().PtrZ(), - timeBuf->Des().PtrZ() ); - } - - else if ( aType == ETraceAssert ) - { - RDebug::Print( KAssertion, - fileBuf->Des().PtrZ(), - aLine, - dateBuf->Des().PtrZ(), - timeBuf->Des().PtrZ() ); - } - - else if ( aType == ETracePanic ) - { - RDebug::Print( KPanic, - fileBuf->Des().PtrZ(), - aLine, - dateBuf->Des().PtrZ(), - timeBuf->Des().PtrZ() ); - } - - else - { - - } - } - - else - { - RDebug::Print( _L( "Assertion and memory allocation failed!" ) ); - } - - delete fileBuf; - delete dateBuf; - delete timeBuf; - } - - // ----------------------------------------------------------------------------- - // TraceAssertFunc - // ----------------------------------------------------------------------------- - inline void TraceAssertFunc( const TDesC8& aFile, TInt aLine ) - { - ThisFileFunc( aFile, aLine, ETraceAssert ); - } - - // ----------------------------------------------------------------------------- - // TracePanicFunc - // ----------------------------------------------------------------------------- - inline void TracePanicFunc( const TDesC8& aFile, TInt aLine ) - { - ThisFileFunc( aFile, aLine, ETracePanic ); - User::Panic( KComponent, KErrGeneral ); - } - -// MACROS - #define PANIC_IF_FALSE( a ) if ( !( a ) )\ - TracePanicFunc( TPtrC8( ( TText8* ) __FILE__), __LINE__ ) - - #define PANIC_IF_TRUE( a ) if ( ( a ) )\ - TracePanicFunc( TPtrC8( ( TText8* ) __FILE__), __LINE__ ) - - #define PANIC_ALWAYS\ - TracePanicFunc( TPtrC8( ( TText8* ) __FILE__), __LINE__ ) - - // ----------------------------------------------------------------------------- - // COMPONENT_TRACE_FLAG - // ----------------------------------------------------------------------------- - #ifdef COMPONENT_TRACE_FLAG - - #define COMPONENT_TRACE_THIS_FILE\ - ThisFileFunc( TPtrC8( ( TText8* ) __FILE__), __LINE__ ) - - #define COM_TRACE_( AAA ) do\ - { _LIT( logStr, AAA ); RDebug::Print( logStr ); } while ( 0 ) - - #define COM_TRACE_1( AAA, BBB ) do\ - { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB ); } while ( 0 ) - - #define COM_TRACE_2( AAA, BBB, CCC ) do\ - { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB, CCC ); } while ( 0 ) - - #define COM_TRACE_3( AAA, BBB, CCC, DDD ) do\ - { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB, CCC, DDD ); } while ( 0 ) - - #define COM_TRACE_4( AAA, BBB, CCC, DDD, EEE ) do\ - { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB, CCC, DDD, EEE ); } while ( 0 ) - - #else - - #define COMPONENT_TRACE_THIS_FILE - - #define COM_TRACE_( AAA ) - #define COM_TRACE_1( AAA, BBB ) - #define COM_TRACE_2( AAA, BBB, CCC ) - #define COM_TRACE_3( AAA, BBB, CCC, DDD ) - #define COM_TRACE_4( AAA, BBB, CCC, DDD, EEE ) - - #endif // COMPONENT_TRACE_FLAG - - #define TRACE_ASSERT( a ) if ( !( a ) )\ - TraceAssertFunc( TPtrC8( ( TText8* ) __FILE__), __LINE__ ) - - #define TRACE_ASSERT_RETURN( a ) if ( !( ( a ) == KErrNone ) )\ - TraceAssertFunc( TPtrC8( ( TText8* ) __FILE__), __LINE__ ) - - #define TRACE_ASSERT_ALWAYS\ - TraceAssertFunc( TPtrC8( ( TText8* ) __FILE__ ), __LINE__ ) - - // ----------------------------------------------------------------------------- - // API_TRACE_FLAG - // ----------------------------------------------------------------------------- - #ifdef API_TRACE_FLAG - - #define API_TRACE_( AAA ) do\ - { _LIT( logStr, AAA ); RDebug::Print( logStr ); } while ( 0 ) - - #define API_TRACE_1( AAA, BBB ) do\ - { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB ); } while ( 0 ) - - #define API_TRACE_2( AAA, BBB, CCC ) do\ - { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB, CCC ); } while ( 0 ) - - #define API_TRACE_3( AAA, BBB, CCC, DDD ) do\ - { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB, CCC, DDD ); } while ( 0 ) - - #define API_TRACE_4( AAA, BBB, CCC, DDD, EEE ) do\ - { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB, CCC, DDD, EEE ); } while ( 0 ) - - #else - - #define API_TRACE_( AAA ) - #define API_TRACE_1( AAA, BBB ) - #define API_TRACE_2( AAA, BBB, CCC ) - #define API_TRACE_3( AAA, BBB, CCC, DDD ) - #define API_TRACE_4( AAA, BBB, CCC, DDD, EEE ) - - #endif // API_TRACE_FLAG - -#else // _DEBUG - - #define TRACE_ASSERT( a ) - #define TRACE_ASSERT_RETURN( a ) a - #define TRACE_ASSERT_ALWAYS - - #define COM_TRACE_( AAA ) - #define COM_TRACE_1( AAA, BBB ) - #define COM_TRACE_2( AAA, BBB, CCC ) - #define COM_TRACE_3( AAA, BBB, CCC, DDD ) - #define COM_TRACE_4( AAA, BBB, CCC, DDD, EEE ) - - #define API_TRACE_( AAA ) - #define API_TRACE_1( AAA, BBB ) - #define API_TRACE_2( AAA, BBB, CCC ) - #define API_TRACE_3( AAA, BBB, CCC, DDD ) - #define API_TRACE_4( AAA, BBB, CCC, DDD, EEE ) - - #define COMPONENT_TRACE_THIS_FILE - - #define PANIC_IF_FALSE( a ) - #define PANIC_IF_TRUE( a ) - #define PANIC_ALWAYS - -#endif // _DEBUG - -#endif // ACC_DEBUG_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/asyreference/rom/ASYReference.iby --- a/systemswstubs/asyreference/rom/ASYReference.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef ASYREFERENCE_IBY -#define ASYREFERENCE_IBY - -#ifdef __ACCESSORY_FW - -ECOM_PLUGIN(ASYReferencePlugin.dll, ASYReferencePlugin.rsc) - -#endif // __ACCESSORY_FW -#endif // ASYREFERENCE_IBY - -// End of File - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/asyreference/src/ASYReferenceCmdHandlerBase.cpp --- a/systemswstubs/asyreference/src/ASYReferenceCmdHandlerBase.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,355 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used as an reference implementation -* -*/ - - -// INCLUDE FILES - -#include "ASYReferenceCmdHandlerBase.h" -#include "ASYReferenceMainServiceBase.h" -#include "acc_debug.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CASYReferenceCmdHandlerBase* CASYReferenceCmdHandlerBase::NewL() - { - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceCmdHandlerBase::NewL() - Enter" ); - - CASYReferenceCmdHandlerBase * self = new(ELeave) CASYReferenceCmdHandlerBase( ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceCmdHandlerBase::NewL() - Return" ); - - return self; - } - -// ----------------------------------------------------------------------------- -// destructor. -// ----------------------------------------------------------------------------- -// -CASYReferenceCmdHandlerBase::~CASYReferenceCmdHandlerBase() - { - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceCmdHandlerBase::~CASYReferenceCmdHandlerBase() - Enter" ); - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceCmdHandlerBase::~CASYReferenceCmdHandlerBase() - Return" ); - } - -// ----------------------------------------------------------------------------- -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CASYReferenceCmdHandlerBase::CASYReferenceCmdHandlerBase() - { - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceCmdHandlerBase::CASYReferenceCmdHandlerBase() - Enter" ); - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceCmdHandlerBase::CASYReferenceCmdHandlerBase() - Return" ); - } - -// ----------------------------------------------------------------------------- -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -void CASYReferenceCmdHandlerBase::ConstructL() - { - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceCmdHandlerBase::CASYReferenceCmdHandlerBase() - Enter" ); - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceCmdHandlerBase::CASYReferenceCmdHandlerBase() - Return" ); - } - -// ----------------------------------------------------------------------------- -// CASYReferenceCmdHandlerBase::ProcessCommandL -// ----------------------------------------------------------------------------- -// -void CASYReferenceCmdHandlerBase::ProcessCommandL( - const TProcessCmdId aCommand, - const TASYCmdParams& aCmdParams ) - { - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceCmdHandlerBase::ProcessCommandL() - Enter" ); - - CASYReferenceMainServiceBase* connectionHandler = (CASYReferenceMainServiceBase *) ASYMainServiceBase(); - - if( !connectionHandler ) - { - User::Leave( KErrGeneral ); - } - - switch( aCommand ) - { - case ECmdProcessCommandInit: - { - - // Command received from Accessory Server. - - // Connection handler state is set ongoing. - connectionHandler->StateChangeL( CASYReferenceMainServiceBase::EStateInitOngoing ); - - // [A.2] Process command init is received from Accessory Server - // At this point it is possible to request from an Accessory Driver/Domestic OS if the accessory connection exists. - // In this example the Process response is send immediately to Accessory Server. - TASYMsgAccessoryConnectionHandlerInitRetBuf package; - - // Accessory is not connected to terminal. - package().iStateInfo.iState = AccessoryConnection::EStateNotConnected; - package().iStateInfo.iAccessoryId = 0xffffff; - TASYMessage message( KASYMessageGroupAccessoryMessage, KASYMsgAccessoryConnectionHandlerInitRet, package ); - - // Call straight ProcessResponse. - ProcessResponseL( message ); - - } - break; - - case ECmdGetValueBool: - { - - // [E.1] Command received from Accessory Server - - TASYMsgAccessoryGetValueBooleanCmdBuf cmdPackage; - - // Map and set feature - MapCommandToAccessoryFeatureL( aCmdParams(), cmdPackage().iFeature ); - - // Set Device ID - TInt32 deviceId = ( TInt32 ) aCmdParams().iGenericID.HWDeviceID(); - cmdPackage().iAccessoryId = deviceId; - - // - // [E.2] Send request to an Accessory Driver/Domestic OS. - // - - } - break; - - - case ECmdSetValueBool: - { - - // [E.1] Command received from Accessory Server - - TASYMsgAccessorySetValueBooleanCmdBuf cmdPackage; - - // Map and set feature - MapCommandToAccessoryFeatureL( aCmdParams(), cmdPackage().iFeature ); - - // Set Device ID - TInt32 deviceId = ( TInt32 ) aCmdParams().iGenericID.HWDeviceID(); - cmdPackage().iAccessoryId = deviceId; - - if( aCmdParams().iCmdValue ) - { - cmdPackage().iState = ETrue; - } - else - { - cmdPackage().iState = EFalse; - } - - // - // [E.2] Send request to an Accessory Driver/Domestic OS - // - - } - break; - - default: - - User::Leave( KErrNotSupported ); - break; - } - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceCmdHandlerBase::ProcessCommandL() - Enter" ); - } - -// ----------------------------------------------------------------------------- -// CASYReferenceCmdHandlerBase::ProcessResponseL -// ----------------------------------------------------------------------------- -// -void CASYReferenceCmdHandlerBase::ProcessResponseL( TASYMessage& aMessage ) - { - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceCmdHandlerBase::ProcessResponseL() - Enter" ); - // Response for previous made process command, received from an Accessory Driver/Domestic OS. - - CASYReferenceMainServiceBase* connectionHandler = (CASYReferenceMainServiceBase *) ASYMainServiceBase(); - - if( !connectionHandler ) - { - User::Leave( KErrGeneral ); - } - - switch ( aMessage.GroupId() ) - { - case KASYMessageGroupAccessoryMessage: - - switch ( aMessage.MessageId() ) - { - - case KASYMsgAccessoryConnectionHandlerInitRet: - { - - connectionHandler->StateChangeL( CASYReferenceMainServiceBase::EStateInitOk ); - - TASYMsgAccessoryConnectionHandlerInitRetBuf package; - package.Copy( aMessage.Data() ); - - if( package().iStateInfo.iState == AccessoryConnection::EStateConnected ) - { - // - // Accessory connection exists in Accessory Driver/Domestic OS, inform accessory connection handler. - // - connectionHandler->ConnectionStateChangedL( package().iStateInfo ); - } - - TAccValueTypeTBool state; - state.iValue = ETrue; - - // [A.3] After process responce for the previous made process command with init parameter - // Server is aware wheather accessory was connected or not ( to Accessory Server ). - - CASYCommandHandlerBase::ProcessResponseL( state, KErrNone ); - - } - break; - case KASYMsgAccessoryGetValueBooleanRet: - { - - // - // [E.3] Send response previous made process command ( to Accessory Server ). - // - TASYMsgAccessoryGetValueBooleanRetBuf response; - response.Copy( aMessage.Data() ); - - TAccValueTypeTBool state; - state.iValue = response().iFeatureState.iState; - CASYCommandHandlerBase::ProcessResponseL( state, KErrNone ); - - } - break; - - case KASYMsgAccessorySetValueBooleanRet: - { - - // - // [E.3] Send response previous made process command ( to Accessory Server ). - // - - TASYMsgAccessorySetValueBooleanRetBuf response; - response.Copy( aMessage.Data() ); - - TAccValueTypeTBool state; - TInt errorCode = response().iErrorCode; - state.iValue = response().iFeatureState.iState; - CASYCommandHandlerBase::ProcessResponseL( state, errorCode ); - - } - break; - - default: - { - - User::Leave( KErrGeneral ); - } - break; - } - - break; - - default: - { - - User::Leave( KErrGeneral ); - } - break; - } - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceCmdHandlerBase::ProcessResponseL() - Return" ); - } - -// ----------------------------------------------------------------------------- -// CSACAccessoryCommandHandler::ProcessErrorResponseL -// ----------------------------------------------------------------------------- -// -void CASYReferenceCmdHandlerBase::ProcessErrorResponseL( TInt /*aErrorCode*/, - TASYMessage& /*aMessage*/ ) - { - - } - - -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -void CASYReferenceCmdHandlerBase::MapCommandToAccessoryFeatureL( const TASYCommandParamRecord& aCommandParamRecord, - AccessoryFeature::TAccessoryFeature& aAccessoryFeature ) - { - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceCmdHandlerBase::MapCommandToAccessoryFeatureL() - Enter" ); - TUint32 param; - - //Couple of accessory feature examples which can be requested from an Accessory Driver/Domestic OS. - aCommandParamRecord.iNameRecord.GetName( param ); - - if( param == KAccAudioOutConnector ) - { - aAccessoryFeature = AccessoryFeature::EHeadphonesConnected; - } - else if( param == KAccExtPowerSupply ) - { - - aAccessoryFeature = AccessoryFeature::EExternalPowerSourceConnected; - } - else - { - - User::Leave( KErrArgument ); - } - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceCmdHandlerBase::MapCommandToAccessoryFeatureL() - Return" ); - } -// ----------------------------------------------------------------------------- -// -// ----------------------------------------------------------------------------- -// -void CASYReferenceCmdHandlerBase::RaiseEventL( TASYMessage& aMessage ) - { - - (void) aMessage; - } - -// End of file - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/asyreference/src/ASYReferenceMainServiceBase.cpp --- a/systemswstubs/asyreference/src/ASYReferenceMainServiceBase.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,497 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used as an reference implementation -* -*/ - - - -// INCLUDE FILES -#include -#include -#include -#include -#include -#include "ASYReferenceMainServiceBase.h" -#include "acc_debug.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CASYReferenceMainServiceBase::CASYReferenceMainServiceBase() - : iAccessoryControl() - , iAccConfigFileParser( NULL ) - , iState( EStateUnknown ) - , iConnectedAccessory( NULL ) - { - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceMainServiceBase::CASYReferenceMainServiceBase() - Enter" ); - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceMainServiceBase::CASYReferenceMainServiceBase() - Return" ); - } - -// ----------------------------------------------------------------------------- -// -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -void CASYReferenceMainServiceBase::ConstructL() - { - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceMainServiceBase::ConstructL() - Enter" ); - - // ConfigFileParser instance is created for GID parsing. - iAccConfigFileParser = CAccConfigFileParser::NewL( KNullDesC ); - - // AccessoryControl instance is created for Accessory Connection / Disconnection handling. - iAccessoryControl = new ( ELeave ) RAccessoryControl(); - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceMainServiceBase::ConstructL() - Return" ); - } - -// ----------------------------------------------------------------------------- -// -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CASYReferenceMainServiceBase* CASYReferenceMainServiceBase::NewL() - { - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceMainServiceBase::NewL() - Enter" ); - - CASYReferenceMainServiceBase * self = new ( ELeave ) CASYReferenceMainServiceBase(); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceMainServiceBase::NewL() - Return" ); - - return self; - } - -// ----------------------------------------------------------------------------- -// -// destructor. -// ----------------------------------------------------------------------------- -// -CASYReferenceMainServiceBase::~CASYReferenceMainServiceBase() - { - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceMainServiceBase::~CASYReferenceMainServiceBase() - Enter" ); - - if( iAccessoryControl ) - { - iAccessoryControl->CloseSubSession(); - } - - delete iConnectedAccessory; - iConnectedAccessory = NULL; - - delete iAccessoryControl; - iAccessoryControl = NULL; - - delete iAccConfigFileParser; - iAccConfigFileParser = NULL; - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceMainServiceBase::~CASYReferenceMainServiceBase() - Return" ); - - } - -// ---------------------------------------------------------------------------------- -// CASYReferenceMainServiceBase::StartL -// ---------------------------------------------------------------------------------- -// -TInt CASYReferenceMainServiceBase::StartL() - { - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceMainServiceBase::StartL() - Enter" ); - - // - //CASYReferenceMainServiceBase internal state is change to InitWait - // - StateChangeL( EStateInitWait ); - - TInt err ( KErrNone ); - - - // - // Following syntax is used from now on to illustrate ASY sequences. - // - - // - // Comments of initialization sequence during terminal boot are marked as [A.n]. - // - - // - // Comments of accessory connection sequence are marked as [B.n] - // - - // - // Comments of accessory disconnection sequence are marked as [C.n] - // - - // - // Comments of internal state change of accessory feature are marked as [D.n] - // Example external headphones are connected to headset control unit. - - // - // Comments of getting/setting accessory internal state are marked as [E.n] - // - - // [A.1] Signals Accessory Server that ASY implementation is ready to receive commands. - // Process command by init parameter is received after signal method call - // (Receiver in this example is CASYReferenceCmdHandlerBase class). - Signal(); - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceMainServiceBase::StartL() - Return" ); - - return err; - } - -// ----------------------------------------------------------------------------- -// CASYReferenceMainServiceBase::ProcessResponseL -// ----------------------------------------------------------------------------- -// -void CASYReferenceMainServiceBase::ProcessResponseL( TASYMessage& /*aMessage*/ ) - { - - } - -// ----------------------------------------------------------------------------- -// CASYReferenceMainServiceBase::ProcessErrorResponseL -// ----------------------------------------------------------------------------- -// -void CASYReferenceMainServiceBase::ProcessErrorResponseL( - TInt aErrorCode, - TASYMessage& aMessage ) - { - - (void) aMessage; - (void) aErrorCode; - - } - -// ----------------------------------------------------------------------------- -// CASYReferenceMainServiceBase::RaiseEventL -// ----------------------------------------------------------------------------- -// -void CASYReferenceMainServiceBase::RaiseEventL( TASYMessage& aMessage ) - { - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceMainServiceBase::RaiseEventL() - Enter" ); - - // - // [B.1], [C.1], [D.1] Accessory events are received from Accessory Driver/Domestic OS. - // - if( aMessage.GroupId() == KASYMessageGroupAccessoryEvent ) - { - // Event processing according the accessory event. - switch( aMessage.MessageId() ) - { - case KASYMsgAccessoryConnectionStateChangedEvent: - { - - // Accessory connection state is changed. - TASYMsgAccessoryConnectionStateChangedEventBuf package; - package.Copy( aMessage.Data() ); - - ConnectionStateChangedL( package() ); - } - break; - case KASYMsgAccessoryFeatureStateChangedEvent: - { - - // State of accessory feature is changed. - TASYMsgAccessoryFeatureStateChangedEventBuf package; - package.Copy( aMessage.Data() ); - - AccessoryFeatureStateBooleanChangedL( package() ); - } - break; - default: - User::Leave( KErrGeneral ); - break; - }; - } - else - { - User::Leave( KErrGeneral ); - } - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceMainServiceBase::RaiseEventL() - Return" ); - } - - -// ----------------------------------------------------------------------------- -// CASYReferenceMainServiceBase::StateChangeL -// ----------------------------------------------------------------------------- -// -void CASYReferenceMainServiceBase::StateChangeL( TState aState ) - { - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceMainServiceBase::StateChangeL() - Enter" ); - - TInt err ( KErrGeneral ); - - switch ( aState ) - { - case EStateInitWait: - { - - if ( iState != EStateUnknown ) - { - User::Leave( KErrGeneral ); - } - else - { - // - // initialization of event subscribe(s) can be done here. - // - } - } - break; - case EStateInitOngoing: - { - - if ( iState != EStateInitWait ) - { - User::Leave( KErrGeneral ); - } - // - // Current state extra handling can be added here, if needed. - // - } - break; - case EStateInitOk: - { - if ( iState != EStateInitOngoing ) - { - User::Leave( KErrGeneral ); - } - else - { - // - // Initialized sequence is ready, and session can be created to accessory control. - // - err = iAccessoryControl->CreateSubSession( CASYMainServiceBase::Session() ); - - if ( err != KErrNone ) - { - User::Leave( err ); - } - } - } - break; - - default: - { - User::Leave( KErrGeneral ); - } - break; - } - - // - // Example class state change. - // - iState = aState; - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceMainServiceBase::StateChangeL() - Return" ); - - } - - -// ----------------------------------------------------------------------------- -// CASYReferenceMainServiceBase::ConnectionStateChangedL -// ----------------------------------------------------------------------------- -// -void CASYReferenceMainServiceBase::ConnectionStateChangedL( AccessoryConnection::TConnectionStateInfoStruct& aState ) - { - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceMainServiceBase::ConnectionStateChangedL() - Enter" ); - // - // Accessory Connection handling example. - // - TRequestStatus status; - - switch( aState.iState ) - { - case AccessoryConnection::EStateConnected: - { - - // - // [B.2] Event of an accessory connection is raised to ASY from a Accessory Driver/Domestic OS. - // - - // Delete old Generic ID - if( iConnectedAccessory ) - { - - delete iConnectedAccessory; - iConnectedAccessory = NULL; - } - - TUint64 accessoryId( aState.iAccessoryId ); - - - iConnectedAccessory = CAccConGenericID::NewL(); - - // [B.3] Parse a new Generic ID according to the accessory spesific ID. - iAccConfigFileParser->FindL( iConnectedAccessory, accessoryId, KNullDesC ); - - // Check if accessory is not supported - if( ( iConnectedAccessory->GenericID().UniqueID() ) < 0 ) - { - // Accessory is not supported. Debug purpose. - } - else - { - // Accessory is supported. Debug purpose. - } - - // [B.4] Send connect accessory request to Accessory Server - iAccessoryControl->ConnectAccessory( status, iConnectedAccessory, EFalse ); - - // the WaitForRequest method can be used because ConnectAccessory is immediately complete by - // Accessory Server. - User::WaitForRequest( status ); - - } - break; - case AccessoryConnection::EStateNotConnected: - { - - // - // [C.2] Event of an accessory disconnection is raised to ASY from a Accessory Driver/Domestic OS. - // - - // [C.3] Get current Generic ID. - TAccPolGenericID genericId = iConnectedAccessory->GenericID(); - - // [C.4] Send disconnect request to Accessory Server. - iAccessoryControl->DisconnectAccessory( status, genericId ); - - // the WaitForRequest can be used because DisconnectAccessory is immediately complete by - // Accessory Server. - User::WaitForRequest( status ); - - delete iConnectedAccessory; - iConnectedAccessory = NULL; - } - break; - default: - { - User::Leave( KErrGeneral ); - } - break; - } - - if ( status.Int() != KErrNone ) - { - - } - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceMainServiceBase::ConnectionStateChangedL() - Return" ); - } - - -// ----------------------------------------------------------------------------- -// CASYReferenceMainServiceBase::AccessoryFeatureStateBooleanChangedL -// ----------------------------------------------------------------------------- -void CASYReferenceMainServiceBase::AccessoryFeatureStateBooleanChangedL( AccessoryFeature::TFeatureStateBooleanStruct& aState ) - { - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceMainServiceBase::AccessoryFeatureStateBooleanChangedL() - Enter" ); - - // [D.2] the accessory internal state is change. - - TASYCommandParamRecord record; - - // See accessory feature example --> MapAccessoryFeatureL method. - MapAccessoryFeatureL( aState.iFeature, record ); - - TAccValueTypeTBool state; - state.iValue = aState.iState; - - //Current Generic ID - TAccPolGenericID genericId = iConnectedAccessory->GenericID(); - - // [D.4] Accessory internal state change is indicated to Accessory Server. - iAccessoryControl->AccessoryValueChangedNotifyL( genericId, record.iNameRecord, state ); - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceMainServiceBase::AccessoryFeatureStateBooleanChangedL() - Return" ); - - } - -// ----------------------------------------------------------------------------- -// CASYReferenceMainServiceBase::MapAccessoryFeatureL -// ----------------------------------------------------------------------------- -void CASYReferenceMainServiceBase::MapAccessoryFeatureL( AccessoryFeature::TAccessoryFeature& aAccessoryFeature, - TASYCommandParamRecord& aCommandParamRecord ) - { - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceMainServiceBase::AccessoryFeatureStateBooleanChangedL() - Enter" ); - - // Couple feature examples - switch( aAccessoryFeature ) - { - - // [D.3] - //A headphone is not connected to the sound adapter which means that the accessory is not detected as a control connection (the headset icon is not shown on the phone display). - //Audio Out Connector capability value is updated by ASY when the headphone is connected to the sound adapter, which means that the accessory connection is updated as a control connection. - - case AccessoryFeature::EHeadphonesConnected: - { - aCommandParamRecord.iNameRecord.SetNameL( KAccAudioOutConnector ); - } - break; - case AccessoryFeature::EExternalPowerSourceConnected: - { - aCommandParamRecord.iNameRecord.SetNameL( KAccExtPowerSupply ); - } - break; - - default: - { - User::Leave( KErrGeneral ); - } - break; - } - - COM_TRACE_( "[AccFW:AsyReference] CASYReferenceMainServiceBase::AccessoryFeatureStateBooleanChangedL() - Return" ); - - } - -// End of file - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/asyreference/src/ASYReferencePluginProxy.cpp --- a/systemswstubs/asyreference/src/ASYReferencePluginProxy.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used as an reference implementation -* -*/ - - -// INCLUDE FILES -#include "ASYReferenceMainServiceBase.h" -#include "ASYReferenceCmdHandlerBase.h" - -#include -#include - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// Map the interface implementation UIDs to implementation factory functions -const TImplementationProxy ImplementationTable[] = - { - { { 0x1000B000 }, ( TProxyNewLPtr ) CASYReferenceMainServiceBase::NewL }, - { { 0x1000B001 }, ( TProxyNewLPtr ) CASYReferenceCmdHandlerBase::NewL } - }; - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// Exported proxy for instantiation method resolution. -EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount ) - { - aTableCount = sizeof( ImplementationTable ) / sizeof( TImplementationProxy ); - return ImplementationTable; - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/asyreference/src/ASYmessage.cpp --- a/systemswstubs/asyreference/src/ASYmessage.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The implementation of TASYMessage example class -* -*/ - - - -// INCLUDE FILES -#include "ASYmessage.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// TSASMessage::TSASMessage -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -TASYMessage::TASYMessage( const TUint32 aGroupId, const TUint32 aMessageId, TDesC8& aData ) - : iGroupId( aGroupId ), - iMessageId( aMessageId ), - iData( aData ) - { - } - -// ----------------------------------------------------------------------------- -// TSASMessage::GroupId() -// This function returns the group id of the SAS message -// ----------------------------------------------------------------------------- -// -TUint32 TASYMessage::GroupId() - { - - return iGroupId; - - } - -// ----------------------------------------------------------------------------- -// TSASMessage::MessageId() -// This function returns the message id of the SAS message -// ----------------------------------------------------------------------------- -// -TUint32 TASYMessage::MessageId() - { - - return iMessageId; - - } - -// ----------------------------------------------------------------------------- -// TSASMessage::Data() -// This function returns the transaction id of the SAS message -// ----------------------------------------------------------------------------- -// -TDesC8& TASYMessage::Data() - { - - return iData; - - } - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ddcaccessstub/bwins/ddc_accessu.def --- a/systemswstubs/ddcaccessstub/bwins/ddc_accessu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - ?ApiVersion@CDdcPortAccess@@SAIXZ @ 1 NONAME ; unsigned int CDdcPortAccess::ApiVersion(void) - ?NewL@CDdcPortAccess@@SAPAV1@XZ @ 2 NONAME ; class CDdcPortAccess * CDdcPortAccess::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ddcaccessstub/eabi/ddc_accessu.def --- a/systemswstubs/ddcaccessstub/eabi/ddc_accessu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - _ZN14CDdcPortAccess10ApiVersionEv @ 1 NONAME - _ZN14CDdcPortAccess4NewLEv @ 2 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ddcaccessstub/group/bld.inf --- a/systemswstubs/ddcaccessstub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Build information file for DDC Access Stub. -* -*/ - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_MMPFILES -ddc_access.mmp diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ddcaccessstub/group/ddc_access.mmp --- a/systemswstubs/ddcaccessstub/group/ddc_access.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Project definition file for DDC Access Stub. -* -*/ - -#include -#include - -TARGET ddc_access.dll -TARGETTYPE dll - -UID 0x1000008D 0x101f6e00 - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE ddc_access.cpp -SOURCE ddc_accessimpl.cpp - -USERINCLUDE ../inc - -OS_LAYER_SYSTEMINCLUDE - -LIBRARY euser.lib diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ddcaccessstub/inc/ddc_accessimpl.h --- a/systemswstubs/ddcaccessstub/inc/ddc_accessimpl.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * CDdcPortAccessImpl class declaration. - * - */ - -#ifndef DDCACCESSIMPL_H -#define DDCACCESSIMPL_H - -// SYSTEM INCLUDE FILES -#include -#include - -// USER INCLUDE FILES - -// FORWARD DECLARATIONS - -// DATA TYPES - -// CLASS DECLARATION - -/** - * DDC Access Stub implementation. - * - * @lib ddc_access.lib - * @since S60 TB9.2 - */ -NONSHARABLE_CLASS( CDdcPortAccessImpl ): public CDdcPortAccess - { -public: - - /** - * Symbian two phased constructors. - * - * @since S60 TB9.2 - * @param None. - * @return CDDCAccessImpl - */ - static CDdcPortAccessImpl* NewL(); - static CDdcPortAccessImpl* NewLC(); - - /** - * C++ destructor. - */ - virtual ~CDdcPortAccessImpl(); - -protected: // From base classes - - // @see CDdcPortAccess - virtual TInt Read( TDdcPort aDdcPort, - TUint aBlockNumber, - TDataBlock& aDataBlock, - TRequestStatus& aCompletedWhenRead ); - - // @see CDdcPortAccess - virtual void CancelAll(); - - // @see CDdcPortAccess - virtual void ConstructL(); - -private: - - CDdcPortAccessImpl(); - }; - -#endif // DDCACCESSIMPL_H diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ddcaccessstub/rom/ddcaccessstub.iby --- a/systemswstubs/ddcaccessstub/rom/ddcaccessstub.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: DDC Access Stub ROM files. -* -*/ - -#ifndef DDCACCESSSTUB_IBY -#define TVOUTCONFIG_IBY - -// GS TvOutConfig library: -file=ABI_DIR\BUILD_DIR\ddc_access.dll sys\bin\ddc_access.dll - -#endif // DDCACCESSSTUB_IBY -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ddcaccessstub/src/ddc_access.cpp --- a/systemswstubs/ddcaccessstub/src/ddc_access.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * CDdcPortAccess class implementation. - * - */ - -// SYSTEM INCLUDES - -// USER INCLUDES -#include "ddc_access.h" -#include "ddc_accessimpl.h" - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// Symbian two phased constructor. -// --------------------------------------------------------------------------- -// -EXPORT_C CDdcPortAccess* CDdcPortAccess::NewL() - { - return CDdcPortAccessImpl::NewL(); - } - -//------------------------------------------------------------------------------ -// CDdcPortAccess::ApiVersion -//------------------------------------------------------------------------------ -// -EXPORT_C TUint CDdcPortAccess::ApiVersion() - { - return KDdcAccessVersion; - } - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ddcaccessstub/src/ddc_accessimpl.cpp --- a/systemswstubs/ddcaccessstub/src/ddc_accessimpl.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * CDdcPortAccessImpl class implementation. - * - */ - -// USER INCLUDES -#include "ddc_accessimpl.h" - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// C++ constructor. -// --------------------------------------------------------------------------- -// -CDdcPortAccessImpl::CDdcPortAccessImpl() - { - - } - -// --------------------------------------------------------------------------- -// Symbian 2nd phase constructor. -// --------------------------------------------------------------------------- -// -void CDdcPortAccessImpl::ConstructL() - { - - } - -// --------------------------------------------------------------------------- -// Symbian two phased constructor. -// --------------------------------------------------------------------------- -// -CDdcPortAccessImpl* CDdcPortAccessImpl::NewL() - { - CDdcPortAccessImpl* self = CDdcPortAccessImpl::NewLC(); - CleanupStack::Pop( self ); - return self; - } - -// --------------------------------------------------------------------------- -// Symbian two phased constructor. -// Leaves pointer in the cleanup stack. -// --------------------------------------------------------------------------- -// -CDdcPortAccessImpl* CDdcPortAccessImpl::NewLC() - { - CDdcPortAccessImpl* self = new ( ELeave ) CDdcPortAccessImpl; - CleanupStack::PushL( self ); - self->ConstructL(); - return self; - } - -// --------------------------------------------------------------------------- -// C++ destructor. -// --------------------------------------------------------------------------- -// -CDdcPortAccessImpl::~CDdcPortAccessImpl() - { - - } - -//------------------------------------------------------------------------------ -// CDdcPortAccessImpl::Read -//------------------------------------------------------------------------------ -// -TInt CDdcPortAccessImpl::Read( TDdcPort /*aDdcPort*/, - TUint /*aBlockNumber*/, - TDataBlock& /*aDataBlock*/, - TRequestStatus& aCompletedWhenRead ) - { - TRequestStatus* status = &aCompletedWhenRead; - User::RequestComplete( status, KErrNotSupported ); - return KErrNotSupported; - } - -//------------------------------------------------------------------------------ -// CDdcPortAccessImpl::CancelAll -//------------------------------------------------------------------------------ -// -void CDdcPortAccessImpl::CancelAll() - { - // Nothing to do here. - } - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/BWINS/ISCDRIVEREXTENSIONU.DEF --- a/systemswstubs/examplecommonisc/BWINS/ISCDRIVEREXTENSIONU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - ?CreateLogicalDevice@@YAPAVDLogicalDevice@@XZ @ 1 NONAME ; class DLogicalDevice * __cdecl CreateLogicalDevice(void) - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/BWINS/ISCDRIVERU.DEF --- a/systemswstubs/examplecommonisc/BWINS/ISCDRIVERU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -EXPORTS - ?CreateLogicalDevice@@YAPAVDLogicalDevice@@XZ @ 1 NONAME ; class DLogicalDevice * CreateLogicalDevice(void) - ??0DIscChannel@@QAE@PAVDLogicalDevice@@@Z @ 2 NONAME ; DIscChannel::DIscChannel(class DLogicalDevice *) - ??0DIscDevice@@QAE@XZ @ 3 NONAME ; DIscDevice::DIscDevice(void) - ??0DIscQueue@@QAE@PAPAKG@Z @ 4 NONAME ; DIscQueue::DIscQueue(unsigned long * *, unsigned short) - ??0DIscSendQueue@@QAE@PAPAKPAPAVTIscSendFrameInfo@@G@Z @ 5 NONAME ; DIscSendQueue::DIscSendQueue(unsigned long * *, class TIscSendFrameInfo * *, unsigned short) - ??1DIscDevice@@UAE@XZ @ 6 NONAME ; DIscDevice::~DIscDevice(void) - ??1DIscQueue@@UAE@XZ @ 7 NONAME ; DIscQueue::~DIscQueue(void) - ??1DIscSendQueue@@UAE@XZ @ 8 NONAME ; DIscSendQueue::~DIscSendQueue(void) - ?Add@DIscQueue@@QAEHPAX@Z @ 9 NONAME ; int DIscQueue::Add(void *) - ?Add@DIscSendQueue@@QAEHPAXGPAVDIscChannel@@0@Z @ 10 NONAME ; int DIscSendQueue::Add(void *, unsigned short, class DIscChannel *, void *) - ?CancelSending@DIscDevice@@QAEHGPBX@Z @ 11 NONAME ; int DIscDevice::CancelSending(unsigned short, void const *) - ?CompleteRequest@DIscDevice@@QAEXGHPBX@Z @ 12 NONAME ; void DIscDevice::CompleteRequest(unsigned short, int, void const *) - ?CopyFromUserBuffer@DIscDevice@@QAEHABVTDesC8@@AAVTDes8@@PBXH@Z @ 13 NONAME ; int DIscDevice::CopyFromUserBuffer(class TDesC8 const &, class TDes8 &, void const *, int) - ?CopyToUserBuffer@DIscDevice@@QAEHPAXABVTDesC8@@PBXH@Z @ 14 NONAME ; int DIscDevice::CopyToUserBuffer(void *, class TDesC8 const &, void const *, int) - ?DeleteFirst@DIscQueue@@QAEXXZ @ 15 NONAME ; void DIscQueue::DeleteFirst(void) - ?Empty@DIscQueue@@QAEHXZ @ 16 NONAME ; int DIscQueue::Empty(void) - ?FlushQueues@DIscDevice@@QAEXXZ @ 17 NONAME ; void DIscDevice::FlushQueues(void) - ?GetCaps@DIscDevice@@UBEXAAVTDes8@@@Z @ 18 NONAME ; void DIscDevice::GetCaps(class TDes8 &) const - ?GetFirst@DIscQueue@@QAEPAXXZ @ 19 NONAME ; void * DIscQueue::GetFirst(void) - ?GetFirstFrameInfo@DIscSendQueue@@QAEPAVTIscSendFrameInfo@@XZ @ 20 NONAME ; class TIscSendFrameInfo * DIscSendQueue::GetFirstFrameInfo(void) - ?GetThreadPtr@DIscDevice@@QAEPAVDThread@@PBX@Z @ 21 NONAME ; class DThread * DIscDevice::GetThreadPtr(void const *) - ?IsPending@DIscDevice@@QAEHGPBX@Z @ 22 NONAME ; int DIscDevice::IsPending(unsigned short, void const *) - ?NextBufferLength@DIscQueue@@QAEGXZ @ 23 NONAME ; unsigned short DIscQueue::NextBufferLength(void) - ?NotifyConnectionStatus@DIscDevice@@QAEXH@Z @ 24 NONAME ; void DIscDevice::NotifyConnectionStatus(int) - ?QueueFrame@DIscDevice@@QAEHGPBVTDesC8@@PBXPAX@Z @ 25 NONAME ; int DIscDevice::QueueFrame(unsigned short, class TDesC8 const *, void const *, void *) - ?Receive@DIscDevice@@QBEXPAVTDesC8@@@Z @ 26 NONAME ; void DIscDevice::Receive(class TDesC8 *) const - ?ReleaseMemoryBlock@DIscDevice@@QAEXPAVTDes8@@@Z @ 27 NONAME ; void DIscDevice::ReleaseMemoryBlock(class TDes8 *) - ?RemoveFirst@DIscQueue@@QAEPAXXZ @ 28 NONAME ; void * DIscQueue::RemoveFirst(void) - ?ReserveMemoryBlock@DIscDevice@@QAEXAAPAVTDes8@@G@Z @ 29 NONAME ; void DIscDevice::ReserveMemoryBlock(class TDes8 * &, unsigned short) - ?SetChannel@IscChannelContainer@@SAHPAVDIscChannel@@G@Z @ 30 NONAME ; int IscChannelContainer::SetChannel(class DIscChannel *, unsigned short) - ?ULFlowControl@DIscDevice@@QAEXHGPBX@Z @ 31 NONAME ; void DIscDevice::ULFlowControl(int, unsigned short, void const *) - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/BWINS/IscDataTransmissionBaseCWU.def --- a/systemswstubs/examplecommonisc/BWINS/IscDataTransmissionBaseCWU.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -EXPORTS - ?CreateLogicalDevice@@YAPAVDLogicalDevice@@XZ @ 1 NONAME ; class DLogicalDevice * CreateLogicalDevice(void) - ??0DIscDataTransmissionBase@@QAE@XZ @ 2 NONAME ; DIscDataTransmissionBase::DIscDataTransmissionBase(void) - ??1DIscDataTransmissionBase@@UAE@XZ @ 3 NONAME ; DIscDataTransmissionBase::~DIscDataTransmissionBase(void) - ?AllocBuffers@DIscBufferAllocator@@QAEHXZ @ 4 NONAME ; int DIscBufferAllocator::AllocBuffers(void) - ?AllocBuffers@DIscDataTransmissionBase@@UAEXPAUTIscBufferEntry@@@Z @ 5 NONAME ; void DIscDataTransmissionBase::AllocBuffers(struct TIscBufferEntry *) - ?Connect@DIscDataTransmissionBase@@UAEXPAVDIscDevice@@@Z @ 6 NONAME ; void DIscDataTransmissionBase::Connect(class DIscDevice *) - ?Install@DIscDataTransmissionBase@@UAEHXZ @ 7 NONAME ; int DIscDataTransmissionBase::Install(void) - ?NotifyConnectionStatus@DIscDataTransmissionBase@@IAEXH@Z @ 8 NONAME ; void DIscDataTransmissionBase::NotifyConnectionStatus(int) - ?ReceiveFrame@DIscDataTransmissionBase@@IAEXAAVTDesC8@@@Z @ 9 NONAME ; void DIscDataTransmissionBase::ReceiveFrame(class TDesC8 &) - ?ReleaseMemoryBlock@DIscBufferAllocator@@QAEXPAVTDes8@@@Z @ 10 NONAME ; void DIscBufferAllocator::ReleaseMemoryBlock(class TDes8 *) - ?ReleaseMemoryBlock@DIscDataTransmissionBase@@UAEXPAVTDes8@@@Z @ 11 NONAME ; void DIscDataTransmissionBase::ReleaseMemoryBlock(class TDes8 *) - ?ReserveMemoryBlock@DIscBufferAllocator@@QAEXAAPAVTDes8@@G@Z @ 12 NONAME ; void DIscBufferAllocator::ReserveMemoryBlock(class TDes8 * &, unsigned short) - ?ReserveMemoryBlock@DIscDataTransmissionBase@@UAEXAAPAVTDes8@@G@Z @ 13 NONAME ; void DIscDataTransmissionBase::ReserveMemoryBlock(class TDes8 * &, unsigned short) - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/BWINS/IscMultiplexerBaseCWU.def --- a/systemswstubs/examplecommonisc/BWINS/IscMultiplexerBaseCWU.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -EXPORTS - ?CreateLogicalDevice@@YAPAVDLogicalDevice@@XZ @ 1 NONAME ; class DLogicalDevice * CreateLogicalDevice(void) - ??0DIscMultiplexerBase@@QAE@XZ @ 2 NONAME ; DIscMultiplexerBase::DIscMultiplexerBase(void) - ??1DIscMultiplexerBase@@UAE@XZ @ 3 NONAME ; DIscMultiplexerBase::~DIscMultiplexerBase(void) - ?CancelSending@DIscMultiplexerBase@@IAEHGPBX@Z @ 4 NONAME ; int DIscMultiplexerBase::CancelSending(unsigned short, void const *) - ?CompleteRequest@DIscMultiplexerBase@@IAEXGHPBX@Z @ 5 NONAME ; void DIscMultiplexerBase::CompleteRequest(unsigned short, int, void const *) - ?Connect@DIscMultiplexerBase@@UAEXPAVDIscDevice@@@Z @ 6 NONAME ; void DIscMultiplexerBase::Connect(class DIscDevice *) - ?CopyFromUserBuffer@DIscMultiplexerBase@@IAEHABVTDesC8@@AAVTDes8@@PBXH@Z @ 7 NONAME ; int DIscMultiplexerBase::CopyFromUserBuffer(class TDesC8 const &, class TDes8 &, void const *, int) - ?CopyToUserBuffer@DIscMultiplexerBase@@IAEHPAXABVTDesC8@@PBXH@Z @ 8 NONAME ; int DIscMultiplexerBase::CopyToUserBuffer(void *, class TDesC8 const &, void const *, int) - ?CustomFunction@DIscMultiplexerBase@@UAEHGGPAXPBX@Z @ 9 NONAME ; int DIscMultiplexerBase::CustomFunction(unsigned short, unsigned short, void *, void const *) - ?FlushQueues@DIscMultiplexerBase@@IAEXXZ @ 10 NONAME ; void DIscMultiplexerBase::FlushQueues(void) - ?GetChannelInfo@DIscMultiplexerBase@@UAEHGAAVTDes8@@@Z @ 11 NONAME ; int DIscMultiplexerBase::GetChannelInfo(unsigned short, class TDes8 &) - ?Install@DIscMultiplexerBase@@UAEHXZ @ 12 NONAME ; int DIscMultiplexerBase::Install(void) - ?IsPending@DIscMultiplexerBase@@IAEHGPBX@Z @ 13 NONAME ; int DIscMultiplexerBase::IsPending(unsigned short, void const *) - ?QueueFrame@DIscMultiplexerBase@@IAEHGPBVTDesC8@@PBXPAX@Z @ 14 NONAME ; int DIscMultiplexerBase::QueueFrame(unsigned short, class TDesC8 const *, void const *, void *) - ?ReleaseMemoryBlock@DIscMultiplexerBase@@IAEXPAVTDes8@@@Z @ 15 NONAME ; void DIscMultiplexerBase::ReleaseMemoryBlock(class TDes8 *) - ?ReserveMemoryBlock@DIscMultiplexerBase@@IAEXAAPAVTDes8@@G@Z @ 16 NONAME ; void DIscMultiplexerBase::ReserveMemoryBlock(class TDes8 * &, unsigned short) - ?SetInitializationParameters@DIscMultiplexerBase@@UAEXABVTDesC8@@@Z @ 17 NONAME ; void DIscMultiplexerBase::SetInitializationParameters(class TDesC8 const &) - ?ULFlowControl@DIscMultiplexerBase@@IAEXHGPAX@Z @ 18 NONAME ; void DIscMultiplexerBase::ULFlowControl(int, unsigned short, void *) - ?GetThreadPtr@DIscMultiplexerBase@@IAEPAVDThread@@PBX@Z @ 19 NONAME ; class DThread * DIscMultiplexerBase::GetThreadPtr(void const *) - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/EABI/IscDataTransmissionBaseU.def --- a/systemswstubs/examplecommonisc/EABI/IscDataTransmissionBaseU.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -EXPORTS - _ZN24DIscDataTransmissionBase12AllocBuffersEP15TIscBufferEntry @ 1 NONAME - _ZN24DIscDataTransmissionBase12ReceiveFrameER6TDesC8 @ 2 NONAME - _ZN24DIscDataTransmissionBase18ReleaseMemoryBlockEP5TDes8 @ 3 NONAME - _ZN24DIscDataTransmissionBase18ReserveMemoryBlockERP5TDes8t @ 4 NONAME - _ZN24DIscDataTransmissionBase22NotifyConnectionStatusEi @ 5 NONAME - _ZN24DIscDataTransmissionBase7ConnectEP10DIscDevice @ 6 NONAME - _ZN24DIscDataTransmissionBase7InstallEv @ 7 NONAME - _ZN24DIscDataTransmissionBaseC2Ev @ 8 NONAME - _ZN24DIscDataTransmissionBaseD0Ev @ 9 NONAME - _ZN24DIscDataTransmissionBaseD1Ev @ 10 NONAME - _ZN24DIscDataTransmissionBaseD2Ev @ 11 NONAME - _ZTI19DIscBufferAllocator @ 12 NONAME ; ## - _ZTI24DIscDataTransmissionBase @ 13 NONAME ; ## - _ZTV19DIscBufferAllocator @ 14 NONAME ; ## - _ZTV24DIscDataTransmissionBase @ 15 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/EABI/IscDriverExtensionU.def --- a/systemswstubs/examplecommonisc/EABI/IscDriverExtensionU.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -EXPORTS - _Z19CreateLogicalDevicev @ 1 NONAME - _ZTI25DIscDriverExtensionDevice @ 2 NONAME ; ## - _ZTV25DIscDriverExtensionDevice @ 3 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/EABI/IscDriverU.def --- a/systemswstubs/examplecommonisc/EABI/IscDriverU.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -EXPORTS - _Z19CreateLogicalDevicev @ 1 NONAME - _ZN10DIscDevice10QueueFrameEtPK6TDesC8PKvPv @ 2 NONAME - _ZN10DIscDevice11FlushQueuesEv @ 3 NONAME - _ZN10DIscDevice13CancelSendingEtPKv @ 4 NONAME - _ZN10DIscDevice13ULFlowControlEitPKv @ 5 NONAME - _ZN10DIscDevice15CompleteRequestEtiPKv @ 6 NONAME - _ZN10DIscDevice16CopyToUserBufferEPvRK6TDesC8PKvi @ 7 NONAME - _ZN10DIscDevice18CopyFromUserBufferERK6TDesC8R5TDes8PKvi @ 8 NONAME - _ZN10DIscDevice18ReleaseMemoryBlockEP5TDes8 @ 9 NONAME - _ZN10DIscDevice18ReserveMemoryBlockERP5TDes8t @ 10 NONAME - _ZN10DIscDevice22NotifyConnectionStatusEi @ 11 NONAME - _ZN10DIscDevice9IsPendingEtPKv @ 12 NONAME - _ZN10DIscDeviceC1Ev @ 13 NONAME - _ZN10DIscDeviceC2Ev @ 14 NONAME - _ZN10DIscDeviceD0Ev @ 15 NONAME - _ZN10DIscDeviceD1Ev @ 16 NONAME - _ZN10DIscDeviceD2Ev @ 17 NONAME - _ZN11DIscChannelC1EP14DLogicalDevice @ 18 NONAME - _ZN11DIscChannelC2EP14DLogicalDevice @ 19 NONAME - _ZN13DIscSendQueue17GetFirstFrameInfoEv @ 20 NONAME - _ZN13DIscSendQueue3AddEPvtP11DIscChannelS0_ @ 21 NONAME - _ZN13DIscSendQueueC1EPPmPP17TIscSendFrameInfot @ 22 NONAME - _ZN13DIscSendQueueC2EPPmPP17TIscSendFrameInfot @ 23 NONAME - _ZN13DIscSendQueueD0Ev @ 24 NONAME - _ZN13DIscSendQueueD1Ev @ 25 NONAME - _ZN13DIscSendQueueD2Ev @ 26 NONAME - _ZN19IscChannelContainer10SetChannelEP11DIscChannelt @ 27 NONAME - _ZN9DIscQueue11DeleteFirstEv @ 28 NONAME - _ZN9DIscQueue11RemoveFirstEv @ 29 NONAME - _ZN9DIscQueue16NextBufferLengthEv @ 30 NONAME - _ZN9DIscQueue3AddEPv @ 31 NONAME - _ZN9DIscQueue5EmptyEv @ 32 NONAME - _ZN9DIscQueue8GetFirstEv @ 33 NONAME - _ZN9DIscQueueC1EPPmt @ 34 NONAME - _ZN9DIscQueueC2EPPmt @ 35 NONAME - _ZN9DIscQueueD0Ev @ 36 NONAME - _ZN9DIscQueueD1Ev @ 37 NONAME - _ZN9DIscQueueD2Ev @ 38 NONAME - _ZNK10DIscDevice7GetCapsER5TDes8 @ 39 NONAME - _ZNK10DIscDevice7ReceiveEP6TDesC8 @ 40 NONAME - _ZTI10DIscDevice @ 41 NONAME ; ## - _ZTI11DIscChannel @ 42 NONAME ; ## - _ZTI13DIscSendQueue @ 43 NONAME ; ## - _ZTI17DIscMainRcvBuffer @ 44 NONAME ; ## - _ZTI9DIscQueue @ 45 NONAME ; ## - _ZTV10DIscDevice @ 46 NONAME ; ## - _ZTV11DIscChannel @ 47 NONAME ; ## - _ZTV13DIscSendQueue @ 48 NONAME ; ## - _ZTV17DIscMainRcvBuffer @ 49 NONAME ; ## - _ZTV9DIscQueue @ 50 NONAME ; ## - _ZN10DIscDevice12GetThreadPtrEPKv @ 51 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/EABI/IscMultiplexerBaseU.def --- a/systemswstubs/examplecommonisc/EABI/IscMultiplexerBaseU.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -EXPORTS - _ZN19DIscMultiplexerBase10QueueFrameEtPK6TDesC8PKvPv @ 1 NONAME - _ZN19DIscMultiplexerBase11FlushQueuesEv @ 2 NONAME - _ZN19DIscMultiplexerBase13CancelSendingEtPKv @ 3 NONAME - _ZN19DIscMultiplexerBase13ULFlowControlEitPv @ 4 NONAME - _ZN19DIscMultiplexerBase14CustomFunctionEttPvPKv @ 5 NONAME - _ZN19DIscMultiplexerBase14GetChannelInfoEtR5TDes8 @ 6 NONAME - _ZN19DIscMultiplexerBase15CompleteRequestEtiPKv @ 7 NONAME - _ZN19DIscMultiplexerBase16CopyToUserBufferEPvRK6TDesC8PKvi @ 8 NONAME - _ZN19DIscMultiplexerBase18CopyFromUserBufferERK6TDesC8R5TDes8PKvi @ 9 NONAME - _ZN19DIscMultiplexerBase18ReleaseMemoryBlockEP5TDes8 @ 10 NONAME - _ZN19DIscMultiplexerBase18ReserveMemoryBlockERP5TDes8t @ 11 NONAME - _ZN19DIscMultiplexerBase27SetInitializationParametersERK6TDesC8 @ 12 NONAME - _ZN19DIscMultiplexerBase7ConnectEP10DIscDevice @ 13 NONAME - _ZN19DIscMultiplexerBase7InstallEv @ 14 NONAME - _ZN19DIscMultiplexerBase9IsPendingEtPKv @ 15 NONAME - _ZN19DIscMultiplexerBaseC2Ev @ 16 NONAME - _ZN19DIscMultiplexerBaseD0Ev @ 17 NONAME - _ZN19DIscMultiplexerBaseD1Ev @ 18 NONAME - _ZN19DIscMultiplexerBaseD2Ev @ 19 NONAME - _ZTI19DIscMultiplexerBase @ 20 NONAME ; ## - _ZTV19DIscMultiplexerBase @ 21 NONAME ; ## - _ZN19DIscMultiplexerBase12GetThreadPtrEPKv @ 22 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscApi/inc/IscDefinitions.h --- a/systemswstubs/examplecommonisc/IscApi/inc/IscDefinitions.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,210 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - - -#ifndef ISCDEFINITIONS_H -#define ISCDEFINITIONS_H - -// INCLUDES -#ifndef __KERNEL_MODE__ -#include -#else -#include -#endif // __KERNEL_MODE__ - -// CONSTANTS -const TInt KIscNumberOfUnits = 64; - -// uncomment definition to support channel sharing -//#define ISC_CHANNEL_SHARING_IN_USE - -#ifdef ISC_CHANNEL_SHARING_IN_USE -// amount of how many users one channel can have -const TInt KIscMaxNumberOfChannelSharers = 3; -#else -const TInt KIscMaxNumberOfChannelSharers = 1; -#endif // ISC_CHANNEL_SHARING_IN_USE - -const TInt KIscIniLineLength = 256; - -// constant used by DIscMultiplexerBase::GetFrameInfo, -// TIscFrameInfo.DataMode -enum TIscFrameType - { - EIscNonDataFrame, - EIscDataFrame - }; - -// frame concatenation enumeration -enum TIscFrameConcatenation - { - EIscNoConcatenation, - EIscConcatenationDataStart, - EIscConcatenationData, - EIscConcatenationDataEnd - }; - -/** Connection status enumeration. -@see RIscApi::NotifyConnectionStatus -@see RIscApi::ConnectionStatus -@publishedPartner -@released -*/ -enum TIscConnectionStatus - { - /** - The connection is functional. - */ - EIscConnectionOk=0, - /** - The connection to baseband modem is not functional. - */ - EIscConnectionNotOk - }; - -/** Flow control status enumeration. -@see RIscApi::FlowControlStatus -@see RIscApi::NotifyFlowControl -@publishedPartner -@released -*/ -enum TIscFlowControlStatus - { - /** - Flow control is not active; i.e. the client can operate normally. - */ - EIscFlowControlOff=0, - /** - Flow control is invoked, meaning that the user may no longer send data until the status is back to EIscFlowControlOff. - */ - EIscFlowControlOn, - /** - Indicates that other end has finished sending data or the data connection has been removed. - */ - EIscTransmissionEnd - }; - -const TUint16 KIscControlChannel = 0x00; -const TUint16 KIscFirstChannel = 0x01; -const TUint16 KIscLastChannel = KIscNumberOfUnits-1; // Maximun number of channels in ISC driver framework - -const TUint16 KIscMaxChannelsInLdd = 0x20; // 32 - -const TUint16 KIscFrameReceiverNotFound = 0x500; - -const TUint16 KIscAllChannels = 0x100; - - -// MACROS - -// DATA TYPES - -// enumerations for asynchronous requests in ISC -enum TIscAsyncRequest - { - EIscAsyncInitializeModemInterface, - EIscAsyncOpen, - EIscAsyncLastKernelServerContext, // last kernel server context call - EIscAsyncSend, - EIscAsyncReceive, - EIscAsyncDataSend, - EIscAsyncDataReceive, - EIscAsyncNotifyConnectionStatus, - EIscAsyncNotifyFlowControlStatus, - EIscAsyncCustomOperation1, - EIscAsyncCustomOperation2, - EIscAsyncCustomOperation3, - EIscAsyncCustomOperation4, - EIscAsyncCustomOperation5, - EIscAsyncClose, - EIscAsyncLast - }; - -// enumerations for synchronous requests in ISC -enum TIscSyncRequest - { - EIscSyncClose = EIscAsyncLast, // 15 - EIscSyncLastKernelServerContext,// last kernel server context call - EIscSyncSend, - EIscSyncDataSend, - EIscSyncGetConnectionStatus, - EIscSyncGetFlowControlStatus, - EIscSyncGetChannelInfo, - EIscSyncGetMaximunDataSize, - EIscSyncCustomOperation1, - EIscSyncCustomOperation2, - EIscSyncCustomOperation3, - EIscSyncCustomOperation4, - EIscSyncCustomOperation5, - EIscSyncResetBuffers, - EIscSyncLast - }; - -// enumerations for canceling asynchronous requests in ISC -enum TIscCancelRequest - { - EIscCancelAsyncInitialize = EIscSyncLast, - EIscCancelAsyncOpen, - EIscCancelAsyncSend, - EIscCancelAsyncDataSend, - EIscCancelAsyncReceive, - EIscCancelAsyncDataReceive, - EIscCancelAsyncNotifyConnection, - EIscCancelAsyncNotifyFlowControl, - EIscCancelAsyncCustomOperation1, - EIscCancelAsyncCustomOperation2, - EIscCancelAsyncCustomOperation3, - EIscCancelAsyncCustomOperation4, - EIscCancelAsyncCustomOperation5, - EIscCancelAsyncClose, - EIscCancelLast - }; - -// Panic values used in ASSERT_RESET macro -// Can be seen as "FAULT [component] [TIscIfFault]" in trace or crash debugger -// e.g "FAULT IscDriver: 0x1" -enum TIscIfFault - { - EIscPanicSetChannel=1, // 1 - EIscPanicCreateLogicalDevice, // 2 - EIscMainRcvBufferOverflow, // 3 - EIscNotAllowedCallToDoRequest, // 4 - EIscNotAllowedCallToDoCancel, // 5 - EIscUnknownCommand, // 6 - EIscNullIscDriverPointer, // 7 - EIscMemoryAllocationFailure, // 8 - EIscRequestAlreadyActive, // 9 - EIscDriverNotFound, // 10 - EIscLogicalDevicesNotFound, // 11 - EIscMultiplexerNotFound, // 12 - EIscDataTransmissionDriverNotFound, // 13 - EIscMainRcvBufferInitialize, // 14 - EIscBufferAllocationFailure, // 15 - EIscControlBufferOverflow, // 16 - EIscInvalidChannelPtr // 17 only in debug mode - }; - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -#endif // ISCDEFINITIONS_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscApi/inc/IscTrace.h --- a/systemswstubs/examplecommonisc/IscApi/inc/IscTrace.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - -#ifndef ISCTRACE_H -#define ISCTRACE_H - -// INCLUDES -// CONSTANTS - -// MACROS - -#ifdef TRACE_MODE_KERNEL - - // INCLUDES - #include - - #define _T(a) a -#else - - // INCLUDES - #include // RDebug - #include - - #define _T(a) _L(a) - -#endif // TRACE_MODE_KERNEL - -#ifdef _DEBUG - - #ifdef TRACE_MODE_KERNEL - #define __TRACE_PRINTF(a) Kern::Printf a - #else - #define __TRACE_PRINTF(a) RDebug::Print a - #endif - -#else - #define __TRACE_PRINTF(a) -#endif // _DEBUG - - -#ifdef _DEBUG - - void BuildTraceFunc( const TDesC& aPrefix ); - void DataDumpTraceFunc( const TDesC& aPrefix, const TDesC8& aData ); - - #define BUILD_TRACE( a ) BuildTraceFunc( a ) - #define DATA_DUMP_TRACE( a, b ) DataDumpTraceFunc( a, b ) - - #ifdef TRACE_MODE_KERNEL - - // define assertions - #define TRACE_ASSERT(a) if (!(a)) __TRACE_PRINTF(("Assertion failed: file=" __FILE__ ", line=%d, compiled=" __DATE__" "__TIME__, __LINE__ )) - - #else - - // define assertions - #ifdef __WINS__ - #define TRACE_ASSERT(a) if (!(a)) __TRACE_PRINTF((_L("Assertion failed: file= __FILE__ , line=%d, compiled=__DATE__ __TIME__ "),__LINE__)) - #else - #define TRACE_ASSERT(a) if (!(a)) __TRACE_PRINTF((_L("Assertion failed: file=" __FILE__ ", line=%d, compiled="__DATE__ __TIME__""),__LINE__ )) - #endif //__WINS__ - - #endif // TRACE_MODE_KERNEL - - - #if defined COMPONENT_TRACE_FLAG - #define C_TRACE(a) __TRACE_PRINTF(a) - #else - #define C_TRACE(a) - #endif // COMPONENT_TRACE_FLAG - - #if defined API_TRACE_FLAG - #define A_TRACE(a) __TRACE_PRINTF(a) - #else - #define A_TRACE(a) - #endif // API_TRACE_FLAG - - #if defined EXTENDED_TRACE_FLAG - #define E_TRACE(a) __TRACE_PRINTF(a) - #else - #define E_TRACE(a) - #endif // EXTENDED_TRACE_FLAG - -#else - #define TRACE_ASSERT(a) - #define C_TRACE(a) - #define A_TRACE(a) - #define E_TRACE(a) - #define BUILD_TRACE(a) - #define DATA_DUMP_TRACE(a, b) -#endif // _DEBUG - - -// Resets are made both in UDEB and UREL (traces only in udeb) -#ifdef TRACE_MODE_KERNEL - #define ASSERT_RESET_ALWAYS(a,b,c) if(!(a)) { __TRACE_PRINTF(("Assertion failed: file=" __FILE__ ", line=%d, compiled="__DATE__" "__TIME__, __LINE__)); Kern::Fault(b,c); } - #define TRACE_ASSERT_ALWAYS __TRACE_PRINTF( ("Assertion failed: file=" __FILE__ ", line=%d, compiled="__DATE__" "__TIME__, __LINE__) ) -#else - #ifdef __WINS__ - #define ASSERT_RESET_ALWAYS(a,b,c) error - #define TRACE_ASSERT_ALWAYS __TRACE_PRINTF( (_L("Assertion failed: file= __FILE__ , line=%d, compiled=__DATE__ __TIME__ "),__LINE__) ) - #else - #define ASSERT_RESET_ALWAYS(a,b,c) error - #define TRACE_ASSERT_ALWAYS __TRACE_PRINTF( (_L("Assertion failed: file=%s, line=%d, compiled=%s %s "),__FILE__, __LINE__, __DATE__, __TIME__) ) - #endif -#endif // kernel - - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -#endif // ISCTRACE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscApi/src/IscApi.cpp --- a/systemswstubs/examplecommonisc/IscApi/src/IscApi.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1230 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of RIscApi class -* -*/ - - - -// INCLUDE FILES -#include -#include -#include -#include -#include -#include "IscTrace.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS -_LIT( KIscApiPanic,"IscApi Panic" ); -_LIT( KIscDriverName,"IscDriver" ); -_LIT( KIscDriverExtensionName,"IscDriverExtension" ); - -// MACROS - -// LOCAL CONSTANTS AND MACROS -_LIT( KIniFile,"Z:\\resource\\ISC\\isc_config.ini" ); -_LIT( KMultiplexerLdd,"MultiplexerLdd" ); -_LIT( KDataTransmissionLdd,"DataTransmissionLdd" ); -_LIT( KDataTransmissionPdd,"DataTransmissionPdd" ); -_LIT( KPdd,"PDD" ); -_LIT( KLdd,"LDD" ); -_LIT( KHashSign,"#" ); -_LIT( KSemiColon,";" ); -_LIT( KEqualSign,"=" ); - -_LIT( KIscDriverLdd, "iscdriver.ldd" ); -_LIT( KIscDriverExtensionLdd, "iscdriverextension.ldd" ); - -const TInt KZeroLength( KErrNone ); -const TInt KStartPosition( KErrNone ); -const TInt KOneParam( 1 ); -const TInt KTwoParams( 2 ); -const TInt KThreeParams( 3 ); -const TInt KFirstParam( 0 ); -const TInt KSecondParam( 1 ); -const TInt KThirdParam( 2 ); -const TInt KMajor( KErrNone ); -const TInt KMinor( KErrNone ); -const TInt KBuild( KErrNone ); -const TInt KAddPosition( 1 ); -const TInt KInfoLength( 1 ); - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// RIscApi::RIscApi -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -EXPORT_C RIscApi::RIscApi() - :iNeededLen( NULL, KZeroLength ), - iNeededDataLen( NULL, KZeroLength ), - iConnectionStatus( NULL, KZeroLength ), - iFlowControlStatus( NULL, KZeroLength ), - iOpen( EFalse ), - iChannelNumber( KIscFrameReceiverNotFound ) -#ifdef __WINS__ - ,iInitializing( EFalse ) -#endif - { - } - - -EXPORT_C RIscApi::~RIscApi() - { - - if( iOpen || iChannelNumber != KIscFrameReceiverNotFound ) - { - Close(); - } - else - { - // Do nothing. - } - - } - - -// ----------------------------------------------------------------------------- -// RIscApi::Initialize -// Initialize the ISC Interface -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::InitializeModemInterface - ( - TRequestStatus& aStatus - ) - { - A_TRACE( ( _T( "RIscApi::InitializeModemInterface(0x%x)" ), &aStatus ) ); - -#ifdef __WINS__ - iInitializing = ETrue; -#endif - - CTrapCleanup* cleanup = CTrapCleanup::New(); - TInt r( KErrNone ); - TInt r2( KErrNone ); - HBufC8* multiplexerInit = NULL; - TRAP( r, ( multiplexerInit = HBufC8::NewL( KIscIniLineLength ) ) ); - // buffer to hold the init-string for second-level driver - HBufC8* dataTransmissionInit = NULL; - TRAP( r2, ( dataTransmissionInit = HBufC8::NewL( KIscIniLineLength ) ) ); - __ASSERT_ALWAYS( ( KErrNone == r && KErrNone == r2 ), - User::Panic( KIscApiPanic, EIscApiMemoryAllocationFailure ) ); - // Read ini-file and load needed drivers. - TRAP( r, LoadL( *multiplexerInit, *dataTransmissionInit ) ); - if( KErrAlreadyExists == r ) - { - TRACE_ASSERT_ALWAYS; - C_TRACE( ( _T( "RIscApi::InitializeModemInterface DRIVERS ERROR" ) ) ); - delete multiplexerInit; - multiplexerInit = NULL; - delete dataTransmissionInit; - dataTransmissionInit = NULL; - delete cleanup; - cleanup = NULL; - TRequestStatus* ptrStatus = &aStatus; - User::RequestComplete( ptrStatus, r ); - return; - } - else - { - __ASSERT_ALWAYS( ( KErrNone == r ), - User::Panic( KIscApiPanic,EIscApiDriverLoadFail ) ); - } - - // Open control channel - TInt channel( KIscControlChannel ); - TInt err = DoCreate( KIscDriverName, - TVersion( KMajor, KMinor, KBuild ), - channel, - NULL, - NULL, - EOwnerThread ); - __ASSERT_ALWAYS( KErrNone == err, - User::Panic( KIscApiPanic, EIscApiChannelCreateFail ) ); - iChannelNumber = static_cast( channel ); - iOpen = ETrue; - - TPtrC8 multiplexerInitString( multiplexerInit->Des() ); - TPtrC8 dataTransmissionInitString( dataTransmissionInit->Des() ); - TAny* params[ KThreeParams ]; - params[ KFirstParam ] = (TAny*)&aStatus; - params[ KSecondParam ] = static_cast( &multiplexerInitString ); - params[ KThirdParam ] = static_cast( &dataTransmissionInitString ); - - aStatus = KRequestPending; - //Initialize Data transmission - DoSvControl( EIscAsyncInitializeModemInterface, params ); - - delete multiplexerInit; - multiplexerInit = NULL; - delete dataTransmissionInit; - dataTransmissionInit = NULL; - delete cleanup; - cleanup = NULL; - -#ifdef __WINS__ - iInitializing = EFalse; -#endif - A_TRACE( ( _T( "RIscApi::InitializeModemInterfaceL - return void" ) ) ); - - } - -// ----------------------------------------------------------------------------- -// RIscApi::InitializeCancel -// Cancel ISC Initialization sequence -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::InitializeCancel() - { - A_TRACE( ( _T( "RIscApi::InitializeCancel()" ) ) ); - - if( iOpen && iChannelNumber == KIscControlChannel ) - { - DoControl( EIscCancelAsyncInitialize ); - } - else - { - // Do nothing if not controlchannel who is handling the initialization. - } - - A_TRACE( ( _T( "RIscApi::InitializeCancel - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// RIscApi::LoadL -// Load required drivers using Isc_config.ini file -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void RIscApi::LoadL - ( - const TDesC8& aMultiplexerInit, // Multiplexer init. - const TDesC8& aDataTransmissionInit // Datatransmission init. - ) const - { - C_TRACE( ( _T( "RIscApi::LoadL(0x%x, 0x%x)" ), &aMultiplexerInit, - &aDataTransmissionInit ) ); - - TInt err( KErrNone ); - TInt loadStatus( KErrNone ); - TInt pos( KErrNone ); - - // Temporary buffers. - HBufC* driverNameBuf = HBufC::NewLC( KIscIniLineLength ); - HBufC* iniFileLineBuf = HBufC::NewLC( KIscIniLineLength ); - HBufC* initStringBuf = HBufC::NewLC( KIscIniLineLength ); - // Temporary pointers. - TPtr driverName( driverNameBuf->Des() ); - TPtr initString( initStringBuf->Des() ); - TPtr iniFileLine( iniFileLineBuf->Des() ); - - RFs fsSession; - CleanupClosePushL( fsSession ); - RFile file; - CleanupClosePushL( file ); - TFileText fileText; - User::LeaveIfError( fsSession.Connect() ); - User::LeaveIfError( file.Open( fsSession, KIniFile, - EFileStreamText | EFileRead ) ); - fileText.Set( file ); - - while( KErrNone == fileText.Read( iniFileLine ) ) - { - if( KErrNone < iniFileLine.Length() ) - { - C_TRACE( ( iniFileLine ) ); - pos = KErrNotFound; - loadStatus = KErrNotFound; - if ( iniFileLine.Find( KHashSign ) != KErrNotFound ) - { - pos = KErrNone; - loadStatus = KErrNone; - } - else if ( iniFileLine.Find( KDataTransmissionPdd ) != KErrNotFound ) - { - C_TRACE( ( _T( "RIscApi::LoadL - datatransmissionpdd" ) ) ); - iniFileLine.Trim(); - pos = InifileLineParser( iniFileLine, driverName ); - if( KErrNotFound != pos ) - { - loadStatus = User::LoadPhysicalDevice( driverName ); - } - else - { - // Do nothing. - } - } - else if ( iniFileLine.Find( KDataTransmissionLdd ) != KErrNotFound ) - { - C_TRACE( ( iniFileLine ) ); - pos = InifileLineParser( iniFileLine, driverName ); - if( KErrNotFound != pos ) - { - DriverNameParser( initString, driverName, - *&aDataTransmissionInit ); - loadStatus = User::LoadLogicalDevice( driverName ); - } - else - { - // Do nothing. - } - } - else if ( iniFileLine.Find( KMultiplexerLdd ) != KErrNotFound ) - { - C_TRACE( ( iniFileLine ) ); - pos = InifileLineParser( iniFileLine, driverName ); - if( KErrNotFound != pos ) - { - DriverNameParser( initString, driverName, - *&aMultiplexerInit ); - loadStatus = User::LoadLogicalDevice( driverName ); - } - else - { - // Do nothing. - } - } - else if ( iniFileLine.Find( KPdd ) != KErrNotFound ) - { - C_TRACE( ( _T( "RIscApi::LoadL - pdd" ) ) ); - iniFileLine.Trim(); - pos = InifileLineParser( iniFileLine, driverName ); - if( KErrNotFound != pos ) - { - loadStatus = User::LoadPhysicalDevice( driverName ); - } - else - { - // Do nothing. - } - } - else if ( iniFileLine.Find( KLdd ) != KErrNotFound ) - { - RDebug::Print( _L( "RIscApi::LoadL ldd" ) ); - iniFileLine.Trim(); - pos = InifileLineParser( iniFileLine, driverName ); - if( KErrNotFound != pos ) - { - loadStatus = User::LoadLogicalDevice( driverName ); - } - else - { - // Do nothing. - } - } - __ASSERT_ALWAYS( pos != KErrNotFound, - User::Panic( KIscApiPanic, EIscApiFalseIniFile ) ); - __ASSERT_ALWAYS( KErrAlreadyExists != loadStatus, - User::Leave( loadStatus ) ); - __ASSERT_ALWAYS( KErrNone == loadStatus, - User::Panic( KIscApiPanic, EIscApiDriverLoadFail ) ); - } - else - { - C_TRACE( ( _T( "RIscApi::LoadL IniFileLength = KErrNone" ) ) ); - } - } - loadStatus = User::LoadLogicalDevice( KIscDriverLdd ); - err = User::LoadLogicalDevice( KIscDriverExtensionLdd ); - C_TRACE( ( _T( "RIscApi::LoadL drivers iscdriver %d, iscdriverext %d" ), - loadStatus, err ) ); - __ASSERT_ALWAYS( ( KErrNone == loadStatus|| KErrNone == err ), - User::Panic( KIscApiPanic, EIscApiDriverLoadFail ) ); - // R-Classes fsSession and file Close-method is called when deleted - // from CleanupStack. - CleanupStack::PopAndDestroy( KTwoParams ); - CleanupStack::PopAndDestroy( initStringBuf ); - CleanupStack::PopAndDestroy( iniFileLineBuf ); - CleanupStack::PopAndDestroy( driverNameBuf ); - C_TRACE( ( _T( "RIscApi::LoadL - return void" ) ) ); - - } - -// ----------------------------------------------------------------------------- -// IscApi::LoadLHelper -// Helps parsing the .ini file. -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -TInt RIscApi::InifileLineParser - ( - TDes& aInifileLine, - TDes& aDriverName - ) const - { - C_TRACE( ( _T( "RIscApi::InifileLineParser" ) ) ); - - TInt position( KErrNotFound ); - position = aInifileLine.Find( KEqualSign ); - if( KErrNotFound != position ) - { - // Split the string. - C_TRACE( ( aInifileLine ) ); - aDriverName.Zero(); - aDriverName.Append( aInifileLine.Mid( position + KAddPosition ) ); - aInifileLine.Delete( KStartPosition, KIscIniLineLength ); - C_TRACE( ( aDriverName ) ); - } - else - { - // Do nothing. - } - C_TRACE( ( _T( "RIscApi::InifileLineParser return %d" ), position ) ); - return position; - - } - -// ----------------------------------------------------------------------------- -// IscApi::LoadLSecondHelper -// Helps parsing the .ini file. -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void RIscApi::DriverNameParser - ( - TDes& aInitString, - TDes& aDriverName, - const TDesC8& aString - )const - { - C_TRACE( ( _T( "RIscApi::DriverNameParser" ) ) ); - - TInt position = aDriverName.Find( KSemiColon ); - if( KErrNotFound != position ) - { - C_TRACE( ( aInitString ) ); - // Split the string. - aInitString.Zero(); - aInitString.Append( aDriverName.Mid( position + KAddPosition ) ); - aDriverName.Delete( position, KIscIniLineLength ); - C_TRACE( ( aDriverName ) ); - TPtr8 tmpPtr( ( static_cast( &const_cast( aString ) ) )->Des() ); - tmpPtr.Append( aInitString ); - C_TRACE( ( aInitString ) ); - } - else - { - // Do nothing. - } - C_TRACE( ( _T( "RIscApi::DriverNameParser return " ) ) ); - - } - -// ----------------------------------------------------------------------------- -// RIscApi::Open -// Open ISC channel asyncronously -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::Open( - const TUint16 aChannelNumber, - TRequestStatus& aStatus, - TOwnerType aType, - const TDesC8* aOpenParams ) - { - A_TRACE( ( _T( "RIscApi::Open(0x%x, 0x%x, 0x%x, 0x%x) this %x" ), - aChannelNumber, &aStatus, aType, aOpenParams, this ) ); - - // In case if async Close() is called but channel is not destructed, - // release kernel side memory allocations before actual channel opening. - if( iChannelNumber != KIscFrameReceiverNotFound && iOpen == EFalse ) - { - Close(); - } - else - { - // Do nothing. - } - -#ifdef __WINS__ - // InitializeModemInterface() must be called to load correct drivers. - // In HW this is done e.g. from EStart - - RMutex iscapiMutex; - if ( !iInitializing ) - { - C_TRACE( ( _T( "RIscApi::Open mutex creation" ) ) ); - TInt createErr( iscapiMutex.CreateGlobal( _L( "ISCAPICONNECT" ) ) ); - if ( createErr == KErrNoMemory ) - { - C_TRACE( ( _T( "RIscApi::Open mutex creation FAILED" ) ) ); - TRequestStatus* ptrStatus = &aStatus; - User::RequestComplete( ptrStatus, KErrNoMemory ); - return; - } - else if ( createErr ) - { - TInt openErr( iscapiMutex.OpenGlobal( _L( "ISCAPICONNECT" ) ) ); - if ( openErr ) - { - C_TRACE( ( _T( "RIscApi::Open mutex open FAILED" ) ) ); - TRequestStatus* ptrStatus = &aStatus; - User::RequestComplete( ptrStatus, KErrNoMemory ); - return; - } - else - { - // Do nothing. - } - } - else - { - // Do nothing. - } - iscapiMutex.Wait(); - } - - RDevice handle; - // If already openend, initialization not needed - TInt r = handle.Open( KIscDriverName ); - if( r == KErrNotFound && !iInitializing ) - { - RIscApi temp; - TRequestStatus status; - temp.InitializeModemInterface( status ); - iInitializing = EFalse; - - User::WaitForRequest( status ); - r = status.Int(); - - temp.Close(); - } - else - { - // Do nothing. - } - - if( !iInitializing ) - { - iscapiMutex.Signal(); - } - else - { - // Do nothing. - } - - if( r != KErrNone ) - { - C_TRACE( ( _T( "RIscApi::Open Initialization FAILED" ) ) ); - TRequestStatus* ptrStatus = &aStatus; - User::RequestComplete( ptrStatus, r ); - return; - } - else - { - // Do nothing. - } -#endif - - TBuf8 info; - TInt error( KErrInUse ); - if( !iOpen ) - { - // handle channels 1 .. 31, open channel to IscDriver - if ( aChannelNumber >= KIscFirstChannel - && aChannelNumber < KIscMaxChannelsInLdd ) - { - C_TRACE( ( _T( "RIscApi::Open 1st ldd" ) ) ); - info.Append( ( TUint8 )aChannelNumber ); - error = DoCreate( KIscDriverName, - TVersion( KMajor, KMinor, KBuild ), - ( TInt )aChannelNumber, - NULL, - &info, - aType ); - - } - // handle channels 32 .. 63, open channel to IscDriverExtension - else if ( aChannelNumber >= KIscMaxChannelsInLdd - && aChannelNumber < KIscNumberOfUnits ) - { - C_TRACE( ( _T( "RIscApi::Open 2nd ldd" ) ) ); - info.Append( ( TUint8 )aChannelNumber ); - TInt channelCount( aChannelNumber - KIscMaxChannelsInLdd ); - error = DoCreate( KIscDriverExtensionName, - TVersion( KMajor, KMinor, KBuild ), - channelCount, - NULL, - &info, - aType ); - } - // channel number out of range - else // illegal channel number - { - User::Panic( KIscApiPanic,EIscApiChannelNumberOutOfRange ); - } - } - - if ( error != KErrNone ) - { - C_TRACE( ( _T( "RIscApi::Open - Channel open Failed,\ - channel 0x%x error %d" ), aChannelNumber, error ) ); - TRequestStatus* ptrStatus = &aStatus; - User::RequestComplete( ptrStatus, error ); - } - else - { - iChannelNumber = aChannelNumber; - C_TRACE( ( _T( "RIscApi::Open iChannelNumber %d " ), iChannelNumber ) ); - iOpen = ETrue; - TAny* params[ KThreeParams ]; - params[ KFirstParam ] = (TAny*)&aStatus; - params[ KSecondParam ] = (TAny*)aChannelNumber; - params[ KThirdParam ] = (TAny*)aOpenParams; - - aStatus = KRequestPending; - error = DoSvControl( EIscAsyncOpen, params ); - } - - A_TRACE( ( _T( "RIscApi::Open - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// RIscApi::OpenCancel -// Cancel asynchronous channel opening -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::OpenCancel() - { - A_TRACE( ( _T( "RIscApi::OpenCancel() channel 0x%x" ), iChannelNumber ) ); - - PanicIfNotOpen(); - - DoSvControl( EIscCancelAsyncOpen ); - Close(); - - A_TRACE( ( _T( "RIscApi::OpenCancel - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// RIscApi::Close -// Close ISC Channel -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::Close() - { - A_TRACE( ( _T( "RIscApi::Close channel 0x%x" ), iChannelNumber ) ); - - if( iChannelNumber <= KIscLastChannel && iOpen ) - { - DoSvControl( EIscSyncClose ); - } - else - { - // Do nothing. - } - - iChannelNumber = KIscFrameReceiverNotFound; - iOpen = EFalse; - RHandleBase::Close(); - - A_TRACE( ( _T( "RIscApi::Close - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// RIscApi::Close -// Close ISC Channel -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::Close( TRequestStatus& aStatus ) - { - A_TRACE( ( _T( "RIscApi::Close(0x%x) channel (0x%x)" ), &aStatus, - iChannelNumber ) ); - - TAny* params[ KOneParam ]; - - params[ KFirstParam ] = (TAny*)&aStatus; - aStatus = KRequestPending; - if ( iChannelNumber <= KIscLastChannel && - iOpen ) - { - DoSvControl( EIscAsyncClose, params ); - } - else - { - C_TRACE((_T("RIscApi::Close FAILED"))); - TRequestStatus* ptrStatus = &aStatus; - User::RequestComplete( ptrStatus, KErrNotReady ); - } - - iOpen = EFalse; - - A_TRACE( ( _T( "RIscApi::Close - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// RIsaApi::ResetBuffers -// Resets buffers. -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::ResetBuffers() - { - A_TRACE( ( _T( "RIscApi::ResetBuffers() 0x%x" ), iChannelNumber ) ); - - PanicIfNotOpen(); - - DoSvControl( EIscSyncResetBuffers ); - - A_TRACE( ( _T( "RIscApi::ResetBuffers - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// RIscApi::Send -// Send data to Domestic OS ( asynchronous ) -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::Send( - TRequestStatus& aStatus, - const TDesC8& aData ) - { - A_TRACE( ( _T( "RIscApi::Send(0x%x, 0x%x) iChannelNumber (0x%x) this %x" ), - &aStatus, &aData, iChannelNumber, this ) ); - - PanicIfNotOpen(); - - TAny* params[ KTwoParams ]; - - params[ KFirstParam ] = (TAny*)&aStatus; - params[ KSecondParam ] = (TAny*)&aData; - - aStatus = KRequestPending; - DoControl( EIscAsyncSend, params ); - - A_TRACE( ( _T( "RIscApi::Send - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// RIscApi::Send -// Send data to Domestic OS ( synchronous ) -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt RIscApi::Send( - const TDesC8& aData ) - { - A_TRACE( ( _T( "RIscApi::Send(0x%x) iChannelNumber (0x%x) this %x" ), - &aData, iChannelNumber, this ) ); - - - PanicIfNotOpen(); - - TInt error( KErrNone ); - - TAny* params[ KOneParam ]; - params[ KFirstParam ] = (TAny*)&aData; - - error = DoControl( EIscSyncSend, params ); - - A_TRACE( ( _T( "RIscApi::Send - return %d" ), error ) ); - return error; - } - -// ----------------------------------------------------------------------------- -// RIscApi::SendCancel -// Cancel asynchronous Send request -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::SendCancel() - { - A_TRACE( ( _T( "RIscApi::SendCancel(), channel 0x%x" ), iChannelNumber ) ); - - PanicIfNotOpen(); - - DoSvControl( EIscCancelAsyncSend ); - - A_TRACE( ( _T( "RIscApi::SendCancel - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// RIscApi::Receive -// Receive data from Domestic OS -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::Receive( - TRequestStatus& aStatus, - TDes8& aData, - TUint16& aNeededBufLen ) - { - A_TRACE( ( _T( "RIscApi::Receive 0x%x, 0x%x, 0x%x iChannelNumber 0x%x this\ - 0x%x" ), &aStatus, &aData, aNeededBufLen, iChannelNumber, this ) ); - - PanicIfNotOpen(); - - TAny* params[ KThreeParams ]; - - iNeededLen.Set( ( TUint8* )&aNeededBufLen, sizeof ( TUint16 ), sizeof ( TUint16 ) ); - - params[ KFirstParam ] = (TAny*)&aStatus; - params[ KSecondParam ] = (TAny*)&aData; - params[ KThirdParam ] = (TAny*)&iNeededLen; - - aStatus = KRequestPending; - DoControl( EIscAsyncReceive, params ); - - A_TRACE( ( _T( "RIscApi::Receive - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// RIscApi::ReceiveCancel -// Cancel data receiving from Domestic OS -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::ReceiveCancel() - { - A_TRACE( ( _T( "RIscApi::ReceiveCancel() iChannelNumber (0x%x)" ), - iChannelNumber ) ); - - PanicIfNotOpen(); - - DoControl( EIscCancelAsyncReceive ); - - A_TRACE( ( _T( "RIscApi::ReceiveCancel - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// RIscApi::DataReceiveCancel -// Cancel data receiving from Domestic OS -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::DataReceiveCancel() - { - A_TRACE( ( _T( "RIscApi::DataReceiveCancel() channel 0x%x" ), - iChannelNumber ) ); - - PanicIfNotOpen(); - - DoControl( EIscCancelAsyncDataReceive ); - - A_TRACE( ( _T( "RIscApi::DataReceiveCancel - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// RIscApi::ConnectionStatus -// Get the current connection status -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt RIscApi::ConnectionStatus() - { - A_TRACE( ( _T( "RIscApi::ConnectionStatus() channel 0x%x" ), - iChannelNumber ) ); - - PanicIfNotOpen(); - - TInt state( EIscConnectionOk ); - - state = DoControl( EIscSyncGetConnectionStatus ); - - A_TRACE( ( _T( "RIscApi::ConnectionStatus - return 0x%x" ), state ) ); - - return state; - } - -// ----------------------------------------------------------------------------- -// RIscApi::NotifyConnectionStatus -// Listen for connection status changes -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::NotifyConnectionStatus( - TRequestStatus& aStatus, - TInt& aConnectionStatus ) - { - A_TRACE( ( _T( "RIscApi::NotifyConnectionStatus(0x%x, 0x%x)\ - iChannelNumber (0x%x)" ), &aStatus, aConnectionStatus, iChannelNumber ) ); - - PanicIfNotOpen(); - - TAny* params[ KTwoParams ]; - - iConnectionStatus.Set( ( TUint8* )&aConnectionStatus, - sizeof ( TInt ), sizeof ( TInt ) ); - - params[ KFirstParam ] = (TAny*)&aStatus; - params[ KSecondParam ] = (TAny*)&iConnectionStatus; - - aStatus = KRequestPending; - DoControl( EIscAsyncNotifyConnectionStatus, params ); - - A_TRACE( ( _T( "RIscApi::NotifyConnectionStatus - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// RIscApi::NotifyConnectionStatusCancel -// Stop listening for connection status changes -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::NotifyConnectionStatusCancel() - { - A_TRACE( ( _T( "RIscApi::NotifyConnectionStatusCancel() channel 0x%x" ), - iChannelNumber ) ); - - PanicIfNotOpen(); - - DoControl( EIscCancelAsyncNotifyConnection ); - - A_TRACE( ( _T( "RIscApi::NotifyConnectionStatusCancel - return void" ) ) ); - } - - -// ----------------------------------------------------------------------------- -// RIscApi::CustomFunction -// Asynchronous API extension function -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::CustomFunction( - TRequestStatus& aStatus, - const TUint16 aOperation, - TAny* aParameters ) - { - A_TRACE( ( _T( "RIscApi::CustomFunction(0x%x, 0x%x, 0x%x) iChannelNumber\ - 0x%x" ), &aStatus, aOperation, aParameters, iChannelNumber ) ); - - PanicIfNotOpen(); - - // Check if custom operation is out of range. - if ( aOperation < EIscAsyncCustomOperation1 - || aOperation > EIscAsyncCustomOperation5 ) - { - User::Panic( KIscApiPanic, EIscApiCustomFunctionUndefined ); - } - TAny* params[ KTwoParams ]; - - params[ KFirstParam ] = (TAny*)&aStatus; - params[ KSecondParam ] = aParameters; - - aStatus = KRequestPending; - DoSvControl( aOperation, params ); - - A_TRACE( ( _T( "RIscApi::CustomFunction - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// RIscApi::CustomFunction -// Synchronous API extension function -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt RIscApi::CustomFunction( - const TUint16 aOperation, - TAny* aParameters ) - { - A_TRACE( ( _T( "RIscApi::CustomFunction(0x%x, 0x%x) iChannelNumber\ - (0x%x) this %x" ), aOperation, aParameters, iChannelNumber, this ) ); - - PanicIfNotOpen(); - - // Check if custom operation is out of range. - if ( aOperation < EIscSyncCustomOperation1 - || aOperation > EIscSyncCustomOperation5 ) - { - User::Panic( KIscApiPanic, EIscApiCustomFunctionUndefined ); - } - - TInt error( KErrNone ); - TAny* params[ KOneParam ]; - params[ KFirstParam ] = aParameters; - - error = DoSvControl( aOperation, params ); - - A_TRACE( ( _T( "RIscApi::CustomFunction - return %d" ), error ) ); - return error; - } - -// ----------------------------------------------------------------------------- -// RIscApi::CustomFunctionCancel -// Cancel the execution of the asynchronous API extension function -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::CustomFunctionCancel( - const TUint16 aOperation ) - { - A_TRACE( ( _T( "RIscApi::CustomFunctionCancel(0x%x) iChannelNumber (0x%x)" ) - , aOperation, iChannelNumber ) ); - - PanicIfNotOpen(); - - // Check if custom operation is out of range - if ( aOperation < EIscCancelAsyncCustomOperation1 - || aOperation > EIscCancelAsyncCustomOperation5 ) - { - User::Panic( KIscApiPanic, EIscApiCustomFunctionUndefined ); - } - - DoSvControl( aOperation ); - - A_TRACE( ( _T( "RIscApi::CustomFunctionCancel - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// RIscApi::DataSend -// Send data to Domestic OS ( asynchronous ) -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::DataSend( - TRequestStatus& aStatus, - const TDesC8& aData ) - { - A_TRACE( ( _T( "RIscApi::DataSend(0x%x, 0x%x) iChannelNumber 0x%x" ), - &aStatus, &aData, iChannelNumber ) ); - - PanicIfNotOpen(); - - TAny* params[ KTwoParams ]; - - params[ KFirstParam ] = (TAny*)&aStatus; - params[ KSecondParam ] = (TAny*)&aData; - - aStatus = KRequestPending; - DoControl( EIscAsyncDataSend, params ); - - A_TRACE( ( _T( "RIscApi::DataSend - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// RIscApi::DataSend -// Send data to Domestic OS ( synchronous ) -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt RIscApi::DataSend( - const TDesC8& aData ) - { - A_TRACE( ( _T( "RIscApi::DataSend(0x%x) iChannelNumber 0x%x" ), - &aData, iChannelNumber ) ); - - PanicIfNotOpen(); - - TInt error( KErrNone ); - TAny* params[ KOneParam ]; - - params[ KFirstParam ] = (TAny*)&aData; - - error = DoControl( EIscSyncDataSend, params ); - - A_TRACE( ( _T( "RIscApi::DataSend - return %d" ), error ) ); - return error; - } - -// ----------------------------------------------------------------------------- -// RIscApi::DataSendCancel -// Cancel asynchronous DataSend request -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::DataSendCancel() - { - A_TRACE( ( _T( "RIscApi::DataSendCancel() iChannelNumber 0x%x" ), - iChannelNumber ) ); - - PanicIfNotOpen(); - - DoSvControl( EIscCancelAsyncDataSend ); - - A_TRACE( ( _T( "RIscApi::DataSendCancel - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// RIscApi::DataReceive -// Receive data from Domestic OS -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::DataReceive( - TRequestStatus& aStatus, - TDes8& aData, - TUint16& aNeededBufLen ) - { - A_TRACE( ( _T( "RIscApi::DataReceive(0x%x, 0x%x, 0x%x) iChannelNumber 0x%x" ), - &aStatus, &aData, aNeededBufLen, iChannelNumber ) ); - - PanicIfNotOpen(); - - TAny* params[ KThreeParams ]; - - iNeededDataLen.Set( ( TUint8* )&aNeededBufLen, sizeof ( TUint16 ),sizeof ( TUint16 ) ); - - params[ KFirstParam ] = (TAny*)&aStatus; - params[ KSecondParam ] = (TAny*)&aData; - params[ KThirdParam ] = (TAny*)&iNeededDataLen; - - aStatus = KRequestPending; - DoControl( EIscAsyncDataReceive, params ); - - A_TRACE( ( _T( "RIscApi::DataReceive - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// RIscApi::FlowControlStatus -// Get the current flow control status ( in uplink-direction ) -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt RIscApi::FlowControlStatus() - { - A_TRACE( ( _T( "RIscApi::FlowControlStatus() channel 0x%x" ), - iChannelNumber ) ); - - PanicIfNotOpen(); - - TInt state( EIscFlowControlOff ); - - state = DoControl( EIscSyncGetFlowControlStatus ); - - A_TRACE( ( _T( "RIscApi::FlowControlStatus - return %d" ), state ) ); - - return state; - } - - -// ----------------------------------------------------------------------------- -// RIscApi::NotifyFlowControl -// Listen for flow control status changes -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::NotifyFlowControl( - TRequestStatus& aStatus, - TInt& aFlowControlStatus ) - { - A_TRACE( ( _T( "RIscApi::NotifyFlowControl(0x%x, 0x%x) channel 0x%x" ), - &aStatus, aFlowControlStatus, iChannelNumber ) ); - - PanicIfNotOpen(); - - TAny* params[ KTwoParams ]; - - iFlowControlStatus.Set( ( TUint8* )&aFlowControlStatus,sizeof ( TInt ),sizeof ( TInt ) ); - - params[ KFirstParam ] = (TAny*)&aStatus; - params[ KSecondParam ] = (TAny*)&iFlowControlStatus; - - aStatus = KRequestPending; - DoControl( EIscAsyncNotifyFlowControlStatus, params ); - - A_TRACE( ( _T( "RIscApi::NotifyFlowControl - return void" ) ) ); - } - - -// ----------------------------------------------------------------------------- -// RIscApi::NotifyFlowControlCancel -// Stop listening for flow control status changes -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void RIscApi::NotifyFlowControlCancel() - { - A_TRACE( ( _T( "RIscApi::NotifyFlowControlCancel()" ) ) ); - - PanicIfNotOpen(); - - DoControl( EIscCancelAsyncNotifyFlowControl ); - - A_TRACE( ( _T( "RIscApi::NotifyFlowControlCancel - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// RIscApi::MaximumDataSize -// Get maximun data size ( for sending and receiving ) -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt RIscApi::MaximumDataSize() - { - A_TRACE( ( _T( "RIscApi::MaximumDataSize() channel 0x%x" ), - iChannelNumber ) ); - - PanicIfNotOpen(); - - TInt r = DoControl( EIscSyncGetMaximunDataSize ); - A_TRACE( ( _T( "RIscApi::MaximumDataSize - return 0x%x" ), r ) ); - return r; - - } - -// ----------------------------------------------------------------------------- -// RIscApi::GetChannelInfo -// Get channel info from multiplexer -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt RIscApi::GetChannelInfo( - const TUint16 aChannel, - TDes8& aInfo ) - { - A_TRACE( ( _T( "RIscApi::GetChannelInfo(0x%x, 0x%x)" ), - aChannel, &aInfo ) ); - - PanicIfNotOpen(); - - TAny* params[ KTwoParams ]; - params[ KFirstParam ] = (TAny*)aChannel; - params[ KSecondParam ] = (TAny*)&aInfo; - - TInt error = DoControl( EIscSyncGetChannelInfo, params ); - - A_TRACE( ( _T( "RIscApi::GetChannelInfo - return %d" ), error ) ); - return error; - } - -// ----------------------------------------------------------------------------- -// IscApi::PanicIfNotOpen -// Panic if channel is not opened yet -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void RIscApi::PanicIfNotOpen() const - { - - if( !iOpen ) - { - C_TRACE( ( _T( "IscApi::PanicIfNotOpen() channel 0x%x" ), - iChannelNumber ) ); - User::Panic( KIscApiPanic, EIscApiChannelNotOpen ); - } - else - { - // Do nothing. - } - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDataTransmissionBase/inc/IscBufferAllocator.h --- a/systemswstubs/examplecommonisc/IscDataTransmissionBase/inc/IscBufferAllocator.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,111 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Reference implementation for ISC buffer allocator. -* -*/ - - - - -#ifndef ISCBUFFERALLOCATOR_H -#define ISCBUFFERALLOCATOR_H - -// INCLUDES -#include - -#include "IscDataTransmissionBase.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -class DIscDevice; -class IscBufferQueue; -class DPlatChunkHw; -class DIscBufferQueue; - -// CLASS DECLARATION - - -/** -* Manages pre-allocated memory blocks -* -* @lib IscDataTransmissionBase.LIB -* @since 2.8 -*/ -class DIscBufferAllocator //: public DLogicalDevice - { - public: // Constructors and destructor - - DIscBufferAllocator( TIscBufferEntry* aBufferConfig ); - virtual ~DIscBufferAllocator(); - - public: // New functions - - /** - * This method reserves pre-allocated memory block for sending/receiving frames - * @since 2.8 - * @param TDes8*& aPtr a reference to pointer of descriptor - * @param TUint16 aSize The minimum size of needed memory block - * @return void - */ - IMPORT_C void ReserveMemoryBlock( TDes8*& aPtr, TUint16 aSize ); - - /** - * This method releases memory block allocated with ReserveMemoryBlock - * @since 2.8 - * @param TDes8* aPtr a pointer to descriptor that is to be released - * @return void - */ - IMPORT_C void ReleaseMemoryBlock( TDes8* aPtr ); - - /** - * This method makes the buffer allocations according to the - * configuration specified by the ISC Multiplexer - * @since 2.8 - * @return TInt KErrNone if succesful - */ - IMPORT_C TInt AllocBuffers(); - - - private: - - /** - * This method makes the physical buffer allocations - * @since 2.8 - * @param TInt aPages amount of needed pages to allocate - * @return void - */ - void AllocPhMemory( TInt aPages ); - - private: // Data - - TIscBufferEntry iBufferConfig[KIscBufferAmount]; - DIscBufferQueue** iBuffers; - -#ifndef __WINS__ - DPlatChunkHw* iBufferChunk; - TLinAddr iCurrentAddress; -#endif - - }; - -#endif // ISCBUFFERALLOCATOR - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDataTransmissionBase/inc/IscBufferQueue.h --- a/systemswstubs/examplecommonisc/IscDataTransmissionBase/inc/IscBufferQueue.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,139 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of DIscBufferQueue class -* -*/ - - - -#ifndef ISCBUFFERQUEUE_H -#define ISCBUFFERQUEUE_H - -// INCLUDES -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -class DIscQueue; - -// CLASS DECLARATION - -/** -* Queue class for buffer allocation and management -* -* @lib IscDataTransmissionBase.LIB -* @since 2.8 -*/ -class DIscBufferQueue - { - public: // Constructors and destructor - - /** - * C++ default constructor. - */ - DIscBufferQueue(); - - /** - * Construct a new queue - * @since 2.8 - * @param TUint16 aSize size of element in queue - * @param TUint16 aCount amount of elements in queue - * @param TUint8* &aCurrentAddress start address of queue - * @return DIscBufferQueue* pointer to queue - */ - static DIscBufferQueue* New( TUint16 aSize, TUint16 aCount, TUint8* &aCurrentAddress ); - - /** - * Destructor. - */ - ~DIscBufferQueue(); - - public: // New functions - - /** - * Checks if queue is empty - * @since 2.8 - * @return TBool ETrue if empty, otherwise EFalse - */ - inline TBool Empty(){return iCount ? EFalse : ETrue;}; - - /** - * Reserves first element from the queue - * @since 2.8 - * @return TDes8* pointer to element if succesful, otherwise NULL - */ - TDes8* Reserve(); - - /** - * Releases element from the queue - * @since 2.8 - * @param TDes8* aPtr pointer to element - * @return void - */ - void Release( TDes8* aPtr ); - - protected: // New functions - - /** - * Function to disable interrupts - * @since 2.8 - * @return TInt KErrNone if succesful - */ - TInt DisableIrqs(); - - /** - * Function to restore interrupts - * @since 2.8 - * @param TInt aLevel level where interrupts should be restored - * @return void - */ - void RestoreIrqs( TInt aLevel ); - - - protected: // Functions from base classes - - private: - - /** - * 2nd phase constructor - * @since 2.8 - * @param TUint16 aSize size of element in queue - * @param TUint16 aCount amount of elements in queue - * @param TUint8* &aCurrentAddress start address of queue - * @return TInt - */ - TInt Construct( TUint16 aSize, TUint16 aCount, TUint8* &aCurrentAddress ); - - public: // Data - - protected: // Data - - private: // Data - - volatile TUint32 iCount; - TUint32** iBuffers; - DIscQueue* iBuffersQueue; - - }; - -#endif // ISCBUFFERQUEUE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDataTransmissionBase/inc/IscDataTransmissionBase.h --- a/systemswstubs/examplecommonisc/IscDataTransmissionBase/inc/IscDataTransmissionBase.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,188 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: A reference implementation for ISC data transmission base. -* -*/ - - - -#ifndef ISCDATATRANSMISSIONBASE_H -#define ISCDATATRANSMISSIONBASE_H - -// INCLUDES -#include -#include - -// CONSTANTS -_LIT(KIscDataTransmissionDriverName,"IscDataTransmissionDriver"); - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -class DIscDevice; -class DIscBufferAllocator; - -// CLASS DECLARATION - -/** -* DIscDataTransmissionBase defines the ISC Data Transmission Plug-In API -* -* @lib IscDataTransmissionBase.LIB -* @since 2.8 -*/ -class DIscDataTransmissionBase : public DLogicalDevice - { - - public: - /** - * C++ default constructor. - */ - IMPORT_C DIscDataTransmissionBase(); - - /** - * Destructor. - */ - IMPORT_C virtual ~DIscDataTransmissionBase(); - - public: // Functions from base class - - /** - * Implementation of pure-virtual Install from DLogicalDevice. This - * function calls Install2ndPhase. - * @since 2.8 - * @return TInt KErrNone - */ - IMPORT_C TInt Install(); - - /** - * This method makes the buffer allocations according to the - * configuration specified by the ISC Multiplexer - * @since 2.8 - * @param TIscBufferEntry* aBufferConfig pointer to buffer configuration table - * @return void - */ - IMPORT_C virtual void AllocBuffers( TIscBufferEntry* aBufferConfig ); - - public: // New functions - - /** - * Second phase initialization, called during ISC Multiplexer loading. - * ISC Data Transmission Driver must do all initialization here that - * are normally done in Install() - * @since ?Series60_version - * @return TInt KErrNone if successful - */ - virtual TInt Install2ndPhase() = 0; - - /** - * ISC Data Transmission driver initialization - * @since 2.8 - * @param aParameters Initialization parameters passed from - * ISC initialization file - * @param aDfc Dfc that must be runned after the initialization - * has been done - * @return void - */ - virtual void InitializeDataTransmission( TDesC8& aParameters, - TDfc* aDfc, - TInt& aErrorCode /* KErrNone */) = 0; - - /** - * In asynchronous data transmission checkin if transmission is not yet finished - * Access to this method is necessary since transmission can be asynchronous. - * @since 2.8 - * @return TBool EFalse / ETrue - */ - virtual TBool IsWritePending() { return EFalse; }; - - /** - * Send frame to Domestic OS - * @since 2.8 - * @param aFrame Frame to be sent - * @param aDfc Dfc function that must be runned after the frame is sent. - * Or the dfc can be runned immediately if the driver internally buffers - * the outgoing frames - * @param aMultiplexerDfc Dfc function in multiplexer to handle send complition - * @param aMultiplexerErrorCode error code for frame sending to modem - * @return void - */ - virtual void SendFrame( TDes8& aFrame, TDfc* aDfc, TAny* aFrameInfo ) = 0; - - /** - * Get the connection status - * @since 2.8 - * @return TInt EIscConnectionOk / EIscConnectionNotOk - */ - virtual TInt ConnectionStatus() = 0; - - /** - * Connects ISC Driver to ISC Data Transmission Driver - * @since 2.8 - * @param aDevice Pointer to DIscDevice class in ISC Driver - * @return void - */ - IMPORT_C virtual void Connect(DIscDevice* aDevice); - - /** - * Reserve memory block - * @since 2.8 - * @param aPtr Pointer to reserved memory block, NULL if not successful - * @param aSize Required minimun size of the block - * @return void - */ - IMPORT_C virtual void ReserveMemoryBlock( TDes8*& aPtr, TUint16 aSize); - - /** - * Release the reserved memory block - * @since 2.8 - * @param aPtr Pointer to memory block to be released - * @return void - */ - IMPORT_C virtual void ReleaseMemoryBlock( TDes8* aPtr ); - - protected: // New functions - - /** - * Transfer incoming frame to ISC Driver - * @since 2.8 - * @param aFrame Frame that was received - * @return void - */ - IMPORT_C void ReceiveFrame(TDesC8& aFrame); - - /** - * Notifies any connection status changes to ISC Driver - * @since 2.8 - * @param aStatus EIscConnectionOk / EIscConnectionNotOk - * @return void - */ - IMPORT_C void NotifyConnectionStatus( TInt aStatus ); - - private: // Data - - // pointer to DIscDevice class from ISC Driver - DIscDevice* iDevice; // No ownership - - // pointer to pre-allocated buffers - DIscBufferAllocator* iIscBufferAllocator; // Ownership - - }; - -#endif // ISCDATATRANSMISSIONBASE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDataTransmissionBase/inc/IscTrace.h --- a/systemswstubs/examplecommonisc/IscDataTransmissionBase/inc/IscTrace.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - -#ifndef ISCTRACE_H -#define ISCTRACE_H - -// INCLUDES -// CONSTANTS - -// MACROS - -#ifdef TRACE_MODE_KERNEL - - // INCLUDES - #include - - #define _T(a) a -#else - - // INCLUDES - #include // RDebug - #include - - #define _T(a) _L(a) - -#endif // TRACE_MODE_KERNEL - -#ifdef _DEBUG - - #ifdef TRACE_MODE_KERNEL - #define __TRACE_PRINTF(a) Kern::Printf a - #else - #define __TRACE_PRINTF(a) RDebug::Print a - #endif - -#else - #define __TRACE_PRINTF(a) -#endif // _DEBUG - - -#ifdef _DEBUG - - void BuildTraceFunc( const TDesC& aPrefix ); - void DataDumpTraceFunc( const TDesC& aPrefix, const TDesC8& aData ); - - #define BUILD_TRACE( a ) BuildTraceFunc( a ) - #define DATA_DUMP_TRACE( a, b ) DataDumpTraceFunc( a, b ) - - #ifdef TRACE_MODE_KERNEL - - // define assertions - #define TRACE_ASSERT(a) if (!(a)) __TRACE_PRINTF(("Assertion failed: file=" __FILE__ ", line=%d, compiled=" __DATE__" "__TIME__, __LINE__ )) - - #else - - // define assertions - #ifdef __WINS__ - #define TRACE_ASSERT(a) if (!(a)) __TRACE_PRINTF((_L("Assertion failed: file= __FILE__ , line=%d, compiled=__DATE__ __TIME__ "),__LINE__)) - #else - #define TRACE_ASSERT(a) if (!(a)) __TRACE_PRINTF((_L("Assertion failed: file=" __FILE__ ", line=%d, compiled="__DATE__ __TIME__""),__LINE__ )) - #endif //__WINS__ - - #endif // TRACE_MODE_KERNEL - - - #if defined COMPONENT_TRACE_FLAG - #define C_TRACE(a) __TRACE_PRINTF(a) - #else - #define C_TRACE(a) - #endif // COMPONENT_TRACE_FLAG - - #if defined API_TRACE_FLAG - #define A_TRACE(a) __TRACE_PRINTF(a) - #else - #define A_TRACE(a) - #endif // API_TRACE_FLAG - - #if defined EXTENDED_TRACE_FLAG - #define E_TRACE(a) __TRACE_PRINTF(a) - #else - #define E_TRACE(a) - #endif // EXTENDED_TRACE_FLAG - -#else - #define TRACE_ASSERT(a) - #define C_TRACE(a) - #define A_TRACE(a) - #define E_TRACE(a) - #define BUILD_TRACE(a) - #define DATA_DUMP_TRACE(a, b) -#endif // _DEBUG - - -// Resets are made both in UDEB and UREL (traces only in udeb) -#ifdef TRACE_MODE_KERNEL - #define ASSERT_RESET_ALWAYS(a,b,c) if(!(a)) { __TRACE_PRINTF(("Assertion failed: file=" __FILE__ ", line=%d, compiled="__DATE__" "__TIME__, __LINE__)); Kern::Fault(b,c); } - #define TRACE_ASSERT_ALWAYS __TRACE_PRINTF( ("Assertion failed: file=" __FILE__ ", line=%d, compiled="__DATE__" "__TIME__, __LINE__) ) -#else - #ifdef __WINS__ - #define ASSERT_RESET_ALWAYS(a,b,c) error - #define TRACE_ASSERT_ALWAYS __TRACE_PRINTF( (_L("Assertion failed: file= __FILE__ , line=%d, compiled=__DATE__ __TIME__ "),__LINE__) ) - #else - #define ASSERT_RESET_ALWAYS(a,b,c) error - #define TRACE_ASSERT_ALWAYS __TRACE_PRINTF( (_L("Assertion failed: file=%s, line=%d, compiled=%s %s "),__FILE__, __LINE__, __DATE__, __TIME__) ) - #endif -#endif // kernel - - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -#endif // ISCTRACE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDataTransmissionBase/src/IscBufferAllocator.cpp --- a/systemswstubs/examplecommonisc/IscDataTransmissionBase/src/IscBufferAllocator.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,229 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of DIscBufferAllocator class -* -*/ - - - -// INCLUDE FILES -#include -#include -#include - -#include "IscBufferAllocator.h" -#include "IscBufferQueue.h" -#include "IscTrace.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// DIscBufferAllocator::DIscBufferAllocator -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -DIscBufferAllocator::DIscBufferAllocator( TIscBufferEntry* aBufferConfig ) - : iBuffers( NULL ) -#ifndef __WINS__ - , iBufferChunk( NULL ) - , iCurrentAddress( NULL ) -#endif - { - for ( TUint16 i = 0; i < KIscBufferAmount; i++ ) - { - iBufferConfig[i].size = aBufferConfig[i].size; - iBufferConfig[i].count = aBufferConfig[i].count; - } - - C_TRACE( ( _T( "DIscBufferAllocator::DIscBufferAllocator" ) ) ); - } - -// Destructor -DIscBufferAllocator::~DIscBufferAllocator() - { - // delete iBuffers & chunk - for ( TUint8 i = 0; i < KIscBufferAmount; i++ ) - { - delete iBuffers[i]; - iBuffers[i] = NULL; - } - delete [] iBuffers; - iBuffers=NULL; - -#ifndef __WINS__ - delete iBufferChunk; - iBufferChunk = NULL; - // free ram pages.. -#endif - } - -// ----------------------------------------------------------------------------- -// DIscBufferAllocator::AllocBuffers -// Allocate buffers according the multiplexer -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -TInt DIscBufferAllocator::AllocBuffers() - { - C_TRACE( ( _T( "DIscBufferAllocator::AllocBuffers()" ) ) ); - TUint8 i = 0; -#ifndef __WINS__ - TInt memoryNeeded = 0; - for ( i = 0; i < KIscBufferAmount; i++ ) - { - if ( iBufferConfig[i].size > 0 && iBufferConfig[i].count> 0 ) - { - memoryNeeded += ( iBufferConfig[i].size * iBufferConfig[i].count ); - } - } - C_TRACE( ( _T( "DIscBufferAllocator::AllocBuffers memory needed %d" ), memoryNeeded ) ); - - // Check if buffers are allocated from ISC - if ( memoryNeeded > 0 ) - { - AllocPhMemory( memoryNeeded ); - } - else - { - return KErrNone; - } - - TUint8* address = ( TUint8* )iCurrentAddress; -#else - TUint8* address = NULL; -#endif //WINS - - - - iBuffers = new DIscBufferQueue*[ KIscBufferAmount ]; - ASSERT_RESET_ALWAYS( iBuffers, "ISCDataTransmissionBase",EIscMemoryAllocationFailure ); - - for ( i = 0; i < KIscBufferAmount; i++ ) - { - if ( iBufferConfig[i].size > 0 && iBufferConfig[i].count > 0 ) - { - iBuffers[i] = DIscBufferQueue::New( iBufferConfig[i].size, iBufferConfig[i].count, address ); - } - } - - return KErrNone; - - } - -#ifndef __WINS__ -// ----------------------------------------------------------------------------- -// DIscBufferAllocator::AllocPhMemory -// Physical buffer allocations -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscBufferAllocator::AllocPhMemory( TInt aMemoryNeeded ) - { - C_TRACE( ( _T( "DIscBufferAllocator::AllocPhMemory(0x%x)" ), aMemoryNeeded ) ); - - TPhysAddr physAddr = 0; - NKern::ThreadEnterCS(); - TInt r = Epoc::AllocPhysicalRam( aMemoryNeeded, physAddr ); - ASSERT_RESET_ALWAYS( r == KErrNone, "IscDataTransmissionBase",EIscMemoryAllocationFailure ); - r = DPlatChunkHw::New( iBufferChunk, physAddr, aMemoryNeeded, EMapAttrSupRw ); - NKern::ThreadLeaveCS(); - ASSERT_RESET_ALWAYS( r == KErrNone, "IscDataTransmissionBase",EIscMemoryAllocationFailure ); - iCurrentAddress = iBufferChunk->LinearAddress(); - - } -#endif //WINS - -// ----------------------------------------------------------------------------- -// DIscBufferAllocator::ReserveMemoryBlock -// Reserves pre-allocated memory block -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscBufferAllocator::ReserveMemoryBlock( - TDes8*& aPtr, - TUint16 aSize ) - { - E_TRACE( ( _T( "IBA:Res (0x%x)" ), aSize ) ); - - if ( iBuffers ) - { - for ( TUint8 i = 0; i < KIscBufferAmount;i++ ) - { - if ( aSize <= iBufferConfig[i].size && iBufferConfig[i].count > 0 ) - { - if ( iBuffers[i] ) - { - if ( !iBuffers[i]->Empty() ) - { - aPtr = ( TPtr8* )iBuffers[i]->Reserve(); - if ( aPtr ) - { - aPtr->SetLength( 0 ); - E_TRACE( ( _T( "IBA:Res 0x%x %d" ), aPtr, i ) ); - return; - } - } - } - } - } - } - // If Memory block is not reserved, set NULL to aPtr - aPtr = NULL; - return; - } - -// ----------------------------------------------------------------------------- -// DIscBufferAllocator::ReleaseMemoryBlock -// Releases memory block allocated with ReserveMemoryBlock -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscBufferAllocator::ReleaseMemoryBlock( - TDes8* aPtr ) - { - E_TRACE( ( _T( "IBA:Rel 0x%x" ), aPtr ) ); - if ( !aPtr ) - { - TRACE_ASSERT_ALWAYS; - } - else if ( KIscBufferAmount != 0 && iBuffers ) - { - for ( TUint8 i = 0; i < KIscBufferAmount; i++ ) - { - if ( iBufferConfig[i].size == ( ( TDes8* )aPtr )->MaxLength() ) - { - iBuffers[i]->Release( aPtr ); - } - } - } - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDataTransmissionBase/src/IscBufferQueue.cpp --- a/systemswstubs/examplecommonisc/IscDataTransmissionBase/src/IscBufferQueue.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,263 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of DIscBufferQueue class -* -*/ - - - -// INCLUDE FILES - -#include -#include "IscBufferQueue.h" -#include "IscQueue.h" -#include "IscTrace.h" - -#ifdef __WINS__ -#include -#endif - -// EXTERNAL DATA STRUCTURES -#ifdef __WINS__ -extern CRITICAL_SECTION g_IscDTBCriticalSection; -#endif - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS -const TInt KIscInterruptLevelTwo( 2 ); - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// DIscBufferQueue::DIscBufferQueue -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -DIscBufferQueue::DIscBufferQueue() - : iCount( NULL ), - iBuffers( NULL ), - iBuffersQueue( NULL ) - { - } - - -// ----------------------------------------------------------------------------- -// DIscBufferQueue::Construct -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -TInt DIscBufferQueue::Construct( - TUint16 aSize, - TUint16 aCount, - TUint8* &aCurrentAddress ) - { - C_TRACE( ( _T( "DIscBufferQueue::Construct(0x%x, 0x%x, 0x%x) 0x%x, 0x%x" ), aSize, aCount, &aCurrentAddress, iBuffers, iBuffersQueue ) ); - - TInt r = KErrNone; - if ( aSize == 0 || aCount == 0 ) - return KErrArgument; - - iCount = aCount; - iBuffers = new TUint32*[aCount]; - ASSERT_RESET_ALWAYS( iBuffers, "ISCDataTransmissionBase",EIscMemoryAllocationFailure ); - iBuffersQueue = new DIscQueue( iBuffers, aCount ); - ASSERT_RESET_ALWAYS( iBuffersQueue, "ISCDataTransmissionBase",EIscMemoryAllocationFailure ); - - for ( TInt i = 0; i < aCount; i++ ) - { - TPtr8* pTmp; -#ifndef __WINS__ - pTmp = new TPtr8 ( ( TUint8* )aCurrentAddress, aSize ); - ASSERT_RESET_ALWAYS( pTmp, "ISCDataTransmissionBase",EIscMemoryAllocationFailure ); -#else - TAny* ptr = Kern::Alloc( aSize ); - ASSERT_RESET_ALWAYS( ptr, "ISCDataTransmissionBase",EIscMemoryAllocationFailure ); - pTmp = new TPtr8( ( TUint8* )ptr, 0, aSize ); - ASSERT_RESET_ALWAYS( pTmp, "ISCDataTransmissionBase",EIscMemoryAllocationFailure ); -#endif // __WINS__ - - // Put the buffer into RX resource queue. - r = iBuffersQueue->Add( pTmp ); - - aCurrentAddress += aSize; - } - - C_TRACE( ( _T( "DIscBufferQueue::Construct - return 0x%x" ),r ) ); - - return r; - } - - -// ----------------------------------------------------------------------------- -// DIscBufferQueue::New -// Construct a new queue -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -DIscBufferQueue* DIscBufferQueue::New( - TUint16 aSize, - TUint16 aCount, - TUint8*& aCurrentAddress ) - { - C_TRACE( ( _T( "DIscBufferQueue::New(0x%x, 0x%x, 0x%x)" ), aSize, aCount, aCurrentAddress) ); - - DIscBufferQueue* self = new DIscBufferQueue(); - ASSERT_RESET_ALWAYS( self, "ISCDataTransmissionBase",EIscMemoryAllocationFailure ); - if ( self->Construct( aSize, aCount, aCurrentAddress ) != KErrNone ) - { - delete self; - self = NULL; - } - else - { - } - - C_TRACE( ( _T( "DIscBufferQueue::New - return 0x%x" ),self ) ); - return self; - } - - -// ----------------------------------------------------------------------------- -// DIscBufferQueue::~DIscBufferQueue -// Destructor -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -DIscBufferQueue::~DIscBufferQueue() - { - C_TRACE( ( _T( "DIscBufferQueue::~DIscBufferQueue()" ) ) ); - if ( iBuffersQueue ) - { - /* release all buffers */ - for ( TInt i = 0; i < iBuffersQueue->Count(); i++ ) - { - // destroy allocated buffer - TPtr8* delBuf = ( TPtr8* )iBuffersQueue->RemoveFirst(); - - if ( delBuf ) - { -#ifdef __WINS__ - Kern::Free( ( TAny* )delBuf->Ptr() ); - delete delBuf; -#else - delete delBuf; -#endif - } - else - { - } - } - delete iBuffersQueue; - delete []iBuffers; - } - C_TRACE( ( _T( "DIscBufferQueue::~DIscBufferQueue - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// DIscBufferQueue::Reserve -// Reserves first element from the queue -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -TDes8* DIscBufferQueue::Reserve() - { - - if ( iBuffersQueue ) - { - TDes8* temp = ( TDes8* )iBuffersQueue->RemoveFirst(); - if ( temp ) - { - TInt irqLevel = DisableIrqs(); - iCount--; - RestoreIrqs( irqLevel ); - } - return temp; - } - else - { - return NULL; - } - - } - -// ----------------------------------------------------------------------------- -// DIscBufferQueue::Release -// Releases element from the queue -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscBufferQueue::Release( - TDes8* aPtr ) - { - - if ( iBuffersQueue ) - { - aPtr->Zero(); - TInt err = iBuffersQueue->Add( aPtr ); - ASSERT_RESET_ALWAYS( err == KErrNone, "ISCDataTransmissionBase",EIscBufferAllocationFailure ); - TInt irqLevel = DisableIrqs(); - iCount++; - RestoreIrqs( irqLevel ); - } - - } - -// ----------------------------------------------------------------------------- -// DIscBufferQueue::DisableIrqs -// Function to disable interrupts -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -TInt DIscBufferQueue::DisableIrqs() - { -#ifndef __WINS__ - return NKern::DisableInterrupts( KIscInterruptLevelTwo ); -#else //__WINS__ - EnterCriticalSection( &g_IscDTBCriticalSection ); - return KErrNone; -#endif//__WINS__ - } - -// ----------------------------------------------------------------------------- -// DIscBufferQueue::RestoreIrqs -// Function to restore interrupts -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// - -#ifndef __WINS__ -void DIscBufferQueue::RestoreIrqs( - TInt aLevel ) - { - NKern::RestoreInterrupts( aLevel ); -#else //__WINS__ -void DIscBufferQueue::RestoreIrqs( - TInt ) - { - LeaveCriticalSection( &g_IscDTBCriticalSection ); -#endif//__WINS__ - } -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDataTransmissionBase/src/IscDataTransmissionBase.cpp --- a/systemswstubs/examplecommonisc/IscDataTransmissionBase/src/IscDataTransmissionBase.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,216 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of DIscDataTransmissionBase class -* -*/ - - - -// INCLUDE FILES -#include -#include "IscTrace.h" -#include "IscDataTransmissionBase.h" -#include "IscBufferAllocator.h" - -#ifdef __WINS__ -#include -#endif - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -#ifdef __WINS__ -CRITICAL_SECTION g_IscDTBCriticalSection; -#endif - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// DIscDataTransmissionBase::DIscDataTransmissionBase -// C++ default constructor -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C DIscDataTransmissionBase::DIscDataTransmissionBase() - :iDevice( NULL ), - iIscBufferAllocator( NULL ) - { - A_TRACE( ( _T( "DIscDataTransmissionBase::DIscDataTransmissionBase()" ) ) ); -#ifdef __WINS__ - InitializeCriticalSection( &g_IscDTBCriticalSection ); -#endif - } - - -// Destructor -EXPORT_C DIscDataTransmissionBase::~DIscDataTransmissionBase() - { - A_TRACE( ( _T( "DIscDataTransmissionBase::~DIscDataTransmissionBase()" ) ) ); - if ( iIscBufferAllocator ) - { - delete iIscBufferAllocator; - iIscBufferAllocator=NULL; - } -#ifdef __WINS__ - DeleteCriticalSection( &g_IscDTBCriticalSection ); -#endif - A_TRACE( ( _T( "DIscDataTransmissionBase::~DIscDataTransmissionBase - return void" ) ) ); - } - - -// ----------------------------------------------------------------------------- -// DIscDataTransmissionBase::AllocBuffers -// buffer allocations according to the ISC Multiplexer -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void DIscDataTransmissionBase::AllocBuffers( TIscBufferEntry* aBufferConfig ) - { - A_TRACE( ( _T( "DIscDataTransmissionBase::AllocBuffers(0x%x)" ), aBufferConfig ) ); - // Allocate buffers - if ( !iIscBufferAllocator ) - { - iIscBufferAllocator = new DIscBufferAllocator( aBufferConfig ); - ASSERT_RESET_ALWAYS( iIscBufferAllocator, "ISCDataTransmissionBase",EIscMemoryAllocationFailure ); - iIscBufferAllocator->AllocBuffers(); - } - A_TRACE( ( _T( "DIscDataTransmissionBase::AllocBuffers - return void" ) ) ); - } -// ----------------------------------------------------------------------------- -// DIscDataTransmissionBase::ReceiveFrame -// Transfer incoming frame to ISC Driver -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void DIscDataTransmissionBase::ReceiveFrame( - TDesC8& aFrame ) - { - - if ( iDevice ) - { - iDevice->Receive( &aFrame ); - } - else - { - TRACE_ASSERT_ALWAYS; - } - - } - -// ----------------------------------------------------------------------------- -// DIscDataTransmissionBase::NotifyConnectionStatus -// Notifies any connection status changes to ISC Driver -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void DIscDataTransmissionBase::NotifyConnectionStatus( - TInt aStatus ) - { - A_TRACE( ( _T( "DIscDataTransmissionBase::NotifyConnectionStatus(0x%x)" ), aStatus ) ); - - if ( iDevice ) - { - iDevice->NotifyConnectionStatus( aStatus ); - } - - A_TRACE( ( _T( "DIscDataTransmissionBase::NotifyConnectionStatus - return void" ) ) ); - } - - -// ----------------------------------------------------------------------------- -// DIscDataTransmissionBase::ReserveMemoryBlock -// Reserve memory block -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void DIscDataTransmissionBase::ReserveMemoryBlock( - TDes8*& aPtr, - TUint16 aSize ) - { - E_TRACE( ( _T( "IDTB:Res(0x%x)" ), aSize ) ); - - iIscBufferAllocator->ReserveMemoryBlock( aPtr, aSize ); - } - - -// ----------------------------------------------------------------------------- -// DIscDataTransmissionBase::ReleaseMemoryBlock -// Release the reserved memory block -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void DIscDataTransmissionBase::ReleaseMemoryBlock( - TDes8* aPtr ) - { - - E_TRACE( ( _T( "IDTB:Rel (0x%x)" ), aPtr ) ); - iIscBufferAllocator->ReleaseMemoryBlock( aPtr ); - - } - - -// ----------------------------------------------------------------------------- -// DIscDataTransmissionBase::Connect -// Connects ISC Driver to ISC Data Transmission Driver -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void DIscDataTransmissionBase::Connect( - DIscDevice* aDevice ) - { - A_TRACE( ( _T( "DIscDataTransmissionBase::Connect(0x%x)" ), aDevice ) ); - ASSERT_RESET_ALWAYS( aDevice, "ISCDataTransmissionBase", EIscNullIscDriverPointer ); - iDevice = aDevice; - A_TRACE( ( _T( "DIscDataTransmissionBase::Connect - return void" ) ) ); - } - - -// ----------------------------------------------------------------------------- -// DIscDataTransmissionBase::Install -// Implementation of pure-virtual Install from DLogicalDevice -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt DIscDataTransmissionBase::Install() - { - A_TRACE( ( _T( "DIscDataTransmissionBase::Install()" ) ) ); - SetName( &KIscDataTransmissionDriverName ); - - // call second phase install ( located in the driver realizing this API ) - TInt r = Install2ndPhase(); - - A_TRACE( ( _T( "DIscDataTransmissionBase::Install - return 0x%x" ), r ) ); - return r; - } - -#if defined( __WINSCW__ ) -DECLARE_STANDARD_LDD() - { - return NULL; - } -#endif - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDriver/inc/IscChannel.h --- a/systemswstubs/examplecommonisc/IscDriver/inc/IscChannel.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,325 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef DISCCHANNEL_H -#define DISCCHANNEL_H - -// INCLUDES -#include -#include // TIscFrameInfo - -// CONSTANTS -const TInt KMajorVersionNumber = 1; -const TInt KMinorVersionNumber = 0; -const TInt KBuildVersionNumber = 1; - -const TUint8 KBehaviormask = 15; //bits 00001111 - -// MACROS - -const TInt KIscEmptyMyBuffersDfcPriority( 4 ); -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION -class DIscDevice; -class DIscQueue; -class IscChannelContainer; - -/** -* Handles all interraction with the user-side -* -* @lib IscDriver.LIB -* @since 2.8 -*/ -class DIscChannel : public DLogicalChannel - { - - public: // Constructors and destructor - - /** - * C++ default constructor. - * @param pointer to owner device - */ - IMPORT_C DIscChannel( DLogicalDevice* aDevice ); - - /** - * Destructor. - */ - ~DIscChannel(); - - public: // Functions from base classes - - /** - * Secondary initialization of channel. - * @since 2.8 - * @param TInt aUnit Channel number - * @param const TDesC8* anInfo pointer to a descriptor containing extra - * information for the device. - * @param const TVersion& aVer reference containing the version being - * requested by the thread which is opening this channel - * @return virtual TInt KErrNone if succesful. KErrAlreadyExist if channel already open - */ - virtual TInt DoCreate( TInt aUnit, const TDesC8* anInfo, const TVersion& aVer ); - - /** - * Message handling ( kernel server context ). - * @since 2.8 - * @param aMsg Thread message to get parameters from user side - * @return void - */ - virtual void HandleMsg( TMessageBase* aMsg ); - - /** - * Message handling ( user thread context ). - * @since 2.8 - * @param aReqNo request number called from IscApi - * @param a1 pointer array to get parameters from user side - * @param a2 not used in ISC - * @return TInt KErrNone if succesful - */ - TInt Request( TInt aReqNo, TAny* a1, TAny* a2 ); - - public: // New functions - /** - * Function to complete clients pending asynchronous request - * @since 2.8 - * @param TInt aOperation asynchronous operation to complete - * @param TInt aCompleteStatus status of request to be completed - * @return void - */ - void CompleteRequest( TInt aOperation, TInt aCompleteStatus ); - - /** - * Stores the incoming frame to channels receive queue - * @since 2.8 - * @param TDesC8* aData pointer to storable frame - * @return void - */ - void StoreFrame( TDesC8* aData ); - - /** - * Goes through channel's queue and delivers possible frame to client - * @since 2.8 - * @return void - */ - void EmptyBuffers(); - - /** - * Notify user side client that uplink flow control is on/off - * @since 2.8 - * @param const TInt aFlowControlStatus EIscFlowControlOn / EIscFlowControlOff - * @return void - */ - void NotifyFlowControl( const TInt aFlowControlStatus ); - - /** - * Notify user side client that status of connection between Symbian side and the Domestic OS has changed - * @since 2.8 - * @param const TInt aConnectionStatus EIscConnectionOk / EIscConnectionNotOk - * @return void - */ - void NotifyConnectionStatus( const TInt aConnectionStatus ); - - /** - * Check if asynchronous request is active - * @since 2.8 - * @param const TUint16 aReqNumber Number of request - * @return TInt KRequestPending if request active. Otherwise KErrNone - */ - TInt IsPending( const TUint16 aReqNumber ); - - /** - * Copy data from user buffer to kernel side buffer by multiplexer - * @since 2.8 - * @param aUserBuffer pointer to source descriptor - * @param aKernelBuffer pointer to destination descriptor - * @param aOffset Offset of the source buffer - * @return KErrNone if successful - */ - TInt CopyFromUserBuffer( const TDesC8& aUserBuffer, - TDes8& aKernelBuffer, - TInt aOffset ); - - /** - * Writes data/frames to clients buffer - * @since 2.8 - * @param aDest pointer to destination descriptor - * @param aSrc pointer to source descriptor - * @param aOffset Offset on where to start writing to target descriptor - * @return TInt - */ - TInt ThreadWrite( TAny* aDest, const TDesC8* aSrc, TInt aOffset ); - - /** - * Delete send frames / receive queue for channel in question - * @since 2.8 - * @return void - */ - void ResetBuffers(); - - /** - * Returns the channel number. - * @since 3.0 - * @return TUint16, the number of the channel. - */ - inline TUint16 GetChannelNumber(){return iChannelNumber;}; - - /** - * Returns a reference to user side thread of this channel. - * @since 3.0 - * @param None - * @return DThread*, user side thread ownership is not given. - */ - inline DThread* GetDThread() - { - return iThread; - }; - - protected: - - // None - - private: - - /** - * Call from user side comes to this function - * @since 2.8 - * @param TInt aFunction request number - * @param TAny* a1 pointer to array including info about request - * @param TAny* a2 not used - * @return TInt KErrNone if succesful - */ - TInt HandleRequest( TInt aFunction, TAny* a1, TAny* a2 ); - - /** - * Handles channel destruction. - * @since 2.8 - * @param void - * @return void - */ - void ChannelDestruction(); - - /** - * Handles asynchronous client requests - * @since 2.8 - * @param TInt aFunction request number - * @param TAny* a1 pointer to array including info about request - * @return void - */ - void HandleAsyncRequest( TInt aFunction, TAny* a1 ); - - /** - * Handles synchronous client requests - * @since 2.8 - * @param TInt aFunction - * @param TAny* a1 pointer to array including info about request - * @return TInt - */ - TInt HandleSyncRequest( TInt aFunction, TAny* a1 ); - - /** - * Cancels active request - * @since 2.8 - * @param TInt aFunction request number - * @param TAny* a1 not used - * @return TInt - */ - TInt HandleCancelRequest( TInt aFunction, TAny* a1 ); - - /** - * Copies several data frames to clients buffer if needed before compliting receive request - * @since 2.8 - * @param TDes8* aPtr pointer to frame - * @param TIscFrameInfo& aInfo info needed in frame combining - * @return void - */ - void HandleConcatenatedDataFrame( TDes8* aPtr, TIscFrameInfo& aInfo ); - - /** - * Copies several frames to clients buffer if needed before compliting receive request - * @since 2.8 - * @param TDes8* aPtr pointer to frame - * @param TIscFrameInfo& aInfo info needed in frame combining - * @return void - */ - void HandleConcatenatedFrame( TDes8* aPtr, TIscFrameInfo& aInfo ); - - /** - * Initialization complete dfc - * @since 2.8 - * @param TAny* aPtr pointer to channel - * @return static void. - */ - static void InitializeComplete( TAny* aPtr ); - - /** - * Completes the multiplexer initialization - * @since 2.8 - * @return void - */ - void DoMultiplexerInitialize(); - - private: // Data - - TDfc* iInitializeDfc; - TPtr8* iDataTransmissionIniData; - TPtr8* iMultiplexerIniData; - TUint8* iMultiplexerBuffer; - TUint8* iDataTransmissionBuffer; - DIscDevice* iIscDevice; - TPtr8* iIscConnectionStatusPtr; - TPtr8* iIscFlowControlStatusPtr; - //Store of Isc requests - TRequestStatus* iIscRequests[ EIscAsyncLast ]; - // Pointers to client message buffers - TPtr8* iReceiveBufPtr; - TPtr8* iDataReceiveBufPtr; - TPtr8* iNeededBufLen; - TPtr8* iNeededDataBufLen; - TUint16 iChannelNumber; - TBool iChannelOpen; - // Queue for incoming frames - TUint32** iFrameRx; - DIscQueue* iFrameRxQueue; - - // Queue for incoming data frames - TUint32** iDataFrameRx; - DIscQueue* iDataFrameRxQueue; - - TInt iULFlowControlStatus; - TInt iDLFlowControlStatus; - // Stores the last notified uplink flowcontrol status. - TInt iLastNotifiedULFlowstatus; - - TUint16 iIscChannelHighWaterMark; - TUint16 iIscChannelLowWaterMark; - TBool iOverFlow; - TBool iClientPanic; - TInt iDataTransmissionErrorCode; - - DThread* iThread; - - }; - -#endif // DISCCHANNEL_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDriver/inc/IscChannelContainer.h --- a/systemswstubs/examplecommonisc/IscDriver/inc/IscChannelContainer.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - - -#ifndef ISCCHANNELCONTAINER_H -#define ISCCHANNELCONTAINER_H - -// INCLUDES -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -class DIscChannel; - -// CLASS DECLARATION - -/** -* Static class to hold channel objects -* -* @lib IscDriver.LIB -* @since 2.8 -*/ -class IscChannelContainer - { - public: // Constructors and destructor - - - public: // New functions - - /** - * Set pointer to channel - * @since 2.8 - * @param IscChannel* aChannel pointer to channel - * @param const TUint16 aUnit channelnumber - * @return void - */ - IMPORT_C static TInt SetChannel( DIscChannel* aChannel, - const TUint16 aUnit ); - - /** - * Return pointer to channel. TUint16 aChannelSharingIndex is needed - * for channel sharing - * @since 2.8 - * @param const TUint16 aChannel channel number - * @param const TUint16 aChannelSharingIndex, index in channel table. - * @return static DIscChannel* pointer to channel instance - */ - static DIscChannel* Channel( const TUint16 aChannel, - const TUint16 aChannelSharingIndex ); - - /** - * Remove channel pointer from channel table - * @since 2.8 - * @param DIscChannel* aChannel pointer to DIscChannel - * @return static TInt - */ - static TInt RemoveChannel( DIscChannel* aChannel ); - - /** - * Goes through channels and open ones are emptied - * @since 2.8 - * @param TAny* not used - * @return static void - */ - static void ChannelComplition( TAny* /*a*/ ); - - /** - * Allocates Dfc function dynamically and formats data tables. - * @since 2.8 - * @return static void - */ - static void Initialize(); - - - /** - * Deallocates Dfc function - * @since 2.8 - * @return static void - */ - static void DeActivate(); - - /** - * Adds ChannelComplition Dfc. - * Can be called from any context. - * @since 2.8 - * @return static void - */ - static void AddDfc(); - - /** - * Make sure that pointer is valid DIscChannel pointer - * @since 2.8 - * @param aChannelPtr DIscChannel pointer - * @return void - */ - static TInt ValidateChannel( DIscChannel* aChannelPtr ); - - private: // Data - - static DIscChannel* iIscChannels[KIscNumberOfUnits][KIscMaxNumberOfChannelSharers]; - - static TDfc* iDfc; - - }; - -#endif // ISCCHANNELCONTAINER_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDriver/inc/IscDevice.h --- a/systemswstubs/examplecommonisc/IscDriver/inc/IscDevice.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,333 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef ISCDEVICE_H -#define ISCDEVICE_H - -// INCLUDES -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -class DIscDataTransmissionBase; -class DIscMultiplexerBase; -class DIscChannel; -class DIscMainRcvBuffer; -class DIscQueue; -class DIscSendQueue; -class TIscSendFrameInfo; - -// CLASS DECLARATION - -/** -* Isc driver ldd factory object -* -* @lib IscDriver.LIB -* @since 2.8 -*/ -class DIscDevice : public DLogicalDevice - { - public: // Constructors and destructor - /** - * C++ default constructor. - */ - IMPORT_C DIscDevice(); - - /** - * Destructor. - */ - IMPORT_C virtual ~DIscDevice(); - - - public: // Functions from base classes - - /** - * From DLogicalDevice. - * Create a logical channel - * @since 2.8 - * @param DLogicalChannelBase*& aChannel logical channel to be set - * @return TInt KErrNone if succesful, otherwise KErrNoMemory - */ - virtual TInt Create( DLogicalChannelBase*& aChannel ); - - /** - * Complete the installation of driver - * @since 2.8 - * @return TInt KErrNone if successful - */ - virtual TInt Install(); - - /** - * From DLogicalDevice. - * Get capabilities of this logical device - * @since 2.8 - * @param TDes8& aDes a reference which contains return - * information describing the capabilities of this device. - * @return void - */ - IMPORT_C virtual void GetCaps( TDes8& aDes ) const; - - public: // New functions - - /** - * Complete the initialization of driver - * @since 2.8 - * @return void - */ - void Initialize(); - - /** - * Get message block from buffers allocated in IscDataTransmissionBase.dll - * @since 2.8 - * @param TDes8*& aPtr pointer where message block is set - * @param TUint16 aSize size of needed memory block - * @return void - */ - IMPORT_C void ReserveMemoryBlock( TDes8*& aPtr, TUint16 aSize ); - - /** - * Release memory block allocated with ReserveMemoryBlock - * @since 2.8 - * @param TDes8* aData - * @return void - */ - IMPORT_C void ReleaseMemoryBlock( TDes8* aData ); - - /** - * Connection status change function. Can be called from any context. - * @since 2.8 - * @param const TInt aStatus status of driver - * @return void - */ - EXPORT_C void NotifyConnectionStatus( const TInt aStatus ); - - /** - * Frames coming from Domestic OS - * @since 2.8 - * @param TDesC8* aData pointer to data - * @return void - */ - IMPORT_C void Receive( TDesC8* aData ) const; - - /** - * Queue frames that will be sent to Domestic OS - * @since 2.8 - * @param aChannelId number of sender channel - * @param const TDesC8* aFrame pointer to send frame - * @param aChannelPtr DIscChannel pointer - * @param aMultiplexerDfc dfc to run by data transmission driver after frame has delivered - * @param aMultiplexerErrorCode status how frame transmission succeeded - * @return TInt KErrNone if frame added to send queue succesfully - */ - IMPORT_C TInt QueueFrame( const TUint16 aChannelId, - const TDesC8* aFrame, - const TAny* aChannelPtr, - TAny* aFrameInfo ); - - /** - * Cancels sending of frames to Domestic OS of certain channel and deletes queued frames - * @since 2.8 - * @param aChannelId channel number to which canceling is done - * @param aChannelPtr DIscChannel pointer - * @return TInt KErrNone when canceling is done - */ - IMPORT_C TInt CancelSending( const TUint16 aChannelId, - const TAny* aChannelPtr ); - - /** - * Adds Dfc to empty queues. Can be called from any context. - * @since 2.8 - * @return void - */ - IMPORT_C void FlushQueues(); - - /** - * Function to complete user side asynchronous request. Uses DIscChannel pointer - * @since 2.8 - * @param aOperation operation to complete - * @param aCompleteStatus status of operation - * @param aChannelPtr pointer to a DIscChannel - * @return void - */ - IMPORT_C void CompleteRequest( TUint16 aOperation, - TInt aCompleteStatus, - const TAny* aChannelPtr ); - - /** - * Function to notify client about uplink flow control status - * @since 2.8 - * @param aULFlowStatus EIscFlowControlOn / EIscFlowControlOff - * @param aChannelId Channel to be affected by the flow control - * @param aChannelPtr pointer to DIscChannel - * @return void - */ - IMPORT_C void ULFlowControl( const TInt aULFlowStatus, - const TUint16 aChannelId, - const TAny* aChannelPtr ); - - /** - * Function to check if asycnhronous request is active - * @since 2.8 - * @param const TUint16 aReqNumber request number - * @param const TUint16 aChannelId channel number - * @return TInt KRequestPending if request active, otherwise KErrNone - */ - IMPORT_C TInt IsPending( const TUint16 aReqNumber, - const TAny* aChannelPtr ); - - /** - * Copy data from user buffer to kernel side buffer by multiplexer. - * This method will be deprecated in the future. - * It is preffered to use GetThreadPtr instead. - * @since 2.8 - * @param aUserBuffer pointer to source descriptor - * @param aKernelBuffer pointer to destination descriptor - * @param aChannelPtr DIscChannel pointer - * @param aOffset Offset of the source buffer - * @return KErrNone if successful - */ - IMPORT_C TInt CopyFromUserBuffer( const TDesC8& aUserBuffer, - TDes8& aKernelBuffer, - const TAny* aChannelPtr, - const TInt aOffset ); - - /** - * Copy data to user side buffer from kernel side by multiplexer. - * This method will be deprecated in the future. - * It is preffered to use GetThreadPtr instead. - * @since 2.8 - * @param aUserBuffer pointer to destination descriptor - * @param aKernelBuffer pointer to source descriptor - * @param aChannelPtr DIscChannel pointer - * @param aOffset Offset of the destination buffer - * @return KErrNone if succesful - */ - IMPORT_C TInt CopyToUserBuffer( TAny* aUserBuffer, - const TDesC8& aKernelBuffer, - const TAny* aChannelPtr, - const TInt aOffset ); - - /** - * Returns a user side thread of a given channel. - * @since 3.0 - * @param const TAny* aChannelPtr, channel pointer (DIscChannel). - * @return DThread*, user side clients thread. Ownership is not given. - */ - IMPORT_C DThread* GetThreadPtr( const TAny* aChannelPtr ); - - /** - * Notify multiplexer about down link flow control - * @since 2.8 - * @param const TInt aDLFlowStatus EIscFlowControlOn / EIscFlowControlOff - * @param const TUint16 aChannel channel number - * @return void - */ - void DLFlowControlNotify( const TInt aDLFlowStatus, - const TUint16 aChannel, - const TAny* aChannelPtr ); - - /** - * Function to tell current status of connection to Domestic OS - * @since 2.8 - * @return TInt EIscConnectionOk / EIscConnectionNotOk - */ - TInt ConnectionStatus(); - - protected: - - /** - * Function to disable interrupts - * @since 2.8 - * @return TInt KErrNone if succesful - */ - static TInt DisableIrqs(); - - /** - * Function to restore interrupts - * @since 2.8 - * @param TInt aLevel level where interrupts should be restored - * @return void - */ - static void RestoreIrqs( TInt aLevel ); - - - private: - - /** - * Function to connect to DataTransmission and Multiplexer ldds - * @since 2.8 - * @return TInt KErrNone if succesful - */ - TInt InitializeLdd2LddInterface(); - - /** - * Dfc to empty control channel and other send queues - * @since 2.8 - * @param TAny* aPtr pointer to DIscDevice - * @return static void - */ - static void Flush( TAny* aPtr ); - - /** - * Notifies connection changes. - * @since 2.8 - * @param TAny* aPtr - * @return static void - */ - static void NotifyConnection( TAny* aPtr ); - - - public: // Data - - static DIscMultiplexerBase* iIscMultiplexerInterface; - static DIscDataTransmissionBase* iIscDataTransmissionInterface; - - - private: // Data - - TUint32** iSend; - TUint32** iTempSend; - TUint32** iControlSend; - - TIscSendFrameInfo** iSendFrameParameters; - TIscSendFrameInfo** iTempFrameParameters; - TIscSendFrameInfo** iControlFrameParameters; - - static DIscSendQueue* iSendQueue; - static DIscSendQueue* iTempQueue; - static DIscSendQueue* iControlSendQueue; - - static TDfc* iSendDfc; - static TDfc* iNotifyDfc; - - DIscMainRcvBuffer* iIscMainRcvBuffer; - - static TInt iConnectionStatus; - - }; - -#endif // ISCDEVICE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDriver/inc/IscDriverExtensionDevice.h --- a/systemswstubs/examplecommonisc/IscDriver/inc/IscDriverExtensionDevice.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Reference implementation for ISC Driver extension -* -*/ - - - - -#ifndef ISCDRIVER_EXTENSION_DEVICE_H -#define ISCDRIVER_EXTENSION_DEVICE_H - -// INCLUDES -#include -#include // Base class - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* Isc driver extension ldd factory object -* -* @lib IscDriver.LIB -* @since 2.8 -*/ -class DIscDriverExtensionDevice : public DIscDevice - { - public: // Constructors and destructor - - /** - * C++ default constructor. - */ - DIscDriverExtensionDevice(); - - /** - * Destructor. - */ - virtual ~DIscDriverExtensionDevice(); - - public: // Functions from base classes - - /** - * Create a logical channel - * @since 2.8 - * @param DLogicalChannelBase*& aChannel logical channel to be set - * @return virtual TInt KErrNone if succesful, otherwise KErrNoMemory - */ - virtual TInt Create( DLogicalChannelBase*& aChannel ); - - /** - * Complete the installation of driver - * @since 2.8 - * @return TInt KErrNone if successful - */ - TInt Install(); - - - private: - - DIscDevice* iIscDriverDevice; - }; - -#endif // ISCDRIVER_EXTENSION_DEVICE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDriver/inc/IscMainRcvBuffer.h --- a/systemswstubs/examplecommonisc/IscDriver/inc/IscMainRcvBuffer.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,109 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of DIscMainRcvBuffer class -* -*/ - - - - -#ifndef DISCMAINRCVBUFFER_H -#define DISCMAINRCVBUFFER_H - -// INCLUDES -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION -class DIscDevice; -class DIscQueue; - -/** -* First place to store incoming messages from Domestic OS -* -* @lib IscDriver.LIB -* @since 2.8 -*/ -class DIscMainRcvBuffer//: public CBase - { - public: // Constructors and destructor - - /** - * C++ default constructor. - */ - DIscMainRcvBuffer( DIscDevice* aDevice, TUint16 aIscMainRcvBufferQueueSize ); - - /** - * Destructor. - */ - virtual ~DIscMainRcvBuffer(); - - public: // New functions - - /** - * Second-phase constructor. Should be called to complete construction. - * @since 2.8 - * @return void - */ - void DoCreate(); - - /** - * Function that should be called to store incoming frame - * @since 2.8 - * @param TDesC8* aData pointer to frame - * @return void - */ - static void MsgReceive( TDesC8* aData ); - - /** - * Function for adding Dfc. Can be called from any context. - * @since 2.8 - * @return void - */ - void AddDfc(); - - private: - - /** - * Function that goes through messages in main buffer - * and empties those to correct channel buffers - * @since 2.8 - * @param TAny* aPtr pointer to DIscMainRcvBuffer - * @return static void - */ - static void BufferCleanUp( TAny* aPtr ); - - private: // Data - - DIscDevice* iDevice; - TDfc* iDfc; - static DIscMainRcvBuffer* iThisPointer; - TUint16 iIscMainRcvBufferQueueSize; - TUint32** iMainRcvBuffer; - DIscQueue* iMainRcvBufferQueue; - - }; - -#endif // DISCMAINRCVBUFFER_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDriver/inc/IscQueue.h --- a/systemswstubs/examplecommonisc/IscDriver/inc/IscQueue.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,144 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Header file for Iscqueue -* -*/ - - - -#ifndef DISCQUEUE_H -#define DISCQUEUE_H - -// INCLUDES -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* Generic FIFO-type class -* -* @lib IscDriver.LIB -* @since 2.8 -*/ -class DIscQueue - { - public: // Constructors and destructor - - DIscQueue(); - - /** - * C++ default constructor. - */ - IMPORT_C DIscQueue( TUint32** aQueue, TUint16 Size ); - - /** - * Destructor. - */ - IMPORT_C virtual ~DIscQueue(); - - /** - * Function to add element to queue - * @since 2.8 - * @param TAny* pointer to frame - * @return TInt KErrNone / KErrNoMemory - */ - IMPORT_C TInt Add( TAny* ); - - /** - * Removes first element from the queue - * @since 2.8 - * @return TAny* pointer to frame - */ - IMPORT_C TAny* RemoveFirst(); - - /** - * Fetches first element from the queue - * @since 2.8 - * @return TAny* pointer to frame - */ - IMPORT_C TAny* GetFirst(); - - /** - * Deletes first element from the queue - * @since 2.8 - * @return void - */ - IMPORT_C void DeleteFirst(); - - /** - * Checks if queue is empty - * @since 2.8 - * @return TBool ETrue if empty, otherwise EFalse - */ - IMPORT_C TBool Empty(); - - /** - * Gets length of next frame in queue - * @since 2.8 - * @return TUint16 - */ - IMPORT_C TUint16 NextBufferLength(); - - /** - * Inline function to tell the amount of elements in queue - * @since 2.8 - * @return TUint16 amount of elements in queue - */ - inline TUint16 Count() const { return iCount; }; - - /** - * Inline function to tell the size of queue - * @since 2.8 - * @return TUint16 size of queue - */ - inline TUint16 SizeOf() const { return iSize; }; - - protected: - - /** - * Function to disable interrupts - * @since 2.8 - * @return TInt KErrNone if succesful - */ - TInt DisableIrqs(); - - /** - * Function to restore interrupts - * @since 2.8 - * @param TInt aLevel level where interrupts should be restored - * @return void - */ - void RestoreIrqs( TInt aLevel ); - - volatile TUint16 iHead; - volatile TUint16 iTail; - volatile TUint16 iCount; - TUint16 iSize; - TUint32** iQueue; - - }; - -#endif // DISCQUEUE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDriver/inc/IscSendQueue.h --- a/systemswstubs/examplecommonisc/IscDriver/inc/IscSendQueue.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,98 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: An example implementation for ISC Driver Reference -* -*/ - - - -#ifndef DISCSENDQUEUE_H -#define DISCSENDQUEUE_H - -// INCLUDES -#include -#include "IscQueue.h" // Base class - -// CONSTANTS - -// MACROS - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION -class DIscChannel; -class TIscSendFrameInfo; - -// DATA TYPES - -/** -* Generic FIFO-type class for send messages -* -* @lib IscDriver.LIB -* @since 2.8 -*/ -class DIscSendQueue : public DIscQueue - { - public: // Constructors and destructor - - /** - * C++ default constructor. - */ - IMPORT_C DIscSendQueue( TUint32** aQueue, - TIscSendFrameInfo** aParameterQueue, - TUint16 aSize ); - - /** - * Destructor. - */ - IMPORT_C ~DIscSendQueue(); - - /** - * Function to add element to queue - * @since 2.8 - * @param anEntry pointer to frame - * @param aId channel number - * @param aChannelPtr DIscChannel pointer - * @param aFrameInfo Additional information to pass information to data transmission driver - * @return TInt KErrNone / KErrNoMemory - */ - IMPORT_C TInt Add( TAny* anEntry, TUint16 aId, DIscChannel* aChannelPtr, TAny* aFrameInfo ); - - /** - * Function to get information about first frame in queue - * @since 2.8 - * @return TIscSendFrameInfo* (channel id, channel pointer and frameinfo) - */ - IMPORT_C TIscSendFrameInfo* GetFirstFrameInfo(); - - - private: - - TIscSendFrameInfo** iParameterQueue; - - }; - -class TIscSendFrameInfo - { - public: - DIscChannel* iChannelPtr; - TAny* iFrameInfo; - TUint16 iChannelId; - }; - -#endif // DISCSENDQUEUE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDriver/inc/IscTrace.h --- a/systemswstubs/examplecommonisc/IscDriver/inc/IscTrace.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Trace macros for example common isc. -* -*/ - - -#ifndef ISCTRACE_H -#define ISCTRACE_H - -// INCLUDES -// CONSTANTS - -// MACROS - -#ifdef TRACE_MODE_KERNEL - - // INCLUDES - #include - - #define _T(a) a -#else - - // INCLUDES - #include // RDebug - #include - - #define _T(a) _L(a) - -#endif // TRACE_MODE_KERNEL - -#ifdef _DEBUG - - #ifdef TRACE_MODE_KERNEL - #define __TRACE_PRINTF(a) Kern::Printf a - #else - #define __TRACE_PRINTF(a) RDebug::Print a - #endif - -#else - #define __TRACE_PRINTF(a) -#endif // _DEBUG - - -#ifdef _DEBUG - - void BuildTraceFunc( const TDesC& aPrefix ); - void DataDumpTraceFunc( const TDesC& aPrefix, const TDesC8& aData ); - - #define BUILD_TRACE( a ) BuildTraceFunc( a ) - #define DATA_DUMP_TRACE( a, b ) DataDumpTraceFunc( a, b ) - - #ifdef TRACE_MODE_KERNEL - - // define assertions - #define TRACE_ASSERT(a) if (!(a)) __TRACE_PRINTF(("Assertion failed: file=" __FILE__ ", line=%d, compiled=" __DATE__" "__TIME__, __LINE__ )) - - #else - - // define assertions - #ifdef __WINS__ - #define TRACE_ASSERT(a) if (!(a)) __TRACE_PRINTF((_L("Assertion failed: file= __FILE__ , line=%d, compiled=__DATE__ __TIME__ "),__LINE__)) - #else - #define TRACE_ASSERT(a) if (!(a)) __TRACE_PRINTF((_L("Assertion failed: file=" __FILE__ ", line=%d, compiled="__DATE__ __TIME__""),__LINE__ )) - #endif //__WINS__ - - #endif // TRACE_MODE_KERNEL - - - #if defined COMPONENT_TRACE_FLAG - #define C_TRACE(a) __TRACE_PRINTF(a) - #else - #define C_TRACE(a) - #endif // COMPONENT_TRACE_FLAG - - #if defined API_TRACE_FLAG - #define A_TRACE(a) __TRACE_PRINTF(a) - #else - #define A_TRACE(a) - #endif // API_TRACE_FLAG - - #if defined EXTENDED_TRACE_FLAG - #define E_TRACE(a) __TRACE_PRINTF(a) - #else - #define E_TRACE(a) - #endif // EXTENDED_TRACE_FLAG - -#else - #define TRACE_ASSERT(a) - #define C_TRACE(a) - #define A_TRACE(a) - #define E_TRACE(a) - #define BUILD_TRACE(a) - #define DATA_DUMP_TRACE(a, b) -#endif // _DEBUG - - -// Resets are made both in UDEB and UREL (traces only in udeb) -#ifdef TRACE_MODE_KERNEL - #define ASSERT_RESET_ALWAYS(a,b,c) if(!(a)) { __TRACE_PRINTF(("Assertion failed: file=" __FILE__ ", line=%d, compiled="__DATE__" "__TIME__, __LINE__)); Kern::Fault(b,c); } - #define TRACE_ASSERT_ALWAYS __TRACE_PRINTF( ("Assertion failed: file=" __FILE__ ", line=%d, compiled="__DATE__" "__TIME__, __LINE__) ) -#else - #ifdef __WINS__ - #define ASSERT_RESET_ALWAYS(a,b,c) error - #define TRACE_ASSERT_ALWAYS __TRACE_PRINTF( (_L("Assertion failed: file= __FILE__ , line=%d, compiled=__DATE__ __TIME__ "),__LINE__) ) - #else - #define ASSERT_RESET_ALWAYS(a,b,c) error - #define TRACE_ASSERT_ALWAYS __TRACE_PRINTF( (_L("Assertion failed: file=%s, line=%d, compiled=%s %s "),__FILE__, __LINE__, __DATE__, __TIME__) ) - #endif -#endif // kernel - - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -#endif // ISCTRACE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDriver/src/IscChannel.cpp --- a/systemswstubs/examplecommonisc/IscDriver/src/IscChannel.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1800 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: An example implementation for ISC Driver Reference -* -*/ - - - -// INCLUDE FILES -#include -#include -#include "IscChannel.h" -#include "IscDevice.h" -#include "IscChannelContainer.h" -#include "IscQueue.h" -#include "IscTrace.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS -_LIT( KIscDriver, "IscDriver" ); - -// MACROS - -// LOCAL CONSTANTS AND MACROS -const TInt KIscInitializeDfcPriority( 1 ); -const TInt KOneParam( 1 ); -const TInt KTwoParams( 2 ); -const TInt KThreeParams( 3 ); -const TInt KFirstParam( 0 ); -const TInt KSecondParam( 1 ); -const TInt KThirdParam( 2 ); -const TInt KMultiplyByOne( KSecondParam ); -const TInt KMultiplyByThree( KThreeParams ); -const TInt KDivideByFour( 4 ); - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - - -// ============================ MEMBER FUNCTIONS =============================== - - -// ----------------------------------------------------------------------------- -// DIscChannel::DIscChannel -// C++ default constructor. -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C DIscChannel::DIscChannel( DLogicalDevice* aDevice ) - : iInitializeDfc( NULL ), - iDataTransmissionIniData( NULL ), - iMultiplexerIniData( NULL ), - iMultiplexerBuffer( NULL ), - iDataTransmissionBuffer( NULL ), - iIscDevice( NULL ), - iIscConnectionStatusPtr( NULL ), - iIscFlowControlStatusPtr( NULL ), - iReceiveBufPtr( NULL ), - iDataReceiveBufPtr( NULL ), - iNeededBufLen( NULL ), - iNeededDataBufLen( NULL ), - iChannelNumber( 0 ), - iChannelOpen( EFalse ), - iFrameRx( NULL ), - iFrameRxQueue( NULL ), - iDataFrameRx( NULL ), - iDataFrameRxQueue( NULL ), - iULFlowControlStatus( EIscFlowControlOff ), - iDLFlowControlStatus( EIscFlowControlOff ), - iLastNotifiedULFlowstatus( EIscFlowControlOff ), - iIscChannelHighWaterMark( 0 ), - iIscChannelLowWaterMark( 0 ), - iOverFlow( EFalse ), - iClientPanic( EFalse ), - iDataTransmissionErrorCode( KErrNone ) - { - - iIscDevice = ( DIscDevice * )aDevice; - for ( TInt i( KErrNone ); i < EIscAsyncLast; i++ ) - { - iIscRequests[i] = NULL; - } - iThread = &Kern::CurrentThread(); - TInt r = iThread->Open(); - TRACE_ASSERT( r == KErrNone ); - - } - - -// ----------------------------------------------------------------------------- -// DIscChannel::~DIscChannel -// Destructor -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -DIscChannel::~DIscChannel() - { - C_TRACE( ( _T( "DIscChannel::~DIscChannel()" ) ) ); - - if ( iChannelNumber < KIscNumberOfUnits ) - { - IscChannelContainer::RemoveChannel( this ); - } - else - { - C_TRACE( ( _T( "DIscChannel::~DIscChannel() re-open" ) ) ); - } - - ChannelDestruction(); - Kern::SafeClose( ( DObject*& )iThread, NULL ); - C_TRACE( ( _T( "DIscChannel::~DIscChannel() SafeClose called" ) ) ); - - } - -// ----------------------------------------------------------------------------- -// DIscChannel::ChannelDestruction -// Destructor -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscChannel::ChannelDestruction() - { - C_TRACE( ( _T( "DIscChannel::ChannelDestruction() iChannelNumber (0x%x)" ),iChannelNumber ) ); - - // call DIscMultiplexerBase::CloseDLC and DLFlowControlNotify in case the channel has not been - // properly closed ( e.g. client thread panic etc. ) - if ( iChannelOpen ) - { - iIscDevice->CancelSending( iChannelNumber, this );// Delete pending send frames - iIscDevice->iIscMultiplexerInterface->CloseDLC( iChannelNumber, this ); - iIscDevice->DLFlowControlNotify( EIscFlowControlOff, iChannelNumber, this ); - } - - if ( iFrameRxQueue ) - { - while ( !iFrameRxQueue->Empty() ) - { - TDes8* tempPtr = ( TDes8* ) iFrameRxQueue->GetFirst(); - iFrameRxQueue->DeleteFirst(); - iIscDevice->ReleaseMemoryBlock( tempPtr ); - } - delete iFrameRxQueue; - iFrameRxQueue = NULL; - } - - if ( iFrameRx ) - { - delete [] iFrameRx; - iFrameRx = NULL; - } - - if ( iDataFrameRxQueue ) - { - while ( !iDataFrameRxQueue->Empty() ) - { - TDes8* tempPtr = ( TDes8* ) iDataFrameRxQueue->GetFirst(); - iDataFrameRxQueue->DeleteFirst(); - iIscDevice->ReleaseMemoryBlock( tempPtr ); - } - delete iDataFrameRxQueue; - iDataFrameRxQueue = NULL; - } - - if ( iDataFrameRx ) - { - delete [] iDataFrameRx; - iDataFrameRx = NULL; - } - - if ( iInitializeDfc ) - { - delete iInitializeDfc; - iInitializeDfc = NULL; - } - - if ( iDataTransmissionIniData ) - { - Kern::Free( iDataTransmissionBuffer ); - delete iDataTransmissionIniData; - iDataTransmissionIniData = NULL; - } - - if ( iMultiplexerIniData ) - { - Kern::Free( iMultiplexerBuffer ); - delete iMultiplexerIniData; - iMultiplexerIniData = NULL; - } - - C_TRACE( ( _T( "DIscChannel::ChannelDestruction - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// DIscChannel::HandleMsg -// Message handling ( kernel server context ). -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscChannel::HandleMsg( - TMessageBase* aMsg ) - { - C_TRACE( ( _T( "DIscChannel::HandleMsg(0x%x)" ), aMsg ) ); - TThreadMessage& m=*( TThreadMessage* )aMsg; - TInt id( m.iValue ); - - if ( id==( TInt )ECloseMsg ) - { - C_TRACE( ( _T( "DIscChannel::HandleMsg ECloseMsg" ) ) ); - m.Complete( KErrNone,EFalse ); - return; - } - - else if ( id==KMaxTInt ) - { - // DoCancel - // Should not come here ever - ASSERT_RESET_ALWAYS( 0,"IscDriver",EIscNotAllowedCallToDoCancel ); - } - - else if ( id<0 ) - { - // DoRequest - // should not come here ever - ASSERT_RESET_ALWAYS( 0,"IscDriver",EIscNotAllowedCallToDoRequest ); - } - - else - { - // DoControl - TUint32 a1[ KThreeParams ]; - TInt r( KErrNone ); - if ( id != EIscSyncClose ) - { - TInt amountOfParams( KErrNone ); - switch( id ) - { - case EIscAsyncInitializeModemInterface: - case EIscAsyncOpen: - amountOfParams = KThreeParams; - break; - default: - ASSERT_RESET_ALWAYS( 0, "NokiaISCDriver", EIscUnknownCommand ); - break; - } - r = Kern::ThreadRawRead( iThread, ( TAny* )m.Ptr0(), a1, - amountOfParams * sizeof( TAny* ) ); - TRACE_ASSERT( r == KErrNone ); - } - if( r == KErrNone ) - { - r=HandleRequest( id,a1,m.Ptr1() ); - } - - m.Complete( r,ETrue ); - } - } - -// ----------------------------------------------------------------------------- -// DIscChannel::Request -// Message handling ( user thread context ). -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -#ifndef COMPONENT_TRACE_FLAG -TInt DIscChannel::Request( TInt aReqNo, TAny* a1, TAny* ) -#else -TInt DIscChannel::Request( TInt aReqNo, TAny* a1, TAny* a2) -#endif - { - C_TRACE( ( _T( "DIscChannel::Request(0x%x, 0x%x, 0x%x)" ), aReqNo, a1, a2 ) ); - - TInt r( KErrNotFound ); - - if ( aReqNo<( TInt )EMinRequestId ) - C_TRACE( ( _T( "DIscChannel::Request ERROR: False aReqNo %d" ), aReqNo ) ); - - if ( aReqNo >= 0 && aReqNo < EIscAsyncLastKernelServerContext || - aReqNo >= EIscAsyncLast && aReqNo < EIscSyncLastKernelServerContext ) - { - TThreadMessage& m=Kern::Message(); - m.iValue=aReqNo; - m.iArg[ KFirstParam ]=a1; - m.iArg[ KSecondParam ]=NULL; - r = m.SendReceive( &iMsgQ ); - } - else - { - TInt ulen( KErrNotFound ); - switch ( aReqNo ) - { - case EIscCancelAsyncInitialize: - case EIscCancelAsyncReceive: - case EIscCancelAsyncDataReceive: - case EIscSyncGetConnectionStatus: - case EIscCancelAsyncNotifyConnection: - case EIscSyncGetFlowControlStatus: - case EIscCancelAsyncNotifyFlowControl: - case EIscSyncGetMaximunDataSize: - case EIscCancelAsyncCustomOperation1: - case EIscCancelAsyncCustomOperation2: - case EIscCancelAsyncCustomOperation3: - case EIscCancelAsyncCustomOperation4: - case EIscCancelAsyncCustomOperation5: - case EIscCancelAsyncOpen: - case EIscSyncResetBuffers: - case EIscCancelAsyncSend: - case EIscCancelAsyncDataSend: - { - ulen = KErrNone; - break; - } - case EIscSyncSend: - case EIscSyncDataSend: - case EIscSyncCustomOperation1: - case EIscSyncCustomOperation2: - case EIscSyncCustomOperation3: - case EIscSyncCustomOperation4: - case EIscSyncCustomOperation5: - case EIscAsyncClose: - { - ulen = KOneParam; - break; - } - case EIscAsyncSend: - case EIscAsyncDataSend: - case EIscSyncGetChannelInfo: - case EIscAsyncNotifyConnectionStatus: - case EIscAsyncNotifyFlowControlStatus: - case EIscAsyncCustomOperation1: - case EIscAsyncCustomOperation2: - case EIscAsyncCustomOperation3: - case EIscAsyncCustomOperation4: - case EIscAsyncCustomOperation5: - { - ulen = KTwoParams; - break; - } - case EIscAsyncReceive: - case EIscAsyncDataReceive: - { - ulen = KThreeParams; - break; - } - default: - { - TRACE_ASSERT_ALWAYS; - } - } - ASSERT_RESET_ALWAYS( KErrNotFound != ulen, "ISCDriver", EIscUnknownCommand ); - // Maximum number of elements is three!!! - TAny* kptr[ KThreeParams ] = { KErrNone }; - if( ulen > KErrNone ) - { - C_TRACE( ( _T( "DIscChannel::Request ISC kumemget32" ) ) ); - kumemget32( kptr , a1, ( sizeof( TAny* ) ) * ulen ); - } - r = HandleRequest( aReqNo, kptr, NULL ); - } - C_TRACE( ( _T( "DIscChannel::Request ISC return %d CH 0x%x" ), r, iChannelNumber ) ); - return r; - - } - -// ----------------------------------------------------------------------------- -// DIscChannel::DoControl -// Handles requests. -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -TInt DIscChannel::HandleRequest( - TInt aFunction, - TAny* a1, - TAny* /*a2*/ ) - { - C_TRACE( ( _T( "DIscChannel::DoControl(0x%x, 0x%x) iChannelNumber 0x%x channelPtr 0x%x" ), aFunction, a1, iChannelNumber, this ) ); - - TInt error( KErrNone ); - -#ifdef _DEBUG - // Check if control frame buffer overflow -> panic - if ( iClientPanic ) - { - C_TRACE( ( _T( "DIscChannel::DoControl() BUFFER OVERFLOW: PANIC CLIENT 0x%x" ), iChannelNumber ) ); - TRACE_ASSERT_ALWAYS; - // This panic the user thread only. - Kern::ThreadKill( iThread, EExitPanic, EIscControlBufferOverflow, KIscDriver ); - } -#endif // _DEBUG - - // Handle asynchronous requests - if ( aFunction >= EIscAsyncInitializeModemInterface && - aFunction < EIscAsyncLast ) - { - // if request is already active - if ( iIscRequests[aFunction] ) - { - TUint32* tablePtr = ( TUint32* )a1; - TRequestStatus* requestStatus = ( TRequestStatus* )( tablePtr[ KFirstParam ] ); - Kern::RequestComplete( iThread, requestStatus, KErrAlreadyExists ); - } - else - { - HandleAsyncRequest( aFunction, a1 ); - } - } - // Handle synchronous requests. - else if ( aFunction >= EIscAsyncLast && - aFunction < EIscSyncLast ) - { - error = HandleSyncRequest( aFunction, a1 ); - } - // Handle cancellation requests. - else if ( aFunction >= EIscSyncLast && - aFunction < EIscCancelLast ) - { - error = HandleCancelRequest( aFunction, a1 ); - } - // Undefined request, panic current thread. - else - { - // This panic the user thread only. - Kern::ThreadKill( iThread, EExitPanic, EIscControlBufferOverflow, KIscDriver ); - } - - C_TRACE( ( _T( "DIscChannel::DoControl - return %d" ), error ) ); - - return error; - } - - -// ----------------------------------------------------------------------------- -// DIscChannel::HandleAsyncRequests -// Handles asynchronous client requests -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscChannel::HandleAsyncRequest( - TInt aFunction, - TAny* a1 ) - { - C_TRACE( ( _T( "DIscChannel::HandleAsyncRequest(0x%x, 0x%x) channelPtr 0x%x" ), aFunction, a1, this ) ); - - TUint32* tablePtr = ( TUint32* )a1; - - switch ( aFunction ) - { - case EIscAsyncInitializeModemInterface: - { - TInt r = KErrNotFound; - iIscRequests[EIscAsyncInitializeModemInterface] = ( TRequestStatus* )( tablePtr[ KFirstParam ] ); - - iInitializeDfc = new TDfc( InitializeComplete, this, Kern::DfcQue0(), KIscInitializeDfcPriority ); - ASSERT_RESET_ALWAYS( iInitializeDfc, "IscDriver",EIscMemoryAllocationFailure ); - - // Get Data Transmission Driver initialization string - TDesC8* tempPtr = ( TDesC8* )tablePtr[ KThirdParam ]; - iDataTransmissionBuffer = ( TUint8* )Kern::Alloc( KIscIniLineLength ); - ASSERT_RESET_ALWAYS( iDataTransmissionBuffer, "IscDriver",EIscMemoryAllocationFailure ); - - iDataTransmissionIniData = new ( TPtr8 )( iDataTransmissionBuffer, KIscIniLineLength ); - ASSERT_RESET_ALWAYS( iDataTransmissionIniData, "IscDriver",EIscMemoryAllocationFailure ); - - r = Kern::ThreadDesRead( iThread, tempPtr, *iDataTransmissionIniData, 0, KChunkShiftBy0 ); - ASSERT_RESET_ALWAYS( r == KErrNone, "IscDriver",EIscMemoryAllocationFailure ); - - // Get Multiplexer initialization string - tempPtr = ( TDesC8* )tablePtr[1]; - iMultiplexerBuffer = ( TUint8* )Kern::Alloc( KIscIniLineLength ); - ASSERT_RESET_ALWAYS( iMultiplexerBuffer, "IscDriver",EIscMemoryAllocationFailure ); - - iMultiplexerIniData = new ( TPtr8 )( iMultiplexerBuffer, KIscIniLineLength ); - ASSERT_RESET_ALWAYS( iDataTransmissionIniData, "IscDriver",EIscMemoryAllocationFailure ); - - r = Kern::ThreadDesRead( iThread, tempPtr, *iMultiplexerIniData, 0, KChunkShiftBy0 ); - ASSERT_RESET_ALWAYS( r == KErrNone, "IscDriver",EIscMemoryAllocationFailure ); - - // If buffer configuration is given from isc_config.ini as multiplexer configuration string, multiplexer - // needs configuration before datatransmissin driver is initialized - iIscDevice->iIscMultiplexerInterface->SetInitializationParameters( *iMultiplexerIniData ); - - // Allocate buffers and receive queues - iIscDevice->Initialize(); - - iIscDevice->iIscDataTransmissionInterface->InitializeDataTransmission( *iDataTransmissionIniData, - iInitializeDfc, - iDataTransmissionErrorCode ); - break; - } - - case EIscAsyncOpen: - { - iIscRequests[EIscAsyncOpen] = ( TRequestStatus* )( tablePtr[ KFirstParam ] ); - if ( iIscDevice->ConnectionStatus() == EIscConnectionOk ) - { - TDesC8* openInfo = ( TDesC8* )tablePtr[ KThirdParam ]; - // Channel info parameter has to be copied from user side in Epoc Kernel Architecture 2 - TInt length = Kern::ThreadGetDesLength( iThread, ( TDesC8* )tablePtr[ KThirdParam ] ); - TUint8* buffer = NULL; - TPtr8* bufferPtr = NULL; - if ( length > KErrNone ) - { - C_TRACE( ( _T( "DIscChannel::HandleAsyncRequest EIscAsyncOpen channel info got" ) ) ); - buffer = ( TUint8* )Kern::Alloc( length ); - bufferPtr = new ( TPtr8 )( buffer, length ); - TInt r = Kern::ThreadDesRead( iThread, openInfo, *bufferPtr, 0, KChunkShiftBy0 ); - ASSERT_RESET_ALWAYS( r == KErrNone, "IscDriver",EIscMemoryAllocationFailure ); - openInfo = ( TDesC8* )bufferPtr; - } - iIscDevice->iIscMultiplexerInterface->OpenDLC( ( TUint16 )tablePtr[ KSecondParam ], - openInfo, - this ); - - if ( buffer ) - Kern::Free( buffer ); - if ( bufferPtr ) - { - delete bufferPtr; - bufferPtr = NULL; - } - } - else - { - CompleteRequest( aFunction, KErrNotReady ); - } - break; - } - case EIscAsyncSend: - { - iIscRequests[EIscAsyncSend] = ( TRequestStatus* )( tablePtr[ KFirstParam ] ); - if ( iIscDevice->ConnectionStatus() == EIscConnectionOk - && iULFlowControlStatus == EIscFlowControlOff ) - { - TDesC8* ptr = ( TDesC8* ) tablePtr[ KSecondParam ]; - - // No return values check needed. Request completed with error value by multiplexer - iIscDevice->iIscMultiplexerInterface->Send( ( TUint16 )aFunction, - iChannelNumber, - *ptr, - this ); - } - else - { - if ( iULFlowControlStatus != EIscFlowControlOff ) - { - CompleteRequest( aFunction, KErrOverflow ); - } - else - { - CompleteRequest( aFunction, KErrNotReady ); - } - } - break; - } - case EIscAsyncReceive: - { - TRACE_ASSERT( tablePtr[ KFirstParam ] ); - TRACE_ASSERT( tablePtr[ KSecondParam ] ); - TRACE_ASSERT( tablePtr[ KThirdParam ] ); - - // check for descriptor validity - TRACE_ASSERT( Kern::ThreadGetDesMaxLength( iThread, (TPtr8* )tablePtr[KSecondParam] ) > 0 ); - - //Store needed length ptr - iNeededBufLen = ( TPtr8* )tablePtr[ KThirdParam ]; - - //Store msg data ptr - iReceiveBufPtr = ( TPtr8* )tablePtr[ KSecondParam ]; - - iIscRequests[EIscAsyncReceive] = ( TRequestStatus* )( tablePtr[ KFirstParam ] ); - - break; - } - case EIscAsyncDataSend: - { - iIscRequests[EIscAsyncDataSend] = ( TRequestStatus* )( tablePtr[ KFirstParam ] ); - - if ( iIscDevice->ConnectionStatus() == EIscConnectionOk - && iULFlowControlStatus == EIscFlowControlOff ) - { - TDesC8* ptr = ( TDesC8* )tablePtr[ KSecondParam ]; - iIscDevice->iIscMultiplexerInterface->DataSend( ( TUint16 )aFunction, - iChannelNumber, - *ptr, - this ); - } - else - { - if ( iULFlowControlStatus != EIscFlowControlOff ) - { - CompleteRequest( aFunction, KErrOverflow ); - } - else - { - CompleteRequest( aFunction, KErrNotReady ); - } - } - break; - } - case EIscAsyncDataReceive: - { - TRACE_ASSERT( tablePtr[ KFirstParam ] ); - TRACE_ASSERT( tablePtr[ KSecondParam ] ); - TRACE_ASSERT( tablePtr[ KThirdParam ] ); - - // check for descriptor validity - TRACE_ASSERT( Kern::ThreadGetDesMaxLength( iThread, (TPtr8* )tablePtr[KSecondParam] ) > 0 ); - - //Store needed length ptr - iNeededDataBufLen = ( TPtr8* )tablePtr[ KThirdParam ]; - - //Store msg data ptr - iDataReceiveBufPtr = ( TPtr8* )tablePtr[ KSecondParam ]; - - iIscRequests[EIscAsyncDataReceive] = ( TRequestStatus* )( tablePtr[ KFirstParam ] ); - - break; - } - case EIscAsyncNotifyConnectionStatus: - { - iIscConnectionStatusPtr = ( TPtr8* )tablePtr[ KSecondParam ]; - iIscRequests[EIscAsyncNotifyConnectionStatus] = ( TRequestStatus* )( tablePtr[ KFirstParam ] ); - break; - } - case EIscAsyncNotifyFlowControlStatus: - { - iIscFlowControlStatusPtr = reinterpret_cast( tablePtr[ KSecondParam ] ); - iIscRequests[ EIscAsyncNotifyFlowControlStatus ] = reinterpret_cast( tablePtr[ KFirstParam ] ); - C_TRACE( ( _T( "DIscChannel::NotifyFlowControl iLastNotifiedULFlowstatus = %d iULFlowControlStatus = %d" ), iLastNotifiedULFlowstatus, iULFlowControlStatus ) ); - - if( iULFlowControlStatus != iLastNotifiedULFlowstatus ) - { - // Complete immediately. - C_TRACE( ( _T( "DIscChannel::HandleAsyncRequest iULFlowControlStatus != iLastNotifiedULFlowstatus" ) ) ); - NotifyFlowControl( iULFlowControlStatus ); - } - else - { - // None - } - break; - } - case EIscAsyncCustomOperation1: - case EIscAsyncCustomOperation2: - case EIscAsyncCustomOperation3: - case EIscAsyncCustomOperation4: - case EIscAsyncCustomOperation5: - { - iIscRequests[aFunction] = ( TRequestStatus* )( tablePtr[ KFirstParam ] ); - TAny* tempPtr = ( TAny* )tablePtr[ KSecondParam ]; - iIscDevice->iIscMultiplexerInterface->CustomFunction( iChannelNumber, - ( TUint16 )aFunction, - tempPtr, - this ); - break; - } - case EIscAsyncClose: - { - iIscRequests[aFunction] = ( TRequestStatus* )( tablePtr[ KFirstParam ] ); - - ResetBuffers(); - - // Cancel all active requests except asynchronous close - for ( TInt i( KErrNone ); i < EIscAsyncLast; i++ ) - { - // if request is active complete it with KErrCancel - if ( iIscRequests[i] && i != EIscAsyncClose ) - { - iIscDevice->iIscMultiplexerInterface->CancelNotify( iChannelNumber, i, this ); - CompleteRequest( i, KErrCancel ); - } - } - - iChannelOpen = EFalse; - - iIscDevice->iIscMultiplexerInterface->CloseDLC( iChannelNumber, this ); - - break; - } - default: - { - ASSERT_RESET_ALWAYS( 0,"IscDriver",EIscUnknownCommand ); - break; - } - } - - IscChannelContainer::AddDfc(); - - } - - -// ----------------------------------------------------------------------------- -// DIscChannel::HandleSyncRequest -// Handles synchronous client requests -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -TInt DIscChannel::HandleSyncRequest( - TInt aFunction, - TAny* a1 ) - { - C_TRACE( ( _T( "DIscChannel::HandleSyncRequest(0x%x, 0x%x) channelPtr 0x%x" ), aFunction, a1, this ) ); - - TInt error( KErrNone ); - TUint32* tablePtr = ( TUint32* )a1; - - switch ( aFunction ) - { - case EIscSyncClose: - { - ResetBuffers(); - - iIscDevice->iIscMultiplexerInterface->CloseDLC( iChannelNumber, this ); - - // Cancel all active requests - for ( TInt i( KErrNone ); i < EIscAsyncLast; i++ ) - { - // if request is active complete it with KErrCancel - if ( iIscRequests[i] ) - { - iIscDevice->iIscMultiplexerInterface->CancelNotify( iChannelNumber, i, this ); - CompleteRequest( i, KErrCancel ); - } - } - - error = KErrNone; - iChannelOpen = EFalse; - break; - } - case EIscSyncSend: - { - if ( iIscDevice->ConnectionStatus() == EIscConnectionOk - && iULFlowControlStatus == EIscFlowControlOff ) - { - - TDesC8* ptr = ( TDesC8* ) tablePtr[ KFirstParam ]; - error = iIscDevice->iIscMultiplexerInterface->Send( ( TUint16 )aFunction, - iChannelNumber, - *ptr, - this ); - } - else - { - if ( iULFlowControlStatus != EIscFlowControlOff ) - { - error = KErrOverflow; - } - else - { - error = KErrNotReady; - } - } - break; - } - case EIscSyncDataSend: - { - if ( iIscDevice->ConnectionStatus() == EIscConnectionOk - && iULFlowControlStatus == EIscFlowControlOff ) - { - TDesC8* ptr = ( TDesC8* ) tablePtr[ KFirstParam ]; - error = iIscDevice->iIscMultiplexerInterface->DataSend( ( TUint16 )aFunction, - iChannelNumber, - *ptr, - this ); - } - else - { - if ( iULFlowControlStatus != EIscFlowControlOff ) - { - error = KErrOverflow; - } - else - { - error = KErrNotReady; - } - } - break; - } - case EIscSyncGetConnectionStatus: - { - error = iIscDevice->ConnectionStatus(); - break; - } - case EIscSyncGetFlowControlStatus: - { - error = iULFlowControlStatus; - break; - } - case EIscSyncGetChannelInfo: - { - TDes8* tempPtr = ( TDes8* ) tablePtr[1]; - error = iIscDevice->iIscMultiplexerInterface->GetChannelInfo( ( TUint16 )tablePtr[ KFirstParam ], - *tempPtr ); - break; - } - case EIscSyncGetMaximunDataSize: - { - error = iIscDevice->iIscMultiplexerInterface->MaximumDataSize( iChannelNumber ); - break; - } - case EIscSyncCustomOperation1: - case EIscSyncCustomOperation2: - case EIscSyncCustomOperation3: - case EIscSyncCustomOperation4: - case EIscSyncCustomOperation5: - { - TAny* tempPtr = ( TAny* )tablePtr[ KFirstParam ]; - error = iIscDevice->iIscMultiplexerInterface->CustomFunction( iChannelNumber, - ( TUint16 )aFunction, - tempPtr, - this ); - break; - } - case EIscSyncResetBuffers: - { - ResetBuffers(); - error = KErrNone; - break; - } - default: - { - ASSERT_RESET_ALWAYS( 0,"IscDriver",EIscUnknownCommand ); - break; - } - } - return error; - } - -// ----------------------------------------------------------------------------- -// DIscChannel::HandleCancelRequest -// Cancels active request -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -TInt DIscChannel::HandleCancelRequest( - TInt aFunction, - TAny* /*a1*/ ) - { - C_TRACE( ( _T( "DIscChannel::HandleCancelRequest(0x%x)" ), aFunction ) ); - - TUint16 operationToCancel( 0 ); - switch ( aFunction ) - { - - case EIscCancelAsyncInitialize: - { - if ( iDataTransmissionIniData ) - { - Kern::Free( iDataTransmissionBuffer ); - delete iDataTransmissionIniData; - iDataTransmissionIniData = NULL; - } - if ( iMultiplexerIniData ) - { - Kern::Free( iMultiplexerBuffer ); - delete iMultiplexerIniData; - iMultiplexerIniData = NULL; - } - - operationToCancel = EIscAsyncInitializeModemInterface; - break; - } - case EIscCancelAsyncOpen: - { - if ( KRequestPending == IsPending( EIscAsyncOpen ) ) - { - iChannelOpen = EFalse; - } - operationToCancel = EIscAsyncOpen; - break; - } - case EIscCancelAsyncSend: - { - operationToCancel = EIscAsyncSend; - // Cancel sending / empty send queues - iIscDevice->CancelSending( iChannelNumber, this ); - break; - } - case EIscCancelAsyncDataSend: - { - operationToCancel = EIscAsyncDataSend; - // Cancel sending / empty send queues - iIscDevice->CancelSending( iChannelNumber, this ); - break; - } - - case EIscCancelAsyncReceive: - { - iReceiveBufPtr = NULL; - iNeededBufLen = NULL; - operationToCancel = EIscAsyncReceive; - break; - } - - case EIscCancelAsyncDataReceive: - { - iDataReceiveBufPtr = NULL; - iNeededDataBufLen = NULL; - operationToCancel = EIscAsyncDataReceive; - break; - } - - case EIscCancelAsyncNotifyConnection: - { - iIscConnectionStatusPtr = NULL; - operationToCancel = EIscAsyncNotifyConnectionStatus; - break; - } - - case EIscCancelAsyncNotifyFlowControl: - { - iIscFlowControlStatusPtr = NULL; - operationToCancel = EIscAsyncNotifyFlowControlStatus; - break; - } - case EIscCancelAsyncCustomOperation1: - { - operationToCancel = EIscAsyncCustomOperation1; - break; - } - case EIscCancelAsyncCustomOperation2: - { - operationToCancel = EIscAsyncCustomOperation2; - break; - } - case EIscCancelAsyncCustomOperation3: - { - operationToCancel = EIscAsyncCustomOperation3; - break; - } - case EIscCancelAsyncCustomOperation4: - { - operationToCancel = EIscAsyncCustomOperation4; - break; - } - case EIscCancelAsyncCustomOperation5: - { - operationToCancel = EIscAsyncCustomOperation5; - break; - } - case EIscCancelAsyncClose: - { - TRACE_ASSERT_ALWAYS; - operationToCancel = EIscAsyncClose; - break; - } - default: - { - ASSERT_RESET_ALWAYS( 0,"IscDriver",EIscUnknownCommand ); - break; - } - } - - iIscDevice->iIscMultiplexerInterface->CancelNotify( iChannelNumber, ( TUint16 )operationToCancel, this ); - CompleteRequest( operationToCancel, KErrCancel ); - - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// DIscChannel::DoCreate -// Secondary initialization of channel -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -TInt DIscChannel::DoCreate( - TInt aUnit, - const TDesC8* anInfo, - const TVersion& /*aVer*/ ) - { - C_TRACE( ( _T( "DIscChannel::DoCreate(0x%x, 0x%x, 0x%x)" ), aUnit, anInfo, this ) ); - if ( !Kern::CurrentThreadHasCapability( ECapabilityCommDD,__PLATSEC_DIAGNOSTIC_STRING - ( "Checked by ISCDRIVER.LDD ( Inter-System Communication Driver )" ) ) ) - { - return KErrPermissionDenied; - } - TUint16 channelNumber = ( TUint16 )aUnit; - if ( anInfo ) - { - // check for channel number inside anInfo - TUint8 channel = ( TUint8 )( *anInfo )[0]; - if ( channel >= KIscMaxChannelsInLdd ) - { - channelNumber += KIscMaxChannelsInLdd; - } - C_TRACE( ( _T( "DIscChannel::DoCreate channel=0x%x" ), channelNumber ) ); - } - - if ( channelNumber != KIscControlChannel ) - { - TIscConfiguration config; - iIscDevice->iIscMultiplexerInterface->GetConfiguration( config ); - TInt i( KErrNone ); - iFrameRx = new TUint32*[config.channelRcvQueueSize]; - ASSERT_RESET_ALWAYS( iFrameRx, "IscDriver",EIscMemoryAllocationFailure ); - for ( i = KErrNone; i < config.channelRcvQueueSize; i++ ) - { - iFrameRx[i] = 0; - } - - iDataFrameRx = new TUint32*[config.channelDataRcvQueueSize]; - ASSERT_RESET_ALWAYS( iDataFrameRx, "IscDriver",EIscMemoryAllocationFailure ); - for ( i = KErrNone; i < config.channelDataRcvQueueSize; i++ ) - { - iDataFrameRx[i] = 0; - } - - // creating frame queue for incoming frames - iFrameRxQueue = new DIscQueue( iFrameRx, config.channelRcvQueueSize ); - ASSERT_RESET_ALWAYS( iFrameRxQueue, "IscDriver",EIscMemoryAllocationFailure ); - - // creating frame queue for incoming data frames - iDataFrameRxQueue = new DIscQueue( iDataFrameRx, config.channelDataRcvQueueSize ); - ASSERT_RESET_ALWAYS( iDataFrameRxQueue, "IscDriver",EIscMemoryAllocationFailure ); - - // Flowcontrol marks for data frames - iIscChannelHighWaterMark = ( TUint16 )( ( ( ( TUint16 )config.channelDataRcvQueueSize ) * KMultiplyByThree ) / KDivideByFour );// 75% = multiply with 3, divide by 4 - iIscChannelLowWaterMark = ( TUint16 )( ( ( ( TUint16 )config.channelDataRcvQueueSize ) * KMultiplyByOne ) / KDivideByFour );// 25% = multiply with 1, divide by 4 - - TRACE_ASSERT( iIscChannelHighWaterMark != 0 ); - } - -#ifndef ISC_CHANNEL_SHARING_IN_USE - // Remove checking if channel already set to enable channel sharing - //Check if channel already set - if ( IscChannelContainer::Channel( channelNumber, 0 ) ) - { - C_TRACE( ( _T( "DIscChannel::DoCreate channel 0x%x already set!!!!" ), channelNumber ) ); - return KErrAlreadyExists; - } -#endif //ISC_CHANNEL_SHARING_IN_USE - - //Add itself to channel table. - TInt error = IscChannelContainer::SetChannel( ( DIscChannel* )this, channelNumber ); - if ( KErrNone != error ) - { - return error; - } - - iChannelOpen = ETrue; - - // Store channel number. - iChannelNumber = channelNumber; - SetDfcQ( Kern::DfcQue0() ); - iMsgQ.Receive(); - - return KErrNone; - - } - - -// ----------------------------------------------------------------------------- -// DIscChannel::NotifyFlowControl -// Notify user side client that uplink flow control is on/off -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscChannel::NotifyFlowControl - ( - const TInt aFlowControlStatus - ) - { - C_TRACE( ( _T( "DIscChannel::NotifyFlowControl(0x%x) iChannelNumber 0x%x channelPtr 0x%x" ), aFlowControlStatus, iChannelNumber, this ) ); - - iULFlowControlStatus = aFlowControlStatus; - if( iIscRequests[ EIscAsyncNotifyFlowControlStatus ] - && iIscFlowControlStatusPtr ) - { - TPtr8 tempDes( reinterpret_cast( &iULFlowControlStatus ), sizeof ( TInt ), sizeof ( TInt ) ); - iLastNotifiedULFlowstatus = aFlowControlStatus; - TInt r = ThreadWrite( static_cast( iIscFlowControlStatusPtr ), &tempDes, 0 ); - TRACE_ASSERT( r == KErrNone ); - CompleteRequest( EIscAsyncNotifyFlowControlStatus, r ); - } - else - { - C_TRACE( ( _T( "DIscChannel::NotifyFlowControl No request pending!" ) ) ); - } - } - -// ----------------------------------------------------------------------------- -// DIscChannel::NotifyConnectionStatus -// Notify user side client that connection status has changed -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscChannel::NotifyConnectionStatus( - const TInt aConnectionStatus ) - { - C_TRACE( ( _T( "DIscChannel::NotifyConnectionStatus(0x%x) channelPtr 0x%x" ), aConnectionStatus, this ) ); - - if ( iIscRequests[EIscAsyncNotifyConnectionStatus] - && iIscConnectionStatusPtr ) - { - TInt temp = aConnectionStatus; - TPtr8 tempDes( ( TUint8* )&temp,sizeof ( TInt ),sizeof ( TInt ) ); - TInt r = ThreadWrite( ( TAny* )iIscConnectionStatusPtr, &tempDes, 0 ); - TRACE_ASSERT( r == KErrNone ); - - CompleteRequest( EIscAsyncNotifyConnectionStatus, r ); - } - } - -// ----------------------------------------------------------------------------- -// DIscChannel::IsPending -// Check if asynchronous request is active -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -TInt DIscChannel::IsPending( - const TUint16 aReqNumber ) - { - TInt error( KErrNone ); - if ( iIscRequests[aReqNumber] ) - { - error = KRequestPending; - } - else - { - // error is KErrNone - } - return error; - } -// ----------------------------------------------------------------------------- -// DIscChannel::CompleteRequest -// Function to complete clients pending asynchronous request -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscChannel::CompleteRequest( - TInt aOperation, - TInt aCompleteStatus ) - { - C_TRACE( ( _T( "DIscChannel::CompleteRequest(0x%x, 0x%x) iChannelNumber 0x%x channelPtr 0x%x" ), aOperation, aCompleteStatus, iChannelNumber, this ) ); - - if ( aOperation < EIscAsyncLast ) - { - - TRequestStatus* requestStatus = iIscRequests[aOperation]; - if ( requestStatus ) - { - // In case of higher priority thread, set request to NULL from the request table before actual completing - iIscRequests[aOperation] = NULL; - Kern::RequestComplete( iThread, requestStatus, aCompleteStatus ); - } - } - else - { - // Do nothing - } - - C_TRACE( ( _T( "DIscChannel::CompleteRequest - return void" ) ) ); - - } - -// ----------------------------------------------------------------------------- -// DIscChannel::InitializeComplete -// Initialization complete dfc -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscChannel::InitializeComplete( - TAny* aPtr ) - { - C_TRACE( ( _T( "DIscChannel::InitializeComplete(0x%x)" ), aPtr ) ); - - DIscChannel* ThisPtr = ( DIscChannel* )aPtr; - if ( KErrNone == ThisPtr->iDataTransmissionErrorCode ) - { - ThisPtr->DoMultiplexerInitialize(); - } - else - { - ThisPtr->CompleteRequest( EIscAsyncInitializeModemInterface, ThisPtr->iDataTransmissionErrorCode ); - } - C_TRACE( ( _T( "DIscChannel::InitializeComplete - return 0x%x" ) ) ); - - } - -// ----------------------------------------------------------------------------- -// DIscChannel::DoMultiplexerInitialize -// Completes the multiplexer initialization -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscChannel::DoMultiplexerInitialize() - { - C_TRACE( ( _T( "DIscChannel::DoMultiplexerInitialize() channelPtr 0x%x" ), this ) ); - - if ( iIscRequests[EIscAsyncInitializeModemInterface] ) - { - - iIscDevice->iIscMultiplexerInterface->InitializeMultiplexer( - EIscAsyncInitializeModemInterface, - *iMultiplexerIniData, - this ); - } - - C_TRACE( ( _T( "DIscChannel::DoMultiplexerInitialize - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// DIscChannel::StoreFrame -// Stores the incoming frame to channels receive queue -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscChannel::StoreFrame( TDesC8* aData ) - { - C_TRACE( ( _T( "DIscChannel::StoreFrame(0x%x) channelId 0x%x channelPtr 0x%x" ), aData, iChannelNumber, this ) ); - - TInt error( KErrNone ); - - TIscFrameInfo frameInfo; - iIscDevice->iIscMultiplexerInterface->GetFrameInfo( *aData, frameInfo ); - - if ( frameInfo.frameType == EIscDataFrame ) - { - C_TRACE( ( _T( "DIscChannel::StoreFrame dataFrame" ) ) ); - error = iDataFrameRxQueue->Add( ( TAny* )aData ); - if ( error == KErrNone ) - { - if ( iDataFrameRxQueue->Count() >= iIscChannelHighWaterMark - && iDLFlowControlStatus == EIscFlowControlOff ) - { - iIscDevice->DLFlowControlNotify( EIscFlowControlOn, iChannelNumber, this ); - iDLFlowControlStatus = EIscFlowControlOn; - } - else if ( iDataFrameRxQueue->Count() <= iIscChannelLowWaterMark - && iDLFlowControlStatus != EIscFlowControlOff ) - { - iIscDevice->DLFlowControlNotify( EIscFlowControlOff, iChannelNumber, this ); - iDLFlowControlStatus = EIscFlowControlOff; - } - else - { - // Do nothing - } - } - else - { - // Set overflow flag on. Complete next DataReceive with KErrOverFlow - TRACE_ASSERT_ALWAYS; - iOverFlow = ETrue; - iIscDevice->ReleaseMemoryBlock( ( TDes8* )aData ); - } - } - - else - { - C_TRACE( ( _T( "DIscChannel::StoreFrame controlFrame" ) ) ); - error = iFrameRxQueue->Add( ( TAny* )aData ); - if ( error != KErrNone ) - { - C_TRACE( ( _T( "DIscChannel::StoreFrame() CONTROL FRAME OVERFLOW channel %d" ), iChannelNumber ) ); - TRACE_ASSERT_ALWAYS; - iClientPanic = ETrue; - iIscDevice->ReleaseMemoryBlock( ( TDes8* )aData ); - } - } - - C_TRACE( ( _T( "DIscChannel::StoreFrame - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// DIscChannel::EmptyBuffers -// Goes through channel's queue and delivers possible frame( s ) to client -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscChannel::EmptyBuffers() - { - C_TRACE( ( _T( "DIscChannel::EmptyBuffers() channelId 0x%x channelPtr 0x%x" ),iChannelNumber, this ) ); - - if ( iDataFrameRxQueue->NextBufferLength() > KErrNone ) - { - TDes8* tempPtr = ( TDes8* ) iDataFrameRxQueue->GetFirst(); - TIscFrameInfo frameInfo; - TInt desMaxLen( KErrNone ); - - iIscDevice->iIscMultiplexerInterface->GetFrameInfo( *tempPtr, frameInfo ); - - // frame incoming, and datareceive request active - if ( iIscRequests[EIscAsyncDataReceive] && frameInfo.frameType == EIscDataFrame ) - { - if ( frameInfo.concatenation == EIscNoConcatenation ) - { - desMaxLen = Kern::ThreadGetDesMaxLength( iThread, iDataReceiveBufPtr ); - - C_TRACE( ( _T( "DIscChannel::EmptyBuffers() data desMaxLen %d" ),desMaxLen ) ); - - TRACE_ASSERT( desMaxLen > KErrNone ); - - // check that client's memory block is big enough - if ( desMaxLen >= frameInfo.writeLength ) - { - // create a temporary descriptor for writing since we're - // necessary not writing the whole contents of the - // source descriptor, only the part that ISC Multiplexer - // wants - TPtr8 writePtr( ( TUint8* )( tempPtr->Ptr() + frameInfo.writeStartIndex ), - frameInfo.writeLength, - frameInfo.writeLength ); - - TInt r = ThreadWrite( iDataReceiveBufPtr, &writePtr, 0 ); - - TRACE_ASSERT( r == KErrNone ); - - // remove the pointer from queue and release the memory block - // but only if the ThreadWrite was successfull - if ( r == KErrNone ) - { - iDataFrameRxQueue->DeleteFirst(); - iIscDevice->ReleaseMemoryBlock( tempPtr ); - if ( iOverFlow ) - { - iOverFlow = EFalse; - CompleteRequest( EIscAsyncDataReceive, KErrOverflow ); - } - else - { - CompleteRequest( EIscAsyncDataReceive, KErrNone ); - } - } - else - { - C_TRACE( ( _T( "DIscChannel::EmptyBuffers() data ThreadWrite %d" ), r ) ); - CompleteRequest( EIscAsyncDataReceive, r ); - } - } - // client buffer too small - else - { - TUint16 tempLen( frameInfo.writeLength ); - TPtr8 tempLenDes( ( TUint8* )&tempLen, sizeof ( TUint16 ), sizeof ( TUint16 ) ); - - TInt r = ThreadWrite( ( TAny* )iNeededDataBufLen, &tempLenDes, 0 ); - TRACE_ASSERT( r == KErrNone ); - if ( r != KErrNone ) - { - C_TRACE( ( _T( "DIscChannel::EmptyBuffers() data ThreadWrite %d" ), r ) ); - } - - CompleteRequest( EIscAsyncDataReceive, KErrNoMemory ); - } - } - else - { - HandleConcatenatedDataFrame( tempPtr, frameInfo ); - } - } - } - // no frames in data queue - else - { - C_TRACE( ( _T( "DIscChannel::EmptyBuffers() channelId 0x%x channelPtr No frames in data queue" ), iChannelNumber, this ) ); - } - - // Check if there is frame in queue - if ( iFrameRxQueue->NextBufferLength() > KErrNone ) - { - TDes8* tempPtr = ( TDes8* ) iFrameRxQueue->GetFirst(); - TIscFrameInfo frameInfo; - TInt desMaxLen( KErrNone ); - - iIscDevice->iIscMultiplexerInterface->GetFrameInfo( *tempPtr, frameInfo ); - - // frame incoming and normal receive request active - if ( iIscRequests[EIscAsyncReceive] && frameInfo.frameType == EIscNonDataFrame ) - { - if ( frameInfo.concatenation == EIscNoConcatenation ) - { - desMaxLen = Kern::ThreadGetDesMaxLength( iThread, iReceiveBufPtr ); - - C_TRACE( ( _T( "DIscChannel::EmptyBuffers() desMaxLen %d" ),desMaxLen ) ); - - TRACE_ASSERT( desMaxLen > KErrNone ); - - // check that client's memory block is big enough - if ( desMaxLen >= frameInfo.writeLength ) - { - // create a temporary descriptor for writing since we're - // necessary not writing the whole contents of the - // source descriptor, only the part that ISC Multiplexer - // wants - TPtr8 writePtr( ( TUint8* )( tempPtr->Ptr() + frameInfo.writeStartIndex ), - frameInfo.writeLength, - frameInfo.writeLength ); - - TInt r = ThreadWrite( iReceiveBufPtr, &writePtr, 0 ); - - TRACE_ASSERT( r == KErrNone ); - - // remove the pointer from queue and release the memory block - // but only if the ThreadWrite was successfull - if ( r == KErrNone ) - { - iFrameRxQueue->DeleteFirst(); - iIscDevice->ReleaseMemoryBlock( tempPtr ); - if ( iClientPanic ) - { - iClientPanic = EFalse; - CompleteRequest( EIscAsyncReceive, KErrOverflow ); - } - else - { - CompleteRequest( EIscAsyncReceive, KErrNone ); - } - } - else - { - C_TRACE( ( _T( "DIscChannel::EmptyBuffers() ThreadWrite %d" ), r ) ); - CompleteRequest( EIscAsyncReceive, r ); - } - } - // client buffer too small - else - { - TUint16 tempLen = frameInfo.writeLength; - TPtr8 tempLenDes( ( TUint8* )&tempLen, sizeof ( TUint16 ), sizeof ( TUint16 ) ); - - TInt r = ThreadWrite ( ( TAny* )iNeededBufLen, &tempLenDes, 0 ); - TRACE_ASSERT( r == KErrNone ); - if ( r != KErrNone ) - { - C_TRACE( ( _T( "DIscChannel::EmptyBuffers() ThreadWrite %d" ), r ) ); - } - - CompleteRequest( EIscAsyncReceive, KErrNoMemory ); - } - } - else - { - HandleConcatenatedFrame( tempPtr, frameInfo ); - } - } - } - // no frames in queue - else - { - C_TRACE( ( _T( "DIscChannel::EmptyBuffers() channelId 0x%x channelPtr 0x%x No frames in queue" ), iChannelNumber, this ) ); - } - - // If possible, set flow control off from data frame receiving - if ( iDataFrameRxQueue->Count() <= iIscChannelLowWaterMark - && iDLFlowControlStatus != EIscFlowControlOff ) - { - iIscDevice->DLFlowControlNotify( EIscFlowControlOff, iChannelNumber, this ); - iDLFlowControlStatus = EIscFlowControlOff; - } - - - C_TRACE( ( _T( "DIscChannel::EmptyBuffers - return void" ) ) ); - - } - -// ----------------------------------------------------------------------------- -// DIscChannel::HandleConcatenatedDataFrame -// Copies several data frames to clients buffer if needed before compliting receive request -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscChannel::HandleConcatenatedDataFrame( TDes8* aPtr, TIscFrameInfo& aInfo ) - { - C_TRACE( ( _T( "DIscChannel::HandleConcatenatedDataFrame(0x%x, 0x%x) channelPtr 0x%x" ), aPtr, &aInfo, this ) ); - TInt desMaxLen( KErrNone ); - TInt desLen( KErrNone ); - TUint16 totalLength( 0 ); - - desMaxLen = Kern::ThreadGetDesMaxLength( iThread, iDataReceiveBufPtr ); - desLen = Kern::ThreadGetDesLength( iThread, iDataReceiveBufPtr ); - - if ( aInfo.totalLength > KErrNone ) - { - totalLength = aInfo.totalLength; - } - else - { - totalLength = desMaxLen; - } - switch ( aInfo.concatenation ) - { - // first frame of a larger data chunk - case EIscConcatenationDataStart: - { - // check whether the whole data amount will fit into the user buffer - if ( desMaxLen >= ( desLen + aInfo.writeLength ) && desMaxLen >= totalLength ) - { - // create a temporary descriptor for writing since we're - // necessary not writing the whole contents of the - // source descriptor, only the part that ISC Multiplexer - // wants - TPtr8 writePtr( ( TUint8* )( aPtr->Ptr() + aInfo.writeStartIndex ), - aInfo.writeLength, - aInfo.writeLength ); - - // start writing the data at offset 0 since this is the first frame - TInt r = ThreadWrite( iDataReceiveBufPtr, &writePtr, 0 ); - - // remove the pointer from queue and release the memory block - // but only if the ThreadWrite was successfull - // we do not complete the user request until EIscConcatenationDataEnd - if ( r == KErrNone ) - { - iDataFrameRxQueue->DeleteFirst(); - iIscDevice->ReleaseMemoryBlock( aPtr ); - } - else - { - C_TRACE( ( _T( "DIscChannel::HandleConcatenatedDataFrame() ThreadWrite %d" ), r ) ); - TRACE_ASSERT_ALWAYS; - CompleteRequest( EIscAsyncDataReceive, KErrWrite ); - } - } - else // buffer too small - { - TRACE_ASSERT( totalLength >= ( desLen + aInfo.writeLength ) ); - TPtr8 tempLenDes( ( TUint8* )&totalLength, sizeof ( TUint16 ), sizeof ( TUint16 ) ); - TInt r = ThreadWrite ( ( TAny* )iNeededDataBufLen, &tempLenDes, 0 ); - TRACE_ASSERT( r == KErrNone ); - if ( r != KErrNone ) - { - C_TRACE( ( _T( "DIscChannel::HandleConcatenatedDataFrame() data start KErrNoMemory ThreadWrite %d" ), r ) ); - } - - CompleteRequest( EIscAsyncDataReceive, KErrNoMemory ); - } - break; - } - case EIscConcatenationData: - case EIscConcatenationDataEnd: - { - // check whether the next frame fits to the remaining buffer - if ( ( desMaxLen - desLen ) >= aInfo.writeLength ) - { - // create a temporary descriptor for writing since we're - // necessary not writing the whole contents of the - // source descriptor, only the part that ISC Multiplexer - // wants - TPtr8 writePtr( ( TUint8* )( aPtr->Ptr() + aInfo.writeStartIndex ), - aInfo.writeLength, - aInfo.writeLength ); - - // start writing the data at offset desLen - TInt r = ThreadWrite( iDataReceiveBufPtr, &writePtr, desLen ); - TRACE_ASSERT( r == KErrNone ); - // remove the pointer from queue and release the memory block - // but only if the ThreadWrite was successfull - if ( r == KErrNone ) - { - iDataFrameRxQueue->DeleteFirst(); - iIscDevice->ReleaseMemoryBlock( aPtr ); - } - else - { - C_TRACE( ( _T( "DIscChannel::HandleConcatenatedDataFrame() data ThreadWrite %d" ), r ) ); - } - - // complete client request if the frame was the last one - if ( aInfo.concatenation == EIscConcatenationDataEnd ) - { - if ( r == KErrNone ) - { - CompleteRequest( EIscAsyncDataReceive, KErrNone ); - } - else - { - CompleteRequest( EIscAsyncDataReceive, KErrWrite ); - } - } - } - else - { - CompleteRequest( EIscAsyncDataReceive, KErrUnderflow ); - } - break; - } - default: - { - ASSERT_RESET_ALWAYS( 0,"IscDriver",EIscNotAllowedCallToDoCancel ); - break; - } - } - } - -// ----------------------------------------------------------------------------- -// DIscChannel::HandleConcatenatedFrame -// Copies several frames to clients buffer if needed before compliting receive request -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscChannel::HandleConcatenatedFrame( TDes8* aPtr, TIscFrameInfo& aInfo ) - { - C_TRACE( ( _T( "DIscChannel::HandleConcatenatedFrame(0x%x, 0x%x) channelPtr 0x%x" ), aPtr, &aInfo, this ) ); - TInt desMaxLen( 0 ); - TInt desLen( 0 ); - TUint16 totalLength( 0 ); - - desMaxLen = Kern::ThreadGetDesMaxLength( iThread, iReceiveBufPtr ); - desLen = Kern::ThreadGetDesLength( iThread, iReceiveBufPtr ); - - if ( aInfo.totalLength > 0 ) - { - totalLength = aInfo.totalLength; - } - else - { - totalLength = desMaxLen; - } - switch ( aInfo.concatenation ) - { - // first frame of a larger data chunk - case EIscConcatenationDataStart: - { - // check whether the whole data amount will fit into the user buffer - if ( desMaxLen >= ( desLen + aInfo.writeLength ) && desMaxLen >= totalLength ) - { - // create a temporary descriptor for writing since we're - // necessary not writing the whole contents of the - // source descriptor, only the part that ISC Multiplexer - // wants - TPtr8 writePtr( ( TUint8* )( aPtr->Ptr() + aInfo.writeStartIndex ), - aInfo.writeLength, - aInfo.writeLength ); - - // start writing the data at offset 0 since this is the first frame - TInt r = ThreadWrite( iReceiveBufPtr, &writePtr, 0 ); - TRACE_ASSERT( r == KErrNone ); - - // remove the pointer from queue and release the memory block - // but only if the ThreadWrite was successfull - // we do not complete the user request until EIscConcatenationDataEnd - if ( r == KErrNone ) - { - iFrameRxQueue->DeleteFirst(); - iIscDevice->ReleaseMemoryBlock( aPtr ); - } - else - { - C_TRACE( ( _T( "DIscChannel::HandleConcatenatedFrame() ThreadWrite %d" ), r ) ); - CompleteRequest( EIscAsyncReceive, KErrWrite ); - } - } - else // buffer too small - { - TRACE_ASSERT( totalLength >= ( desLen + aInfo.writeLength ) ); - TPtr8 tempLenDes( ( TUint8* )&totalLength, sizeof ( TUint16 ), sizeof ( TUint16 ) ); - TInt r = ThreadWrite ( ( TAny* )iNeededBufLen, &tempLenDes, 0 ); - TRACE_ASSERT( r == KErrNone ); - if ( r != KErrNone ) - { - C_TRACE( ( _T( "DIscChannel::HandleConcatenatedFrame() ThreadWrite %d" ), r ) ); - } - - CompleteRequest( EIscAsyncReceive, KErrNoMemory ); - } - break; - } - case EIscConcatenationData: - case EIscConcatenationDataEnd: - { - // check whether the next frame fits to the remaining buffer - if ( ( desMaxLen - desLen ) >= aInfo.writeLength ) - { - // create a temporary descriptor for writing since we're - // necessary not writing the whole contents of the - // source descriptor, only the part that ISC Multiplexer - // wants - TPtr8 writePtr( ( TUint8* )( aPtr->Ptr() + aInfo.writeStartIndex ), - aInfo.writeLength, - aInfo.writeLength ); - - // start writing the data at offset desLen - TInt r = ThreadWrite( iReceiveBufPtr, &writePtr, desLen ); - - if ( r != KErrNone ) - { - C_TRACE( ( _T( "DIscChannel::HandleConcatenatedFrame() ThreadWrite %d" ), r ) ); - } - // remove the pointer from queue and release the memory block - // but only if the ThreadWrite was successfull - if ( r == KErrNone ) - { - iFrameRxQueue->DeleteFirst(); - iIscDevice->ReleaseMemoryBlock( aPtr ); - } - - // complete client request if the frame was the last one - if ( aInfo.concatenation == EIscConcatenationDataEnd ) - { - if ( r == KErrNone ) - { - CompleteRequest( EIscAsyncReceive, KErrNone ); - } - else - { - CompleteRequest( EIscAsyncReceive, KErrWrite ); - } - } - } - else - { - CompleteRequest( EIscAsyncDataReceive, KErrUnderflow ); - } - break; - } - default: - { - ASSERT_RESET_ALWAYS( 0,"IscDriver",EIscUnknownCommand ); - break; - } - } - - } - -// ----------------------------------------------------------------------------- -// DIscChannel::CopyFromUserBuffer -// Copy data from user-thread memory space. -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -TInt DIscChannel::CopyFromUserBuffer( - const TDesC8& aUserBuffer, - TDes8& aKernelBuffer, - const TInt aOffset ) - { - C_TRACE( ( _T( "DIscChannel::CopyFromUserBuffer(0x%x, 0x%x, 0x%x) channelPtr 0x%x" ), &aUserBuffer, &aKernelBuffer, aOffset, this ) ); - return Kern::ThreadDesRead( iThread, ( TAny* )&aUserBuffer, aKernelBuffer, aOffset, KChunkShiftBy0 ); - - } - -// ----------------------------------------------------------------------------- -// DIscChannel::ThreadWrite -// Writes data/frames to clients buffer -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -TInt DIscChannel::ThreadWrite( - TAny* dest, - const TDesC8* src, - const TInt aOffset ) - { - C_TRACE( ( _T( "DIscChannel::ThreadWrite(0x%x, 0x%x, 0x%x)" ), dest, src, aOffset ) ); - C_TRACE( ( _T( "DIscChannel::ThreadWrite writeLen 0x%x" ), src->Length() ) ); - - return Kern::ThreadDesWrite( iThread, dest, *src, aOffset, iThread ); - - } - -// ----------------------------------------------------------------------------- -// DIscChannel::ResetBuffers -// Resets buffers -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscChannel::ResetBuffers() - { - // Delete pending send frames - iIscDevice->CancelSending( iChannelNumber, this ); - - // Empty receive queue - if ( iFrameRxQueue ) - { - while ( !iFrameRxQueue->Empty() ) - { - TDes8* tempPtr = ( TDes8* ) iFrameRxQueue->GetFirst(); - iFrameRxQueue->DeleteFirst(); - iIscDevice->ReleaseMemoryBlock( tempPtr ); - } - } - - // Empty data receive queue - if ( iDataFrameRxQueue ) - { - while ( !iDataFrameRxQueue->Empty() ) - { - TDes8* tempPtr = ( TDes8* ) iDataFrameRxQueue->GetFirst(); - iDataFrameRxQueue->DeleteFirst(); - iIscDevice->ReleaseMemoryBlock( tempPtr ); - } - } - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDriver/src/IscChannelContainer.cpp --- a/systemswstubs/examplecommonisc/IscDriver/src/IscChannelContainer.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,279 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: An example implementation for ISC Driver Reference -* -*/ - - - -// INCLUDE FILES - -#include -#include -#include "IscChannel.h" -#include "IscChannelContainer.h" -#include "IscTrace.h" - -#ifdef __WINS__ -#include -#endif - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS -const TInt KChannelComplitionDfcPriority( 2 ); - -// MACROS - -// LOCAL CONSTANTS AND MACROS -DIscChannel* IscChannelContainer::iIscChannels[KIscNumberOfUnits][KIscMaxNumberOfChannelSharers]; -TDfc* IscChannelContainer::iDfc = NULL; - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -#ifdef __WINS__ -CRITICAL_SECTION g_IscCriticalSection; -#endif - -// ============================ MEMBER FUNCTIONS =============================== - - -// ----------------------------------------------------------------------------- -// IscChannelContainer::SetChannel -// Set pointer to channel -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt IscChannelContainer::SetChannel( - DIscChannel* aChannel, - const TUint16 aUnit ) - { - C_TRACE( ( _T( "IscChannelContainer::SetChannel(0x%x, 0x%x)" ), aChannel, aUnit ) ); - TInt error( KErrNoMemory ); - - //check values - if ( aUnit < KIscNumberOfUnits ) - { - for ( TInt i( 0 ); i < KIscMaxNumberOfChannelSharers; i++ ) - { - if ( !iIscChannels[aUnit][i] ) - { - iIscChannels[aUnit][i] = aChannel; - error = KErrNone; - break; - } - } - } - else - { - ASSERT_RESET_ALWAYS( 0, "IscDriver",EIscPanicSetChannel ); - } - - C_TRACE( ( _T( "IscChannelContainer::SetChannel - return 0x%x" ), error ) ); - return error; - } - -// ----------------------------------------------------------------------------- -// IscChannelContainer::Channel -// Return pointer to channel -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -DIscChannel* IscChannelContainer::Channel( - const TUint16 aChannel, - const TUint16 aChannelSharingIndex ) - { - TRACE_ASSERT( aChannel < KIscNumberOfUnits ); - TRACE_ASSERT( aChannelSharingIndex < KIscMaxNumberOfChannelSharers ); - return( iIscChannels[ aChannel ][ aChannelSharingIndex ] ); - } - -// ----------------------------------------------------------------------------- -// IscChannelContainer::RemoveChannel -// -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -TInt IscChannelContainer::RemoveChannel - ( - DIscChannel* aChannel - ) - { - - TRACE_ASSERT( aChannel ); - C_TRACE( ( _T( "IscChannelContainer::RemoveChannel(0x%x)" ), aChannel ) ); - TUint16 channelNumber = aChannel->GetChannelNumber(); - - TInt error( KErrNotFound ); - for ( TInt i( KErrNone ); ( i < KIscMaxNumberOfChannelSharers ) && ( KErrNone != error ); i++ ) - { - if ( iIscChannels[channelNumber][i] == aChannel ) - { - iIscChannels[channelNumber][i] = NULL; - error = KErrNone; - } - } - - C_TRACE( ( _T( "IscChannelContainer::RemoveChannel - return %d" ), error ) ); - return error; - - } - -// ----------------------------------------------------------------------------- -// IscChannelContainer::ChannelComplition -// Goes through channels and open ones are emptied -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void IscChannelContainer::ChannelComplition( - TAny* /*a*/ ) - { - C_TRACE( ( _T( "IscChannelContainer::ChannelComplition()" ) ) ); -#ifdef __WINS__ - EnterCriticalSection( &g_IscCriticalSection ); -#endif - - DIscChannel* channelPtr = NULL; - - for ( TUint16 channel( KIscFirstChannel ) ; channel < KIscNumberOfUnits; channel++ ) - { - for ( TUint16 i( 0 ); i < KIscMaxNumberOfChannelSharers; i++ ) - { - channelPtr = iIscChannels[channel][i]; - if ( channelPtr ) - { - channelPtr->EmptyBuffers(); - } - } - } -#ifdef __WINS__ - LeaveCriticalSection( &g_IscCriticalSection ); -#endif - - C_TRACE( ( _T( "IscChannelContainer::ChannelComplition - return 0x%x" ), KErrNone ) ); - - } - -// ----------------------------------------------------------------------------- -// IscChannelContainer::AddDfc -// Adds ChannelComplition Dfc -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void IscChannelContainer::AddDfc() - { - C_TRACE( ( _T( "IscChannelContainer::AddDfc()" ) ) ); - - if ( NKern::CurrentContext() == NKern::EInterrupt ) - { - iDfc->Add(); - } - else - { - iDfc->Enque(); - } - - } - -// ----------------------------------------------------------------------------- -// IscChannelContainer::Initialize -// Allocates Dfc function dynamically and formats data tables. -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void IscChannelContainer::Initialize() - { - C_TRACE( ( _T( "IscChannelContainer::Initialize()" ) ) ); - - if ( !iDfc ) - { - iDfc = new TDfc( IscChannelContainer::ChannelComplition, NULL, Kern::DfcQue0(), - KChannelComplitionDfcPriority ); - ASSERT_RESET_ALWAYS( iDfc, "IscDriver",EIscMemoryAllocationFailure ); - } - - for ( TUint16 channel( 0 ); channel < KIscNumberOfUnits; channel++ ) - { - for ( TUint16 i( 0 ); i < KIscMaxNumberOfChannelSharers; i++ ) - { - iIscChannels[channel][i] = NULL; - } - } - -#ifdef __WINS__ - InitializeCriticalSection( &g_IscCriticalSection ); -#endif - } - -// ----------------------------------------------------------------------------- -// IscChannelContainer::DeActivate -// Deallocates Dfc function -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void IscChannelContainer::DeActivate() - { - if ( iDfc ) - { - delete iDfc; - iDfc = NULL; - } -#ifdef __WINS__ - DeleteCriticalSection( &g_IscCriticalSection ); -#endif - - } - -// ----------------------------------------------------------------------------- -// IscChannelContainer::ValidateChannel -// -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TInt IscChannelContainer::ValidateChannel( - DIscChannel* aChannelPtr ) - { - C_TRACE( ( _T( "IscChannelContainer::ValidateChannel(0x%x)" ), aChannelPtr ) ); - TInt error( KErrNotFound ); - if( !aChannelPtr ) - { - C_TRACE( ( _T( "IscChannelContainer::ValidateChannel aChannelPtr was NULL" ) ) ); - error = KErrArgument; - } - else - { - for ( TUint16 channelNumber( 0 ); channelNumber < KIscNumberOfUnits ; channelNumber++ ) - { - for ( TInt i( KErrNone ); i < KIscMaxNumberOfChannelSharers ; i++ ) - { - if ( iIscChannels[channelNumber][i] == aChannelPtr ) - { - error = KErrNone; - break; - } - } - } - } - - C_TRACE( ( _T( "IscChannelContainer::ValidateChannel - return %d" ), error ) ); - return error; - - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDriver/src/IscDevice.cpp --- a/systemswstubs/examplecommonisc/IscDriver/src/IscDevice.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,927 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: An example implementation for ISC Driver Reference -* -*/ - - - -// INCLUDE FILES - -#include -#include -#include -#include - -#include "IscMainRcvBuffer.h" -#include "IscQueue.h" -#include "IscSendQueue.h" -#include "IscDevice.h" -#include "IscChannel.h" -#include "IscChannelContainer.h" -#include "IscTrace.h" - -#ifdef __WINS__ -#include -#endif - - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS -_LIT( KIscDriverName, "IscDriver" ); - -// MACROS - -// LOCAL CONSTANTS AND MACROS -const TInt KSendDfcPriority( 4 ); -const TInt KNotifyDfcPriority( 5 ); -const TInt KIscInterruptLevelTwo( 2 ); - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - - -DIscDataTransmissionBase* DIscDevice::iIscDataTransmissionInterface = NULL; -DIscMultiplexerBase* DIscDevice::iIscMultiplexerInterface = NULL; -DIscSendQueue* DIscDevice::iSendQueue=NULL; -DIscSendQueue* DIscDevice::iTempQueue=NULL; -DIscSendQueue* DIscDevice::iControlSendQueue=NULL; -TDfc* DIscDevice::iSendDfc = NULL; -TDfc* DIscDevice::iNotifyDfc = NULL; -TInt DIscDevice::iConnectionStatus = EIscConnectionNotOk; - -#ifdef __WINS__ -CRITICAL_SECTION g_IscDTBCriticalSection; -#endif - -// ============================ MEMBER FUNCTIONS =============================== - - -// ----------------------------------------------------------------------------- -// DIscDevice::DIscDevice -// C++ default constructor -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C DIscDevice::DIscDevice() - :DLogicalDevice(), - iSend( NULL ), - iTempSend( NULL ), - iControlSend( NULL ), - iSendFrameParameters( NULL ), - iTempFrameParameters( NULL ), - iControlFrameParameters( NULL ), - iIscMainRcvBuffer( NULL ) - { - C_TRACE( ( _T( "DIscDevice::DIscDevice()" ) ) ); - - iVersion = TVersion( KMajorVersionNumber, KMinorVersionNumber, - KBuildVersionNumber ); - iParseMask |= KDeviceAllowUnit; - iParseMask |= KDeviceAllowInfo; - -#ifdef __WINS__ - InitializeCriticalSection( &g_IscDTBCriticalSection ); -#endif - } - -// Destructor -EXPORT_C DIscDevice::~DIscDevice() - { - C_TRACE( ( _T( "DIscDevice::~DIscDevice()" ) ) ); - - IscChannelContainer::DeActivate(); - - if ( iIscMainRcvBuffer ) - { - delete iIscMainRcvBuffer; - iIscMainRcvBuffer = NULL; - } - - - iIscDataTransmissionInterface = NULL; - iIscMultiplexerInterface = NULL; - - delete iTempSend; - delete iControlSend; - delete iSendQueue; - delete iTempQueue; - delete iControlSendQueue; - delete iSendDfc; - delete iNotifyDfc; - -#ifdef __WINS__ - DeleteCriticalSection( &g_IscDTBCriticalSection ); -#endif - - } - - -// ----------------------------------------------------------------------------- -// DIscDevice::Install -// Complete the installation of driver -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -TInt DIscDevice::Install() - { - C_TRACE( ( _T( "DIscDevice::Install()" ) ) ); - - // Dfc for sending frames - iSendDfc = new TDfc( Flush, this, Kern::DfcQue0(), KSendDfcPriority ); - iNotifyDfc = new TDfc( NotifyConnection, this, Kern::DfcQue0(), KNotifyDfcPriority ); - ASSERT_RESET_ALWAYS( iSendDfc, "IscDriver",EIscMemoryAllocationFailure ); - - //Initialize IscChannelContainer - IscChannelContainer::Initialize(); - - // connect to multiplexer and data transmission driver - TInt r = InitializeLdd2LddInterface(); - if ( r != KErrNone ) - { - TRACE_ASSERT_ALWAYS; - return r; - } - - return ( SetName( &KIscDriverName ) ); - } - -// ----------------------------------------------------------------------------- -// DIscDevice::Initialize -// Complete the initialization of driver -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscDevice::Initialize() - { - C_TRACE( ( _T( "DIscDevice::Initialize()" ) ) ); - - TInt i( 0 ); - - // Get buffer configuration data from multiplexer - TIscConfiguration configData; - iIscMultiplexerInterface->GetConfiguration( configData ); - - // Create main buffer - iIscMainRcvBuffer = new DIscMainRcvBuffer( this, configData.mainRcvQueueSize ); - ASSERT_RESET_ALWAYS( iIscMainRcvBuffer, "IscDriver",EIscMemoryAllocationFailure ); - - // Do second phase installation - iIscMainRcvBuffer->DoCreate(); - - // Create queue for sending frames - iSend = new TUint32*[configData.channelSendQueueSize]; - ASSERT_RESET_ALWAYS( iSend, "IscDriver",EIscMemoryAllocationFailure ); - - iSendFrameParameters = new TIscSendFrameInfo*[configData.channelSendQueueSize]; - for ( i = 0; i < configData.channelSendQueueSize; i++ ) - { - iSendFrameParameters[i] = new TIscSendFrameInfo; - } - ASSERT_RESET_ALWAYS( iSendFrameParameters, "IscDriver",EIscMemoryAllocationFailure ); - - iSendQueue = new DIscSendQueue( iSend, iSendFrameParameters, configData.channelSendQueueSize ); - ASSERT_RESET_ALWAYS( iSendQueue, "IscDriver",EIscMemoryAllocationFailure ); - - - // create temporary queue - iTempSend = new TUint32*[configData.channelSendQueueSize]; - ASSERT_RESET_ALWAYS( iTempSend, "IscDriver",EIscMemoryAllocationFailure ); - - iTempFrameParameters = new TIscSendFrameInfo*[configData.channelSendQueueSize]; - for ( i =0; i < configData.channelSendQueueSize; i++ ) - { - iTempFrameParameters[i] = new TIscSendFrameInfo; - } - ASSERT_RESET_ALWAYS( iTempFrameParameters, "IscDriver",EIscMemoryAllocationFailure ); - - iTempQueue = new DIscSendQueue( iTempSend, iTempFrameParameters, configData.channelSendQueueSize ); - ASSERT_RESET_ALWAYS( iTempQueue, "IscDriver",EIscMemoryAllocationFailure ); - - - // Create send queue for control channel - iControlSend = new TUint32*[configData.channelSendQueueSize]; - ASSERT_RESET_ALWAYS( iControlSend, "IscDriver",EIscMemoryAllocationFailure ); - - iControlFrameParameters = new TIscSendFrameInfo*[configData.channelSendQueueSize]; - for ( i = 0; i < configData.channelSendQueueSize; i++ ) - { - iControlFrameParameters[i] = new TIscSendFrameInfo; - } - ASSERT_RESET_ALWAYS( iControlFrameParameters, "IscDriver",EIscMemoryAllocationFailure ); - - iControlSendQueue = new DIscSendQueue( iControlSend, iControlFrameParameters, configData.channelSendQueueSize ); - ASSERT_RESET_ALWAYS( iControlSendQueue, "IscDriver",EIscMemoryAllocationFailure ); - - iIscDataTransmissionInterface->AllocBuffers( configData.bufferConfig ); - - iConnectionStatus = iIscDataTransmissionInterface->ConnectionStatus(); - - iIscMultiplexerInterface->NotifyConnectionStatus( iConnectionStatus ); - C_TRACE( ( _T( "DIscDevice::Initialize - return void" ) ) ); - } -// ----------------------------------------------------------------------------- -// DIscDevice::GetCaps -// -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void DIscDevice::GetCaps( - TDes8& /*aDes*/ ) const - { - // GetCaps implemented to keep compiler happy - } - -// ----------------------------------------------------------------------------- -// DEcsDevice::Create -// From DLogicalDevice -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -TInt DIscDevice::Create( - DLogicalChannelBase*& aChannel ) - { - aChannel=new DIscChannel( this ); - return aChannel?KErrNone:KErrNoMemory; - } - -// ----------------------------------------------------------------------------- -// DIscDevice::Receive -// Frames coming from Domestic OS -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void DIscDevice::Receive( - TDesC8* aData ) const - { - DIscMainRcvBuffer::MsgReceive( aData ); - } - - -// ----------------------------------------------------------------------------- -// DIscDevice::ReserveMemoryBlock -// Get message block from buffers allocated in IscDataTransmissionBase.dll -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void DIscDevice::ReserveMemoryBlock( TDes8*& aPtr, TUint16 aSize ) - { - iIscDataTransmissionInterface->ReserveMemoryBlock( aPtr, aSize ); - } - -// ----------------------------------------------------------------------------- -// DIscDevice::ReleaseMemoryBlock -// Release memory block allocated with ReserveMemoryBlock -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void DIscDevice::ReleaseMemoryBlock( - TDes8* aPtr ) - { - C_TRACE( ( _T( "DIscDevice::ReleaseMemoryBlock(0x%x)" ), aPtr ) ); - - if ( iIscDataTransmissionInterface ) - { - iIscDataTransmissionInterface->ReleaseMemoryBlock( aPtr ); - } - } - -// ----------------------------------------------------------------------------- -// DIscDevice::NotifyConnectionStatus -// Connection status change function -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void DIscDevice::NotifyConnectionStatus( const TInt aStatus ) - { - C_TRACE( ( _T( "DIscDevice::NotifyConnectionStatus(0x%x)" ), aStatus ) ); - if ( iConnectionStatus != aStatus ) - { - iConnectionStatus = aStatus; - if ( NKern::CurrentContext() == NKern::EInterrupt ) - { - iNotifyDfc->Add(); - } - else - { - iNotifyDfc->Enque(); - } - } - - C_TRACE( ( _T( "DIscDevice::NotifyConnectionStatus() return" ) ) ); - } - -// ----------------------------------------------------------------------------- -// DIscDevice::NotifyConnection -// Connection status change DFC function. -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscDevice::NotifyConnection( TAny* ) - { - C_TRACE( ( _T( "DIscDevice::NotifyConnection(0x%x)" ), iConnectionStatus ) ); - - iIscMultiplexerInterface->NotifyConnectionStatus( iConnectionStatus ); - DIscChannel* tempPtr = NULL; - for ( TUint16 i = KIscFirstChannel; i < KIscNumberOfUnits; i++ ) - { - for ( TUint16 ii( 0 ); ii < KIscMaxNumberOfChannelSharers; ii++ ) - { - tempPtr = IscChannelContainer::Channel( i, ii ); - if ( tempPtr ) - { - tempPtr->NotifyConnectionStatus( iConnectionStatus ); - tempPtr = NULL; - } - } - } - C_TRACE( ( _T( "DIscDevice::NotifyConnection() return" ) ) ); - - } - -// ----------------------------------------------------------------------------- -// DIscDevice::ULFlowControl -// Function to notify client about uplink flow control status -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void DIscDevice::ULFlowControl( - const TInt aULFlowStatus, - const TUint16 aChannelId, - const TAny* aChannelPtr ) - { - C_TRACE( ( _T( "DIscDevice::ULFlowControl(0x%x, 0x%x, 0x%x)" ), aULFlowStatus, aChannelId, aChannelPtr ) ); - - DIscChannel* tempPtr = NULL; - TBool channelFound(EFalse); - - if ( !aChannelPtr ) - { - // All channels. - for ( TUint16 i(0); i < KIscMaxNumberOfChannelSharers; i++ ) - { - tempPtr = IscChannelContainer::Channel( aChannelId, i ); - if ( tempPtr ) - { - tempPtr->NotifyFlowControl( aULFlowStatus ); - tempPtr = NULL; - channelFound = ETrue; - } - else - { - //Do nothing - } - } - } - else - { - // Single channel. - for ( TUint16 i(0); i < KIscMaxNumberOfChannelSharers; i++ ) - { - tempPtr = IscChannelContainer::Channel( aChannelId, i ); - if ( tempPtr == ( DIscChannel* )aChannelPtr ) - { - tempPtr->NotifyFlowControl( aULFlowStatus ); - tempPtr = NULL; - channelFound = ETrue; - break; - } - else - { - //Do nothing - } - } - } - - if ( channelFound == EFalse ) - TRACE_ASSERT_ALWAYS; - - } - -// ----------------------------------------------------------------------------- -// DIscDevice::IsPending -// Function to check if asycnhronous request is active -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt DIscDevice::IsPending( - const TUint16 aReqNumber, - const TAny* aChannelPtr ) - { - C_TRACE( ( _T( "DIscDevice::IsPending(0x%x, 0x%x)" ), aReqNumber, aChannelPtr ) ); - - DIscChannel* tempPtr = ( DIscChannel* )aChannelPtr; - TInt error = IscChannelContainer::ValidateChannel( tempPtr ); - if( error == KErrNone ) - { - error = tempPtr->IsPending( aReqNumber ); - } - C_TRACE( ( _T( "DIscDevice::IsPending - return %d" ), error ) ); - return error; - - } - -// ----------------------------------------------------------------------------- -// DIscDevice::DLFlowControl -// Notify multiplexer about down link flow control -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscDevice::DLFlowControlNotify( - const TInt aDLFlowStatus, - const TUint16 aChannel, - const TAny* aChannelPtr ) - { - C_TRACE( ( _T( "DIscDevice::DLFlowControlNotify(0x%x, 0x%x)" ), aDLFlowStatus, aChannel ) ); - if ( aChannel >= KIscFirstChannel - && aChannel < KIscNumberOfUnits ) - { - if ( aDLFlowStatus == EIscFlowControlOn ) - { - iIscMultiplexerInterface->DLFlowControl( EIscFlowControlOn, aChannel, aChannelPtr ); - } - else - { - iIscMultiplexerInterface->DLFlowControl( EIscFlowControlOff, aChannel, aChannelPtr ); - } - } - else - { - - if ( aChannel == 0x00 ) - { - // control channel, no flow control used - } - else - { - // should never came here - TRACE_ASSERT_ALWAYS; - } - } - } - -// ----------------------------------------------------------------------------- -// DIscDevice::InitializeLdd2LddInterface -// Function to connect to DataTransmission and Multiplexer ldds -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -TInt DIscDevice::InitializeLdd2LddInterface() - { - C_TRACE( ( _T( "DIscDevice::InitializeLdd2LddInterface()" ) ) ); - - // Find pointer to second level LDD. - DObjectCon* lDevices = Kern::Containers()[ ELogicalDevice ]; - TKName driverName; - ASSERT_RESET_ALWAYS( lDevices, "IscDriver", EIscLogicalDevicesNotFound ); - - TInt err( KErrNone ); - //TInt driverHandle( KErrNone ); // API change in SOS9.2 WK08 - TFindHandle driverHandle; - // Find pointer to ISC Multiplexer. - err = lDevices->FindByName( driverHandle, KIscMultiplexerName, driverName ); - if( KErrNone != err ) - { - C_TRACE( ( _T( "DIscDevice::InitializeLdd2LddInterface() ISC Multiplexer Not Found!" ) ) ); - ASSERT_RESET_ALWAYS( 0, "IscDriver" ,EIscMultiplexerNotFound ); - } - - iIscMultiplexerInterface = static_cast( lDevices->At( driverHandle ) ); - ASSERT_RESET_ALWAYS( iIscMultiplexerInterface, "IscDriver", EIscMultiplexerNotFound ); - - //TInt secondDriverHandle( KErrNone ); // API change in SOS9.2 WK08 - TFindHandle secondDriverHandle; - // Find pointer to Data Transmission Plugin. - err = lDevices->FindByName( secondDriverHandle, KIscDataTransmissionDriverName, driverName ); - if( KErrNone != err ) - { - C_TRACE( ( _T( "DIscDevice::InitializeLdd2LddInterface() Data Transmission Plug-In Not Found!" ) ) ); - ASSERT_RESET_ALWAYS( 0, "IscDriver", EIscDataTransmissionDriverNotFound ); - } - - iIscDataTransmissionInterface = static_cast( lDevices->At( secondDriverHandle ) ); - ASSERT_RESET_ALWAYS( iIscDataTransmissionInterface, "IscDriver", EIscDataTransmissionDriverNotFound ); - - iIscDataTransmissionInterface->Connect( this ); - iIscMultiplexerInterface->Connect( this ); - - C_TRACE( ( _T( "DIscDevice::InitializeLdd2LddInterface - return 0x%x" ), err ) ); - return err; - - } - -// ----------------------------------------------------------------------------- -// DIscDevice::QueueFrame -// Queue frames that will be sent to Domestic OS -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt DIscDevice::QueueFrame( - const TUint16 aChannelId, - const TDesC8* aFrame, - const TAny* aChannelPtr, - TAny* aFrameInfo ) - { - C_TRACE( ( _T( "DIscDevice::QueueFrame(0x%x, 0x%x, 0x%x, 0x%x)" ), aChannelId, aFrame, aChannelPtr, aFrameInfo ) ); - - TInt error = KErrNone; - - // control channel frame ( highest priority ) - if ( aChannelId == KIscControlChannel ) - { - C_TRACE( ( _T( "DIscDevice::QueueFrame control frame queue" ) ) ); - //add to control frame queue - error = iControlSendQueue->Add( ( TDes8* )aFrame, aChannelId, ( DIscChannel* )aChannelPtr, aFrameInfo ); - } - else - { - C_TRACE( ( _T( "DIscDevice::QueueFrame send queue" ) ) ); - // add to send queue - error = iSendQueue->Add( ( TDes8* )aFrame, aChannelId, ( DIscChannel* )aChannelPtr, aFrameInfo ); - } - - C_TRACE( ( _T( "DIscDevice::QueueFrame - return 0x%x" ), error ) ); - return error; - } - - -// ----------------------------------------------------------------------------- -// DIscDevice::CancelSending -// Cancels sending of frames to Domestic OS -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt DIscDevice::CancelSending( const TUint16 aChannelId, const TAny* aChannelPtr ) - { - C_TRACE( ( _T( "DIscDevice::CancelSending - Caller is channel: %d (0x%x)" ), aChannelId, aChannelPtr ) ); - - TInt error( KErrNotFound ); - TInt irqLevel( 0 ); - - TInt counterA( 0 ); - TInt counterB( 0 ); - - TIscSendFrameInfo* temp = NULL; - TDes8* frame = NULL; - - irqLevel = DisableIrqs(); - - if ( KIscControlChannel == aChannelId ) - { - // empty control send queue - while ( !iControlSendQueue->Empty() ) - { - temp = iControlSendQueue->GetFirstFrameInfo(); - frame = ( TDes8* )iControlSendQueue->RemoveFirst(); - if ( temp && frame ) - { - if ( temp->iChannelId == aChannelId && - temp->iChannelPtr == ( DIscChannel* )aChannelPtr ) - { - // sender found, no need to store the frame - counterB++; - } - else - { - iTempQueue->Add( frame, temp->iChannelId, temp->iChannelPtr, temp->iFrameInfo ); - } - } - else - { - // should never came here - TRACE_ASSERT_ALWAYS; - } - counterA++; - temp = NULL; - frame = NULL; - } - - while ( !iTempQueue->Empty() ) - { - temp = iTempQueue->GetFirstFrameInfo(); - frame = ( TDes8* )iTempQueue->RemoveFirst(); - if ( temp && frame ) - { - iControlSendQueue->Add( frame, temp->iChannelId, temp->iChannelPtr, temp->iFrameInfo ); - } - else - { - // should never came here - TRACE_ASSERT_ALWAYS; - } - temp = NULL; - frame = NULL; - } - } - else - { - // empty normal send queue - while ( !iSendQueue->Empty() ) - { - temp = iSendQueue->GetFirstFrameInfo(); - frame = ( TDes8* )iSendQueue->RemoveFirst(); - if ( temp && frame ) - { - if ( temp->iChannelId == aChannelId && - temp->iChannelPtr == ( DIscChannel* )aChannelPtr ) - { - // sender found, no need to store frame - counterB++; - } - else - { - iTempQueue->Add( frame, temp->iChannelId, temp->iChannelPtr, temp->iFrameInfo ); - } - } - else - { - // should never came here - TRACE_ASSERT_ALWAYS; - } - counterA++; - temp = NULL; - frame = NULL; - } - - while ( !iTempQueue->Empty() ) - { - temp = iTempQueue->GetFirstFrameInfo(); - frame = ( TDes8* )iTempQueue->RemoveFirst(); - if ( temp && frame ) - { - iSendQueue->Add( frame, temp->iChannelId, temp->iChannelPtr, temp->iFrameInfo ); - } - else - { - // should never came here - TRACE_ASSERT_ALWAYS; - } - - temp = NULL; - frame = NULL; - } - } - - RestoreIrqs( irqLevel ); - - C_TRACE( ( _T( "DIscDevice::CancelSending() - Frames in queue: Before: %d, After: %d" ), counterA, ( counterA-counterB ) ) ); - C_TRACE( ( _T( "DIscDevice::CancelSending() - So channel 0x%x 0x%x had %d pending messages!" ), aChannelId, aChannelPtr, counterB ) ); - - // if there weren't any frames that were cancelled return KErrNotFound, otherwise return KErrNone - if ( counterB > 0 ) - { - error = KErrNone; - } - - return error; - - } - -// ----------------------------------------------------------------------------- -// DIscDevice::FlushQueues -// Adds Dfc to empty queues -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void DIscDevice::FlushQueues() - { - C_TRACE( ( _T( "DIscDevice::FlushQueues()" ) ) ); - - if ( NKern::CurrentContext() == NKern::EInterrupt ) - { - iSendDfc->Add(); - } - else - { - iSendDfc->Enque(); - } - - } - -// ----------------------------------------------------------------------------- -// DIscDevice::CompleteRequest -// Function to complete user side asynchronous request -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -// This method has been modified to allow channel sharing between application. -// The completion routine uses directly a pointer on a DLogicalChannel instead of a channel index -// -EXPORT_C void DIscDevice::CompleteRequest( - TUint16 aOperation, - TInt aCompleteStatus, - const TAny* aChannelPtr ) - { - C_TRACE( ( _T( "DIscDevice::CompleteRequest(0x%x, 0x%x, 0x%x)" ), aOperation, aCompleteStatus, aChannelPtr ) ); - - DIscChannel* tempPtr = ( DIscChannel* )aChannelPtr; - TInt error = IscChannelContainer::ValidateChannel( tempPtr ); - if( error == KErrNone ) - { - tempPtr->CompleteRequest( aOperation, aCompleteStatus ); - } - - C_TRACE( ( _T( "DIscDevice::CompleteRequest - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// DIscDevice::CopyFromUserBuffer -// -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt DIscDevice::CopyFromUserBuffer( - const TDesC8& aUserBuffer, - TDes8& aKernelBuffer, - const TAny* aChannelPtr, - const TInt aOffset ) - { - C_TRACE( ( _T( "DIscDevice::CopyFromUserBuffer(0x%x, 0x%x, 0x%x, 0x%x)" ), &aUserBuffer, &aKernelBuffer, aChannelPtr, aOffset ) ); - - // Check if channel pointer is valid. - DIscChannel* tempPtr = ( DIscChannel* )aChannelPtr; - TInt error = IscChannelContainer::ValidateChannel( tempPtr ); - if( error == KErrNone ) - { - error = tempPtr->CopyFromUserBuffer( aUserBuffer, aKernelBuffer, aOffset ); - } - C_TRACE( ( _T( "DIscDevice::CopyFromUserBuffer - return %d" ), error ) ); - return error; - - } - -// ----------------------------------------------------------------------------- -// DIscDevice::CopyToUserBuffer -// -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt DIscDevice::CopyToUserBuffer( - TAny* aUserBuffer, - const TDesC8& aKernelBuffer, - const TAny* aChannelPtr, - const TInt aOffset ) - { - C_TRACE( ( _T( "DIscDevice::CopyToUserBuffer(0x%x, 0x%x, 0x%x)" ), aUserBuffer, &aKernelBuffer, aChannelPtr ) ); - - DIscChannel* tempPtr = ( DIscChannel* )aChannelPtr; - TInt error = IscChannelContainer::ValidateChannel( tempPtr ); - if( KErrNone == error ) - { - error = tempPtr->ThreadWrite( aUserBuffer, &aKernelBuffer, aOffset ); - } - C_TRACE( ( _T( "DIscDevice::CopyToUserBuffer - return %d" ), error ) ); - return error; - - } - -// ----------------------------------------------------------------------------- -// DIscMultiplexerBase::GetThreadPtr -// Returns user side thread. Ownership is not given. -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C DThread* DIscDevice::GetThreadPtr( const TAny* aChannelPtr ) - { - C_TRACE( ( _T( "DIscMultiplexerBase::GetThreadPtr(0x%x)" ), aChannelPtr ) ); - DIscChannel* tempPtr = ( DIscChannel* )aChannelPtr; - TInt error = IscChannelContainer::ValidateChannel( tempPtr ); - DThread* tmp = NULL; - if( KErrNone == error ) - { - tmp = tempPtr->GetDThread(); - } - else - { - C_TRACE( ( _T( "DIscMultiplexerBase::GetThreadPtr failed return NULL" ) ) ); - } - C_TRACE( ( _T( "DIscMultiplexerBase::GetThreadPtr return 0x%x" ), tmp ) ); - return tmp; - - } - -// ----------------------------------------------------------------------------- -// DIscDevice::Flush -// Dfc to empty control channel and other send queues -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscDevice::Flush( TAny* aPtr ) - { - C_TRACE( ( _T( "DIscDevice::Flush(0x%x)" ), aPtr ) ); - DIscDevice* device = ( DIscDevice* )aPtr; - - TDes8* frame = NULL; - TIscSendFrameInfo* temp = NULL; - - TInt irqLevel(0); - - // If transmission is asynchronous and there can't be - // several requests at the same time - if ( !iIscDataTransmissionInterface->IsWritePending() ) - { - irqLevel = DisableIrqs(); - if ( !iControlSendQueue->Empty() ) - { - temp = iControlSendQueue->GetFirstFrameInfo(); - frame = ( TDes8* )iControlSendQueue->RemoveFirst(); - } - else - { - temp = iSendQueue->GetFirstFrameInfo(); - frame = ( TDes8* )iSendQueue->RemoveFirst(); - } - RestoreIrqs( irqLevel ); - C_TRACE( ( _T( "DIscDevice::Flush after RESTOREIRQS" ) ) ); - if ( frame ) - iIscDataTransmissionInterface->SendFrame( *frame, device->iSendDfc, temp->iFrameInfo ); - } - C_TRACE( ( _T( "DIscDevice::Flush - return 0x0" ) ) ); - - } - - -// ----------------------------------------------------------------------------- -// DIscDevice::ConnectionStatus -// Function to tell current status of connection to Domestic OS -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -TInt DIscDevice::ConnectionStatus() - { - return iConnectionStatus; - } - -// ----------------------------------------------------------------------------- -// DIscDevice::DisableIrqs -// Function to disable interrupts -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -TInt DIscDevice::DisableIrqs() - { -#ifndef __WINS__ - return NKern::DisableInterrupts( KIscInterruptLevelTwo ); -#else //__WINS__ - EnterCriticalSection( &g_IscDTBCriticalSection ); - return KErrNone; -#endif//__WINS__ - } - -// ----------------------------------------------------------------------------- -// DIscDevice::RestoreIrqs -// Function to restore interrupts -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -#ifndef __WINS__ -void DIscDevice::RestoreIrqs( - TInt aLevel ) - { - NKern::RestoreInterrupts( aLevel ); - -#else //__WINS__ -void DIscDevice::RestoreIrqs( - TInt ) - { - LeaveCriticalSection( &g_IscDTBCriticalSection ); -#endif//__WINS__ - } - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// ----------------------------------------------------------------------------- -// E32Dll -// Epoc Kernel Architecture 2 style entry point -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -DECLARE_STANDARD_LDD() - { - DLogicalDevice* device = new DIscDevice; - if ( !device ) - { - ASSERT_RESET_ALWAYS( 0,"IscDriver",EIscPanicCreateLogicalDevice ); - } - return device; - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDriver/src/IscDriverExtensionDevice.cpp --- a/systemswstubs/examplecommonisc/IscDriver/src/IscDriverExtensionDevice.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,129 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Reference implementation for ISC Driver extension -* -*/ - - - -// INCLUDE FILES - -#include "IscDriverExtensionDevice.h" -#include "IscChannel.h" -#include "IscTrace.h" -#include "kern_priv.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS -_LIT( KIscDriverExtensionName,"IscDriverExtension" ); -_LIT( KIscDriverName,"IscDriver" ); - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - - -// ============================ MEMBER FUNCTIONS =============================== - - -// ----------------------------------------------------------------------------- -// DIscDriverExtensionDevice::DIscDriverExtensionDevice -// C++ default constructor -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -DIscDriverExtensionDevice::DIscDriverExtensionDevice() - : iIscDriverDevice( NULL ) - { - C_TRACE( ( _T( "DIscDriverExtensionDevice::DIscDriverExtensionDevice()" ) ) ); - iParseMask |= KDeviceAllowUnit; - iParseMask |= KDeviceAllowInfo; - } - -// Destructor -DIscDriverExtensionDevice::~DIscDriverExtensionDevice() - { - - } - - -// ----------------------------------------------------------------------------- -// DIscDriverExtensionDevice::Install -// Complete the installation of driver -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -TInt DIscDriverExtensionDevice::Install() - { - C_TRACE( ( _T( "DIscDriverExtensionDevice::Install()" ) ) ); - - // Find pointer to ISC Driver. - TInt err( KErrNone ); - DObjectCon* lDevices = Kern::Containers()[ELogicalDevice]; - TKName driverName; - - ASSERT_RESET_ALWAYS( lDevices, "IscDriverExtension", EIscLogicalDevicesNotFound ); - - //TInt driverHandle( KErrNone ); // API change in SOS9.2 WK08 - TFindHandle driverHandle; - err = lDevices->FindByName( driverHandle, KIscDriverName, driverName ); - if( KErrNone != err ) - { - C_TRACE( ( _T( "DIscDriverExtensionDevice::Install() Pointer to IscDriver not found!" ) ) ); - ASSERT_RESET_ALWAYS( 0, "IscDriverExtension", EIscDriverNotFound ); - } - iIscDriverDevice = static_cast( lDevices->At( driverHandle ) ); - ASSERT_RESET_ALWAYS( iIscDriverDevice, "IscDriverExtension", EIscDriverNotFound ) - return ( SetName( &KIscDriverExtensionName ) ); - - } - -// ----------------------------------------------------------------------------- -// DIscDevice::Create -// Create a logical channel -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -TInt DIscDriverExtensionDevice::Create( - DLogicalChannelBase*& aChannel ) - { - aChannel=new DIscChannel( iIscDriverDevice ); - return aChannel?KErrNone:KErrNoMemory; - } - -// ========================== OTHER EXPORTED FUNCTIONS ========================= -// ----------------------------------------------------------------------------- -// E32Dll -// Epoc Kernel Architecture 2 style entry point -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -DECLARE_STANDARD_LDD() - { - DLogicalDevice* device = new DIscDriverExtensionDevice; - ASSERT_RESET_ALWAYS( device,"IscDriverExtension",EIscPanicCreateLogicalDevice ); - return device; - - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDriver/src/IscMainRcvBuffer.cpp --- a/systemswstubs/examplecommonisc/IscDriver/src/IscMainRcvBuffer.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,230 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: An example implementation for ISC Driver Reference -* -*/ - - - -// INCLUDE FILES -#include -#include -#include "IscMainRcvBuffer.h" -#include "IscQueue.h" -#include "IscDevice.h" -#include "IscChannel.h" -#include "IscChannelContainer.h" -#include "IscTrace.h" - - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS -DIscMainRcvBuffer* DIscMainRcvBuffer::iThisPointer = NULL; -const TInt KBufferCleanUpDfcPriority( 4 ); - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// DIscMainRcvBuffer::DIscMainRcvBuffer -// C++ default constructor -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -DIscMainRcvBuffer::DIscMainRcvBuffer( DIscDevice *aDevice, TUint16 aIscMainRcvBufferQueueSize ) - :iDevice ( aDevice ), - iDfc( NULL ), - iMainRcvBufferQueue( NULL ) - { - iIscMainRcvBufferQueueSize = aIscMainRcvBufferQueueSize; - iMainRcvBuffer = new TUint32*[iIscMainRcvBufferQueueSize]; - ASSERT_RESET_ALWAYS( iMainRcvBuffer, "IscDriver",EIscMemoryAllocationFailure ); - - for ( TInt i = 0; i < iIscMainRcvBufferQueueSize; i++ ) - { - iMainRcvBuffer[i] = NULL; - } - } - - -// ----------------------------------------------------------------------------- -// DIscMainRcvBuffer::DoCreate -// Second-phase constructor to complete construction. -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscMainRcvBuffer::DoCreate() - { - if ( iThisPointer ) //Only one instance of this class is allowed - { - ASSERT_RESET_ALWAYS( 0,"IscDriver",EIscMainRcvBufferInitialize ); - } - - iDfc = new TDfc( BufferCleanUp, this, Kern::DfcQue0(), KBufferCleanUpDfcPriority ); - ASSERT_RESET_ALWAYS( iDfc, "IscDriver",EIscMemoryAllocationFailure ); - - iMainRcvBufferQueue = new DIscQueue( iMainRcvBuffer, iIscMainRcvBufferQueueSize ); - ASSERT_RESET_ALWAYS( iMainRcvBufferQueue, "IscDriver",EIscMemoryAllocationFailure ); - - //Store pointer of this instance that can be used from static functions - iThisPointer = this; - } - -//Destructor -DIscMainRcvBuffer::~DIscMainRcvBuffer() - { - delete iDfc; - delete iMainRcvBufferQueue; - iDfc = NULL; - iMainRcvBufferQueue = NULL; - iThisPointer = NULL; - iDevice = NULL; - } - -// ----------------------------------------------------------------------------- -// DIscMainRcvBuffer::MsgReceive -// Function that should be called to store incoming frame -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscMainRcvBuffer::MsgReceive( TDesC8* aData ) - { - E_TRACE( ( _T( "IMRB:MR(0x%x)" ), aData ) ); - //Check that instance of this class is created - if ( !iThisPointer ) - { - // MainRcvBuffer not initialized -> panic - ASSERT_RESET_ALWAYS( 0,"IscDriver",EIscMainRcvBufferInitialize ); - } - - TInt r = iThisPointer->iMainRcvBufferQueue->Add( aData ); - ASSERT_RESET_ALWAYS( r == KErrNone, "IscDriver",EIscMainRcvBufferOverflow ); - iThisPointer->AddDfc(); - } - -// ----------------------------------------------------------------------------- -// DIscMainRcvBuffer::AddDfc -// Function for adding Dfc -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscMainRcvBuffer::AddDfc() - { -#ifndef __WINS__ - if ( NKern::CurrentContext() == NKern::EInterrupt ) - { - iDfc->Add(); - } - else - { - iDfc->Enque(); - } -#else - // Have to do DoEnque since Enque() & Add() cannot be called from pure - // win32 thread context. And this call might come directly in win32 thread - // since the implementation of ISC Data Transmission API can do virtually - // anything in WINS - iDfc->DoEnque(); -#endif - } - -// ----------------------------------------------------------------------------- -// DIscMainRcvBuffer::BufferCleanUp -// Function to empty messages in main buffer -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -void DIscMainRcvBuffer::BufferCleanUp( TAny* aPtr ) - { - C_TRACE( ( _T( "DIscMainRcvBuffer::BufferCleanUp(0x%x)" ), aPtr ) ); - - DIscMainRcvBuffer* Buffer = ( DIscMainRcvBuffer* )aPtr; - - - TUint16 rcvChannelId( KIscFrameReceiverNotFound ); - TAny* channelPtr = NULL; - DIscChannel* tempPtr = NULL; - TBool channelFound( EFalse ); - - TDesC8* ptr = NULL; - ptr = ( TDesC8* )Buffer->iMainRcvBufferQueue->RemoveFirst(); - - while ( ptr ) - { - Buffer->iDevice->iIscMultiplexerInterface->GetRcvChannelId( *ptr, rcvChannelId, channelPtr ); - - C_TRACE( ( _T( "DIscMainRcvBuffer::BufferCleanUp channelId (0x%x) channelPtr (0x%x)" ), rcvChannelId, channelPtr ) ); - if ( rcvChannelId >= KIscFirstChannel && rcvChannelId < KIscNumberOfUnits && channelPtr ) - { - channelFound = EFalse; - for ( TUint16 i( 0 ); ( i < KIscMaxNumberOfChannelSharers ) && ( !channelFound ); i++ ) - { - tempPtr = IscChannelContainer::Channel( rcvChannelId, i ); - if ( tempPtr == channelPtr ) - { - // correct channel found - ( ( DIscChannel* )channelPtr )->StoreFrame( ptr ); - channelFound = ETrue; - } - tempPtr = NULL; - } - if ( !channelFound ) - { - TRACE_ASSERT_ALWAYS; - // correct channel was not found -> release frame - Buffer->iDevice->ReleaseMemoryBlock( ( TDes8* ) ptr ); - } - } - else if ( rcvChannelId == KIscFrameReceiverNotFound ) - { - C_TRACE( ( _T( "DIscMainRcvBuffer::BufferCleanUp Frame Receiver not found!" ) ) ); - Buffer->iDevice->ReleaseMemoryBlock( ( TDes8* ) ptr ); - } - // Frame going to control channel - else if ( rcvChannelId == 0x00 ) - { - Buffer->iDevice->iIscMultiplexerInterface->HandleControlFrame( *ptr ); - } - else - { - TRACE_ASSERT_ALWAYS; - Buffer->iDevice->ReleaseMemoryBlock( ( TDes8* ) ptr ); - } - - // get the next frame from the queue - ptr = ( TDes8* )Buffer->iMainRcvBufferQueue->RemoveFirst(); - } - - IscChannelContainer::ChannelComplition( NULL ); - - C_TRACE( ( _T( "DIscMainRcvBuffer::BufferCleanUp - return 0x%x" ) ) ); - - } - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDriver/src/IscQueue.cpp --- a/systemswstubs/examplecommonisc/IscDriver/src/IscQueue.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,295 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: An example implementation for ISC Driver Reference -* -*/ - - - -// INCLUDE FILES - -#include -#ifdef __WINS__ -#include -#endif - -#include -#include "IscQueue.h" -#include "IscTrace.h" - - -// EXTERNAL DATA STRUCTURES -#ifdef __WINS__ -extern CRITICAL_SECTION g_IscCriticalSection; -#endif - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS -const TInt KIscInterruptLevelTwo( 2 ); - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// DIscQueue::DIscQueue -// C++ default constructor -// ----------------------------------------------------------------------------- -// -DIscQueue::DIscQueue() - :iHead( 0 ),iTail( 0 ),iCount( 0 ),iSize( 0 ),iQueue( NULL ) - { - } - -// ----------------------------------------------------------------------------- -// DIscQueue::DIscQueue -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -EXPORT_C DIscQueue::DIscQueue( TUint32** aQueue, TUint16 Size ) - :iHead( 0 ),iTail( 0 ),iCount( 0 ),iSize( Size ),iQueue( aQueue ) - { - E_TRACE( ( _T( "IQ:IQ %d 0x%x" ), iSize, iQueue ) ); - } - -// Destructor -EXPORT_C DIscQueue::~DIscQueue() - { - iHead = 0; - iTail = 0; - iCount = 0; - iQueue = NULL; - iSize = 0; - } - - -// ----------------------------------------------------------------------------- -// DIscQueue::Add -// Function to add element to queue -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt DIscQueue::Add( TAny* anEntry ) - { - E_TRACE( ( _T( "IQ:A %d 0x%x" ), iCount, iQueue ) ); - - TInt irqLevel = DisableIrqs(); - - if ( iCount == iSize || iSize == 0 ) - { - RestoreIrqs( irqLevel ); - return KErrNoMemory;//EFalse; - } - - /* place the buffer into the queue */ - iQueue[ iTail ] = ( TUint32* )( anEntry ); - - if ( iSize > 0 ) - { - /* adjust tail pointer */ - iTail = ++iTail % iSize; - - /* remember the amount of the requests in the queue */ - iCount++; - } - else - { - ASSERT_RESET_ALWAYS( 0, "IscDriver", EIscBufferAllocationFailure ) - } - - RestoreIrqs( irqLevel ); - - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// DIscQueue::Remove -// Removes first element from the queue -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TAny* DIscQueue::RemoveFirst() - { - E_TRACE( ( _T( "IQ:R %d %d" ), iCount, iSize ) ); - - TAny* result = NULL; - TInt irqLevel = DisableIrqs(); - - if ( iCount == 0 || iSize == 0 ) - { - RestoreIrqs( irqLevel ); - return NULL; - } - // Get an element from the queue. - result = ( TAny* )iQueue[ iHead ]; - - iQueue[ iHead ] = NULL; - - // Adjust the head of the queue. - iHead = ++iHead % iSize; - // Decrease counter. - iCount--; - - RestoreIrqs( irqLevel ); - - return result; - - } - -// ----------------------------------------------------------------------------- -// DIscQueue::GetFirst -// Fetches first element from the queue -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TAny* DIscQueue::GetFirst() - { - E_TRACE( ( _T( "IQ:G %d %d" ), iCount, iSize ) ); - - TAny* result; - TInt irqLevel = DisableIrqs(); - - if ( iCount == 0 || iSize == 0 ) - { - RestoreIrqs( irqLevel ); - return NULL; - } - // Get an element from the queue. - result = ( TAny* )iQueue[ iHead ]; - - RestoreIrqs( irqLevel ); - - return result; - - } - -// ----------------------------------------------------------------------------- -// DIscQueue::DeleteFirst -// Deletes first element from the queue -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void DIscQueue::DeleteFirst() - { - E_TRACE( ( _T( "IQ:D %d %d" ), iCount, iSize ) ); - - TInt irqLevel = DisableIrqs(); - - iQueue[ iHead ] = NULL; - - if ( iSize > 0 ) - { - // Adjust the head of the queue. - iHead = ++iHead % iSize; - // decrease counter. - iCount--; - } - else - { - ASSERT_RESET_ALWAYS( 0, "IscDriver", EIscBufferAllocationFailure ) - } - - RestoreIrqs( irqLevel ); - - } - -// ----------------------------------------------------------------------------- -// DIscQueue::Empty -// Checks if queue is empty -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TBool DIscQueue::Empty() - { - TInt result; - TInt irqLevel = DisableIrqs(); - result = iCount == 0 ? ETrue : EFalse; - RestoreIrqs( irqLevel ); - - return result; - } - -// ----------------------------------------------------------------------------- -// DIscQueue::NextBufferLenth -// Gets length of next frame in queue -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TUint16 DIscQueue::NextBufferLength() - { - TUint16 length; - - TInt irqLevel = DisableIrqs(); - - if ( iCount == 0 ) - { - RestoreIrqs( irqLevel ); - return 0; - } - - length = ( TUint16 )( ( ( TDes8* )iQueue[ iHead ] )->Length() ); - - - RestoreIrqs( irqLevel ); - - return length; - } - -// ----------------------------------------------------------------------------- -// DIscQueue::DisableIrqs -// Function to disable interrupts -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -TInt DIscQueue::DisableIrqs() - { -#ifndef __WINS__ - return NKern::DisableInterrupts( KIscInterruptLevelTwo ); -#else //__WINS__ - EnterCriticalSection( &g_IscCriticalSection ); - return KErrNone; -#endif//__WINS__ - } - -// ----------------------------------------------------------------------------- -// DIscQueue::RestoreIrqs -// Function to restore interrupts -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -#ifndef __WINS__ -void DIscQueue::RestoreIrqs( - TInt aLevel ) - { - NKern::RestoreInterrupts( aLevel ); -#else //__WINS__ -void DIscQueue::RestoreIrqs( - TInt ) -{ - LeaveCriticalSection( &g_IscCriticalSection ); -#endif//__WINS__ - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscDriver/src/IscSendQueue.cpp --- a/systemswstubs/examplecommonisc/IscDriver/src/IscSendQueue.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,146 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: An example implementation for ISC Driver Reference -* -*/ - - - -// INCLUDE FILES -#include -#include "IscSendQueue.h" -#include "IscTrace.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS -const TInt KImpossibleChannelId( 255 ); - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// DIscSendQueue::DIscSendQueue -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -EXPORT_C DIscSendQueue::DIscSendQueue( TUint32** aQueue, TIscSendFrameInfo** aParameterQueue, TUint16 aSize ) - :iParameterQueue( aParameterQueue ) - { - iHead = 0; - iTail = 0; - iCount = 0; - iQueue = aQueue; - iSize = aSize; - for ( TInt i( 0 ); i < aSize; i++ ) - { - iParameterQueue[i]->iChannelId = KImpossibleChannelId; - iParameterQueue[i]->iChannelPtr = NULL; - iParameterQueue[i]->iFrameInfo = NULL; - } - E_TRACE( ( _T( "ISQ:ISQ %d 0x%x" ), iSize, iQueue ) ); - } - -// Destructor -EXPORT_C DIscSendQueue::~DIscSendQueue() - { - iHead = 0; - iTail = 0; - iCount = 0; - iQueue = NULL; - iParameterQueue = NULL; - iSize = 0; - } - - -// ----------------------------------------------------------------------------- -// DIscSendQueue::Add -// Function to add element to queue -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt DIscSendQueue::Add( TAny* anEntry, TUint16 aId, DIscChannel* aChannelPtr, TAny* aFrameInfo ) - { - E_TRACE( ( _T( "ISQ:A %d, 0x%x" ), iCount, iQueue ) ); - - TInt irqLevel = DisableIrqs(); - - if ( iCount == iSize || iSize == 0 ) - { - RestoreIrqs( irqLevel ); - return KErrNoMemory;//EFalse; - } - - /* place the buffer into the queue */ - iQueue[ iTail ] = ( TUint32* )( anEntry ); - - TIscSendFrameInfo* tmp = iParameterQueue[ iTail ]; - // Set additional info for send frame - tmp->iChannelId = aId; - - tmp->iChannelPtr = aChannelPtr; - - tmp->iFrameInfo = aFrameInfo; - - /* adjust tail pointer */ - iTail = ++iTail % iSize; - - /* remember the amount of the requests in the queue */ - iCount++; - - RestoreIrqs( irqLevel ); - - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// DIscSendQueue::GetFirstFrameInfo -// Returns a frist frame info from list. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TIscSendFrameInfo* DIscSendQueue::GetFirstFrameInfo() - { - E_TRACE( ( _T( "ISQ:G(%d, 0x%x)" ), iCount, iQueue ) ); - - TIscSendFrameInfo* result; - - TInt irqLevel = DisableIrqs(); - - if ( iCount == 0 || iSize == 0 ) - { - RestoreIrqs( irqLevel ); - return NULL; - } - - result = iParameterQueue[ iHead ]; - - RestoreIrqs( irqLevel ); - - return result; - } - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscMultiplexerBase/inc/IscMultiplexerBase.h --- a/systemswstubs/examplecommonisc/IscMultiplexerBase/inc/IscMultiplexerBase.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,446 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef ISCMULTIPLEXERBASE_H -#define ISCMULTIPLEXERBASE_H - -// INCLUDES -#include -#include - -// CONSTANTS -_LIT( KIscMultiplexerName,"IscMultiplexer" ); - -const TUint16 KIscBufferAmount = 10; -// MACROS - -// DATA TYPES - -typedef struct -{ - TIscFrameType frameType; - TIscFrameConcatenation concatenation; - TUint16 totalLength; - TUint16 writeStartIndex; - TUint16 writeLength; -} TIscFrameInfo; - -typedef struct -{ - TUint16 size; - TUint16 count; -} TIscBufferEntry; - -typedef struct -{ - TUint16 mainRcvQueueSize; - TUint16 channelRcvQueueSize; - TUint16 channelDataRcvQueueSize; - TUint16 channelSendQueueSize; - TIscBufferEntry bufferConfig[KIscBufferAmount]; -} TIscConfiguration; - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -class DIscDevice; - -// CLASS DECLARATION - -/** -* DIscMultiplexerBase defines the ISC Multiplexer Plug-In API. -* This class defines the base class for Multiplexer( s ) used in -* conjunction with ISC Driver -* -* @lib IscMultiplexerBase.LIB -* @since 2.8 -*/ -class DIscMultiplexerBase : public DLogicalDevice - { - public: // Constructors and destructor - - /** - * C++ default constructor. - */ - IMPORT_C DIscMultiplexerBase(); - - /** - * Destructor - */ - IMPORT_C virtual ~DIscMultiplexerBase(); - - public: // Functions from base class - - /** - * Implementation of pure-virtual Install from DLogicalDevice. This - * function calls Install2ndPhase. - * @since 2.8 - * @return TInt KErrNone - */ - IMPORT_C TInt Install(); - - public: // New functions - /** - * Second phase initialization, called during ISC Multiplexer loading - * ISC Multiplexer must do all initialization here that are normally - * done in Install() - * @since 2.8 - * @return TInt KErrNone if successful - */ - virtual TInt Install2ndPhase() = 0; - - /** - * Multiplexers "pre" intialization before Data transmission driver - * initialization has been done ( e.g. if buffer configurations are given from isc_config.ini ) - * @since 2.8 - * @param aParameters Additional parameters passed to multiplexer - * @return void - */ - IMPORT_C virtual void SetInitializationParameters( const TDesC8& aParameters ); - - /** - * Multiplexer intialization - * @since 2.8 - * @param aOperation The asynchronous request to complete after - * multiplexer intialization is complete - * @param aParameters Additional parameters passed to multiplexer - * @param aChannelPtr DIscChannel pointer - * @return void - */ - virtual void InitializeMultiplexer( const TUint16 aOperation, - const TDesC8& aParameters, - const TAny* aChannelPtr ) = 0; - - /** - * Open data link connection with the modem - * @since 2.8 - * @param aDLCI The channel id to open - * @param aOpenParams Additional open parameters given by the ISC user, - * NULL if omitted - * @param aChannelPtr DIscChannel pointer - * @return void - */ - virtual void OpenDLC( const TUint16 aDLCI, - const TDesC8* aOpenParams, - const TAny* aChannelPtr ) = 0; - - /** - * Close data link connection - * @since 2.8 - * @param aDLCI The channel id to close - * @param aChannelPtr DIscChannel pointer - * @return void - */ - virtual void CloseDLC( const TUint16 aDLCI, - const TAny* aChannelPtr ) = 0; - - /** - * Send data to Domestic OS - * @since 2.8 - * @param aOperation Used to distinguish whether it is a synchronous - * or asynchronous Send request ( EIscSyncSend / EIscAsyncSend ) - * @param aSenderChannel Sender channel id - * @param aData Data to be sent - * @param aChannelPtr DIscChannel pointer - * @return KErrNone if successful - */ - virtual TInt Send( const TUint16 aOperation, - const TUint16 aSenderChannel, - const TDesC8& aData, - const TAny* aChannelPtr ) = 0; - /** - * Send data to Domestic OS - * @since 2.8 - * @param aOperation Used to distinguish whether it is a synchronous - * or asynchronous Send request ( EIscSyncDataSend / EIscAsyncDataSend ) - * @param aSenderChannel Sender channel id - * @param aData Data to be sent - * @param aChannelPtr DIscChannel pointer - * @return KErrNone if successful - */ - virtual TInt DataSend( const TUint16 aOperation, - const TUint16 aSenderChannel, - const TDesC8& aData, - const TAny* aChannelPtr ) = 0; - - - /** - * Retrieve information on the incoming frame - * @since 2.8 - * @param aFrame Frame which info to retrieve - * @param aFrameInfo Structure that the multiplexer must fill - * @return void - */ - virtual void GetFrameInfo( const TDesC8& aFrame, - TIscFrameInfo& aFrameInfo ) const = 0; - - /** - * Retrieve the channel this frame belongs to - * @since 2.8 - * @param aFrame Frame to check - * @param aRcvChannelId Receiver channel id has to written into this - * variable. Value should be between 0 and 63. KIscFrameReceiverNotFound - * should be returned if multiplexer could not determine correct receiver - * or multiplexer just wants to delete the frame. For multiplexer's purposes - * channel ids higher than 63 are also possible - * @param aRcvChannelPtr Receiver channel pointer. If routing to control channel - * NULL should be returned an 0 to aRcvChannelId - * @return void - */ - virtual void GetRcvChannelId( const TDesC8& aFrame, - TUint16& aRcvChannelId, - TAny*& aRcvChannelPtr ) = 0; - - /** - * Set flow control to specified state - * @since 2.8 - * @param aFlowStatus EIscFlowControlOn / EIscFlowControlOff - * @param aChannelId Channel who requested to DL flow control change - * @param aChannelPtr DIscChannel pointer for corresponding channel - * @return void - */ - virtual void DLFlowControl( const TInt aFlowStatus, - const TUint16 aChannelId, - const TAny* aChannelPtr ) = 0; - - /** - * Handle frames going to control channel ( channel zero ) - * @since 2.8 - * @param aFrame Control frame to be handled - * @return void - */ - virtual void HandleControlFrame( const TDesC8& aFrame ) = 0; - - /** - * Notify multiplexer that some asynchronous operation has been - * cancelled - * @since 2.8 - * @param aChannelId Channel id which has cancelled the operation - * @param aOperation The operation that has been cancelled - * @param aChannelPtr Channel pointer which has cancelled the operation - * @return void - */ - virtual void CancelNotify( const TUint16 aChannelId, - const TUint16 aOperation, - const TAny* aChannelPtr ) = 0; - - /** - * API extension function - * @since 2.8 - * @param aChannelId Channel id that is executing the operation - * @param aOperation Which custom operation to execute - * @param aParameters Additional parameters, NULL if omitted - * @param aChannelPtr Pointer to DIscChannel - * @return TInt KErrNone if successful. KErrNotSupported if the - * operation that was requested is not supported by the multiplexer - */ - IMPORT_C virtual TInt CustomFunction( const TUint16 aChannelId, - const TUint16 aOperation, - TAny* aParameters, - const TAny* aChannelPtr ); - - /** - * Get information on specified channel - * @since 2.8 - * @param aChannelNumber The channel, which information is required - * @param aInfo Buffer in client address space where to write the data - * @return TInt KErrNone if successful. KErrNotSupported if not supported - * by the multiplexer - */ - IMPORT_C virtual TInt GetChannelInfo( const TUint16 aChannelNumber, - TDes8& aInfo ); - - /** - * Get maximun data size ( for sending and receiving ) - * @since 2.8 - * @param aChannelId Channel which needed maximum data size is queried - * @return TInt Maximun data size in bytes - */ - virtual TInt MaximumDataSize( const TUint16 aChannelId ) = 0; - - /** - * Inform multiplexer on connection status changes - * @since 2.8 - * @param aConnectionStatus EIscConnectionOk / EIscConnectionNotOk - * @return void - */ - virtual void NotifyConnectionStatus( const TInt aConnectionStatus ) = 0; - - /** - * Connect ISC Driver to ISC Multiplexer - * @since 2.8 - * @param aDevice Pointer to DIscDevice class of ISC Driver - * @return void - */ - IMPORT_C virtual void Connect( DIscDevice* aDevice ); - - /** - * Get buffer configurations from ISC Multiplexer - * @since 2.8 - * @param aConfig Configuration data structure that the multiplexer must fill - * @return void - */ - virtual void GetConfiguration( TIscConfiguration& aConfig ) = 0; - - - protected: // New functions - - /** - * Complete specified asynchronous request - * @since 2.8 - * @param aReqNumber Request to complete ( possible values in - * IscDefinitions.h ) - * @param aStatus Error code, KErrNone if the operation in question - * was successful - * @param aChannelPtr The channel, which request to complete - * @return void - */ - IMPORT_C void CompleteRequest( TUint16 aReqNumber, - TInt aStatus, - const TAny* aChannelPtr ); - - /** - * Check if specified request is pending in ISC Driver - * @since 2.8 - * @param aReqNumber Request to check if pending - * @param aChannelId The channel, which to check for the request - * @return TInt KRequestPending if the request is pending. KErrNone if - * request is not pending - */ - IMPORT_C TInt IsPending( const TUint16 aReqNumber, - const TAny* aChannelId ); - - /** - * Queue frame for sending - * @since 2.8 - * @param aChannelId On which channels queue to add the frame. Value - * must be between 0 and 63. 0( zero ) refers to the control channel. - * @param aFrame Frame to send - * @param aMultiplexerDfc Dfc to run when frame transmission to modem has been done - * @param aMultiplexerErrorCode error if data transmsission was succesful or not - * @return TInt KErrNone if successful. KErrNotFound if the channel - * in question was not open - */ - IMPORT_C TInt QueueFrame( const TUint16 aChannelId, - const TDesC8* aFrame, - const TAny* aChannelPtr, - TAny* aFrameInfo = NULL ); - - /** - * Start sending the frames - * @since 2.8 - * @return void - */ - IMPORT_C void FlushQueues(); - - /** - * Notify flow control changes to ISC Driver - * @since 2.8 - * @param aULFlowStatus Uplink flow control status, - * EIscFlowControlOff/EIscFlowControlOn - * @param aChannelId Channel to be affected by the flow control - * @param aChannel Channel to be affected by the flow control, NULL if wanted to have - * effect on all channels within this id. By default it affects all channels - * @return void - */ - IMPORT_C void ULFlowControl( const TInt aULFlowStatus, - const TUint16 aChannelId, - TAny* aChannelPtr = NULL ); - - /** - * Reserve memory block - * @since 2.8 - * @param aPtr Pointer to reserved memory block, NULL if not successful - * @param aSize Required minimun size of the block - * @return void - */ - IMPORT_C void ReserveMemoryBlock( TDes8*& aPtr, - const TUint16 aSize ); - - /** - * Release memory block allocated with ReserveMemoryBlock - * @since 2.8 - * @param aPtr Pointer to memory block to be released - * @return void - */ - IMPORT_C void ReleaseMemoryBlock( TDes8* aPtr ); - - - /** - * Copy data from user buffer to kernel side buffer by multiplexer. - * This method will be deprecated in the future. - * It is preffered to use GetThreadPtr instead. - * @since 2.8 - * @param aUserBuffer pointer to source descriptor - * @param aKernelBuffer pointer to destination descriptor - * @param aChannelPtr DIscChannel pointer - * @param aOffset Offset of the source buffer - * @return KErrNone if successful - */ - IMPORT_C TInt CopyFromUserBuffer( const TDesC8& aUserBuffer, - TDes8& aKernelBuffer, - const TAny* aChannelPtr, - const TInt aOffset = 0 ); - - /** - * Copy data to user side buffer from kernel side by multiplexer. - * This method will be deprecated in the future. - * It is preffered to use GetThreadPtr instead. - * @since 2.8 - * @param aUserBuffer pointer to destination descriptor - * @param aKernelBuffer pointer to source descriptor - * @param aChannelPtr DIscChannel pointer - * @param aOffset Offset of the destination buffer - * @return KErrNone if succesful - */ - IMPORT_C TInt CopyToUserBuffer( TAny* aUserBuffer, - const TDesC8& aKernelBuffer, - const TAny* aChannelPtr, - const TInt aOffset = 0 ); - - - /** - * Description_here - * @since 2.8 - * @param aChannelId Channel whose queued send frames should be deleted - * @param aChannelPtr Corresponding DIscChannel pointer - * @return TInt KErrNone if succesful - */ - IMPORT_C TInt CancelSending( const TUint16 aChannelId, const TAny* aChannelPtr ); - - - /** - * Returns a user side thread of a given channel. Returns NULL if channelptr - * is not valid or if the channel is not found. - * @since 3.0 - * @param const TAny* aChannelPtr, channel pointer (DIscChannel). - * @return DThread&, user side clients thread. Ownership is not given. - */ - IMPORT_C DThread* GetThreadPtr( const TAny* aChannelPtr ); - - - protected: // Data - - // pointer to DIscDevice class from ISC Driver - DIscDevice* iDevice; // No ownership - - }; - -#endif // ISCMULTIPLEXERBASE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscMultiplexerBase/inc/IscTrace.h --- a/systemswstubs/examplecommonisc/IscMultiplexerBase/inc/IscTrace.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - -#ifndef ISCTRACE_H -#define ISCTRACE_H - -// INCLUDES -// CONSTANTS - -// MACROS - -#ifdef TRACE_MODE_KERNEL - - // INCLUDES - #include - - #define _T(a) a -#else - - // INCLUDES - #include // RDebug - #include - - #define _T(a) _L(a) - -#endif // TRACE_MODE_KERNEL - -#ifdef _DEBUG - - #ifdef TRACE_MODE_KERNEL - #define __TRACE_PRINTF(a) Kern::Printf a - #else - #define __TRACE_PRINTF(a) RDebug::Print a - #endif - -#else - #define __TRACE_PRINTF(a) -#endif // _DEBUG - - -#ifdef _DEBUG - - void BuildTraceFunc( const TDesC& aPrefix ); - void DataDumpTraceFunc( const TDesC& aPrefix, const TDesC8& aData ); - - #define BUILD_TRACE( a ) BuildTraceFunc( a ) - #define DATA_DUMP_TRACE( a, b ) DataDumpTraceFunc( a, b ) - - #ifdef TRACE_MODE_KERNEL - - // define assertions - #define TRACE_ASSERT(a) if (!(a)) __TRACE_PRINTF(("Assertion failed: file=" __FILE__ ", line=%d, compiled=" __DATE__" "__TIME__, __LINE__ )) - - #else - - // define assertions - #ifdef __WINS__ - #define TRACE_ASSERT(a) if (!(a)) __TRACE_PRINTF((_L("Assertion failed: file= __FILE__ , line=%d, compiled=__DATE__ __TIME__ "),__LINE__)) - #else - #define TRACE_ASSERT(a) if (!(a)) __TRACE_PRINTF((_L("Assertion failed: file=" __FILE__ ", line=%d, compiled="__DATE__ __TIME__""),__LINE__ )) - #endif //__WINS__ - - #endif // TRACE_MODE_KERNEL - - - #if defined COMPONENT_TRACE_FLAG - #define C_TRACE(a) __TRACE_PRINTF(a) - #else - #define C_TRACE(a) - #endif // COMPONENT_TRACE_FLAG - - #if defined API_TRACE_FLAG - #define A_TRACE(a) __TRACE_PRINTF(a) - #else - #define A_TRACE(a) - #endif // API_TRACE_FLAG - - #if defined EXTENDED_TRACE_FLAG - #define E_TRACE(a) __TRACE_PRINTF(a) - #else - #define E_TRACE(a) - #endif // EXTENDED_TRACE_FLAG - -#else - #define TRACE_ASSERT(a) - #define C_TRACE(a) - #define A_TRACE(a) - #define E_TRACE(a) - #define BUILD_TRACE(a) - #define DATA_DUMP_TRACE(a, b) -#endif // _DEBUG - - -// Resets are made both in UDEB and UREL (traces only in udeb) -#ifdef TRACE_MODE_KERNEL - #define ASSERT_RESET_ALWAYS(a,b,c) if(!(a)) { __TRACE_PRINTF(("Assertion failed: file=" __FILE__ ", line=%d, compiled="__DATE__" "__TIME__, __LINE__)); Kern::Fault(b,c); } - #define TRACE_ASSERT_ALWAYS __TRACE_PRINTF( ("Assertion failed: file=" __FILE__ ", line=%d, compiled="__DATE__" "__TIME__, __LINE__) ) -#else - #ifdef __WINS__ - #define ASSERT_RESET_ALWAYS(a,b,c) error - #define TRACE_ASSERT_ALWAYS __TRACE_PRINTF( (_L("Assertion failed: file= __FILE__ , line=%d, compiled=__DATE__ __TIME__ "),__LINE__) ) - #else - #define ASSERT_RESET_ALWAYS(a,b,c) error - #define TRACE_ASSERT_ALWAYS __TRACE_PRINTF( (_L("Assertion failed: file=%s, line=%d, compiled=%s %s "),__FILE__, __LINE__, __DATE__, __TIME__) ) - #endif -#endif // kernel - - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -#endif // ISCTRACE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/IscMultiplexerBase/src/IscMultiplexerBase.cpp --- a/systemswstubs/examplecommonisc/IscMultiplexerBase/src/IscMultiplexerBase.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,348 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of DIscMultiplexerBase class -* -*/ - - - -// INCLUDE FILES -#include -#include -#include "IscMultiplexerBase.h" -#include "IscTrace.h" - - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// DIscMultiplexerBase::DIscMultiplexerBase -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -EXPORT_C DIscMultiplexerBase::DIscMultiplexerBase() - :iDevice( NULL ) - { - C_TRACE( ( _T( "DIscMultiplexerBase::DIscMultiplexerBase()" ) ) ); - C_TRACE( ( _T( "DIscMultiplexerBase::DIscMultiplexerBase - return 0x%x" ) ) ); - } - -// Destructor -EXPORT_C DIscMultiplexerBase::~DIscMultiplexerBase() - { - C_TRACE( ( _T( "DIscMultiplexerBase::~DIscMultiplexerBase()" ) ) ); - C_TRACE( ( _T( "DIscMultiplexerBase::~DIscMultiplexerBase - return 0x%x" ) ) ); - } - -// ----------------------------------------------------------------------------- -// DIscMultiplexerBase::CustomFunction -// API extension function -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -#ifndef API_TRACE_FLAG -EXPORT_C TInt DIscMultiplexerBase::CustomFunction( - const TUint16, - const TUint16 aOperation, - TAny* , - const TAny* aChannelPtr ) -#else -EXPORT_C TInt DIscMultiplexerBase::CustomFunction( - const TUint16 aChannelId, - const TUint16 aOperation, - TAny* aParameters, - const TAny* aChannelPtr ) -#endif - { - A_TRACE( ( _T( "DIscMultiplexerBase::CustomFunction(0x%x, 0x%x, 0x%x, 0x%x)" ), aChannelId, aOperation, aParameters, aChannelPtr ) ); - CompleteRequest( aOperation, KErrNotSupported, aChannelPtr ); - return KErrNotSupported; - } - -// ----------------------------------------------------------------------------- -// DIscMultiplexerBase::GetChannelInfo -// Get information on specified channel -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -#ifndef API_TRACE_FLAG -EXPORT_C TInt DIscMultiplexerBase::GetChannelInfo( - const TUint16, - TDes8& ) -#else -EXPORT_C TInt DIscMultiplexerBase::GetChannelInfo( - const TUint16 aChannelNumber, - TDes8& aInfo ) -#endif - - { - A_TRACE( ( _T( "DIscMultiplexerBase::GetChannelInfo(0x%x, 0x%x)" ), aChannelNumber, &aInfo ) ); - return KErrNotSupported; - } - -// ----------------------------------------------------------------------------- -// DIscMultiplexerBase::CompleteRequest -// Complete specified asynchronous request -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -// This method has been modified to allow channel sharing between application. -// The completion routine uses directly a pointer on a DLogicalChannel instead of a channel index -// -EXPORT_C void DIscMultiplexerBase::CompleteRequest( - TUint16 aReqNumber, - TInt aStatus, - const TAny* aChannelPtr ) - { - A_TRACE( ( _T( "DIscMultiplexerBase::CompleteRequest(0x%x, 0x%x, 0x%x)" ), aReqNumber, aStatus, aChannelPtr ) ); - iDevice->CompleteRequest( aReqNumber, aStatus, aChannelPtr ); - A_TRACE( ( _T( "DIscMultiplexerBase::CompleteRequest - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// DIscMultiplexerBase::IsPending -// Check if specified request is pending in ISC Driver -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt DIscMultiplexerBase::IsPending( - const TUint16 aReqNumber, - const TAny* aChannelPtr ) - { - A_TRACE( ( _T( "DIscMultiplexerBase::IsPending(0x%x, 0x%x)" ), aReqNumber, aChannelPtr ) ); - return iDevice->IsPending( aReqNumber, aChannelPtr ); - } - -// ----------------------------------------------------------------------------- -// DIscMultiplexerBase::QueueFrame -// Queue frame for sending -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt DIscMultiplexerBase::QueueFrame( - const TUint16 aChannelId, - const TDesC8* aFrame, - const TAny* aChannelPtr, - TAny* aFrameInfo ) - { - A_TRACE( ( _T( "DIscMultiplexerBase::QueueFrame(0x%x, 0x%x, 0x%x, 0x%x)" ), aChannelId, aFrame, aChannelPtr, aFrameInfo ) ); - TInt error( KErrNone ); - if ( !aFrame ) - { - error = KErrBadDescriptor; - } - else - { - error = iDevice->QueueFrame( aChannelId, aFrame, aChannelPtr, aFrameInfo ); - } - - return error; - } - -// ----------------------------------------------------------------------------- -// DIscMultiplexerBase::FlushQueue -// Start sending the frames -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void DIscMultiplexerBase::FlushQueues() - { - A_TRACE( ( _T( "DIscMultiplexerBase::FlushQueue()" ) ) ); - iDevice->FlushQueues(); - A_TRACE( ( _T( "DIscMultiplexerBase::FlushQueue - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// DIscMultiplexerBase::ULFlowControl -// Notify flow control changes to ISC Driver -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void DIscMultiplexerBase::ULFlowControl( - const TInt aULFlowStatus, - TUint16 aChannelId, - TAny* aChannelPtr ) - { - A_TRACE( ( _T( "DIscMultiplexerBase::ULFlowControl(0x%x, 0x%x)" ), aULFlowStatus, aChannelPtr ) ); - iDevice->ULFlowControl( aULFlowStatus, aChannelId, aChannelPtr ); - A_TRACE( ( _T( "DIscMultiplexerBase::ULFlowControl - return void" ) ) ); - } - - -// ----------------------------------------------------------------------------- -// DIscMultiplexerBase::ReserveMemoryBlock -// Reserve memory block -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void DIscMultiplexerBase::ReserveMemoryBlock( - TDes8*& aPtr, - const TUint16 aSize ) - { - A_TRACE( ( _T( "DIscMultiplexerBase::ReserveMemoryBlock(0x%x, 0x%x)" ), aPtr, aSize ) ); - iDevice->ReserveMemoryBlock( aPtr,aSize ); - A_TRACE( ( _T( "DIscMultiplexerBase::ReserveMemoryBlock - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// DIscMultiplexerBase::ReleaseMemoryBlock -// Release the reserved memory block -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void DIscMultiplexerBase::ReleaseMemoryBlock( - TDes8* aPtr ) - { - A_TRACE( ( _T( "DIscMultiplexerBase::ReleaseMemoryBlock(0x%x)" ), aPtr ) ); - iDevice->ReleaseMemoryBlock( aPtr ); - A_TRACE( ( _T( "DIscMultiplexerBase::ReleaseMemoryBlock - return void" ) ) ); - } - - -// ----------------------------------------------------------------------------- -// DIscMultiplexerBase::CopyFromUserBuffer -// Due to GetThreadPtr this method will be deprecated in the future. -// It is preffered to use GetThreadPtr instead. -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt DIscMultiplexerBase::CopyFromUserBuffer( - const TDesC8& aUserBuffer, - TDes8& aKernelBuffer, - const TAny* aChannelPtr, - const TInt aOffset ) - { - A_TRACE( ( _T( "DIscMultiplexerBase::CopyFromUserBuffer(0x%x, 0x%x, 0x%x, 0x%x)" ), &aUserBuffer, &aKernelBuffer, aChannelPtr, aOffset ) ); - return iDevice->CopyFromUserBuffer( aUserBuffer, aKernelBuffer, aChannelPtr, aOffset ); - } - -// ----------------------------------------------------------------------------- -// DIscMultiplexerBase::CopyToUserBuffer -// Due to GetThreadPtr this method will be deprecated in the future. -// It is preffered to use GetThreadPtr instead. -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt DIscMultiplexerBase::CopyToUserBuffer( - TAny* aUserBuffer, - const TDesC8& aKernelBuffer, - const TAny* aChannelPtr, - const TInt aOffset ) - { - A_TRACE( ( _T( "DIscMultiplexerBase::CopyToUserBuffer(0x%x, 0x%x, 0x%x, 0x%x)" ), aUserBuffer, &aKernelBuffer, aChannelPtr, aOffset ) ); - return iDevice->CopyToUserBuffer( aUserBuffer, aKernelBuffer, aChannelPtr, aOffset ); - } - -// ----------------------------------------------------------------------------- -// DIscMultiplexerBase::GetThreadPtr -// Returns user side thread pointer no owenership is given. -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C DThread* DIscMultiplexerBase::GetThreadPtr( const TAny* aChannelPtr ) - { - A_TRACE( ( _T( "DIscMultiplexerBase::DIscMultiplexerBase::GetThreadPtr(0x%x)" ), aChannelPtr ) ); - TRACE_ASSERT( aChannelPtr ); - return iDevice->GetThreadPtr( aChannelPtr ); - } - -// ----------------------------------------------------------------------------- -// DIscMultiplexerBase::CancelSending -// -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt DIscMultiplexerBase::CancelSending( - const TUint16 aChannelId, - const TAny* aChannelPtr ) - { - A_TRACE( ( _T( "DIscMultiplexerBase::CancelSending(0x%x, 0x%x)" ), aChannelId, aChannelPtr ) ); - return iDevice->CancelSending( aChannelId, aChannelPtr ); - } - -// ----------------------------------------------------------------------------- -// DIscMultiplexerBase::Connect -// Connect ISC Driver to ISC Multiplexer -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C void DIscMultiplexerBase::Connect( - DIscDevice* aDevice ) - { - A_TRACE( ( _T( "DIscMultiplexerBase::Connect(0x%x)" ), aDevice ) ); - ASSERT_RESET_ALWAYS( aDevice, "IscMultiplexerBase",EIscNullIscDriverPointer ); - iDevice = aDevice; - A_TRACE( ( _T( "DIscMultiplexerBase::Connect - return void" ) ) ); - } - -// ----------------------------------------------------------------------------- -// DIscMultiplexerBase::SetInitializationParameters -// Initialization string to multiplexer in case if needed before datatransmission driver has been initialized -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -#ifndef API_TRACE_FLAG -EXPORT_C void DIscMultiplexerBase::SetInitializationParameters( const TDesC8&) -#else -EXPORT_C void DIscMultiplexerBase::SetInitializationParameters( const TDesC8& aParameters ) -#endif - { - A_TRACE( ( _T( "DIscMultiplexerBase::SetInitializationParameters not supported(0x%x)" ), &aParameters ) ); - } - -// ----------------------------------------------------------------------------- -// DIscMultiplexerBase::Install -// Install from DLogicalDevice -// ( other items were commented in a header ). -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt DIscMultiplexerBase::Install() - { - A_TRACE( ( _T( "DIscMultiplexerBase::Install()" ) ) ); - SetName( &KIscMultiplexerName ); - TInt r = Install2ndPhase(); - C_TRACE( ( _T( "DIscMultiplexerBase::Install - return 0x%x" ), r ) ); - return r; - } - -// ================= E32Dll ============== -// E32Dll -// Dll entry point. -// Returns: TInt Invariably return KErrNone. -// -#if defined( __WINSCW__ ) -DECLARE_STANDARD_LDD() - { - return NULL; - } -#endif -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/group/IscApi.mmp --- a/systemswstubs/examplecommonisc/group/IscApi.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include - -TARGET IscApi.dll -TARGETTYPE dll -UID 0x10000079 0x1020209F -VENDORID VID_DEFAULT - -#ifdef WINSCW -deffile /epoc32/include/def/bwins/iscapi.def -#else -deffile /epoc32/include/def/eabi/iscapi.def -#endif - -CAPABILITY ALL - -SOURCEPATH ../IscApi/src -SOURCE IscApi.cpp - -USERINCLUDE ../IscApi/inc - -// System include macro -OS_LAYER_SYSTEMINCLUDE - -LIBRARY euser.lib efsrv.lib - -START WINS -win32_library kernel32.lib -END - -// flag to enable trace of components API calls -//MACRO API_TRACE_FLAG - -// flag to enable normal trace inside component -//MACRO COMPONENT_TRACE_FLAG - - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/group/IscDataTransmissionBaseReference.mmp --- a/systemswstubs/examplecommonisc/group/IscDataTransmissionBaseReference.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: A reference implementation for ISC data transmission base -* reference. -* -*/ - - -#include - -#include "kernel/kern_ext.mmh" - -#if defined(WINSCW) -TARGET IscDataTransmissionBase.ldd -TARGETTYPE ldd -UID 0x100000AF 0x102020A2 -DEFFILE IscDataTransmissionBaseCW.def -#else -TARGET IscDataTransmissionBase.dll -TARGETTYPE kdll -UID 0x10000079 0x102020A2 -DEFFILE IscDataTransmissionBase.def -#endif - -VENDORID VID_DEFAULT - -CAPABILITY ALL - -SOURCEPATH ../IscDataTransmissionBase/src -SOURCE IscDataTransmissionBase.cpp -SOURCE IscBufferAllocator.cpp -SOURCE IscBufferQueue.cpp - - -USERINCLUDE ../IscDriver/inc -USERINCLUDE ../IscDataTransmissionBase/inc -USERINCLUDE ../IscMultiplexerBase/inc - -OS_LAYER_KERNEL_SYSTEMINCLUDE - -LIBRARY IscDriver.lib - -START WINS -win32_library kernel32.lib -#if defined(VC32) -win32_library libc.lib -#endif - -END - -// Do not remove this flag unless you are sure what you are doing. -macro TRACE_MODE_KERNEL - -// flag to enable trace of components API calls -//macro API_TRACE_FLAG - -// flag to enable normal trace inside component -//macro COMPONENT_TRACE_FLAG - -// flag to enable unsafe trace inside component (i.e. prints when context is unknown, might be irq) -//macro EXTENDED_TRACE_FLAG - - -EPOCALLOWDLLDATA diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/group/IscDriverExtensionReference.mmp --- a/systemswstubs/examplecommonisc/group/IscDriverExtensionReference.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: A reference implementation for ISC Driver Extension -* -*/ - - -#include - -#include "kernel/kern_ext.mmh" - -TARGET IscDriverExtension.ldd -TARGETTYPE ldd -UID 0x100000AF 0x102020A1 -VENDORID VID_DEFAULT -CAPABILITY ALL - -DEFFILE IscDriverExtension.def - -SOURCEPATH ../IscDriver/src -SOURCE IscDriverExtensionDevice.cpp - -USERINCLUDE ../IscDriver/inc -USERINCLUDE ../IscDataTransmissionBase/inc -USERINCLUDE ../IscMultiplexerBase/inc - -OS_LAYER_KERNEL_SYSTEMINCLUDE - -LIBRARY IscDriver.lib - -START WINS -win32_library kernel32.lib -END - -// Do not remove this flag unless you are sure what you are doing. -macro TRACE_MODE_KERNEL - -// flag to enable trace of components API calls -//MACRO API_TRACE_FLAG - -// flag to enable normal trace inside component -//MACRO COMPONENT_TRACE_FLAG - - - -EPOCALLOWDLLDATA diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/group/IscDriverReference.mmp --- a/systemswstubs/examplecommonisc/group/IscDriverReference.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: An example implementation for ISC Driver Reference -* -*/ - - -#include - -#include "kernel/kern_ext.mmh" - -TARGET IscDriver.ldd -TARGETTYPE ldd -UID 0x100000AF 0x102020A0 -VENDORID VID_DEFAULT -CAPABILITY ALL - -DEFFILE IscDriver.def - -SOURCEPATH ../IscDriver/src -SOURCE IscDevice.cpp -SOURCE IscChannel.cpp -SOURCE IscChannelContainer.cpp -SOURCE IscMainRcvBuffer.cpp -SOURCE IscQueue.cpp -SOURCE IscSendQueue.cpp - -USERINCLUDE ../IscDriver/inc -USERINCLUDE ../IscMultiplexerBase/inc -USERINCLUDE ../IscDataTransmissionBase/inc - -OS_LAYER_KERNEL_SYSTEMINCLUDE - -START WINS -win32_library kernel32.lib -END - -// Do not remove this flag unless you are sure what you are doing. -macro TRACE_MODE_KERNEL - -// flag to enable trace of components API calls -//macro API_TRACE_FLAG - -// flag to enable normal trace inside component -//macro COMPONENT_TRACE_FLAG - -// flag to enable unsafe trace inside component (i.e. prints that context is unknown, might be irq) -//macro EXTENDED_TRACE_FLAG - - -EPOCALLOWDLLDATA diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/group/IscMultiplexerBaseReference.mmp --- a/systemswstubs/examplecommonisc/group/IscMultiplexerBaseReference.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: A reference implementation for ISC multiplexer base. -* -*/ - - -#include - -#include "kernel/kern_ext.mmh" - -#if defined(WINSCW) -TARGET IscMultiplexerBase.ldd -TARGETTYPE ldd -UID 0x100000AF 0x102020A3 -DEFFILE IscMultiplexerBaseCW.def -#else -TARGET IscMultiplexerBase.dll -TARGETTYPE kdll -UID 0x10000079 0x102020A3 -DEFFILE IscMultiplexerBase.def -#endif - -VENDORID VID_DEFAULT - -CAPABILITY ALL - -SOURCEPATH ../IscMultiplexerBase/src -SOURCE IscMultiplexerBase.cpp - - -USERINCLUDE ../IscMultiplexerBase/inc -USERINCLUDE ../IscDriver/inc - -OS_LAYER_KERNEL_SYSTEMINCLUDE - -LIBRARY IscDriver.lib - -START WINS -win32_library kernel32.lib -#if defined(VC32) -win32_library libc.lib -#endif - -END -// Do not remove this flag unless you are sure what you are doing. -macro TRACE_MODE_KERNEL - -// flag to enable trace of components API calls -//MACRO API_TRACE_FLAG - -// flag to enable normal trace inside component -//MACRO COMPONENT_TRACE_FLAG - - -EPOCALLOWDLLDATA diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/group/bld.inf --- a/systemswstubs/examplecommonisc/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information file for project ISC_IF -* -*/ - - - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/rom/isc_if_api.iby --- a/systemswstubs/examplecommonisc/rom/isc_if_api.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - -#ifndef ISC_IF_API_IBY -#define ISC_IF_API_IBY - -file=ABI_DIR\BUILD_DIR\IscApi.dll SHARED_LIB_DIR\IscApi.dll - -#endif // ISC_IF_API_IBY - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/examplecommonisc/rom/isc_if_drivers_reference.iby --- a/systemswstubs/examplecommonisc/rom/isc_if_drivers_reference.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ?Description -* -*/ - - -#ifndef ISC_IF_DRIVERS_REFERENCE_IBY -#define ISC_IF_DRIVERS_REFERENCE_IBY - -device[VARID]=KERNEL_DIR\BUILD_DIR\IscDriver.ldd SHARED_LIB_DIR\IscDriver.ldd -device[VARID]=KERNEL_DIR\BUILD_DIR\IscDriverExtension.ldd SHARED_LIB_DIR\IscDriverExtension.ldd -device[VARID]=KERNEL_DIR\BUILD_DIR\IscMultiplexerBase.dll SHARED_LIB_DIR\IscMultiplexerBase.dll -device[VARID]=KERNEL_DIR\BUILD_DIR\IscDataTransmissionBase.dll SHARED_LIB_DIR\IscDataTransmissionBase.dll - -#endif // ISC_IF_DRIVERS_REFERENCE_IBY - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/bwins/exampledsyu.def --- a/systemswstubs/exampledsy/bwins/exampledsyu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - ?LibEntryL@@YAPAVCDosFactoryBase@@XZ @ 1 NONAME ; class CDosFactoryBase * LibEntryL(void) - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/data/dosserver.ini --- a/systemswstubs/exampledsy/data/dosserver.ini Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -ExampleDSY.dsy \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/eabi/exampledsyu.def --- a/systemswstubs/exampledsy/eabi/exampledsyu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -EXPORTS - _Z9LibEntryLv @ 1 NONAME - _ZTI14CDosMtcExample @ 2 NONAME ; ## - _ZTI14CDosSaeExample @ 3 NONAME ; ## - _ZTI17CDosHelperExample @ 4 NONAME ; ## - _ZTI18CDosFactoryExample @ 5 NONAME ; ## - _ZTI19CDosSelfTestExample @ 6 NONAME ; ## - _ZTI19CDosSysUtilsExample @ 7 NONAME ; ## - _ZTI20CDosExtensionExample @ 8 NONAME ; ## - _ZTV14CDosMtcExample @ 9 NONAME ; ## - _ZTV14CDosSaeExample @ 10 NONAME ; ## - _ZTV17CDosHelperExample @ 11 NONAME ; ## - _ZTV18CDosFactoryExample @ 12 NONAME ; ## - _ZTV19CDosSelfTestExample @ 13 NONAME ; ## - _ZTV19CDosSysUtilsExample @ 14 NONAME ; ## - _ZTV20CDosExtensionExample @ 15 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/group/bld.inf --- a/systemswstubs/exampledsy/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include - -PRJ_PLATFORMS -DEFAULT - -#ifndef RD_STARTUP_CHANGE - -PRJ_EXPORTS -../data/DosServer.ini /epoc32/release/winscw/udeb/z/private/101f6efa/DosServer.ini -../data/DosServer.ini /epoc32/release/winscw/urel/z/private/101f6efa/DosServer.ini -../data/DosServer.ini /epoc32/data/z/private/101f6efa/DosServer.ini -../rom/exampledsy.iby CORE_OS_LAYER_IBY_EXPORT_PATH(exampledsy.iby) - -PRJ_MMPFILES -../group/ExampleDSY.mmp - -#endif // RD_STARTUP_CHANGE diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/group/exampledsy.mmp --- a/systemswstubs/exampledsy/group/exampledsy.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include - -TARGET ExampleDSY.dsy - -TARGETTYPE DLL -UID 0x1000008D 0x101f6efe -VENDORID VID_DEFAULT - -CAPABILITY CAP_GENERAL_DLL - -LANG SC -SOURCEPATH ../src -USERINCLUDE ../inc - -OS_LAYER_SYSTEMINCLUDE - -SOURCE DsyFactory.cpp -SOURCE DsyExtension.cpp - -SOURCE DsySysUtils.cpp -SOURCE DsyHelper.cpp -SOURCE DsyMtc.cpp -SOURCE DsySelfTest.cpp - -SOURCE Dsysae.cpp - -LIBRARY euser.lib -LIBRARY DosSrv.lib -LIBRARY efsrv.lib - -DEBUGLIBRARY flogger.lib // File logging services diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/inc/dsydebug.h --- a/systemswstubs/exampledsy/inc/dsydebug.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,104 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This file defines logging macros for DSY plugin. -* -*/ - - -#ifndef DSYDEBUG_H -#define DSYDEBUG_H - -#include - - -#ifdef _DEBUG - -// Enable this to enable memory tracing -// for BT Phone Host Interface -//#define MEMTRACE - -#ifdef __WINS__ -#define __FLOGGING__ // File logging for WINS -#else -#define __CLOGGING__ // Logging with RDebug for target HW -#endif //__WINS__ - -#endif // _DEBUG - - -// File logging -// -#if defined(__FLOGGING__) - -#include - -_LIT(KLogFile,"doslog.txt"); -_LIT(KLogDirFullName,"c:\\logs\\bt\\"); -_LIT(KLogDir,"BT"); - -#include -#include - -#define FLOG(a) { FPrint(a); } -#define FTRACE(a) { a; } - -// Declare the FPrint function -inline void FPrint(const TRefByValue aFmt, ...) - { - VA_LIST list; - VA_START(list,aFmt); - RFileLogger::WriteFormat(KLogDir, KLogFile, EFileLoggingModeAppend, aFmt, list); - -#ifdef MEMTRACE // If memory tracing is activated. - TInt size; - User::Heap().AllocSize(size); - RFileLogger::WriteFormat(KLogDir, KLogFile, EFileLoggingModeAppend, _L("[TBTPHI]\t MEM\tMemory usage: %d high: %d"), size, User::Heap().Size()); -#endif - } - - -// RDebug logging -// -#elif defined(__CLOGGING__) - -#include - -#define FLOG(a) { RDebug::Print(a); } -#define FLOGHEX(a) -#define FTRACE(a) { a; } - -// Declare the FPrint function -inline void FPrint(const TRefByValue aFmt, ...) - { - VA_LIST list; - VA_START(list,aFmt); - TInt tmpInt = VA_ARG(list, TInt); - TInt tmpInt2 = VA_ARG(list, TInt); - TInt tmpInt3 = VA_ARG(list, TInt); - VA_END(list); - RDebug::Print(aFmt, tmpInt, tmpInt2, tmpInt3); - } - - -// No loggings --> Reduced binary size -// -#else -#define FLOG(a) -#define FLOGHEX(a) -#define FTRACE(a) -#endif - -#endif // DSYDEBUG_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/inc/dsyextension.h --- a/systemswstubs/exampledsy/inc/dsyextension.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* It describes the CDosExtensionExample class -* -*/ - - -#ifndef __DSYEXTENSION_H__ -#define __DSYEXTENSION_H__ - -#include "DosExtensionBase.h" - -/** -* Plug-in class that implements the MDosExtensionBaseDSY class and to -* satisfy the RDosExtension requests from the client side. -*/ -class CDosExtensionExample : public CDosExtensionBase -{ -public: - /** - * NewL function that creates the object. - * @return The newly created object. - */ - static CDosExtensionExample* NewL(); - - //====================================================== - // See MDosExtensionBaseDSY class for a description of - // the following functions. - //====================================================== - TInt CallFunctionL(TInt aFunc , TAny *aParameter , TInt aParLength, TBool& aParameterModified); - void CallFunctionAndCompleteL(TInt aFunc , TAny *aParameter , TInt aParLength, const RMessage2& aMessage); - -private: - /** - * Symbian two-phased constructor. - */ - void ConstructL(); -}; - - -#endif //__DSYEXTENSION_H__ diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/inc/dsyfactory.h --- a/systemswstubs/exampledsy/inc/dsyfactory.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* It describes the CDosFactoryExample class -* -*/ - - -#ifndef __DSYFACTORY_H__ -#define __DSYFACTORY_H__ - -#include "DosFactoryBase.h" - -/** -* Plug-in class that implements the MDosFactoryBaseDSY class and -* creates all the other plug-in services. -*/ -class CDosFactoryExample : public CDosFactoryBase -{ -public: - /** - * NewL function that creates the object. - * @return The newly created object. - */ - static CDosFactoryExample* NewL(); - - //====================================================== - // See MDosFactoryBaseDSY class for a description of - // the following functions. - //====================================================== - - CDosSysUtilsBase* NewSysUtilsServiceL(); - CDosHelperBase* NewHelperServiceL(); - CDosMtcBase* NewMtcServiceL(); - CDosSelfTestBase* NewSelfTestServiceL(); - - CDosSaeBase* NewSaeServiceL(); - - CDosExtensionBase* NewExtensionServiceL(); - -private: - /** - * Symbian two-phased constructor. - */ - void ConstructL(); -}; - -#endif //__DSYFACTORY_H__ diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/inc/dsyhelper.h --- a/systemswstubs/exampledsy/inc/dsyhelper.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* It describes the CDosHelperExample class -* -*/ - - -#ifndef __DSYHELPER_H__ -#define __DSYHELPER_H__ - -#include "DosHelperBase.h" - -/** -* Plug-in class that implements the MDosHelperBaseDSY class and -* satisfies the RDosHelper requests from the clients. -*/ -class CDosHelperExample : public CDosHelperBase -{ -public: - /** - * NewL function that creates the object. - * @return The newly created object. - */ - static CDosHelperExample* NewL(); - - //====================================================== - // See MDosHelperBaseDSY class for a description of - // the following functions. - //====================================================== - TInt GetStartupReasonL(TInt& aReason); - TInt GetSWStartupReasonL(TInt16& aReason); - TInt SetSWStartupReasonL(TInt16 aReason); - TBool HiddenResetL(); - TInt GetRTCStatusL(TBool& aStatus); - TInt GenerateGripEventL(); - -private: - /** - * Symbian two-phased constructor. - */ - void ConstructL(); -}; - -#endif //__DSYHELPER_H__ diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/inc/dsymtc.h --- a/systemswstubs/exampledsy/inc/dsymtc.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* It describes the CDosMtcExample class -* -*/ - - -#ifndef __DSYMTC_H__ -#define __DSYMTC_H__ - -#include "DosMtcBase.h" - -/** -* Plug-in class that implements the MDosMtcBaseDSY class and -* satisfies the RDosMtc requests from the clients. -*/ -class CDosMtcExample : public CDosMtcBase -{ -public: - /** - * NewL function that creates the object. - * @return The newly created object. - */ - static CDosMtcExample* NewL(); - - //====================================================== - // See MDosMtcBaseDSY class for a description of - // the following functions. - //====================================================== - TInt PowerOnL(); - TInt PowerOffL(); - TInt DosSyncL(); - TInt ResetGenerateL(); - TInt SetStateL(const TInt aStateType); - - TInt SetStateFlagL(const TDosStateFlag aFlag); - TInt GetStateFlagL(TDosStateFlag& aFlag); - -private: - /** - * Symbian two-phased constructor. - */ - void ConstructL(); -}; - -#endif //__DSYMTC_H__ diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/inc/dsysae.h --- a/systemswstubs/exampledsy/inc/dsysae.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* It describes the CDosSaeExample class -* -*/ - - -#ifndef __DSYSAE_H__ -#define __DSYSAE_H__ - -#include "DosSaeBase.h" - -//Class for the SAE Service - -/** -* Plug-in class that implements the MDosSaeBaseDSY class and -* satisfies the RDosSae requests from the clients. -*/ -class CDosSaeExample : public CDosSaeBase -{ -public: - /** - * NewL function that creates the object. - * @return The newly created object. - */ - static CDosSaeExample* NewL(); - - //====================================================== - // See MDosSaeBaseDSY class for a description of - // the following function. - //====================================================== - TInt StartSaeL(); - -private: - /** - * Symbian two-phased constructor. - */ - void ConstructL(); -}; - - -#endif //__DSYSAE_H__ diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/inc/dsyselftest.h --- a/systemswstubs/exampledsy/inc/dsyselftest.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* It describes the CDosSelfTestExample class -* -*/ - - -#ifndef __DSYSELFTEST_H__ -#define __DSYSELFTEST_H__ - -#include "DosSelfTestBase.h" - - -/** -* Plug-in class that implements the MDosSelfTestBaseDSY class and -* satisfies the RDosSelftTest requests from the clients. -*/ -class CDosSelfTestExample : public CDosSelfTestBase -{ -public: - /** - * NewL function that creates the object. - * @return The newly created object. - */ - static CDosSelfTestExample* NewL(); - - //====================================================== - // See MDosSelfTestBaseDSY class for a description of - // the following function. - //====================================================== - TInt PerformSelfTestL(); - -private: - /** - * Symbian two-phased constructor. - */ - void ConstructL(); -}; - - - -#endif //__DSYSELFTEST_H__ diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/inc/dsysysutils.h --- a/systemswstubs/exampledsy/inc/dsysysutils.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* It describes the CDosSysUtilsExample class -* -*/ - - -#ifndef __DSYSYSUTILS_H__ -#define __DSYSYSUTILS_H__ - -#include "DosSysUtilsBase.h" - -/** -* Plug-in class that implements the MDosSysUtilsBaseDSY class and -* satisfies the RDosSysUtils requests from the clients. -*/ -class CDosSysUtilsExample : public CDosSysUtilsBase -{ -public: - /** - * NewL function that creates the object. - * @return The newly created object. - */ - static CDosSysUtilsExample* NewL(); - - //====================================================== - // See MDosSysUtilsBaseDSY class for a description of - // the following functions. - //====================================================== - TInt GetSimLanguageL(TInt& aSimLanguage); - void PerformDosRfsL(TUint aReason, const RMessagePtr2 aMessage); - TInt SetDosAlarmL(TTime* aAlarmTime); - -private: - /** - * Symbian two-phased constructor. - */ - void ConstructL(); -}; - -#endif //__DSYSYSUTILS_H__ diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/rom/exampledsy.iby --- a/systemswstubs/exampledsy/rom/exampledsy.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef __ExampleDsy_IBY__ -#define __ExampleDsy_IBY__ - -#ifndef __COMMON_DSY - -file=ABI_DIR\BUILD_DIR\ExampleDsy.dsy SHARED_LIB_DIR\ExampleDsy.dsy - -data=ZPRIVATE\101f6efa\DosServer.ini \private\101f6efa\dosserver.ini - -#endif - -#endif - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/src/dsyextension.cpp --- a/systemswstubs/exampledsy/src/dsyextension.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* It implements the class CDosExtensionExample. -* -*/ - - -#include "DsyExtension.h" -#include "DsyDebug.h" - -// -// --------------------------------------------------------- -// CDosExtensionExample::NewL -// --------------------------------------------------------- -// -CDosExtensionExample* CDosExtensionExample::NewL() -{ - FLOG(_L("CDosExtensionExample::NewL()")); - - CDosExtensionExample* result = new (ELeave) CDosExtensionExample; - - CleanupStack::PushL(result); - result->ConstructL(); - CleanupStack::Pop(); - - return result; -} - -// -// --------------------------------------------------------- -// CDosExtensionExample::ConstructL -// --------------------------------------------------------- -// -void CDosExtensionExample::ConstructL() -{ - FLOG(_L("CDosExtensionExample::ConstructL()")); -} - - -// -// --------------------------------------------------------- -// CDosExtensionExample::CallFunctionL -// --------------------------------------------------------- -// -TInt CDosExtensionExample::CallFunctionL(TInt /*aFunc*/ , TAny* /*aParameter*/ , TInt /*aParLength*/, TBool& /*aParameterModified*/) -{ - FLOG(_L("CDosExtensionExample::CallFunctionL()")); - - return KErrNone; -} - - -// -// --------------------------------------------------------- -// CDosExtensionExample::CallFunctionAndCompleteL -// --------------------------------------------------------- -// -void CDosExtensionExample::CallFunctionAndCompleteL(TInt /*aFunc*/ , TAny* /*aParameter*/ , TInt /*aParLength*/, const RMessage2& aMessage) -{ - FLOG(_L("CDosExtensionExample::CallFunctionAndCompleteL()")); - - CompleteRequest(aMessage,KErrNone); -} diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/src/dsyfactory.cpp --- a/systemswstubs/exampledsy/src/dsyfactory.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,141 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* It implements the class CDosFactoryExample. -* -*/ - - -#include "DsySysUtils.h" -#include "DsyHelper.h" -#include "DsyMtc.h" -#include "DsySelfTest.h" - -#include "DsySae.h" - -#include "DsyExtension.h" -#include "DsyFactory.h" -#include "DsyDebug.h" -// -// --------------------------------------------------------- -// CDosFactoryExample::NewL -// --------------------------------------------------------- -// -CDosFactoryExample* CDosFactoryExample::NewL() -{ - FLOG(_L("CDosFactoryExample::NewL()")); - - CDosFactoryExample* result = new (ELeave) CDosFactoryExample; - - CleanupStack::PushL(result); - result->ConstructL(); - CleanupStack::Pop(); - - return result; -} - -// -// --------------------------------------------------------- -// CDosFactoryExample::ConstructL -// --------------------------------------------------------- -// -void CDosFactoryExample::ConstructL() -{ - FLOG(_L("CDosFactoryExample::ConstructL()")); -} - - -// -// --------------------------------------------------------- -// CDosFactoryExample::NewSysUtilsServiceL -// --------------------------------------------------------- -// -CDosSysUtilsBase* CDosFactoryExample::NewSysUtilsServiceL() -{ - FLOG(_L("CDosFactoryExample::NewSysUtilsServiceL()")); - - return CDosSysUtilsExample::NewL(); -} - -// -// --------------------------------------------------------- -// CDosFactoryExample::NewHelperServiceL -// --------------------------------------------------------- -// -CDosHelperBase* CDosFactoryExample::NewHelperServiceL() -{ - FLOG(_L("CDosFactoryExample::NewHelperServiceL()")); - - return CDosHelperExample::NewL(); -} - -// -// --------------------------------------------------------- -// CDosFactoryExample::NewMtcServiceL -// --------------------------------------------------------- -// -CDosMtcBase* CDosFactoryExample::NewMtcServiceL() -{ - FLOG(_L("CDosFactoryExample::NewMtcServiceL()")); - - return CDosMtcExample::NewL(); -} - -// -// --------------------------------------------------------- -// CDosFactoryExample::NewSelfTestServiceL -// --------------------------------------------------------- -// -CDosSelfTestBase* CDosFactoryExample::NewSelfTestServiceL() -{ - FLOG(_L("CDosFactoryExample::NewSelfTestServiceL()")); - - return CDosSelfTestExample::NewL(); -} - -// -// --------------------------------------------------------- -// CDosFactoryExample::NewSaeServiceL -// --------------------------------------------------------- -// -CDosSaeBase* CDosFactoryExample::NewSaeServiceL() -{ - FLOG(_L("CDosFactoryExample::NewSaeServiceL()")); - - return CDosSaeExample::NewL(); -} - -// -// --------------------------------------------------------- -// CDosFactoryExample::NewExtensionServiceL -// --------------------------------------------------------- -// -CDosExtensionBase* CDosFactoryExample::NewExtensionServiceL() -{ - FLOG(_L("CDosFactoryExample::NewExtensionServiceL()")); - - return CDosExtensionExample::NewL(); -} - -// -// --------------------------------------------------------- -// Polymorphic Dll Entry Point -// --------------------------------------------------------- -// -EXPORT_C CDosFactoryBase* LibEntryL() -{ - FLOG(_L("CDosFactoryExample::LibEntryL()")); - - return CDosFactoryExample::NewL(); -} diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/src/dsyhelper.cpp --- a/systemswstubs/exampledsy/src/dsyhelper.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,154 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* It implements the class CDosHelperExample. -* -*/ - - -#include "DsyHelper.h" -#include "DsyDebug.h" - -// -// --------------------------------------------------------- -// CDosHelperExample::NewL -// --------------------------------------------------------- -// -CDosHelperExample* CDosHelperExample::NewL() -{ - FLOG(_L("CDosHelperExample::NewL()")); - - CDosHelperExample* result = new (ELeave) CDosHelperExample; - - CleanupStack::PushL(result); - result->ConstructL(); - CleanupStack::Pop(); - - return result; -} - -// -// --------------------------------------------------------- -// CDosHelperExample::ConstructL -// --------------------------------------------------------- -// -void CDosHelperExample::ConstructL() -{ - FLOG(_L("CDosHelperExample::ConstructL()")); -} - -// -// --------------------------------------------------------- -// CDosHelperExample::GetStartupReasonL -// --------------------------------------------------------- -// -TInt CDosHelperExample::GetStartupReasonL(TInt& aReason) -{ - FLOG(_L("CDosHelperExample::GetStartupReasonL()")); - -/*Returns the Startup Reason from the DOS point of view. These are the values (defined in - startupreasons.h): - - ENormal - EAlarm - EMidnightAlarm - EHiddenReset - ECharger - ETest - ELocal - ESelftestFail - ENotReadFromHardware - ENotKnown -*/ - aReason = 0; //ENormal - - return KErrNone; -} - - -// -// --------------------------------------------------------- -// CDosHelperExample::GetSWStartupReasonL -// --------------------------------------------------------- -// -TInt CDosHelperExample::GetSWStartupReasonL(TInt16& aReason) -{ - FLOG(_L("CDosHelperExample::GetSWStartupReasonL()")); - - // provide a list with the Possible Startup Reasons - - - //Retrieve from one previousily stored in SetSWStartupReason - aReason = 100; //Normal - - - return KErrNone; -} - -// -// --------------------------------------------------------- -// CDosHelperExample::SetSWStartupReasonL -// --------------------------------------------------------- -// -TInt CDosHelperExample::SetSWStartupReasonL(TInt16 /*aReason*/) -{ - FLOG(_L("CDosHelperExample::SetSWStartupReasonL()")); - - //Store the value to be got from GetSWStartupReason - - return KErrNone; -} - - -// -// --------------------------------------------------------- -// CDosHelperExample::HiddenResetL -// --------------------------------------------------------- -// -TBool CDosHelperExample::HiddenResetL() -{ - FLOG(_L("CDosHelperExample::HiddenResetL()")); - - //Checks if the last reset was hidden or not. - return EFalse; -} - - -// -// --------------------------------------------------------- -// CDosHelperExample::GetRTCStatusL -// --------------------------------------------------------- -// -TInt CDosHelperExample::GetRTCStatusL(TBool& aStatus) -{ - FLOG(_L("CDosHelperExample::GetRTCStatusL()")); - - // EFalse asks time and date in startup - aStatus = ETrue; - - return KErrNone; -} - - -// -// --------------------------------------------------------- -// CDosHelperExample::GenerateGripEventL -// --------------------------------------------------------- -// -TInt CDosHelperExample::GenerateGripEventL() -{ - FLOG(_L("CDosHelperExample::GenerateGripEventL()")); - - return KErrNone; -} diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/src/dsymtc.cpp --- a/systemswstubs/exampledsy/src/dsymtc.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,221 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* It implements the class CDosMtcExample. -* -*/ - - -#include "DsyMtc.h" -#include "DsyDebug.h" -#include - -_LIT( KExampleDSYMTCStateFlagFile, "KExampleDSYMTCStateFlagFile.dat"); - - -// -// --------------------------------------------------------- -// CDosMtcExample::NewL -// --------------------------------------------------------- -// -CDosMtcExample* CDosMtcExample::NewL() -{ - FLOG(_L("CDosMtcExample::NewL()")); - - CDosMtcExample* result = new (ELeave) CDosMtcExample; - - CleanupStack::PushL(result); - result->ConstructL(); - CleanupStack::Pop(); - - return result; -} - - -// -// --------------------------------------------------------- -// CDosMtcExample::ConstructL -// --------------------------------------------------------- -// -void CDosMtcExample::ConstructL() -{ - FLOG(_L("CDosMtcExample::ConstructL()")); -} - -// -// --------------------------------------------------------- -// CDosMtcExample::PowerOnL -// --------------------------------------------------------- -// -TInt CDosMtcExample::PowerOnL() -{ - FLOG(_L("CDosMtcExample::PowerOnL()")); - - return KErrNone; -} - - -// -// --------------------------------------------------------- -// CDosMtcExample::PowerOffL -// --------------------------------------------------------- -// -TInt CDosMtcExample::PowerOffL() -{ - FLOG(_L("CDosMtcExample::PowerOffL()")); - - return KErrNone; -} - - -// -// --------------------------------------------------------- -// CDosMtcExample::DosSyncL -// --------------------------------------------------------- -// -TInt CDosMtcExample::DosSyncL() -{ - FLOG(_L("CDosMtcExample::DosSyncL()")); - - return KErrNone; -} - - -// -// --------------------------------------------------------- -// CDosMtcExample::ResetGenerateL -// --------------------------------------------------------- -// -TInt CDosMtcExample::ResetGenerateL() -{ - FLOG(_L("CDosMtcExample::ResetGenerateL()")); - - return KErrNone; -} - -// -// --------------------------------------------------------- -// CDosMtcExample::SetStateL -// --------------------------------------------------------- -// -TInt CDosMtcExample::SetStateL(const TInt /*aStateType*/) -{ - FLOG(_L("CDosMtcExample::SetStateL()")); - - return KErrNone; -} - -// -// --------------------------------------------------------- -// CDosMtcExample::SetStateFlagL -// --------------------------------------------------------- -// - -TInt CDosMtcExample::SetStateFlagL(const TDosStateFlag aFlag) -{ - FLOG(_L("CDosMtcExample::SetStateFlagL() - Write state to disk")); - - RFs fsSession; - TInt err = fsSession.Connect(); - - if ( err == KErrNone ) - { - RFile file; - err = file.Open( fsSession, KExampleDSYMTCStateFlagFile, EFileWrite); - - if ( err == KErrNotFound) // file does not exist - create it - { - err = file.Create( fsSession, KExampleDSYMTCStateFlagFile, EFileWrite); - FLOG(_L("CDosMtcExample::SetStateFlagL() - file doesn't exist, create file")); - } - - if ( err == KErrNone ) - { - // write stateflag to disk - TBuf8<1> buf; - buf.Append((TInt8)aFlag); - err = file.Write( buf, 1); - } - - //close file - file.Close(); - } - - if ( err != KErrNone) // file does not exist or read fails - aFlag is EDosOfflineStateFlagFalse and return - { - FLOG(_L("CDosMtcExample::SetStateFlagL() - flag value write fails")); - } - - //close session - fsSession.Close(); - - return KErrNone; -} - - -// -// --------------------------------------------------------- -// CDosMtcExample::GetStateFlagL -// -// --------------------------------------------------------- -// - - -TInt CDosMtcExample::GetStateFlagL(TDosStateFlag& aFlag) -{ - FLOG(_L("CDosMtcExample::GetStateFlagL() - Read state from disk")); - - // set default value - aFlag = EDosOfflineStateFlagFalse; - - RFs fsSession; - TInt err = fsSession.Connect(); - - if ( err == KErrNone ) - { - RFile file; - err = file.Open( fsSession, KExampleDSYMTCStateFlagFile, EFileRead); - - if ( err == KErrNone ) - { - // read stateflag status from disk - TBuf8<1> buf(1); - err = file.Read( buf, 1); - if ( err == KErrNone && buf.Size() > 0) - { - if ( buf[0] == (TInt8)EDosOfflineStateFlagTrue ) - { - aFlag = EDosOfflineStateFlagTrue; - } - } - } - - //close file - file.Close(); - } - - - if ( err != KErrNone) // file does not exist or read fails - aFlag is EDosOfflineStateFlagFalse and return - { - FLOG(_L("CDosMtcExample::GetStateFlagL() - file read fails, default value EDosOfflineStateFlagFalse returned")); - } - - - // close session - fsSession.Close(); - - return KErrNone; -} - - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/src/dsysae.cpp --- a/systemswstubs/exampledsy/src/dsysae.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* It implements the class CDosSaeExample. -* -*/ - - -#include -#include "DosEventManager.h" -#include "DsySae.h" -#include "DsyDebug.h" - -// -// --------------------------------------------------------- -// CDosSaeExample::NewL -// --------------------------------------------------------- -// -CDosSaeExample* CDosSaeExample::NewL() -{ - FLOG(_L("CDosSaeExample::NewL()")); - - CDosSaeExample* result = new (ELeave) CDosSaeExample; - - CleanupStack::PushL(result); - result->ConstructL(); - CleanupStack::Pop(); - - return result; -} - - -// -// --------------------------------------------------------- -// CDosSaeExample::ConstructL -// --------------------------------------------------------- -// -void CDosSaeExample::ConstructL() -{ - FLOG(_L("CDosSaeExample::ConstructL()")); -} - - -// -// --------------------------------------------------------- -// CDosSaeExample::StartSaeL -// --------------------------------------------------------- -// -TInt CDosSaeExample::StartSaeL() -{ - FLOG(_L("CDosSaeExample::StartSaeL()")); - - EventManager()->PhonePowerOn(); - EventManager()->SimState(ESimStateOk); - EventManager()->SecurityCode(EPSSecurityCodeNotRequired); - EventManager()->SimPresentStateChangedL(ESimPresentTrue); - - return KErrNone; -} - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/src/dsyselftest.cpp --- a/systemswstubs/exampledsy/src/dsyselftest.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* It implements the class CDosSelfTestExample. -* -*/ - - -#include "DsySelfTest.h" -#include "DosEventManager.h" -#include "DsyDebug.h" - -// -// --------------------------------------------------------- -// CDosSelfTestExample::NewL -// --------------------------------------------------------- -// -CDosSelfTestExample* CDosSelfTestExample::NewL() -{ - FLOG(_L("CDosSelfTestExample::NewL()")); - - CDosSelfTestExample* result = new (ELeave) CDosSelfTestExample; - - CleanupStack::PushL(result); - result->ConstructL(); - CleanupStack::Pop(); - - return result; -} - - -// -// --------------------------------------------------------- -// CDosSelfTestExample::ConstructL -// --------------------------------------------------------- -// -void CDosSelfTestExample::ConstructL() -{ - FLOG(_L("CDosSelfTestExample::ConstructL()")); -} - - -// -// --------------------------------------------------------- -// CDosSelfTestExample::PerformSelfTestL -// --------------------------------------------------------- -// -TInt CDosSelfTestExample::PerformSelfTestL() -{ - FLOG(_L("CDosSelfTestExample::PerformSelfTestL()")); - EventManager()->NotifySelfTestStatus(3); //EStartupSTOk = 3 - return KErrNone; -} diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/exampledsy/src/dsysysutils.cpp --- a/systemswstubs/exampledsy/src/dsysysutils.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* It implements the class CDosSysUtilsExample. -* -*/ - - -#include "DsySysUtils.h" -#include "DsyDebug.h" - -// -// --------------------------------------------------------- -// CDosSysUtilsExample::NewL -// --------------------------------------------------------- -// -CDosSysUtilsExample* CDosSysUtilsExample::NewL() -{ - FLOG(_L("CDosSysUtilsExample::NewL()")); - - CDosSysUtilsExample* result = new (ELeave) CDosSysUtilsExample; - - CleanupStack::PushL(result); - result->ConstructL(); - CleanupStack::Pop(); - - return result; -} - - -// -// --------------------------------------------------------- -// CDosSysUtilsExample::ConstructL -// --------------------------------------------------------- -// -void CDosSysUtilsExample::ConstructL() -{ - FLOG(_L("CDosSysUtilsExample::ConstructL()")); -} - -// -// --------------------------------------------------------- -// CDosSysUtilsExample::GetSimLanguageL -// --------------------------------------------------------- -// -TInt CDosSysUtilsExample::GetSimLanguageL(TInt& aSimLanguage) -{ - FLOG(_L("CDosSysUtilsExample::GetSimLanguageL()")); - - //Checks the default language in the SIM card and returns it. - - aSimLanguage = 1; - - return KErrNone; -} - -// -// --------------------------------------------------------- -// CDosSysUtilsExample::PerformDosRfsL -// --------------------------------------------------------- -// -void CDosSysUtilsExample::PerformDosRfsL(TUint /*aReason*/, const RMessagePtr2 aMessage) -{ - FLOG(_L("CDosSysUtilsExample::PerformDosRfsL()")); - - RequestComplete(aMessage,KErrNone); -} - - -// -// --------------------------------------------------------- -// CDosSysUtilsExample::SetDosAlarmL -// --------------------------------------------------------- -// -TInt CDosSysUtilsExample::SetDosAlarmL(TTime* /*aAlarmTime*/) -{ - FLOG(_L("CDosSysUtilsExample::SetDosAlarmL()")); - - return KErrNone; -} - - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/featuremanagerstub/data/10205058.rss --- a/systemswstubs/featuremanagerstub/data/10205058.rss Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Feature Manager stub plugin ECom resource file -* -*/ - - -#include "ecom/registryinfov2.rh" - -// Declares info for one implementations - -RESOURCE REGISTRY_INFO featmgrstubplugin_registry_info - { - // UID for the DLL. See FeatMgrStubPlugin.mmp - resource_format_version = RESOURCE_FORMAT_VERSION_2; - dll_uid = 0x10205058; - interfaces = - { - INTERFACE_INFO - { - // UID of interface that is implemented - interface_uid = 0x10205057; - implementations = - { - IMPLEMENTATION_INFO - { - implementation_uid = 0x10205059; - version_no = 1; - display_name = ""; - default_data = ""; - opaque_data = ""; - rom_only = 1; - } - }; - } - }; - } \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/featuremanagerstub/group/bld.inf --- a/systemswstubs/featuremanagerstub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Feature Manager stub plugin bld file -* -*/ - - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS -../rom/featmgrstubplugin.iby CORE_IBY_EXPORT_PATH(stubs,featmgrstubplugin.iby) - -PRJ_MMPFILES -../group/featmgrstubplugin.mmp - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/featuremanagerstub/group/featmgrstubplugin.mmp --- a/systemswstubs/featuremanagerstub/group/featmgrstubplugin.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Feature Manager stub plugin Project definition file -* -*/ - - -#include - -TARGET FeatMgrStubPlugin.dll -TARGETTYPE PLUGIN - -UID 0x10009D8D 0x10205058 - -VENDORID VID_DEFAULT - -CAPABILITY CAP_ECOM_PLUGIN - -SOURCEPATH ../src -SOURCE proxy.cpp -SOURCE featmgrplugin.cpp -SOURCE plugintimer.cpp - -START RESOURCE ../data/10205058.rss - #ifdef SYMBIAN_SECURE_ECOM - TARGET FeatMgrStubPlugin.rsc - #endif -END - -USERINCLUDE ../inc -OS_LAYER_SYSTEMINCLUDE - -LIBRARY euser.lib -LIBRARY ecom.lib - -LANG SC - -// Trace macros -//MACRO API_TRACE_FLAG // Uncomment during testing to get API traces. -//MACRO COMPONENT_TRACE_FLAG // Uncomment during testing to get COMPONENT traces. diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/featuremanagerstub/inc/featmgrplugin.h --- a/systemswstubs/featuremanagerstub/inc/featmgrplugin.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Feature Manger stub plugin header -* -*/ - - -#ifndef __FEATMGRPLUGIN_H_ -#define __FEATMGRPLUGIN_H_ - -#include -#include "plugintimer.h" - - -class CFeatMgrPlugin : public CFeatureInfoPlugin, - public MPluginTimerCallback - { - public: - - static CFeatMgrPlugin* NewL(); - virtual ~CFeatMgrPlugin(); - - /** - * Method to invoke a particular command in the plugin - * @param aCommandId Command ID - * @param aTransId Transaction ID - * @param aData Data associated with command - */ - virtual void ProcessCommandL( const FeatureInfoCommand::TFeatureInfoCmd aCommandId, - const TUint8 aTransId, - TDesC8& aData ); - - // From MPluginTimerCallback - void GenericTimerFiredL( MFeatureInfoPluginCallback& aService, - const FeatureInfoCommand::TFeatureInfoCmd aCommandId, - const TUint8 aTransId, - TInt aRetVal ); - private: // Construction - - CFeatMgrPlugin(); - void ConstructL(); - - // RPointerArray iTimers; - CPluginTimer* iTimer; - - }; - -#endif // __FEATMGRPLUGIN_H_ \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/featuremanagerstub/inc/plugintimer.h --- a/systemswstubs/featuremanagerstub/inc/plugintimer.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Feature Manager stub plugin timer definition -* -*/ - - - -#ifndef __PLUGINTIMER_H_ -#define __PLUGINTIMER_H_ - -#include - -/** -* An interface for handling timer expiration events. -*/ -class MPluginTimerCallback - { - public: - /** - * Called when the timer fires - */ - virtual void GenericTimerFiredL( MFeatureInfoPluginCallback& aService, - FeatureInfoCommand::TFeatureInfoCmd aCommandId, - TUint8 aTransId, - TInt aRetVal ) = 0; - }; - - -class CPluginTimer : public CTimer - { - public: - CPluginTimer( TInt aPriority, - MFeatureInfoPluginCallback& aService, - FeatureInfoCommand::TFeatureInfoCmd aCommandId, - TUint8 aTransId, - TInt aRetVal, - MPluginTimerCallback* aCallback ); - - ~CPluginTimer(); - - CPluginTimer(TInt aPriority); - - static CPluginTimer* NewL( const TTimeIntervalMicroSeconds32& anInterval, - MFeatureInfoPluginCallback& aService, - FeatureInfoCommand::TFeatureInfoCmd aCommandId, - TUint8 aTransId, - TInt aRetVal, - MPluginTimerCallback* aCallback ); - - void ConstructL(); - - void RunL(); - - inline TUint8 TransId() const - { - return iTransId; - }; - - private: - - MFeatureInfoPluginCallback& iService; // Not owned - - FeatureInfoCommand::TFeatureInfoCmd iCommandId; - TUint8 iTransId; - TInt iRetVal; - - MPluginTimerCallback* iCallback; // Not owned - - }; - - -#endif // __PLUGINTIMER_H_ \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/featuremanagerstub/inc/trace.h --- a/systemswstubs/featuremanagerstub/inc/trace.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This is debug macro definition file for Feature Manager -* -*/ - - -#ifndef TRACE_H -#define TRACE_H - -// INCLUDES -#include - -// PC-LINT OPTIONS -// Removes null statement not in line by itself warnings from -// COMPONENT_TRACE macros -//lint -esym(960,54) - -// Removes "area too small" pointer cast warnings. -//lint -e826 - - - -// CONSTANTS -// MACROS -#ifdef _DEBUG - - #ifdef COMPONENT_TRACE_FLAG - - #define COMPONENT_TRACE( a ) RDebug::Print a - - #else // #ifdef COMPONENT_TRACE_FLAG - - #define COMPONENT_TRACE( a ) - - #endif //#ifdef COMPONENT_TRACE_FLAG - - #ifdef API_TRACE_FLAG - - #define API_TRACE( a ) RDebug::Print a - - #else //#ifdef API_TRACE_FLAG - - #define API_TRACE( a ) - - #endif //#ifdef API_TRACE_FLAG - -#else // #ifdef _DEBUG - - #define COMPONENT_TRACE( a ) - #define API_TRACE( a ) - -#endif //#ifdef _DEBUG - - -// DATA TYPES -// FUNCTION PROTOTYPES -// FORWARD DECLARATIONS - -#endif //#ifndef TRACE_H - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/featuremanagerstub/rom/featmgrstubplugin.iby --- a/systemswstubs/featuremanagerstub/rom/featmgrstubplugin.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: FeatMgrStubPlugin provide dummy implementation for emulator -* environment to be used instead of proper FeatMgr plugin. -* -*/ - - -#ifndef __FEATMGRSTUBPLUGIN_IBY__ -#define __FEATMGRSTUBPLUGIN_IBY__ - -ECOM_PLUGIN( FeatMgrStubPlugin.dll , FeatMgrStubPlugin.rsc ) - -#endif // __FEATMGRSTUBPLUGIN_IBY__ - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/featuremanagerstub/src/featmgrplugin.cpp --- a/systemswstubs/featuremanagerstub/src/featmgrplugin.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,196 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Feature Manager stub plugin -* implementation. -* -*/ - - -#include "featmgrplugin.h" -#include -#include "trace.h" - -CFeatMgrPlugin* CFeatMgrPlugin::NewL() - { - CFeatMgrPlugin* self = new(ELeave) CFeatMgrPlugin(); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -CFeatMgrPlugin::~CFeatMgrPlugin() - { - if ( iTimer ) - { - delete iTimer; - iTimer = NULL; - } - } - -CFeatMgrPlugin::CFeatMgrPlugin() - { - } - -void CFeatMgrPlugin::ConstructL() - { - } - - -void CFeatMgrPlugin::ProcessCommandL( const FeatureInfoCommand::TFeatureInfoCmd aCommandId, - const TUint8 aTransId, - TDesC8& /*aData*/ ) - { - COMPONENT_TRACE((_L("FeatMgrPlugin: Processing command: 0x%x, TransId: 0x%x"), - aCommandId, aTransId)); - - switch ( aCommandId ) - { - case FeatureInfoCommand::ELoadFeatureInfoCmdId: - { - COMPONENT_TRACE(_L("FeatMgrPlugin: Processed ELoadFeatureInfoCmdId")); - // Load feature info - } - break; - default : - { - COMPONENT_TRACE((_L("FeatMgrPlugin: Unknown Command: 0x%x"), aCommandId)); - } - break; - } - - TInt retval(KErrNone); - TInt timeout( 1000 ); // microseconds - - // create new timer - - - iTimer = CPluginTimer::NewL(timeout, *iResponseCallback, aCommandId, aTransId, retval,this); - } - -void CFeatMgrPlugin::GenericTimerFiredL( - MFeatureInfoPluginCallback& aService, - FeatureInfoCommand::TFeatureInfoCmd aCommandId, - TUint8 aTransId, - TInt /*aRetVal*/) - { - COMPONENT_TRACE((_L("FeatMgr Plugin: GenericTimerFiredL (0x%x, 0x%x)"), - aCommandId, aTransId)); - - //__ASSERT_ALWAYS(!(&aService), User::Invariant() ); - - RArray* list = - new(ELeave) RArray(1); - - FeatureInfoCommand::TFeatureInfo featureList; - TInt err( KErrNone ); - - // - // TEST CASES - // - - /***/ - // For testing, case 1. - // Returns empty list and KErrNone. - - featureList.iErrorCode = KErrNone; - featureList.iList = *list; - - FeatureInfoCommand::TFeatureInfoRespPckg resPackage(featureList); - - TRAP(err, aService.ProcessResponseL(aCommandId, aTransId, resPackage)); - /***/ - - /*** - // For testing, case 2. - // Returns one feature and KErrNone. - - FeatureInfoCommand::TFeature feature1; - feature1.iFeatureID = KFeatureIdBt; - feature1.iValue = ETrue; - - list->Append(feature1); - - featureList.iErrorCode = KErrNone; - featureList.iList = *list; - - FeatureInfoCommand::TFeatureInfoRespPckg resPackage(featureList); - - TRAP(err, aService.ProcessResponseL(aCommandId, aTransId, resPackage)); - ***/ - - /*** - // For testing, case 3. - // Returns three features and KErrNone - - FeatureInfoCommand::TFeature feature1; - FeatureInfoCommand::TFeature feature2; - FeatureInfoCommand::TFeature feature3; - - feature1.iFeatureID = KFeatureIdBt; - feature1.iValue = EFalse; - - feature1.iFeatureID = KFeatureIdIrda; - feature1.iValue = ETrue; - - feature1.iFeatureID = KFeatureIdProtocolWlan; - feature1.iValue = EFalse; - - list->Append(feature1); - list->Append(feature2); - list->Append(feature3); - - featureList.iErrorCode = KErrNone; - featureList.iList = *list; - - FeatureInfoCommand::TFeatureInfoRespPckg resPackage(featureList); - - TRAP(err, aService.ProcessResponseL(aCommandId, aTransId, resPackage)); - ***/ - - /*** - // For testing, case 4. - // Returns empty list and KErrArgument. - - featureList.iErrorCode = KErrArgument; - featureList.iList = *list; - - FeatureInfoCommand::TFeatureInfoRespPckg resPackage(featureList); - - TRAP(err, aService.ProcessResponseL(aCommandId, aTransId, resPackage)); - ***/ - - /*** - // For testing, case 5. - // ProcessResponseL never called. - ***/ - - list->Reset(); - delete list; - - // TEST CASES END - - if ( err != KErrNone ) - { - COMPONENT_TRACE((_L("FeatMgr Plugin: Error in ProcessResponseL: %d"), err)); - } - - if ( iTimer && !iTimer->IsActive() ) - { - delete iTimer; - iTimer = NULL; - COMPONENT_TRACE((_L("FeatMgr Plugin: GenericTimerFiredL - Removed obsolete timer"))); - } - } - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/featuremanagerstub/src/plugintimer.cpp --- a/systemswstubs/featuremanagerstub/src/plugintimer.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Feature Manager stub plugin timer implementation -* -*/ - - -#include "plugintimer.h" -#include -#include "trace.h" - -CPluginTimer* CPluginTimer::NewL( const TTimeIntervalMicroSeconds32& anInterval, - MFeatureInfoPluginCallback& aService, - FeatureInfoCommand::TFeatureInfoCmd aCommandId, - TUint8 aTransId, - TInt aRetVal, - MPluginTimerCallback* aCallback ) - { - CPluginTimer* self = new( ELeave ) CPluginTimer(0, aService, aCommandId, - aTransId, aRetVal, aCallback); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - - CActiveScheduler::Add(self); - - COMPONENT_TRACE((_L("FeatMgr Plugin - CPluginTimer::NewL - Setting timer: %d"), anInterval)); - - self->After(anInterval); - - return self; - } - -CPluginTimer::~CPluginTimer() - { - // PCLint demands - iCallback = NULL; - } - -CPluginTimer::CPluginTimer( TInt aPriority, - MFeatureInfoPluginCallback& aService, - FeatureInfoCommand::TFeatureInfoCmd aCommandId, - TUint8 aTransId, - TInt aRetVal, - MPluginTimerCallback* aCallback ) - : CTimer(aPriority), - iService(aService), - iCommandId(aCommandId), - iTransId(aTransId), - iRetVal(aRetVal), - iCallback(aCallback) - { - } - -void CPluginTimer::ConstructL() - { - CTimer::ConstructL(); - } - - -void CPluginTimer::RunL( ) - { - iCallback->GenericTimerFiredL(iService, iCommandId, iTransId, iRetVal ); - - } - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/featuremanagerstub/src/proxy.cpp --- a/systemswstubs/featuremanagerstub/src/proxy.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Feature Manager stub plugin proxy definition file -* -*/ - - -#include -#include - -#include "featmgrplugin.h" - -// Map the interface implementation UIDs to implementation factory functions -const TImplementationProxy ImplementationTable[] = - { - IMPLEMENTATION_PROXY_ENTRY(0x10205059, CFeatMgrPlugin::NewL), - }; - -// Exported proxy for instantiation method resolution. -EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount ) - { - aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); - return ImplementationTable; - } diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/group/bld.inf --- a/systemswstubs/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used as an reference implementation -* -*/ - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -#include "../ddcaccessstub/group/bld.inf" -#include "../TVOutConfig/group/bld.inf" -#include "../accessorypolicyreference/group/bld.inf" -#include "../asyreference/group/bld.inf" -#include "../examplecommonisc/group/bld.inf" -#include "../exampledsy/group/bld.inf" -#include "../featuremanagerstub/group/bld.inf" -#include "../hwrmstubplugins/group/bld.inf" -#include "../hwrmhapticsstubplugin/group/bld.inf" -#include "../sensorchannelsreference/group/bld.inf" -#include "../ssyreference/group/bld.inf" -#include "../startupadaptationstub/group/bld.inf" -#include "../tiltcompensationstub/group/bld.inf" -#include "../tvoutbehaviour/group/bld.inf" -#include "../wiredbearerreference/group/bld.inf" - -PRJ_TESTMMPFILES - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmhapticsstubplugin/data/2001CB6D.rss --- a/systemswstubs/hwrmhapticsstubplugin/data/2001CB6D.rss Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Haptics (adaptation) stub plugin ECom resource file -* -*/ - - -#include "registryinfov2.rh" - -// Declares info for implementations -RESOURCE REGISTRY_INFO SA_HAPTICS_ADAPTATION - { - resource_format_version = RESOURCE_FORMAT_VERSION_2; - dll_uid = 0x2001CB6D; // Haptics adaptation DLL UID - interfaces = - { - INTERFACE_INFO - { - interface_uid = 0x2001CBE4; // KCHWRMHapticsPluginServiceInterfaceUid - implementations = - { - // Haptics adaptation implementation - IMPLEMENTATION_INFO - { - implementation_uid = 0x2001CB6E; // Haptics Adaptation Plugin Implementation UID - version_no = 1; - display_name = "Haptics Stub plugin"; - default_data = "EHWRMLogicalActuatorAny"; - opaque_data = ""; - rom_only = 0; - } - }; - } - }; - } - -// End of File - - - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmhapticsstubplugin/group/bld.inf --- a/systemswstubs/hwrmhapticsstubplugin/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Haptics adaptation stub plugin bld file -* -*/ - - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -../group/hwrmhapticsstubplugin.mmp - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmhapticsstubplugin/group/hwrmhapticsstubplugin.mmp --- a/systemswstubs/hwrmhapticsstubplugin/group/hwrmhapticsstubplugin.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Haptics (adaptation) stub plugin project definition file -* -*/ - - -#include - -TARGET hapticsadaptation.dll -TARGETTYPE PLUGIN - -UID 0x10009D8D 0x2001CB6D - -VENDORID VID_DEFAULT - -CAPABILITY CAP_ECOM_PLUGIN - -SOURCEPATH ../src -SOURCE proxy.cpp -SOURCE hwrmhapticsstubplugin.cpp -SOURCE hwrmhapticsstubpluginidleresponder.cpp - -START RESOURCE ../data/2001CB6D.rss -TARGET hapticsadaptation.rsc -END - -USERINCLUDE ../inc - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/ecom - -LIBRARY euser.lib -LIBRARY ecom.lib -LIBRARY estor.lib -LIBRARY hwrmhapticspluginservice.lib - -LANG SC - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmhapticsstubplugin/inc/hwrmhapticsstubplugin.h --- a/systemswstubs/hwrmhapticsstubplugin/inc/hwrmhapticsstubplugin.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,137 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Haptics test (adaptation) plugin header file. -* -*/ - - -#ifndef __HWRMHAPTICSSTUBPLUGIN_H_ -#define __HWRMHAPTICSSTUBPLUGIN_H_ - -#include -#include "hwrmhapticsstubpluginidleresponder.h" - -/** - * Haptics stub plugin. - * Stub implementation of Haptics adaptation ECom plugin for clean build(s). - * - * @since Series S60 5.1 - */ -class CHWRMHapticsStubPlugin : public CHWRMHapticsPluginService - { -public: - /** - * Static method for instantiating stub plugin objects used by - * ECom framework. - * - * @aCallback Haptics plugin callback instance. - * @return Pointer to a new CHWRMHapticsStubPlugin instance. - */ - static CHWRMHapticsStubPlugin* NewL( - MHWRMHapticsPluginCallback* aCallback ); - - /** - * Destructor - */ - virtual ~CHWRMHapticsStubPlugin(); - - /** - * Method to invoke a particular command in the plugin. - * Dummy implementation of the CHWRMHapticsPluginService::ProcessCommandL - * abstract interface method. - * - * @see CHWRMHapticsPluginService - */ - virtual void ProcessCommandL( TInt aCommandId, - TUint8 aTransId, - TDesC8& aData ); - - /** - * Method to cancel a particular command. - * Dummy implementation the CHWRMHapticsPluginService::CancelCommandL - * abstract interface method. - * - * @see CHWRMHapticsPluginService - */ - virtual void CancelCommandL( TUint8 aTransId, - TInt aCommandId ); - - - /** - * The actual response generation method (called from idle responder - * object) - * - * @param aTransId Transaction Id of the command for which the response - * generation is requested. - * @param aData Pointer to the data received in command (based on - * which the command-specific response is generated). - */ - void GenerateResponseL( TUint8 aTransId, - TUint8* aData ); - - /** - * Static method that CIdle calls as callback to remove "spent" responder - * objects from their pointer array - * - * @param aObjectPtr Pointer to the CHWRMHapticsStubPlugin object that - * started the CIdle runner whose RunL calls this - * method as callback. - * @return TInt Always returns KErrNone. Required by - * CIdle( TCallBack ). - */ - static TInt CollectGarbageIdle( TAny* aObjectPtr ); - - /** - * Method that does the actual garbage collection of spent responder - * objects - */ - void CollectGarbage(); - -private: - - /** - * Constructor. - * - * @aCallback Haptics plugin callback instance. - */ - CHWRMHapticsStubPlugin( MHWRMHapticsPluginCallback* aCallback ); - - /** - * Two-phase construction ConstructL - */ - void ConstructL(); - - /** - * Method for removing a specific responder object from internal - * RPointerArray - * - * @param aTransId Transaction Id of the responder that is to be removed. - */ - void RemoveResponder( TUint8 aTransId ); - -private: // data - - /** - * Array of pointers to running idle responder objects - */ - RPointerArray iResponders; - - /** - * CIdle object through which the responders are cleaned (kind of garbage - * collection) - */ - CIdle *iIdle; - }; - -#endif // __HWRMHAPTICSSTUBPLUGIN_H_ diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmhapticsstubplugin/inc/hwrmhapticsstubpluginidleresponder.h --- a/systemswstubs/hwrmhapticsstubplugin/inc/hwrmhapticsstubpluginidleresponder.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,130 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Haptics test (adaptation) plugin idle responder header file. -* -*/ - - -#ifndef __HWRMHAPTICSSTUBPLUGINIDLERESPONDER_H_ -#define __HWRMHAPTICSSTUBPLUGINIDLERESPONDER_H_ - -#include - -class CHWRMHapticsStubPlugin; - -/** - * Haptics stub plugin idle responder. - * Class that initiates response generation after embedded - * CIdle AO gets runtime. - * - * @since Series S60 5.1 - */ -class CHWRMHapticsStubPluginIdleResponder : public CBase - { -public: - /** - * Static method for instantiating stub plugin objects used by - * ECom framework. - * - * @param aPlugin Pointer to the stub plugin object that calls - * this instantiation method. - * @param aTransId Transaction Id of the command (that is to be - * responded when the embedded CIdle object is - * scheduled to run). - * @param aDataPacket Pointer to the received command data. - * @return Pointer to a new instance of idle responder. - */ - static CHWRMHapticsStubPluginIdleResponder* NewL( - CHWRMHapticsStubPlugin* aPlugin, - TUint8 aTransId, - TUint8* aDataPacket ); - - /** - * Destructor - */ - virtual ~CHWRMHapticsStubPluginIdleResponder(); - - /** - * Response generation method (called as callback from CIdle) - * - * @param aSelf TAny pointer to the object that started the CIdle - * whose callback method this is. - * @return TInt Always returns KErrNone. Required by CIdle(TCallBack). - */ - static TInt GenerateResponse( TAny* aSelf ); - - /** - * The actual response generation method. - */ - void GenerateResponseL(); - - /** - * Getter for transId - * - * @return TUint8 The transaction Id. - */ - TUint8 TransId() const; - - /** - * Getter for 'active' state - * - * @return TBool True iff the embedded CIdle AO is currently active. - */ - TBool Active() const; - -private: - - /** - * Constructor - * - * @param aPlugin See the above NewL method. - * @param aTransId See the above NewL method. - * @param aDataPacket See the above NewL method. - */ - CHWRMHapticsStubPluginIdleResponder( - CHWRMHapticsStubPlugin* aPlugin, - TUint8 aTransId, - TUint8* aDataPacket ); - - /** - * Two-phase construction ConstructL - */ - void ConstructL(); - -private: // data - - /** - * CIdle active object (through which response generation is done) - */ - CIdle* iIdle; - - /** - * Pointer to the stub plugin object that created this idle responder - * and through which the actual response to stub client (i.e., to - * HapticsPluginManager) is sent. - */ - CHWRMHapticsStubPlugin* iPlugin; - - /** - * Transaction Id (of the received command) - */ - TUint8 iTransId; - - /** - * Pointer to raw command data (not owned) - */ - TUint8* iDataPacket; - }; - -#endif // __HWRMHAPTICSSTUBPLUGINIDLERESPONDER_H_ diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmhapticsstubplugin/src/hwrmhapticsstubplugin.cpp --- a/systemswstubs/hwrmhapticsstubplugin/src/hwrmhapticsstubplugin.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,612 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Haptics test (adaptation) plugin implementation. -* -*/ - - -#include -#include -#include "hwrmhapticsstubplugin.h" - -// --------------------------------------------------------------------------- -// Static instantiation method. -// --------------------------------------------------------------------------- -// -CHWRMHapticsStubPlugin* CHWRMHapticsStubPlugin::NewL( - MHWRMHapticsPluginCallback* aCallback ) - { - CHWRMHapticsStubPlugin* self = - new ( ELeave ) CHWRMHapticsStubPlugin( aCallback ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - return self; - } - -// --------------------------------------------------------------------------- -// Destructor -// --------------------------------------------------------------------------- -// -CHWRMHapticsStubPlugin::~CHWRMHapticsStubPlugin() - { - iResponders.ResetAndDestroy(); - - if ( iIdle ) - { - iIdle->Cancel(); - delete iIdle; - } - } - -// --------------------------------------------------------------------------- -// Implementation of ProcessCommandL. Creates an idle responder and appends it -// to the array of idle responders. (Later then, when the responder gets -// runtime, it will initiate the response generation). -// --------------------------------------------------------------------------- -// -void CHWRMHapticsStubPlugin::ProcessCommandL( TInt aCommandId, - TUint8 aTransId, - TDesC8& aData ) - { - if ( aCommandId != HWRMHapticsCommand::EHapticsCmdId || - aData.Size() < 2 ) // minimum length check - { - User::Leave( KErrBadDescriptor ); - } - - TUint8* dataPtr = const_cast( aData.Ptr() ); - - if ( !dataPtr ) - { - User::Leave( KErrBadDescriptor ); - } - - CHWRMHapticsStubPluginIdleResponder* responder = - CHWRMHapticsStubPluginIdleResponder::NewL( this, aTransId, dataPtr ); - CleanupStack::PushL( responder ); - iResponders.AppendL( responder ); - CleanupStack::Pop ( responder ); - } - -// --------------------------------------------------------------------------- -// Implementation of CancelCommandL. Just removes the corresponding idle -// responder. -// --------------------------------------------------------------------------- -// -void CHWRMHapticsStubPlugin::CancelCommandL( TUint8 aTransId, - TInt /* aCommandId */ ) - { - RemoveResponder( aTransId ); - } - - -// --------------------------------------------------------------------------- -// Method that does the actual response generation towards the issuer of -// command i.e., the HapticsPluginManager -// --------------------------------------------------------------------------- -// -void CHWRMHapticsStubPlugin::GenerateResponseL( TUint8 aTransId, - TUint8* aData ) - { - // Hardcoded responses generated based on the command code (first 2 bytes - // of the aData data packet, but since at the moment the 2nd byte is - // always 0x00, we just use the 1st one) - TUint8 command = aData[0]; - - TBuf8 binRespData; - binRespData.SetLength( KHWRMHapticsRespMaxSize ); - - TInt i( 0 ); - // For each command the response data's first two bytes are copy of - // the received command code (first 2 bytes of aData). - - binRespData[i++] = aData[0]; // command code bits 0..7 - binRespData[i++] = aData[1]; // command code bits 8..15 - - switch ( command ) - { - case 0x00: // API version query - { - // Response to API version query contains: - // 1 byte major version number - // 1 byte minor version number - // 2 bytes for build version - binRespData[i++] = 0x02; // major version - binRespData[i++] = 0x00; // minor version - binRespData[i++] = 0x53; // build version bits 0..7 - binRespData[i++] = 0x04; // build version bits 8..15 - break; - } - - case 0x01: // Initialize - case 0x02: // Terminate - case 0x06: // Modify basis effect - case 0x07: // Stop effect - case 0x08: // Stop all effects - case 0x0B: // Reset debug buffer - case 0x0C: // Stop designed bridge - case 0x13: // Close device - case 0x14: // Start designed bridge - case 0x16: // Play streaming sample - case 0x18: // Destroy streaming effect - case 0x19: // Pause playing effect - case 0x1A: // Resume playing effect - case 0x1E: // Modify magsweep effect - case 0x1F: // Modify periodic effect - { - // For these commands the response only contains status byte - // (set to 0x00 ("Success") in this stub). - binRespData[i++] = 0x00; // status - break; - } - - case 0x03: // Play basis effect - case 0x04: // Play IVT effect (with IVT data) - case 0x05: // Play IVT effect (without IVT data) - case 0x17: // Create streaming effect - case 0x1C: // Play magsweep effect - case 0x1D: // Play periodic effect - { - // The response consists of status byte (0x00) and 4-byte long - // effectHandle (here hardcoded as 0x01000000) - binRespData[i++] = 0x00; // status - binRespData[i++] = 0x01; // effectHandle bits 0..7 - binRespData[i++] = 0x00; // effectHandle bits 8..15 - binRespData[i++] = 0x00; // effectHandle bits 16..23 - binRespData[i++] = 0x00; // effectHandle bits 24..31 - break; - } - - case 0x09: // Get device capabilities - { - // The response consists of status byte (0x00), 4-byte long - // capability type (copied from the received command (bytes - // 7..10)), 1-byte capability value type (copied from the - // received command (byte 2), 1-byte size byte and "size" bytes - // long value - binRespData[i++] = 0x00; // status - binRespData[i++] = aData[7]; // capability type bits 0..7 - binRespData[i++] = aData[8]; // capability type bits 8..15 - binRespData[i++] = aData[9]; // capability type bits 16..23 - binRespData[i++] = aData[10]; // capability type bits 24..31 - binRespData[i++] = aData[2]; // capability value type - // The size and value depend on what exactly is being queried - // Note: Currently only the lowest (0..7) bytes of capability - // type have meaning, thus the switch case below is - // simplified.. - // Note: Since all values, except device name, are actually 32-bit - // integers, their size is always 4. - TUint8 capabilityType = aData[7]; - switch ( capabilityType ) - { - case 0: // device category - { - binRespData[i++] = 0x04; // size - binRespData[i++] = 0x02; - binRespData[i++] = 0x00; - binRespData[i++] = 0x00; - binRespData[i++] = 0x00; // value - virtual device - break; - } - case 1: // max nested repeats - case 2: // num of actuators - case 4: // num of effect slots - case 6: // min period - { - binRespData[i++] = 0x04; // size - binRespData[i++] = 0x01; - binRespData[i++] = 0x00; - binRespData[i++] = 0x00; - binRespData[i++] = 0x00; // value - 0x1 - break; - } - case 3: // actuator type - { - binRespData[i++] = 0x04; // size - binRespData[i++] = 0x00; - binRespData[i++] = 0x00; - binRespData[i++] = 0x00; - binRespData[i++] = 0x00; // value - ERM actuator - break; - } - case 5: // supported styles - { - binRespData[i++] = 0x04; // size - binRespData[i++] = 0x07; - binRespData[i++] = 0x00; - binRespData[i++] = 0x00; - binRespData[i++] = 0x00; // value - all styles - break; - } - case 7: // max period - case 8: // max effect duration - case 11: // max envelope time - case 13: // max IVT file size (tethered) - case 14: // max IVT file size - { - binRespData[i++] = 0x04; // size - binRespData[i++] = 0xFF; - binRespData[i++] = 0xFF; - binRespData[i++] = 0x00; // - binRespData[i++] = 0x00; // value => 0xFFFF. - break; - } - case 9: // supported effects - { - binRespData[i++] = 0x04; // size - binRespData[i++] = 0x07; - binRespData[i++] = 0x00; - binRespData[i++] = 0x00; - binRespData[i++] = 0x00; // value - mag|per|timeline - break; - } - case 10: // device name - { - binRespData[i++] = 0x04; // size - binRespData[i++] = 0x52; // value - byte 1, ascii "S" - binRespData[i++] = 0x53; // value - byte 2, ascii "T" - binRespData[i++] = 0x54; // value - byte 3, ascii "U" - binRespData[i++] = 0x42; // value - byte 4, ascoo "B" - break; - } - case 12: // API version number - { - binRespData[i++] = 0x04; // size - binRespData[i++] = 0x02; - binRespData[i++] = 0x00; - binRespData[i++] = 0x00; - binRespData[i++] = 0x00; // value - API version - // Note: same as major version in - // specific API version query - // 0x2 - break; - } - default: - { - // Here status byte changed to -6 (0xFA) - // ("incompatible capability type") - binRespData[2] = 0xFA; // status (re-assigned) - binRespData[i++] = 0x00; // value size set to zero - break; - } - } // inner switch ends - break; - } - - case 0x0A: // Get debug buffer - { - // The response consists of status byte (0x00) and 2 bytes - // indicating the buffer size followed by the buffer itself. - // Here buffer size zero is used => thus this only consists of - // 3 bytes - // FFS: This may have to be changed if the zero-length is not ok. - binRespData[i++] = 0x00; // status - binRespData[i++] = 0x00; // buffer size bits 0..7 - binRespData[i++] = 0x00; // buffer size bits 8..15 - break; - } - - case 0x0D: // Get device state - { - // The response consists of status byte (0x00) and 4 bytes that - // indicate the device state (the bytes used here mean - // "device attached to the system") - binRespData[i++] = 0x00; // status - binRespData[i++] = 0x01; // device state bits 0..7 - binRespData[i++] = 0x00; // device state bits 8..15 - binRespData[i++] = 0x00; // device state bits 16..23 - binRespData[i++] = 0x00; // device state bits 24..31 - break; - } - - case 0x0E: // Set kernel param - { - // The response consists of status byte (0x00) and 2 bytes that - // are the kernel param Id's copied from the received command - // (bytes 6 and 7) - binRespData[i++] = 0x00; // status - binRespData[i++] = aData[6]; // kernel param Id bits 0..7 - binRespData[i++] = aData[7]; // kernel param Id bits 8..15 - break; - } - - case 0x0F: // Get kernel param - { - // The response consists of status byte (0x00), 2 bytes that are - // the kernel param Id's copied from the received command - // (bytes 6&7) and two bytes for (here dummy 0x00) values - binRespData[i++] = 0x00; // status - binRespData[i++] = aData[6]; // kernel param Id bits 0..7 - binRespData[i++] = aData[7]; // kernel param Id bits 8..15 - binRespData[i++] = 0x00; // kernel param value bits 0..7 - binRespData[i++] = 0x00; // kernel param value bits 8..15 - break; - } - - case 0x10: // Set device property - { - // The response consists of status byte (0x00), 4 bytes indicating - // the property type (copied from the received command's bytes - // 6..9) and 1 byte indicating the property value type (copied - // from the received command's byte 10). - binRespData[i++] = 0x00; // status - binRespData[i++] = aData[6]; // property type bits 0..7 - binRespData[i++] = aData[7]; // property type bits 8..15 - binRespData[i++] = aData[8]; // property type bits 16..23 - binRespData[i++] = aData[9]; // property type bits 24..31 - binRespData[i++] = aData[10]; // property value type - break; - } - - case 0x11: // Get device property - { - // The response consists of 1-byte status (0x00), 4-byte long - // property type (copied from the received command bytes 7..10), - // 1-byte property value type (copied from the received command - // byte 2), 1-byte size byte and "size" bytes long value part - binRespData[i++] = 0x00; // status - binRespData[i++] = aData[7]; // property type bits 0..7 - binRespData[i++] = aData[8]; // property type bits 8..15 - binRespData[i++] = aData[9]; // property type bits 16..23 - binRespData[i++] = aData[10]; // property type bits 24..31 - binRespData[i++] = aData[2]; // property value type - // The size and value depend on what exactly is being queried - // Note: Currently only the lowest (0..7) bytes of capability type - // have meaning, thus the switch case below is simplified - TUint8 propertyType = aData[7]; - switch ( propertyType ) - { - case 0: - // license key.. not feasible as GET device property type - { - // re-assign the status - binRespData[2] = 0xF9; // status - incompatible property - // type - binRespData[i++] = 0x00; // value size == 0 (=> no value) - break; - } - case 1: // priority - { - binRespData[i++] = 0x04; // size (32-bit integer takes 4 - // bytes) - binRespData[i++] = 0x00; - binRespData[i++] = 0x00; - binRespData[i++] = 0x00; - binRespData[i++] = 0x00; // value - 0x0 is lowest priority - break; - } - case 2: // disable effects - { - binRespData[i++] = 0x04; // size - binRespData[i++] = 0x00; - binRespData[i++] = 0x00; - binRespData[i++] = 0x00; - binRespData[i++] = 0x00; // value - 0x0 means not disabled - break; - } - case 3: // strength - case 4: // master strength - { - binRespData[i++] = 0x04; // size - binRespData[i++] = 0xFF; - binRespData[i++] = 0xFF; - binRespData[i++] = 0x00; - binRespData[i++] = 0x00; // => value 0xFFFF - break; - } - default: - { - // Pehaps it's best to change the status byte to -7 (0xF9) - // ("incompatible property type") - binRespData[2] = 0xF9; // status (re-assigned) - binRespData[i++] = 0x00; // value size, set to zero - break; - } - } // inner switch ends - break; - } - - case 0x12: // Open device - { - // The response consists of status byte (0x00) and 4-byte long - // deviceHandle (here hardcoded as 0x01000000) - binRespData[i++] = 0x00; // status - binRespData[i++] = 0x01; // deviceHandle bits 0..7 - binRespData[i++] = 0x00; // deviceHandle bits 8..15 - binRespData[i++] = 0x00; // deviceHandle bits 16..23 - binRespData[i++] = 0x00; // deviceHandle bits 24..31 - break; - } - - case 0x15: // Device count - { - // The response only contains the device count (here value == 1) - binRespData[i++] = 0x01; - break; - } - - case 0x1B: // Get effect state - { - // The response consists of status byte (0x00) and one byte effect - // state (0x00 used here meaning "Not playing") - binRespData[i++] = 0x00; // status - binRespData[i++] = 0x00; // effect state - break; - } - - case 0x20: // Load IVT data - { - // The response consists of status byte (0x00) and 4-byte long - // fileHandle (here hardcoded as 0x01000000) - binRespData[i++] = 0x00; // status - binRespData[i++] = 0x01; // fileHandle bits 0..7 - binRespData[i++] = 0x00; // fileHandle bits 8..15 - binRespData[i++] = 0x00; // fileHandle bits 16..23 - binRespData[i++] = 0x00; // fileHandle bits 24..31 - break; - } - - case 0x30: // Get license key - { - binRespData[i++] = 0x00; // status - binRespData[i++] = 0x20; // size - for( TInt n=0; n<0x20; ) - { - binRespData[i++] = 0x53; // S - n++; - binRespData[i++] = 0x54; // T - n++; - binRespData[i++] = 0x55; // U - n++; - binRespData[i++] = 0x42; // B - n++; - } - break; - } - - case 0xFF: // Protocol version query - { - // Response to Protocol version query contains: - // 1 byte minor version number - // 1 byte major version number - binRespData[i++] = 0x00; // minor version - binRespData[i++] = 0x03; // major version - break; - } - - default: - { - // Unknown command.. - break; - } - } // switch ends - - // set the lenght of the raw response data - binRespData.SetLength( i ); - - // create Haptics response data. This is done by externalizing - // (with RDesWriteStream whose sink is the Haptics response data) - TInt32 respDataErr( KErrNone ); - CHWRMHapticsRespData* respData = - CHWRMHapticsRespData::NewLC( respDataErr, binRespData ); - HWRMHapticsCommand::RHWRMHapticsRespData resp; - resp.CreateL( KHWRMHapticsRespMaxSize ); - CleanupClosePushL( resp ); - RDesWriteStream streamWriter( resp ); - CleanupClosePushL( streamWriter ); - streamWriter << *respData; - // This commits to stream's sink (i.e., to 'resp') - CleanupStack::PopAndDestroy( &streamWriter ); - - // Call the ProcessResponseL of the HapticsPluginManager - // object that created this stub plugin instance. - iResponseCallback->ProcessResponseL - ( HWRMHapticsCommand::EHapticsCmdId, aTransId, resp ); - - CleanupStack::PopAndDestroy( &resp ); - CleanupStack::PopAndDestroy( respData ); - // Order garbage collection of "spent" responder(s), if not already - // waiting for scheduling - if ( !iIdle->IsActive() ) - { - iIdle->Start( TCallBack ( CollectGarbageIdle, this ) ); - } - } - -// --------------------------------------------------------------------------- -// Static method called as CIdle TCallBack in order to remove obsolete -// responder from the array of responder pointers -// --------------------------------------------------------------------------- -// -TInt CHWRMHapticsStubPlugin::CollectGarbageIdle( TAny* aObjectPtr ) - { - CHWRMHapticsStubPlugin* self = - reinterpret_cast( aObjectPtr ); - if ( self ) - { - self->CollectGarbage(); - } - return KErrNone; - } - -// --------------------------------------------------------------------------- -// Removes all responders that have finished their work from iResponders array -// --------------------------------------------------------------------------- -// -void CHWRMHapticsStubPlugin::CollectGarbage() - { - for( TInt i( 0 ); i < iResponders.Count(); ) - { - if ( iResponders[i]->Active() ) - { - ++i; // skip this, it's still active.. - } - else - { - delete iResponders[i]; - iResponders.Remove( i ); - // note: array index i is not incremented as in the next round - // it already is the position of next item.. - // obviously the iResponders.Count() will be then one less - // than in this round. - } - } - } - -// --------------------------------------------------------------------------- -// Constructor -// --------------------------------------------------------------------------- -// -CHWRMHapticsStubPlugin::CHWRMHapticsStubPlugin( - MHWRMHapticsPluginCallback* aCallback ) - { - // set callback to baseclass' member variable - iResponseCallback = aCallback; - } - -// --------------------------------------------------------------------------- -// Two-phase construction ConstructL -// --------------------------------------------------------------------------- -// -void CHWRMHapticsStubPlugin::ConstructL() - { - iIdle = CIdle::NewL( CActive::EPriorityIdle ); - - // inform haptics of the plugin state - iResponseCallback->PluginEnabled( EHWRMLogicalActuatorAny, ETrue ); - iResponseCallback->PluginEnabled( EHWRMLogicalActuatorDevice, ETrue ); - } - -// --------------------------------------------------------------------------- -// Removes a specific responder (based on transId) from iResponders array -// --------------------------------------------------------------------------- -// -void CHWRMHapticsStubPlugin::RemoveResponder( TUint8 aTransId ) - { - TInt count( iResponders.Count() ); - - for( TInt i( 0 ); i < count; ++i ) - { - if ( iResponders[i]->TransId() == aTransId ) - { - delete iResponders[i]; - iResponders.Remove( i ); - break; - } - } - } - -// end of file - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmhapticsstubplugin/src/hwrmhapticsstubpluginidleresponder.cpp --- a/systemswstubs/hwrmhapticsstubplugin/src/hwrmhapticsstubpluginidleresponder.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Haptics test (adaptation) plugin idle responder -* implementation. -* -*/ - - -#include "hwrmhapticsstubplugin.h" -#include "hwrmhapticsstubpluginidleresponder.h" - -// --------------------------------------------------------------------------- -// Static instantiation method. -// --------------------------------------------------------------------------- -// -CHWRMHapticsStubPluginIdleResponder* - CHWRMHapticsStubPluginIdleResponder::NewL( - CHWRMHapticsStubPlugin* aPlugin, - TUint8 aTransId, - TUint8* aDataPacket) - { - CHWRMHapticsStubPluginIdleResponder* self = - new ( ELeave ) CHWRMHapticsStubPluginIdleResponder( aPlugin, - aTransId, - aDataPacket ); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - return self; - } - - -// --------------------------------------------------------------------------- -// Destructor -// --------------------------------------------------------------------------- -// -CHWRMHapticsStubPluginIdleResponder::~CHWRMHapticsStubPluginIdleResponder() - { - if ( iIdle ) - { - iIdle->Cancel(); - delete iIdle; - } - } - -// --------------------------------------------------------------------------- -// Method for starting response generation from CIdle callback -// This is used as TCallBack object in CIdle AO. -// --------------------------------------------------------------------------- -// -TInt CHWRMHapticsStubPluginIdleResponder::GenerateResponse( TAny* aSelf ) - { - CHWRMHapticsStubPluginIdleResponder* self = - reinterpret_cast( aSelf ); - if ( self ) - { - TRAP_IGNORE( self->GenerateResponseL() ); - } - return KErrNone; - } - -// --------------------------------------------------------------------------- -// Method that does the actual response generation towards the issuer of -// command i.e., the HapticsPluginManager -// --------------------------------------------------------------------------- -// -void CHWRMHapticsStubPluginIdleResponder::GenerateResponseL() - { - if ( iPlugin ) - { - iPlugin->GenerateResponseL( iTransId, iDataPacket ); - } - } - -// --------------------------------------------------------------------------- -// Getter for iTransId -// --------------------------------------------------------------------------- -// -TUint8 CHWRMHapticsStubPluginIdleResponder::TransId() const - { - return iTransId; - } - -// --------------------------------------------------------------------------- -// Method for enquiring whether the contained CIdle AO is active or not -// --------------------------------------------------------------------------- -// -TBool CHWRMHapticsStubPluginIdleResponder::Active() const - { - return ( iIdle && iIdle->IsActive() ); - } - -// --------------------------------------------------------------------------- -// Constructor -// --------------------------------------------------------------------------- -// -CHWRMHapticsStubPluginIdleResponder::CHWRMHapticsStubPluginIdleResponder( - CHWRMHapticsStubPlugin* aPlugin, - TUint8 aTransId, - TUint8* aDataPacket ) - : iPlugin( aPlugin ), - iTransId ( aTransId ), - iDataPacket ( aDataPacket ) - { - // empty - } - -// --------------------------------------------------------------------------- -// Two-phase construction ConstructL -// --------------------------------------------------------------------------- -// -void CHWRMHapticsStubPluginIdleResponder::ConstructL() - { - // Create and start the CIdle AO - iIdle = CIdle::NewL( CActive::EPriorityLow ); - iIdle->Start( TCallBack( GenerateResponse, this ) ); - } - -// end of file - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmhapticsstubplugin/src/proxy.cpp --- a/systemswstubs/hwrmhapticsstubplugin/src/proxy.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Haptics adaptation stub plugin ECom implementation proxy definition file -* -*/ - - -#include -#include - -#include "hwrmhapticsstubplugin.h" - -/** - * Mapping of the interface implementation UIDs to implementation factory - * functions - */ -const TImplementationProxy ImplementationTable[] = - { - IMPLEMENTATION_PROXY_ENTRY( 0x2001CB6E, CHWRMHapticsStubPlugin::NewL ) - }; - -/** - * Exported proxy for instantiation method resolution. - */ -EXPORT_C const TImplementationProxy* ImplementationGroupProxy( - TInt& aTableCount ) - { - aTableCount = - sizeof( ImplementationTable ) / sizeof( TImplementationProxy ); - return ImplementationTable; - } diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmstubplugins/data/10205040.rss --- a/systemswstubs/hwrmstubplugins/data/10205040.rss Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hardware Resource Manager stub plugins ECom resource file -* -*/ - - -#include "ecom/registryinfov2.rh" - -// Declares info for two implementations -RESOURCE REGISTRY_INFO theInfo - { - // UID for the DLL. See HWRMStubPlugins.mmp - resource_format_version = RESOURCE_FORMAT_VERSION_2; - dll_uid = 0x10205040; - interfaces = - { - INTERFACE_INFO - { - // UID of interface that is implemented - interface_uid = 0x10205028; - implementations = - { - IMPLEMENTATION_INFO - { - implementation_uid = 0x1020503F; - version_no = 1; - display_name = "Light plugin stub"; - default_data = "HWRMLight"; - opaque_data = ""; - rom_only = 1; - }, - IMPLEMENTATION_INFO - { - implementation_uid = 0x1020503E; - version_no = 1; - display_name = "Vibra plugin stub"; - default_data = "HWRMVibra"; - opaque_data = ""; - rom_only = 1; - }, - IMPLEMENTATION_INFO - { - implementation_uid = 0x2000BF15; - version_no = 1; - display_name = "Fmtx plugin stub"; - default_data = "HWRMFmTx"; - opaque_data = ""; - rom_only = 1; - } - }; - }, - INTERFACE_INFO - { - // UID of interface that is implemented - interface_uid = 0x10205042; - implementations = - { - IMPLEMENTATION_INFO - { - implementation_uid = 0x1020503D; - version_no = 1; - display_name = "Power State Test plugin"; - default_data = "HWRMPowerState"; - opaque_data = ""; - rom_only = 1; - } - }; - } - }; - } \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmstubplugins/data/HWRMLightsPolicy.ini --- a/systemswstubs/hwrmstubplugins/data/HWRMLightsPolicy.ini Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -// This is product specific policy file for lights. -// Products need to include this in builds, -// if required. -// This empty file is exported by hwrmstubplugins diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmstubplugins/data/HWRMVibraPolicy.ini --- a/systemswstubs/hwrmstubplugins/data/HWRMVibraPolicy.ini Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -// This is product specific policy file for vibra. -// Products need to include this in builds, -// if required. -// This empty file is exported by hwrmstubplugins - -// Devsound adaptation SID should be added here with high priority, -// For example, assuming devsound SID is 0x12345678, add row: -// 10 0x12345678 - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmstubplugins/group/HWRMStubPlugins.mmp --- a/systemswstubs/hwrmstubplugins/group/HWRMStubPlugins.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hardware Resource Manager stub plugins Project definition file -* -*/ - - -#include - -TARGET HWRMStubPlugins.dll -TARGETTYPE PLUGIN - -UID 0x10009D8D 0x10205040 - -VENDORID VID_DEFAULT - -CAPABILITY CAP_ECOM_PLUGIN - -SOURCEPATH ../src -SOURCE proxy.cpp -SOURCE LightPlugin.cpp -SOURCE VibraPlugin.cpp -SOURCE PluginTimer.cpp -SOURCE PowerStatePlugin.cpp -SOURCE FmtxPlugin.cpp - -START RESOURCE ../data/10205040.rss -TARGET HWRMStubPlugins.rsc -END - -USERINCLUDE ../inc -OS_LAYER_SYSTEMINCLUDE - -LIBRARY euser.lib -LIBRARY ecom.lib - -LANG SC - -// Trace macros -//MACRO API_TRACE_FLAG // Uncomment during testing to get API traces. -//MACRO COMPONENT_TRACE_FLAG // Uncomment during testing to get COMPONENT traces. - -// Test macro -//MACRO ENABLE_NOTIFICATIONS // Uncomment during testing to receive periodic notifications - -//MACRO PUBLISH_STATE_INFO // Uncomment before running HWRM module tests to get proper results diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmstubplugins/group/bld.inf --- a/systemswstubs/hwrmstubplugins/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hardware Resource Manager stub plugins bld file -* -*/ - - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS -../data/HWRMLightsPolicy.ini /epoc32/RELEASE/winscw/UDEB/Z/private/101f7a02/HWRMLightsPolicy.ini -../data/HWRMVibraPolicy.ini /epoc32/RELEASE/winscw/UDEB/Z/private/101f7a02/HWRMVibraPolicy.ini -../data/HWRMLightsPolicy.ini /epoc32/RELEASE/winscw/UREL/Z/private/101f7a02/HWRMLightsPolicy.ini -../data/HWRMVibraPolicy.ini /epoc32/RELEASE/winscw/UREL/Z/private/101f7a02/HWRMVibraPolicy.ini -../rom/HWRMStubPlugins.iby CORE_IBY_EXPORT_PATH(stubs,HWRMStubPlugins.iby) - -PRJ_MMPFILES -../group/HWRMStubPlugins.mmp - - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmstubplugins/inc/FmtxPlugin.h --- a/systemswstubs/hwrmstubplugins/inc/FmtxPlugin.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hardware Resource Manager stub plugins fmtx plugin -* implementation. -* -*/ - - -#ifndef __FMTXPLUGIN_H_ -#define __FMTXPLUGIN_H_ - -#include -#include -#include "PluginTimer.h" - -#ifdef PUBLISH_STATE_INFO -#include -const TUint32 KHWRMTestFmtxCommand = 0x44440001; -const TUint32 KHWRMTestFmtxDataPckg = 0x44440002; -#endif // PUBLISH_STATE_INFO - -class CPluginTimer; - -class CFmtxPlugin : public CHWRMPluginService, - public MPluginTimerCallback - { - public: - - static CFmtxPlugin* NewL(); - ~CFmtxPlugin(); - - /** - * Method to invoke a particular command in the plugin - * @param aCommandId Command ID - * @param aTransId Transaction ID - * @param aData Data associated with command - */ - virtual void ProcessCommandL(const TInt aCommandId, - const TUint8 aTransId, - TDesC8& aData); - - /** - * Method to cancel a particular command - * @param aTransId Transaction ID - * @param aCommandId Command ID to optionally double check with the - * transaction ID - */ - virtual void CancelCommandL(const TUint8 aTransId, - const TInt aCommandId); - - // From MPluginTimerCallback - void GenericTimerFired(MHWRMPluginCallback* aService, - const TInt aCommandId, - const TUint8 aTransId, - TInt aRetVal); - - private: // Construction - - CFmtxPlugin(); - void ConstructL(); - - TInt CheckFrequencyWithinRange(TDesC8& aData); - - RPointerArray iTimers; - -#ifdef PUBLISH_STATE_INFO - RProperty iCmdProperty; // for publishing command ID - RProperty iDataProperty; // for publishing data -#endif // PUBLISH_STATE_INFO - - HWRMFmTxCommand::TFmTxCmd iLastCommand; // the on-going command, if any - - HWRMFmTxCommand::TFmTxHwState iHwState; // the current hardware state - - TInt iFrequency; // the requested frequency - - TInt iStatusIndTransId; // the trans ID of last status indication request - - // RSSI scanning - TInt iChannelsRequested; // the number of clear frequencies requested - TUint32 iClearFrequency; // for returning scan responses - - TBuf<1024> iBuf; - }; - -#endif /* __FMTXPLUGIN_H_ */ diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmstubplugins/inc/LightPlugin.h --- a/systemswstubs/hwrmstubplugins/inc/LightPlugin.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hardware Resource Manager stub plugins Light plugin header -* -*/ - - -#ifndef __LIGHTPLUGIN_H_ -#define __LIGHTPLUGIN_H_ - -#include -#include "PluginTimer.h" - -#ifdef PUBLISH_STATE_INFO -#include -#include - -// Each target has own set of these two keys -// Bytes 2-4 contain target >-----------------------vvv -const TUint32 KHWRMTestLightCommand = 0x00000001; -const TUint32 KHWRMTestLightDataPckg = 0x00000002; - -const TUint32 KHWRMTestLightIntensityValue = 0x10000007; -const TUint32 KHWRMTestLightSensitivityValue = 0x10000008; - -const TInt KHWRMLightMaxTargets(4); -#endif // PUBLISH_STATE_INFO - -class CPluginTimer; - -class CLightPlugin : public CHWRMPluginService, - public MPluginTimerCallback - { - public: - - static CLightPlugin* NewL(); - virtual ~CLightPlugin(); - - /** - * Method to invoke a particular command in the plugin - * @param aCommandId Command ID - * @param aTransId Transaction ID - * @param aData Data associated with command - */ - virtual void ProcessCommandL( const TInt aCommandId, - const TUint8 aTransId, - TDesC8& aData ); - - /** - * Method to cancel a particular command - * @param aTransId Transaction ID - * @param aCommandId Command ID to optionally double check with the - * transaction ID - */ - virtual void CancelCommandL( const TUint8 aTransId, - const TInt aCommandId); - - // From MPluginTimerCallback - void GenericTimerFired(MHWRMPluginCallback* aService, - const TInt aCommandId, - const TUint8 aTransId, - TInt aRetVal); - - private: // Construction - - CLightPlugin(); - void ConstructL(); - - RPointerArray iTimers; - -#ifdef PUBLISH_STATE_INFO - void PublishStateInfo(TInt aTargetMask, - const TInt aCommandId, - TDesC8& aData ); - RProperty iCmdProperty[KHWRMLightMaxTargets]; // for publishing command ID - RProperty iDataProperty[KHWRMLightMaxTargets]; // for publishing data - RProperty iIntensityProperty; - RProperty iSensitivityProperty; - TInt iDefaultIntensity; -#endif // PUBLISH_STATE_INFO - - - }; - -#endif // __LIGHTPLUGIN_H_ \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmstubplugins/inc/PluginTimer.h --- a/systemswstubs/hwrmstubplugins/inc/PluginTimer.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hardware Resource Manager stub plugins timer definition -* -*/ - - - -#ifndef __PLUGINTIMER_H_ -#define __PLUGINTIMER_H_ - -#include - -/** -* An interface for handling timer expiration events. -*/ -class MPluginTimerCallback - { - public: - /** - * Called when the timer fires - */ - virtual void GenericTimerFired(MHWRMPluginCallback* aService, - TInt aCommandId, - TUint8 aTransId, - TInt aRetVal) = 0; - }; - - -class CPluginTimer : public CTimer - { - public: - CPluginTimer(TInt aPriority, - MHWRMPluginCallback* aService, - TInt aCommandId, - TUint8 aTransId, - TInt aRetVal, - MPluginTimerCallback* aCallback - ); - - ~CPluginTimer(); - - CPluginTimer(TInt aPriority); - - static CPluginTimer* NewL(const TTimeIntervalMicroSeconds32& anInterval, - MHWRMPluginCallback* aService, - TInt aCommandId, - TUint8 aTransId, - TInt aRetVal, - MPluginTimerCallback* aCallback); - - void ConstructL(); - - void RunL(); - - inline TUint8 TransId() const - { - return iTransId; - }; - - private: - - MHWRMPluginCallback* iService; // Not owned - - TInt iCommandId; - TUint8 iTransId; - TInt iRetVal; - - MPluginTimerCallback* iCallback; // Not owned - - }; - - -#endif // __PLUGINTIMER_H_ \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmstubplugins/inc/PowerStatePlugin.h --- a/systemswstubs/hwrmstubplugins/inc/PowerStatePlugin.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hardware Resource Manager stub plugins PowerState plugin header -* -*/ - - -#ifndef __POWERSTATEPLUGIN_H_ -#define __POWERSTATEPLUGIN_H_ - -#include - - -class CPowerStatePlugin : public CHWRMPowerStatePlugin - { - public: - - static CPowerStatePlugin* NewL(); - ~CPowerStatePlugin(); - - // Callback used by CPeriodic - static TInt Callback(TAny* aPtr); - - private: // Construction - - CPowerStatePlugin(); - void ConstructL(); - - // Helper to increment the key and/or the value - // to cover all cases. - void IncrementKeyAndValue(); - - // Timer used to fire notifications - CPeriodic* iPeriodic; - - // key name for next notification - TUint32 iKey; - // Value for key - TInt iKeyValue; - }; - -#endif // __POWERSTATEPLUGIN_H_ \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmstubplugins/inc/Trace.h --- a/systemswstubs/hwrmstubplugins/inc/Trace.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This is debug macro definition file for HWRM -* -*/ - - -#ifndef TRACE_H -#define TRACE_H - -// INCLUDES -#include - -// PC-LINT OPTIONS -// Removes null statement not in line by itself warnings from -// COMPONENT_TRACE macros -//lint -esym(960,54) - -// Removes "area too small" pointer cast warnings. -//lint -e826 - - - -// CONSTANTS -// MACROS -#ifdef _DEBUG - - #ifdef COMPONENT_TRACE_FLAG - - #define COMPONENT_TRACE( a ) RDebug::Print a - - #else // #ifdef COMPONENT_TRACE_FLAG - - #define COMPONENT_TRACE( a ) - - #endif //#ifdef COMPONENT_TRACE_FLAG - - #ifdef API_TRACE_FLAG - - #define API_TRACE( a ) RDebug::Print a - - #else //#ifdef API_TRACE_FLAG - - #define API_TRACE( a ) - - #endif //#ifdef API_TRACE_FLAG - -#else // #ifdef _DEBUG - - #define COMPONENT_TRACE( a ) - #define API_TRACE( a ) - -#endif //#ifdef _DEBUG - - -// DATA TYPES -// FUNCTION PROTOTYPES -// FORWARD DECLARATIONS - -#endif //#ifndef TRACE_H - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmstubplugins/inc/VibraPlugin.h --- a/systemswstubs/hwrmstubplugins/inc/VibraPlugin.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hardware Resource Manager stub plugins Vibra plugin header -* -*/ - - -#ifndef __VIBRAPLUGIN_H_ -#define __VIBRAPLUGIN_H_ - -#include -#include "PluginTimer.h" - -#ifdef PUBLISH_STATE_INFO -#include -#include -const TUint32 KHWRMTestVibraCommand = 0x11110001; -const TUint32 KHWRMTestVibraDataPckg = 0x11110002; -#endif // PUBLISH_STATE_INFO - -class CPluginTimer; - -class CVibraPlugin : public CHWRMPluginService, - public MPluginTimerCallback - { - public: - - static CVibraPlugin* NewL(); - ~CVibraPlugin(); - - /** - * Method to invoke a particular command in the plugin - * @param aCommandId Command ID - * @param aTransId Transaction ID - * @param aData Data associated with command - */ - virtual void ProcessCommandL( const TInt aCommandId, - const TUint8 aTransId, - TDesC8& aData ); - - /** - * Method to cancel a particular command - * @param aTransId Transaction ID - * @param aCommandId Command ID to optionally double check with the - * transaction ID - */ - virtual void CancelCommandL( const TUint8 aTransId, - const TInt aCommandId); - - // From MPluginTimerCallback - void GenericTimerFired(MHWRMPluginCallback* aService, - const TInt aCommandId, - const TUint8 aTransId, - TInt aRetVal); - - private: // Construction - - CVibraPlugin(); - void ConstructL(); - - RPointerArray iTimers; - -#ifdef PUBLISH_STATE_INFO - RProperty iCmdProperty; // for publishing command ID - RProperty iDataProperty; // for publishing data -#endif // PUBLISH_STATE_INFO - - }; - -#endif // __VIBRAPLUGIN_H_ \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmstubplugins/rom/HWRMStubPlugins.iby --- a/systemswstubs/hwrmstubplugins/rom/HWRMStubPlugins.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: HWRMStubPlugins provide dummy implementation for emulator -* environment to be used instead of proper HWRM plugins. -* -*/ - - -#ifndef __HWRMSTUBPLUGINS_IBY__ -#define __HWRMSTUBPLUGINS_IBY__ - -ECOM_PLUGIN( HWRMStubPlugins.dll , 10205040.rsc ) - -#endif // __HWRMSTUBPLUGINS_IBY__ - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmstubplugins/src/FmtxPlugin.cpp --- a/systemswstubs/hwrmstubplugins/src/FmtxPlugin.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,528 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hardware Resource Manager stub plugins fmtx plugin -* implementation. -* -*/ - - - -#include -#include "FmtxPlugin.h" -#include "PluginTimer.h" -#include "Trace.h" - -const TUint32 KFmTxStubPluginFreqMax = 107900; // KHz -const TUint32 KFmTxStubPluginFreqMin = 88100; // KHz -const TUint32 KFmTxStubPluginStepSize = 50; // KHz -const TInt KMaxLengthMarker = 63; - -#ifdef PUBLISH_STATE_INFO -const TUid KPSUidHWResourceNotification = {0x101F7A01}; // HWRM private PS Uid -#endif /* PUBLISH_STATE_INFO */ - - -CFmtxPlugin* CFmtxPlugin::NewL() - { - COMPONENT_TRACE(( _L("CFmtxPlugin::NewL()") )); - - CFmtxPlugin* self = new(ELeave) CFmtxPlugin(); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - - -CFmtxPlugin::~CFmtxPlugin() - { - COMPONENT_TRACE(( _L("CFmtxPlugin::~CFmtxPlugin()") )); - - iTimers.ResetAndDestroy(); -#ifdef PUBLISH_STATE_INFO - iCmdProperty.Close(); - iDataProperty.Close(); -#endif /* PUBLISH_STATE_INFO */ - } - - -CFmtxPlugin::CFmtxPlugin() : iLastCommand(HWRMFmTxCommand::ENoCommandId), - iHwState(HWRMFmTxCommand::EFmTxHwStateOff), - iClearFrequency(KFmTxStubPluginFreqMin) - { - COMPONENT_TRACE(( _L("CFmtxPlugin::CFmtxPlugin()") )); - } - - -void CFmtxPlugin::ConstructL() - { - COMPONENT_TRACE(( _L("CFmtxPlugin::ConstructL") )); - -#ifdef PUBLISH_STATE_INFO - RProperty::Define(KPSUidHWResourceNotification, KHWRMTestFmtxCommand, RProperty::EInt); - RProperty::Define(KPSUidHWResourceNotification, KHWRMTestFmtxDataPckg, RProperty::EByteArray, 512); - iCmdProperty.Attach(KPSUidHWResourceNotification, KHWRMTestFmtxCommand); - iDataProperty.Attach(KPSUidHWResourceNotification, KHWRMTestFmtxDataPckg); -#endif /* PUBLISH_STATE_INFO */ - } - - -TInt CFmtxPlugin::CheckFrequencyWithinRange(TDesC8& aData) - { - HWRMFmTxCommand::TSetFrequencyPackage pckg; - pckg.Copy(aData); - TInt frequency = pckg(); - - if ( frequency < KFmTxStubPluginFreqMin || - frequency > KFmTxStubPluginFreqMax ) - { - COMPONENT_TRACE((_L("CFmtxPlugin::CheckFrequencyWithinRange, frequency %d is out of range"), frequency)); - return KErrArgument; - } - else - { - iFrequency = frequency; - return KErrNone; - } - } - - -void CFmtxPlugin::ProcessCommandL(const TInt aCommandId, - const TUint8 aTransId, - TDesC8& aData) - { - COMPONENT_TRACE((_L("CFmtxPlugin::ProcessCommandL, command: 0x%x, TransId: 0x%x"), aCommandId, aTransId)); - - TInt retVal(KErrNone); - - switch (aCommandId) - { - case HWRMFmTxCommand::ETxOnCmdId: - { - COMPONENT_TRACE(_L("HWRM FmtxPlugin: Processed ETxOnCmdId")); - - // check TSetFrequencyPackage param - if ( iHwState != HWRMFmTxCommand::EFmTxHwStateOff ) - { - retVal = KErrInUse; - } - else - { - retVal = CheckFrequencyWithinRange(aData); - } - } - break; - - case HWRMFmTxCommand::ETxOffCmdId: - { - COMPONENT_TRACE(_L("HWRM FmtxPlugin: Processed ETxOffCmdId")); - - if ( iHwState == HWRMFmTxCommand::EFmTxHwStateOff ) - { - retVal = KErrNotReady; - } - } - break; - - case HWRMFmTxCommand::ESetTxFrequencyCmdId: - { - COMPONENT_TRACE(_L("HWRM FmtxPlugin: Processed ESetTxFrequencyCmdId")); - - if ( iHwState == HWRMFmTxCommand::EFmTxHwStateOn ) - { - // check TSetFrequencyPackage param - retVal = CheckFrequencyWithinRange(aData); - } - else - { - COMPONENT_TRACE((_L("HWRM FmtxPlugin: HW isn't ready, iHwState = %d"), iHwState)); - retVal = KErrNotReady; - } - } - break; - - case HWRMFmTxCommand::ETxScanRequestCmdId: - { - COMPONENT_TRACE(_L("HWRM FmtxPlugin: Processed ETxScanRequestCmdId")); - - if ( iHwState == HWRMFmTxCommand::EFmTxHwStateOn ) - { - // check TScanRequestPackage param - HWRMFmTxCommand::TScanRequestPackage pckg; - pckg.Copy(aData); - TUint channelsRequested = pckg(); - if( channelsRequested > 10 ) - { - // Should not come here because input verified in client end - retVal = KErrArgument; - } - iChannelsRequested = ( channelsRequested <= 10 ) ? channelsRequested : 10; - } - else - { - COMPONENT_TRACE((_L("HWRM FmtxPlugin: HW isn't ready, iHwState = %d"), iHwState)); - retVal = KErrNotReady; - } - } - break; - - case HWRMFmTxCommand::EGetTxFrequencyRangeCmdId: - { - COMPONENT_TRACE(_L("HWRM FmtxPlugin: Processed EGetTxFrequencyRangeCmdId")); - - // No params to check - } - break; - - case HWRMFmTxCommand::ESetTxRdsPsCmdId: - { - COMPONENT_TRACE(_L("HWRM FmtxPlugin: Processed ESetTxRdsPsCmdId")); - - if ( iHwState == HWRMFmTxCommand::EFmTxHwStateOn ) - { - // check TRdsPsPackage param - } - else - { - COMPONENT_TRACE((_L("HWRM FmtxPlugin: HW isn't ready, iHwState = %d"), iHwState)); - retVal = KErrNotReady; - } - } - break; - - case HWRMFmTxCommand::ESetTxRdsPtyCmdId: - { - COMPONENT_TRACE(_L("HWRM FmtxPlugin: Processed ESetTxRdsPtyCmdId")); - - if ( iHwState == HWRMFmTxCommand::EFmTxHwStateOn ) - { - // Check TRdsPtyPackage param - HWRMFmTxCommand::TRdsPtyPackage pckg; - pckg.Copy(aData); - TInt programType = pckg(); - const TInt KRdsPtyFirst = 0; - const TInt KRdsPtyLast = 31; - - if( programType < KRdsPtyFirst || programType > KRdsPtyLast ) - { - // Should not come here because input verified in client end - retVal = KErrArgument; - } - } - else - { - COMPONENT_TRACE((_L("HWRM FmtxPlugin: HW isn't ready, iHwState = %d"), iHwState)); - retVal = KErrNotReady; - } - } - break; - - case HWRMFmTxCommand::ESetTxRdsPtynCmdId: - { - COMPONENT_TRACE(_L("HWRM FmtxPlugin: Processed ESetTxRdsPtynCmdId")); - - if ( iHwState == HWRMFmTxCommand::EFmTxHwStateOn ) - { - // Check TRdsPtynPackage param - HWRMFmTxCommand::TRdsPtynPackage pckg; - pckg.Copy(aData); - HWRMFmTxCommand::TRdsPtyn prgTypeName = pckg(); - const TInt KMaxRdsPtynLength = 8; - if( prgTypeName.Length() > KMaxRdsPtynLength ) - { - // Should not come here because input verified in client end - retVal = KErrArgument; - } - } - else - { - COMPONENT_TRACE((_L("HWRM FmtxPlugin: HW isn't ready, iHwState = %d"), iHwState)); - retVal = KErrNotReady; - } - } - break; - - case HWRMFmTxCommand::ESetTxRdsMsCmdId: - { - COMPONENT_TRACE(_L("HWRM FmtxPlugin: Processed ESetTxRdsMsCmdId")); - - if ( iHwState == HWRMFmTxCommand::EFmTxHwStateOn ) - { - // No params to check - } - else - { - COMPONENT_TRACE((_L("HWRM FmtxPlugin: HW isn't ready, iHwState = %d"), iHwState)); - retVal = KErrNotReady; - } - } - break; - - case HWRMFmTxCommand::ESetTxRdsLangIdCmdId: - { - COMPONENT_TRACE(_L("HWRM FmtxPlugin: Processed ESetTxRdsLangIdCmdId")); - - if ( iHwState == HWRMFmTxCommand::EFmTxHwStateOn ) - { - // Check TRdsLangIdPackage param - HWRMFmTxCommand::TRdsLangIdPackage pckg; - pckg.Copy(aData); - TInt languageId = pckg(); - const TInt KRdsLanguageFirst = 0x00; - const TInt KRdsLanguageLast = 0x7F; - - if( languageId < KRdsLanguageFirst || languageId > KRdsLanguageLast ) - { - // Should not come here because input verified in client end - User::Leave(KErrArgument); - } - } - else - { - COMPONENT_TRACE((_L("HWRM FmtxPlugin: HW isn't ready, iHwState = %d"), iHwState)); - retVal = KErrNotReady; - } - } - break; - - case HWRMFmTxCommand::ESetTxRtCmdId: - { - COMPONENT_TRACE(_L("HWRM FmtxPlugin: Processed ESetTxRtCmdId")); - - if ( iHwState == HWRMFmTxCommand::EFmTxHwStateOn ) - { - // Check TRtPackage params - HWRMFmTxCommand::TRtPackage pckg; - pckg.Copy(aData); - HWRMFmTxCommand::TRtData rtData = pckg(); - - if( rtData.iTag1.iContentType > KMaxLengthMarker || rtData.iTag2.iContentType > KMaxLengthMarker || - rtData.iTag1.iLengthMarker > KMaxLengthMarker || rtData.iTag2.iLengthMarker > KMaxLengthMarker ) - { - retVal = KErrArgument; - } - } - else - { - COMPONENT_TRACE((_L("HWRM FmtxPlugin: HW isn't ready, iHwState = %d"), iHwState)); - retVal = KErrNotReady; - } - } - break; - - case HWRMFmTxCommand::EClearTxRtCmdId: - { - COMPONENT_TRACE(_L("HWRM FmtxPlugin: Processed EClearTxRtCmdId")); - - if ( iHwState != HWRMFmTxCommand::EFmTxHwStateOn ) - { - COMPONENT_TRACE((_L("HWRM FmtxPlugin: HW isn't ready, iHwState = %d"), iHwState)); - retVal = KErrNotReady; - } - // No params to check - } - break; - - case HWRMFmTxCommand::ENoCommandId: // fall through - default : - { - COMPONENT_TRACE((_L("HWRM FmtxPlugin: Unknown Command: 0x%x"), aCommandId)); - } - break; - } - - // Check for concurrent requests. Scan request (ETxScanRequestCmdId) may precede - // set frequency (ESetTxFrequencyCmdId), because it is handled as a split command. - if ( iLastCommand != HWRMFmTxCommand::ENoCommandId && - !(iLastCommand == HWRMFmTxCommand::ETxScanRequestCmdId && aCommandId == HWRMFmTxCommand::ESetTxFrequencyCmdId) ) - { - COMPONENT_TRACE(_L("HWRM FmtxPlugin: Not ready due to concurrent command")); - retVal = KErrNotReady; - } - iLastCommand = static_cast(aCommandId); - - TInt timeout(500); // microseconds - - // Increase timeout for scan requests - if (HWRMFmTxCommand::ETxScanRequestCmdId == aCommandId) - { - timeout = 2*1000*1000; // 2 seconds - } - -#ifdef PUBLISH_STATE_INFO - // publish - iCmdProperty.Set(aCommandId); - iDataProperty.Set(aData); -#endif /* PUBLISH_STATE_INFO */ - - // create new timer - CPluginTimer* timer = CPluginTimer::NewL(timeout, iResponseCallback, aCommandId, aTransId, retVal, this); - CleanupStack::PushL(timer); - iTimers.AppendL(timer); - CleanupStack::Pop(timer); - - COMPONENT_TRACE((_L("HWRM FmtxPlugin: Processing command - return"))); - } - - -void CFmtxPlugin::CancelCommandL(const TUint8 aTransId, -#if defined(_DEBUG) && defined(COMPONENT_TRACE_FLAG) - const TInt aCommandId) -#else - const TInt /*aCommandId*/) -#endif - { - COMPONENT_TRACE((_L("HWRM FmtxPlugin: Cancelling command: 0x%x, TransId: 0x%x"), aCommandId, aTransId)); - COMPONENT_TRACE((_L("HWRM FmtxPlugin: Cancelling command - iTimers.Count(): %d "), iTimers.Count())); - - for( TInt i = 0; i < iTimers.Count(); i++ ) - { - if ( iTimers[i]->TransId() == aTransId ) - { - delete iTimers[i]; - iTimers.Remove(i); - COMPONENT_TRACE((_L("HWRM FmtxPlugin: Cancelling command - Removed command: 0x%x, TransId: 0x%x"), aCommandId, aTransId)); - break; - } - } - - if ( iTimers.Count() == 0 ) - { - // no more commands on-going - iLastCommand = HWRMFmTxCommand::ENoCommandId; - } - } - -void CFmtxPlugin::GenericTimerFired(MHWRMPluginCallback* aService, - TInt aCommandId, - const TUint8 aTransId, - TInt aRetVal) - { - COMPONENT_TRACE((_L("HWRM FmtxPlugin: GenericTimerFired (0x%x, 0x%x, %d)"), aCommandId, aTransId, aRetVal)); - - __ASSERT_ALWAYS(aService != NULL, User::Invariant() ); - - TInt err = KErrNone; - - HWRMFmTxCommand::TFmTxHwState tempState = HWRMFmTxCommand::EFmTxHwStateOff; - - switch (aCommandId) - { - case HWRMFmTxCommand::EGetTxFrequencyRangeCmdId: - { - COMPONENT_TRACE((_L("HWRM FmtxPlugin: Returning freq range"))); - HWRMFmTxCommand::TFrequencyRangeData freqRange; - freqRange.iErrorCode = KErrNone; - freqRange.iMinFrequency = KFmTxStubPluginFreqMin; - freqRange.iMaxFrequency = KFmTxStubPluginFreqMax; - freqRange.iStepSize = KFmTxStubPluginStepSize; - HWRMFmTxCommand::TFrequencyRangePackage freqRangePckg(freqRange); - TRAP(err, aService->ProcessResponseL(aCommandId, aTransId, freqRangePckg)); - } - break; - - case HWRMFmTxCommand::ETxScanRequestCmdId: - { - HWRMFmTxCommand::TScanResponseData scanData; - scanData.iErrorCode = aRetVal; - if ( aRetVal == KErrNone ) - { - if ( (iClearFrequency += KFmTxStubPluginStepSize) > KFmTxStubPluginFreqMax ) - { - iClearFrequency = KFmTxStubPluginFreqMin; - } - scanData.iErrorCode = KErrNone; - scanData.iFrequenciesFound = iChannelsRequested; - TUint32 clearFrequency = iClearFrequency; - for(TInt i=0; i KFmTxStubPluginFreqMax ) - { - clearFrequency = KFmTxStubPluginFreqMin; - } - } - COMPONENT_TRACE((_L("HWRM FmtxPlugin: Returning 1 clear frequency"))); - } - else - { - scanData.iFrequenciesFound = 0; - COMPONENT_TRACE((_L("HWRM FmtxPlugin: Returning 0 clear frequencies"))); - } - HWRMFmTxCommand::TScanResponsePackage scanPckg(scanData); - TRAP(err, aService->ProcessResponseL(aCommandId, aTransId, scanPckg)); - } - break; - - case HWRMFmTxCommand::ETxOnCmdId: // fall through - case HWRMFmTxCommand::ESetTxFrequencyCmdId: - tempState = HWRMFmTxCommand::EFmTxHwStateOn; // fall through - case HWRMFmTxCommand::ETxOffCmdId: - { - if ( aRetVal == KErrNone) - { - iHwState = tempState; - - if ( iStatusIndTransId ) // if request successful, and status indication has been requested - { - // also send frequency/state changed indications for these - COMPONENT_TRACE((_L("HWRM FmtxPlugin: sending status indication"))); - HWRMFmTxCommand::TFmTxStatusData statusData; - statusData.state = tempState; - statusData.frequency = iFrequency; - HWRMFmTxCommand::TStatusIndicationPackage statusIndPckg(statusData); - TInt tempTransId = iStatusIndTransId; // status indication may be reissued immediately... - iStatusIndTransId = 0; // ...so null here first - TRAP(err, aService->ProcessResponseL(HWRMFmTxCommand::ETxStatusIndId, tempTransId, statusIndPckg)); - if ( err != KErrNone ) - { - COMPONENT_TRACE((_L("HWRM FmtxPlugin: Error sending status indication"))); - } - } - } - } // fall through - - case HWRMFmTxCommand::ESetTxRdsPsCmdId: - case HWRMFmTxCommand::ESetTxRtCmdId: - default : - { - COMPONENT_TRACE((_L("HWRM FmtxPlugin: Returning error code %d, Command: 0x%x"), aRetVal, aCommandId)); - HWRMFmTxCommand::TErrorCodeResponsePackage retvalPackage(aRetVal); - TRAP(err, aService->ProcessResponseL(aCommandId, aTransId, retvalPackage)); - } - break; - } - - if ( err != KErrNone ) - { - COMPONENT_TRACE((_L("HWRM FmtxPlugin: Error in ProcessResponseL: %d"), err)); - } - - // delete obsolete timers - for( TInt i = (iTimers.Count()-1); i > -1 ; i-- ) - { - if ( !iTimers[i]->IsActive() ) - { - delete iTimers[i]; - iTimers.Remove(i); - COMPONENT_TRACE((_L("HWRM FmtxPlugin: GenericTimerFired - Removed obsolete timer"))); - } - } - - if ( iTimers.Count() == 0 ) - { - // no more commands on-going - iLastCommand = HWRMFmTxCommand::ENoCommandId; - } - } diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmstubplugins/src/LightPlugin.cpp --- a/systemswstubs/hwrmstubplugins/src/LightPlugin.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,270 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hardware Resource Manager stub plugins light plugin -* implementation. -* -*/ - - -#include "LightPlugin.h" -#include -#include "PluginTimer.h" -#include "Trace.h" - -#ifdef PUBLISH_STATE_INFO -const TUid KPSUidHWResourceNotification = {0x101F7A01}; // HWRM private PS Uid -#endif // PUBLISH_STATE_INFO - -CLightPlugin* CLightPlugin::NewL() - { - CLightPlugin* self = new(ELeave) CLightPlugin(); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -CLightPlugin::~CLightPlugin() - { - iTimers.ResetAndDestroy(); -#ifdef PUBLISH_STATE_INFO - for ( TInt i=0; i< KHWRMLightMaxTargets; i++ ) - { - iCmdProperty[i].Close(); - iDataProperty[i].Close(); - } - iIntensityProperty.Close(); - iSensitivityProperty.Close(); -#endif // PUBLISH_STATE_INFO - } - -CLightPlugin::CLightPlugin() - { - } - -void CLightPlugin::ConstructL() - { -#ifdef PUBLISH_STATE_INFO - TInt currentTarget(0x00010000); - for ( TInt i=0; i< KHWRMLightMaxTargets; i++ ) - { - RProperty::Define(KPSUidHWResourceNotification, (KHWRMTestLightCommand | currentTarget), RProperty::EInt); - RProperty::Define(KPSUidHWResourceNotification, (KHWRMTestLightDataPckg | currentTarget), RProperty::EByteArray, 512); - iCmdProperty[i].Attach(KPSUidHWResourceNotification, (KHWRMTestLightCommand | currentTarget)); - iDataProperty[i].Attach(KPSUidHWResourceNotification, (KHWRMTestLightDataPckg | currentTarget)); - currentTarget <<= 1; - } - - RProperty::Define(KPSUidHWResourceNotification, KHWRMTestLightIntensityValue, RProperty::EInt); - RProperty::Define(KPSUidHWResourceNotification, KHWRMTestLightSensitivityValue, RProperty::EInt); - iIntensityProperty.Attach(KPSUidHWResourceNotification, KHWRMTestLightIntensityValue); - iSensitivityProperty.Attach(KPSUidHWResourceNotification, KHWRMTestLightSensitivityValue); -#endif // PUBLISH_STATE_INFO - } - - -void CLightPlugin::ProcessCommandL( const TInt aCommandId, - const TUint8 aTransId, -#ifdef PUBLISH_STATE_INFO - TDesC8& aData ) -#else - TDesC8& /*aData*/ ) -#endif // PUBLISH_STATE_INFO - { - COMPONENT_TRACE((_L("HWRM LightPlugin: Processing command: 0x%x, TransId: 0x%x"), aCommandId, aTransId)); - -#ifdef PUBLISH_STATE_INFO - TInt targetMask(0); -#endif // PUBLISH_STATE_INFO - switch ( aCommandId ) - { - case HWRMLightCommand::ELightsOnCmdId: - { - COMPONENT_TRACE(_L("HWRM LightPlugin: Processed ELightsOnCmdId")); -#ifdef PUBLISH_STATE_INFO - HWRMLightCommand::TLightsOnCmdPackage pckg; - pckg.Copy(aData); - HWRMLightCommand::TLightsOnData data = pckg(); - if ( data.iIntensity == KHWRMDefaultIntensity ) - { - data.iIntensity = iDefaultIntensity; - } - - targetMask = data.iTarget << 16; - HWRMLightCommand::TLightsOnCmdPackage pckg2(data); - PublishStateInfo(targetMask, aCommandId, pckg2); -#endif // PUBLISH_STATE_INFO - } - break; - case HWRMLightCommand::ELightsOnSensorCmdId: - { - COMPONENT_TRACE(_L("HWRM LightPlugin: Processed ELightsOnSensorCmdId")); -#ifdef PUBLISH_STATE_INFO - HWRMLightCommand::TLightsOnSensorCmdPackage pckg; - pckg.Copy(aData); - HWRMLightCommand::TLightsOnSensorData data = pckg(); - - targetMask = data.iTarget << 16; - PublishStateInfo(targetMask, aCommandId, pckg); -#endif // PUBLISH_STATE_INFO - } - break; - case HWRMLightCommand::ELightsBlinkCmdId: - { - COMPONENT_TRACE(_L("HWRM LightPlugin: Processed ELightsBlinkCmdId")); -#ifdef PUBLISH_STATE_INFO - HWRMLightCommand::TLightsBlinkCmdPackage pckg; - pckg.Copy(aData); - HWRMLightCommand::TLightsBlinkData data = pckg(); - if ( data.iIntensity == KHWRMDefaultIntensity ) - { - data.iIntensity = iDefaultIntensity; - } - - targetMask = data.iTarget << 16; - HWRMLightCommand::TLightsBlinkCmdPackage pckg2(data); - PublishStateInfo(targetMask, aCommandId, pckg2); -#endif // PUBLISH_STATE_INFO - } - break; - case HWRMLightCommand::ELightsOffCmdId: - { - COMPONENT_TRACE(_L("HWRM LightPlugin: Processed ELightsOffCmdId")); -#ifdef PUBLISH_STATE_INFO - HWRMLightCommand::TLightsOffCmdPackage pckg; - pckg.Copy(aData); - HWRMLightCommand::TLightsOffData data = pckg(); - - targetMask = data.iTarget << 16; - PublishStateInfo(targetMask, aCommandId, pckg); -#endif // PUBLISH_STATE_INFO - } - break; - case HWRMLightCommand::ESetLightsIntensityCmdId: - { - COMPONENT_TRACE(_L("HWRM LightPlugin: Processed ESetLightsIntensityCmdId")); -#ifdef PUBLISH_STATE_INFO - HWRMLightCommand::TLightsIntensityCmdPackage pckg; - pckg.Copy(aData); - HWRMLightCommand::TLightsIntensityData data = pckg(); - - iDefaultIntensity = data.iIntensity; - COMPONENT_TRACE( (_L("HWRM LightPlugin: Intensity: %d"), iDefaultIntensity)); - - // Currently only general intensity is supported, so ignore target parameter, - // it is always all supported targets - iIntensityProperty.Set(iDefaultIntensity); - -#endif // PUBLISH_STATE_INFO - } - break; - case HWRMLightCommand::ESetLightsSensorSensitivityCmdId: - { - COMPONENT_TRACE(_L("HWRM LightPlugin: Processed ESetLightsSensorSensitivityCmdId")); -#ifdef PUBLISH_STATE_INFO - HWRMLightCommand::TLightsSensorSensitivityCmdPackage pckg; - pckg.Copy(aData); - TInt data = pckg(); - - iSensitivityProperty.Set(data); -#endif // PUBLISH_STATE_INFO - } - break; - default : - { - COMPONENT_TRACE((_L("HWRM LightPlugin: Unknown Command: 0x%x"), aCommandId)); - } - break; - } - TInt retval(KErrNone); - TInt timeout(500); // microseconds - - // create new timer - CPluginTimer* timer = CPluginTimer::NewL(timeout, iResponseCallback, aCommandId, aTransId, retval, this); - CleanupStack::PushL(timer); - iTimers.AppendL(timer); - CleanupStack::Pop(timer); - } - -#ifdef PUBLISH_STATE_INFO -void CLightPlugin::PublishStateInfo(TInt aTargetMask, - const TInt aCommandId, - TDesC8& aData ) - { - // publish - TInt currentTarget(0x10000); - for ( TInt i=0; i< KHWRMLightMaxTargets; i++ ) - { - if ( aTargetMask & currentTarget ) - { - iCmdProperty[i].Set(aCommandId); - iDataProperty[i].Set(aData); - } - currentTarget <<= 1; - } - } -#endif // PUBLISH_STATE_INFO - -void CLightPlugin::CancelCommandL( const TUint8 aTransId, -#if defined(_DEBUG) && defined(COMPONENT_TRACE_FLAG) - const TInt aCommandId) -#else - const TInt /*aCommandId*/) -#endif - { - COMPONENT_TRACE((_L("HWRM LightPlugin: Cancelling command: 0x%x, TransId: 0x%x"), aCommandId, aTransId)); - COMPONENT_TRACE((_L("HWRM LightPlugin: Cancelling command - iTimers.Count(): %d "), iTimers.Count())); - - for( TInt i = 0; i < iTimers.Count(); i++ ) - { - if ( iTimers[i]->TransId() == aTransId ) - { - delete iTimers[i]; - iTimers.Remove(i); - COMPONENT_TRACE((_L("HWRM LightPlugin: Cancelling command - Removed command: 0x%x, TransId: 0x%x"), aCommandId, aTransId)); - break; - } - } - } - -void CLightPlugin::GenericTimerFired(MHWRMPluginCallback* aService, - TInt aCommandId, - TUint8 aTransId, - TInt aRetVal) - { - COMPONENT_TRACE((_L("HWRM LightPlugin: GenericTimerFired (0x%x, 0x%x, %d)"), aCommandId, aTransId, aRetVal)); - - __ASSERT_ALWAYS(aService != NULL, User::Invariant() ); - - HWRMLightCommand::TErrorCodeResponsePackage retvalPackage(aRetVal); - - TRAPD(err, aService->ProcessResponseL(aCommandId, aTransId, retvalPackage)); - - if ( err != KErrNone ) - { - COMPONENT_TRACE((_L("HWRM LightPlugin: Error in ProcessResponseL: %d"), err)); - } - - // delete obsolete timers - for( TInt i = (iTimers.Count()-1); i > -1 ; i-- ) - { - if ( !iTimers[i]->IsActive() ) - { - delete iTimers[i]; - iTimers.Remove(i); - COMPONENT_TRACE((_L("HWRM LightPlugin: GenericTimerFired - Removed obsolete timer"))); - } - } - } - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmstubplugins/src/PluginTimer.cpp --- a/systemswstubs/hwrmstubplugins/src/PluginTimer.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hardware Resource Manager stub plugins timer implementation -* -*/ - - -#include "PluginTimer.h" -#include -#include -#include "Trace.h" - -CPluginTimer* CPluginTimer::NewL(const TTimeIntervalMicroSeconds32& anInterval, - MHWRMPluginCallback* aService, - TInt aCommandId, - TUint8 aTransId, - TInt aRetVal, - MPluginTimerCallback* aCallback) - { - CPluginTimer* self = new( ELeave ) CPluginTimer(0, aService, aCommandId, aTransId, aRetVal, aCallback); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - - CActiveScheduler::Add(self); - - COMPONENT_TRACE((_L("HWRM Plugin - CPluginTimer::NewL - Setting timer: %d"), anInterval)); - - self->After(anInterval); - - return self; - } - -CPluginTimer::~CPluginTimer() - { - // PCLint demands - iCallback = NULL; - iService = NULL; - } - -CPluginTimer::CPluginTimer(TInt aPriority, - MHWRMPluginCallback* aService, - TInt aCommandId, - TUint8 aTransId, - TInt aRetVal, - MPluginTimerCallback* aCallback) - : CTimer(aPriority), - iService(aService), - iCommandId(aCommandId), - iTransId(aTransId), - iRetVal(aRetVal), - iCallback(aCallback) - { - } - -void CPluginTimer::ConstructL() - { - CTimer::ConstructL(); - } - - -void CPluginTimer::RunL( ) - { - iCallback->GenericTimerFired(iService, iCommandId, iTransId, iRetVal ); - - } - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmstubplugins/src/PowerStatePlugin.cpp --- a/systemswstubs/hwrmstubplugins/src/PowerStatePlugin.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,137 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hardware Resource Manager stub plugins Power State plugin -* implementation. -* -*/ - - -#include -#include "PowerStatePlugin.h" - - -//CONSTANTS -#ifdef ENABLE_NOTIFICATIONS - // Timer begins triggering notifications after this time period - const TInt KDelay(5000000); //5 seconds - // Timer triggers notifications at this time interval - const TInt KInterval(5000000); //5 seconds -#endif - - -CPowerStatePlugin* CPowerStatePlugin::NewL() - { - CPowerStatePlugin* self = new(ELeave) CPowerStatePlugin(); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -CPowerStatePlugin::~CPowerStatePlugin() - { -#ifdef ENABLE_NOTIFICATIONS - delete iPeriodic; -#endif - } - -CPowerStatePlugin::CPowerStatePlugin() : iKey( KHWRMBatteryLevel ), - iKeyValue( EBatteryLevelUnknown ) - { - } - -void CPowerStatePlugin::ConstructL() - { - // Only send periodic notifications if flag is defined -#ifdef ENABLE_NOTIFICATIONS - RDebug::Print( _L("HWRM PowerStatePlugin: Notifications enabled.") ); - // Use CPeriodic to generate state changes - iPeriodic = CPeriodic::NewL( CActive::EPriorityStandard ); - - // Start the timer after KDelay and for every KInterval - iPeriodic->Start( KDelay, KInterval, - TCallBack( CPowerStatePlugin::Callback, this ) ); -#else - RDebug::Print( _L("HWRM PowerStatePlugin: Notifications disabled.") ); -#endif - } - -TInt CPowerStatePlugin::Callback( TAny* aPtr ) - { - CPowerStatePlugin* ptr = (CPowerStatePlugin*) aPtr; - // use callback to call the notification method in the plugin callback - RDebug::Print( _L("HWRM PowerStatePlugin: Key=%d, Value=%d"), ptr->iKey, ptr->iKeyValue ); - TRAPD( err, ptr->iNotificationCallback->NotifyStateChange( - ptr->iKey, ptr->iKeyValue ) ); - ptr->IncrementKeyAndValue(); - - return err; - } - -void CPowerStatePlugin::IncrementKeyAndValue() - { - switch( iKey ) - { - case KHWRMBatteryLevel: - { - // key has values -1 to 7 - if( iKeyValue == EBatteryLevelLevel7 ) - { - // last value so set next key - iKey = KHWRMBatteryStatus; - iKeyValue = EBatteryStatusUnknown; - } - else - { - // Otherwise just increment it - iKeyValue++; - } - break; - } - case KHWRMBatteryStatus: - { - // key has values -1 to 2 - if( iKeyValue == EBatteryStatusEmpty ) - { - // last value so set next key - iKey = KHWRMChargingStatus; - iKeyValue = EChargingStatusError; - } - else - { - // Otherwise just increment it - iKeyValue++; - } - break; - } - case KHWRMChargingStatus: - { - // key has values -1 to 5 - if( iKeyValue == EChargingStatusChargingContinued ) - { - // last value so set next key - iKey = KHWRMBatteryLevel; - iKeyValue = EBatteryLevelUnknown; - } - else - { - // Otherwise just increment it - iKeyValue++; - } - break; - } - default: - break; - } - } diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmstubplugins/src/VibraPlugin.cpp --- a/systemswstubs/hwrmstubplugins/src/VibraPlugin.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,171 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hardware Resource Manager stub plugins vibra plugin -* implementation. -* -*/ - - -#include "VibraPlugin.h" -#include "PluginTimer.h" -#include -#include "Trace.h" - - -#ifdef PUBLISH_STATE_INFO -const TUid KPSUidHWResourceNotification = {0x101F7A01}; // HWRM private PS Uid -#endif // PUBLISH_STATE_INFO - - -CVibraPlugin* CVibraPlugin::NewL() - { - CVibraPlugin* self = new(ELeave) CVibraPlugin(); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -CVibraPlugin::~CVibraPlugin() - { - iTimers.ResetAndDestroy(); -#ifdef PUBLISH_STATE_INFO - iCmdProperty.Close(); - iDataProperty.Close(); -#endif // PUBLISH_STATE_INFO - } - -CVibraPlugin::CVibraPlugin() - { - } - -void CVibraPlugin::ConstructL() - { -#ifdef PUBLISH_STATE_INFO - RProperty::Define(KPSUidHWResourceNotification, KHWRMTestVibraCommand, RProperty::EInt); - RProperty::Define(KPSUidHWResourceNotification, KHWRMTestVibraDataPckg, RProperty::EByteArray, 512); - iCmdProperty.Attach(KPSUidHWResourceNotification, KHWRMTestVibraCommand); - iDataProperty.Attach(KPSUidHWResourceNotification, KHWRMTestVibraDataPckg); -#endif // PUBLISH_STATE_INFO - } - - -void CVibraPlugin::ProcessCommandL( const TInt aCommandId, - const TUint8 aTransId, -#ifdef PUBLISH_STATE_INFO - TDesC8& aData ) -#else - TDesC8& /*aData*/ ) -#endif // PUBLISH_STATE_INFO - { - COMPONENT_TRACE((_L("HWRM VibraPlugin: Processing command: 0x%x, TransId: 0x%x"), aCommandId, aTransId)); - - switch ( aCommandId ) - { - case HWRMVibraCommand::EStartVibraCmdId: - { - COMPONENT_TRACE(_L("HWRM VibraPlugin: Processed EStartVibraCmdId")); - } - break; - case HWRMVibraCommand::EStartVibraWithDefaultSettingsCmdId: - { - COMPONENT_TRACE(_L("HWRM VibraPlugin: Processed EStartVibraWithDefaultSettingsCmdId")); - } - break; - case HWRMVibraCommand::EPulseVibraCmdId: - { - COMPONENT_TRACE(_L("HWRM VibraPlugin: Processed EPulseVibraCmdId")); - } - break; - case HWRMVibraCommand::EStopVibraCmdId: - { - COMPONENT_TRACE(_L("HWRM VibraPlugin: Processed EStopVibraCmdId")); - } - break; - - default : - { - COMPONENT_TRACE((_L("HWRM VibraPlugin: Unknown Command: 0x%x"), aCommandId)); - } - break; - } - - TInt retval(KErrNone); - TInt timeout(500); // microseconds - -#ifdef PUBLISH_STATE_INFO - // publish - iCmdProperty.Set(aCommandId); - iDataProperty.Set(aData); -#endif // PUBLISH_STATE_INFO - - // create new timer - CPluginTimer* timer = CPluginTimer::NewL(timeout, iResponseCallback, aCommandId, aTransId, retval, this); - CleanupStack::PushL(timer); - iTimers.AppendL(timer); - CleanupStack::Pop(timer); - } - -void CVibraPlugin::CancelCommandL( const TUint8 aTransId, -#if defined(_DEBUG) && defined(COMPONENT_TRACE_FLAG) - const TInt aCommandId) -#else - const TInt /*aCommandId*/) -#endif - { - COMPONENT_TRACE((_L("HWRM VibraPlugin: Cancelling command: 0x%x, TransId: 0x%x"), aCommandId, aTransId)); - COMPONENT_TRACE((_L("HWRM VibraPlugin: Cancelling command - iTimers.Count(): %d "), iTimers.Count())); - - for( TInt i = 0; i < iTimers.Count(); i++ ) - { - if ( iTimers[i]->TransId() == aTransId ) - { - delete iTimers[i]; - iTimers.Remove(i); - COMPONENT_TRACE((_L("HWRM VibraPlugin: Cancelling command - Removed command: 0x%x, TransId: 0x%x"), aCommandId, aTransId)); - break; - } - } - } - -void CVibraPlugin::GenericTimerFired(MHWRMPluginCallback* aService, - TInt aCommandId, - const TUint8 aTransId, - TInt aRetVal) - { - COMPONENT_TRACE((_L("HWRM VibraPlugin: GenericTimerFired (0x%x, 0x%x, %d)"), aCommandId, aTransId, aRetVal)); - - __ASSERT_ALWAYS(aService != NULL, User::Invariant() ); - - HWRMVibraCommand::TErrorCodeResponsePackage retvalPackage(aRetVal); - - TRAPD(err, aService->ProcessResponseL(aCommandId, aTransId, retvalPackage)); - - if ( err != KErrNone ) - { - COMPONENT_TRACE((_L("HWRM VibraPlugin: Error in ProcessResponseL: %d"), err)); - } - - // delete obsolete timers - for( TInt i = (iTimers.Count()-1); i > -1 ; i-- ) - { - if ( !iTimers[i]->IsActive() ) - { - delete iTimers[i]; - iTimers.Remove(i); - COMPONENT_TRACE((_L("HWRM VibraPlugin: GenericTimerFired - Removed obsolete timer"))); - } - } - - } diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/hwrmstubplugins/src/proxy.cpp --- a/systemswstubs/hwrmstubplugins/src/proxy.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hardware Resource Manager stub plugins proxy definition file -* -*/ - - -#include -#include - -#include "LightPlugin.h" -#include "VibraPlugin.h" -#include "FmtxPlugin.h" -#include "PowerStatePlugin.h" - -// Map the interface implementation UIDs to implementation factory functions -const TImplementationProxy ImplementationTable[] = - { - IMPLEMENTATION_PROXY_ENTRY(0x1020503F, CLightPlugin::NewL), - IMPLEMENTATION_PROXY_ENTRY(0x1020503E, CVibraPlugin::NewL), - IMPLEMENTATION_PROXY_ENTRY(0x2000BF15, CFmtxPlugin::NewL), - IMPLEMENTATION_PROXY_ENTRY(0x1020503D, CPowerStatePlugin::NewL) - }; - -// Exported proxy for instantiation method resolution. -EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount ) - { - aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); - return ImplementationTable; - } diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/layers.sysdef.xml --- a/systemswstubs/layers.sysdef.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/sensorchannelsreference/group/bld.inf --- a/systemswstubs/sensorchannelsreference/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information file for project sensorchannelsreference -* -*/ - - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS -../inc/sensrvproprietaryproperties.h OS_LAYER_PLATFORM_EXPORT_PATH(sensrvproprietaryproperties.h) -../inc/sensrvproprietarydatatypes.h OS_LAYER_PLATFORM_EXPORT_PATH(sensrvproprietarydatatypes.h) -../inc/sensrvproprietarychannels.h OS_LAYER_PLATFORM_EXPORT_PATH(sensrvproprietarychannels.h) diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/sensorchannelsreference/inc/sensrvproprietarychannels.h --- a/systemswstubs/sensorchannelsreference/inc/sensrvproprietarychannels.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Proprietary channels definitions -* -*/ - - -#ifndef SENSRVPROPRIETARYCHANNELS_H -#define SENSRVPROPRIETARYCHANNELS_H - -#include - -/** -* - Name: Proprietary example channel type. -* Value of the channel ID must be unique among the all channels. -* To guarantee uniqueness, UID value can be used for channel ID. -* UID values are assigned to developers centrally by Symbian. -* In this example temporary UID range is used (0xExxxxxxx). -* - Type: N/A -* - Datatype: see sensrvproprietarydatatypes.h -* - Description: Example channel definition. -*/ -//const TSensrvChannelTypeId KSensrvProprietaryChanneld = 0xE0000001; - -#endif // SENSRVPROPRIETARYCHANNELS_H diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/sensorchannelsreference/inc/sensrvproprietarydatatypes.h --- a/systemswstubs/sensorchannelsreference/inc/sensrvproprietarydatatypes.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This header provides the proprietary data type definitions. -* -*/ - - -#ifndef SENSRVPROPRIETARYDATATYPES_H -#define SENSRVPROPRIETARYDATATYPES_H - -// See platform provided data type definitions for a channel -// from sensrvchanneldatatypes.h as an example. - -#endif // SENSRVPROPRIETARYDATATYPES_H diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/sensorchannelsreference/inc/sensrvproprietaryproperties.h --- a/systemswstubs/sensorchannelsreference/inc/sensrvproprietaryproperties.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This header provides the proprietary property definitions. -* -*/ - - -#ifndef SENSRVPROPRIETARYPROPERTIES_H -#define SENSRVPROPRIETARYPROPERTIES_H - -#include - -/** -* - Name: Name of the property. -* Property values from 0x0 to 0xffff are reserved for platform use. -* - Type: Defines type of the property (TInt/TReal/TBuf) -* - Scope: Defines a property scope. Property can be defined for a -* channel, for a specific item in a channel or for a server -* related to channel or -* - Group: Defines which category a property belongs -* - Mandatory: Defines is property mandatory or in which groups property is -* mandatory -* - Capability: Capabilities needed to set this property -* - Description: Description of the property -* -*/ -//const TSensrvPropertyId KSensrvProprietaryProperty = 0x00010000; - - -#endif // SENSRVPROPRIETARYPROPERTIES_H diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/data/10205089.rss --- a/systemswstubs/ssyreference/data/10205089.rss Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used as an reference implementation -* Declaration of SSYReferencePlugin ECom resource -* -*/ - - -#include -#include "ecom/registryinfov2.rh" - -// RESOURCE DEFINITIONS -// ----------------------------------------------------------------------------- -// -// 10205089.rss -// Declares info for SSYReference ECom plugin -// -// ----------------------------------------------------------------------------- -// - -RESOURCE REGISTRY_INFO SSYReferencePlugin - { - // UID for the DLL. See SSYReferencePlugin.mmp - resource_format_version = RESOURCE_FORMAT_VERSION_2; - dll_uid = 0x10205089; - interfaces = - { - INTERFACE_INFO - { - // UID of interface that is implemented - interface_uid = KSsyControlInterfaceUid; - implementations = - { - BINARY_IMPLEMENTATION_INFO - { - implementation_uid = 0x10205088; - version_no = 1; - display_name = "SSYReferencePlugin"; - default_data = { - // Double tap channel - 0x1, // ChannelInfoVersion - 0x2F, // ChannelInfoLength - 0x2E, // Flags - 0x81, 0x50, 0x20, 0x10, // ChannelType - 0x02, 0x00, 0x00, 0x00, // ContextType ESensrvContextTypeDevice - 0x0B, 0x00, 0x00, 0x00, // Quantity ESensrvQuantityTapping - 0x0C, 0x53, 0x73, 0x79, 0x52, 0x65, 0x66, 0x44, 0x62, 0x6C, 0x54, 0x61, 0x70, // Location: SsyRefDblTap - 0x06, 0x53, 0x73, 0x79, 0x52, 0x65, 0x66, // VendorId: SsyRef - 0x7F, 0x50, 0x20, 0x10, // ChannelDataTypeId - 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // ChannelSecurityPolicy - - // Accelerometer channel - 0x1, // ChannelInfoVersion - 0x2F, // ChannelInfoLength - 0x1E, // Flags - 0x7E, 0x50, 0x20, 0x10, // ChannelType - 0x02, 0x00, 0x00, 0x00, // ContextType ESensrvContextTypeDevice - 0x0A, 0x00, 0x00, 0x00, // Quantity ESensrvQuantityAcceleration - 0x0C, 0x53, 0x73, 0x79, 0x52, 0x65, 0x66, 0x58, 0x59, 0x5A, 0x43, 0x68, 0x6E, // Location SsyRefXYZChn - 0x06, 0x53, 0x73, 0x79, 0x52, 0x65, 0x66, // VendorId: SsyRef - 0x7E, 0x50, 0x20, 0x10, // ChannelDataTypeId - 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // ChannelSecurityPolicy - - // Magnetometer channel - 0x1, // ChannelInfoVersion - 0x2F, // ChannelInfoLength - 0x1E, // Flags - 0xE0, 0xBE, 0x00, 0x20, // ChannelType - 0x01, 0x00, 0x00, 0x00, // ContextType ESensrvContextAmbient - 0x0E, 0x00, 0x00, 0x00, // Quantity ESensrvQuantityMagnetic - 0x0C, 0x53, 0x73, 0x79, 0x52, 0x65, 0x66, 0x58, 0x59, 0x5A, 0x43, 0x68, 0x6E, // Location: SsyRefXYZChn - 0x06, 0x53, 0x73, 0x79, 0x52, 0x65, 0x66, // VendorId: SsyRef - 0xE0, 0xBE, 0x00, 0x20, // ChannelDataTypeId - 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // ChannelSecurityPolicy - - // Proximity channel - 0x1, // ChannelInfoVersion - 0x2F, // ChannelInfoLength - 0x3E, // Flags - 0x85, 0xE5, 0x00, 0x20, // ChannelType (0x2000E585) - 0x02, 0x00, 0x00, 0x00, // ContextType ESensrvContextTypeDevice - 0x10, 0x00, 0x00, 0x00, // Quantity ESensrvQuantityProximity - 0x0C, 0x53, 0x73, 0x79, 0x52, 0x65, 0x66, 0x50, 0x72, 0x78, 0x43, 0x68, 0x6E, // Location: SsyRefPrxChn - 0x06, 0x53, 0x73, 0x79, 0x52, 0x65, 0x66, // VendorId: SsyRef - 0x85, 0xE5, 0x00, 0x20, // ChannelDataTypeId - 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF // ChannelSecurityPolicy - }; - opaque_data = {}; - } - }; - } - }; - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/group/1020507E.txt Binary file systemswstubs/ssyreference/group/1020507E.txt has changed diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/group/SsyReferenceConfig.xml --- a/systemswstubs/ssyreference/group/SsyReferenceConfig.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,298 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/group/SsyReferenceConfigR.xml --- a/systemswstubs/ssyreference/group/SsyReferenceConfigR.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,269 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/group/SsyReference_Config_template.xml --- a/systemswstubs/ssyreference/group/SsyReference_Config_template.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/group/bld.inf --- a/systemswstubs/ssyreference/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used as an reference implementation -* -*/ - - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS -../rom/ssyreference.iby CORE_OS_LAYER_IBY_EXPORT_PATH(ssyreference.iby) - -// Export config to SensorServers private folder - -// For emulator use -SsyReferenceConfig.xml /epoc32/release/winscw/udeb/z/private/1020507E/reference/SsyReferenceConfig.xml -SsyReferenceConfig.xml /epoc32/release/winscw/urel/z/private/1020507E/reference/SsyReferenceConfig.xml -1020507E.txt /epoc32/release/winscw/udeb/z/private/10202be9/1020507E.txt -1020507E.txt /epoc32/release/winscw/urel/z/private/10202be9/1020507E.txt - -// For HW use -SsyReferenceConfig.xml /epoc32/data/z/private/1020507E/reference/SsyReferenceConfig.xml -1020507E.txt /epoc32/data/z/private/10202be9/1020507E.txt - -PRJ_MMPFILES -#ifdef RD_SENSOR_FW -ssyreferenceplugin.mmp -#endif // RD_SENSOR_FW - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/group/ssyreferenceplugin.mmp --- a/systemswstubs/ssyreference/group/ssyreferenceplugin.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for ssyreferenceplugin.dll -* -*/ - - -#include - -TARGET ssyreferenceplugin.dll -TARGETTYPE PLUGIN -VENDORID VID_DEFAULT - -// ECom Dll recognition UID followed by the unique UID for this dll -UID 0x10009D8D 0x10205089 - -CAPABILITY CAP_ECOM_PLUGIN - -SOURCEPATH ../src - -SOURCE ssyreferencechanneldataprovider.cpp -SOURCE ssyreferencecontrol.cpp -SOURCE ssyreferencepropertyprovider.cpp -SOURCE ssyreferencechannel.cpp -SOURCE ssyreferenceconfig.cpp -SOURCE ssyreferencecmdhandler.cpp -SOURCE ECOMEntryPoint.cpp - -USERINCLUDE ../inc - -OS_LAYER_SYSTEMINCLUDE - -// The resource name should have to be same as the third UID above - -START RESOURCE ../data/10205089.rss -#ifdef SYMBIAN_SECURE_ECOM -TARGET ssyreferenceplugin.rsc -#endif // SYMBIAN_SECURE_ECOM -END - -LIBRARY euser.lib -LIBRARY ecom.lib -LIBRARY sensrvutil.lib -LIBRARY xmlparser.lib // for XML parser -LIBRARY efsrv.lib -LIBRARY xmldom.lib diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/inc/ssyreferencechannel.h --- a/systemswstubs/ssyreference/inc/ssyreferencechannel.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,238 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Reference implementation of SSY Channel -* -*/ - - -#ifndef SSYREFERENCECHANNEL_H -#define SSYREFERENCECHANNEL_H - -#include -#include -#include "ssyreferenceconfig.h" - -class CSsyReferenceControl; -class CSsyReferenceChannelDataProvider; -class CSsyReferencePropertyProvider; -class CSsyReferenceCmdHandler; - -/** - * Main control class for SSY. Controls sensor basic functionality and provides mandatory - * ECOM interface specific things. - * - * @lib ssyreferenceplugin.lib - * @since S60 5.0 - */ -class CSsyReferenceChannel : public CBase - { - -public: - - /** - * Enumeration of the state of this channel - */ - enum TSsyReferenceChannelState - { - ESsyReferenceChannelIdle, // Channel created, not opened - ESsyReferenceChannelOpening, // Processing channel opening - ESsyReferenceChannelOpen, // Channel is open - ESsyReferenceChannelReceiving, // Channel is receiving data - ESsyReferenceChannelClosing // Processing channel closing. After this state is idle - }; - -public: - - /** - * Two-phase constructor - * - * @since S60 5.0 - * @param[in] aSsyControl Reference to SSY control instance. - * @param[in] aChannelInfo Information of this channel - * @return CSsyReferenceControl* Pointer to created CSsyReferenceControl object - */ - static CSsyReferenceChannel* NewL( CSsyReferenceControl& aSsyControl, TSensrvChannelInfo aChannelInfo ); - - /** - * Virtual destructor - * - * @since S60 5.0 - */ - virtual ~CSsyReferenceChannel(); - - /** - * Request for SSY to open a sensor channel asynchronously. - * Response to the request is delivered through MSsyCallback::ChannelOpened(). - * Initilizes SSY (and the sensor) to be ready for other control commands via - * data and property providers. Multiple OpenChannel()-requests can be - * active for different channels at the same time. - * - * @since S60 5.0 - * @return void Symbian OS error code - */ - TInt OpenChannel(); - - /** - * Request to close a sensor channel asynchronously. - * Response to the request is delivered through MSsyCallback::ChannelClosed(). - * Multiple CloseChannel()-requests can be active for different channels - * at the same time. - * - * @since S60 5.0 - * @return void Symbian OS error code - */ - TInt CloseChannel(); - - /** - * Returns ID of this channel - */ - TInt ChannelId(); - - /** - * Handles response directed to this channel - * - * @since S60 5.0 - * @param[in] aMessage Contains information of the response - */ - void ProcessResponse( TSsyReferenceMsg* aMessage ); - - /** - * Updates the state of this channel - * - * @since S60 5.0 - * @param[in] aNewState State to update this channel - */ - void UpdateState( const TSsyReferenceChannelState aNewState ); - - /** - * Reference to SsyControl - */ - CSsyReferenceControl& SsyControl() const; - - /** - * Reference to command handler - */ - CSsyReferenceCmdHandler& CommandHandler() const; - - /** - * Search property of given property id from the channel properties and - * returns reference to that. Leaves with KErrNotFound if property is not found - * - * @since S60 5.0 - * @param[in] aPropertyId Property ID to locate - * @param[in] aItemIndex Item index if this search conserns specific property - * @param[in] aArrayIndex Indicates array index of property - */ - TSensrvProperty& FindPropertyL( const TSensrvPropertyId aPropertyId, - TInt aItemIndex = KErrNotFound, - TInt aArrayIndex = ESensrvSingleProperty ); - - /** - * Search property of given property id from the channel properties and - * update property values, if not read only - * - * @since S60 5.0 - * @param[in] aProperty Property to find and update - */ - void FindAndUpdatePropertyL( const TSensrvProperty& aProperty ); - - - /** - * Copies properties to param PropertyList - * - * @since S60 5.0 - * @param[in, out] aPropertyList List where to copy properties - */ - void GetProperties( RSensrvPropertyList& aPropertyList ); - -private: - - /** - * C++ constructor. - * - * @since S60 5.0 - * @param[in] aSsyControl Reference to SSY Control instance. - * @param[in] aChannelInfo Information of this channel - */ - CSsyReferenceChannel( CSsyReferenceControl& aSsyControl, TSensrvChannelInfo aChannelInfo ); - - /** - * Symbian 2nd phase constructor. - */ - void ConstructL(); - - /** - * Handles response for OpenChannel and completes transaction by calling - * MSsyCallback::ChannelOpened - * - * @since S60 5.0 - * @param[in] aError Error code indicating the channel opening status - */ - void HandleOpenChannelRespL( const TInt aError ); - - /** - * Handles response for CloseChannel and completes transaction by calling - * MSsyCallback::ChannelClosed - * - * @since S60 5.0 - */ - void HandleCloseChannelResp(); - - /** - * Handles response for StartChannelData. Loops all channel data items and sends - * each item to ChannelDataProvider - * - * @since S60 5.0 - */ - void HandleDataReceivedResp(); - -private: // data - - /** - * Reference to SSY Control to send responses to Sensor Server - */ - CSsyReferenceControl& iSsyControl; - - /** - * Pointer to CSsyReferenceChannelDataProvider owned by this channel - */ - CSsyReferenceChannelDataProvider* iChannelDataProvider; - - /** - * Pointer to CSsyReferencePropertyProvider owned by this channel - */ - CSsyReferencePropertyProvider* iChannelPropertyProvider; - - /** - * Pointer to command handler - */ - CSsyReferenceCmdHandler* iCmdHandler; - - /** - * Information of this channel - */ - TSensrvChannelInfo iChannelInfo; - - /** - * State of this channel. See CSsyReferenceChannel::TSsyReferenceChannelState - */ - TInt iState; - - /** - * Property list of this channel - */ - RSensrvPropertyList iProperties; - }; - -#endif // SSYREFERENCECHANNEL_H diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/inc/ssyreferencechanneldataprovider.h --- a/systemswstubs/ssyreference/inc/ssyreferencechanneldataprovider.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,153 +0,0 @@ -/* -* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Reference implementation of SSY Channel Data Provider interface -* -*/ - - -#ifndef SSYREFERENCECHANNELDATAPROVIDER_H -#define SSYREFERENCECHANNELDATAPROVIDER_H - -#include - -class CSsyReferenceChannel; -class TSsyReferenceMsg; - -/** - * Channel data provider implementation. - * - * @lib ssyreferenceplugin.lib - * @since S60 5.0 - */ -class CSsyReferenceChannelDataProvider : public CBase, public MSsyChannelDataProvider - { - -public: - - /** - * Two-phase constructor - * - * @since S60 5.0 - * @param[in] aChannel Reference to channel this provider belongs to - * @return CSsyReferenceChannelDataProvider* Pointer to created CSsyReferenceControl object - */ - static CSsyReferenceChannelDataProvider* NewL( CSsyReferenceChannel& aChannel ); - - /** - * Virtual destructor - * - * @since S60 5.0 - */ - virtual ~CSsyReferenceChannelDataProvider(); - -// from base class MSsyChannelDataProvider - - /** - * From MSsyChannelDataProvider - * Starts asynchronous data listening. Multiple OpenChannel()-requests - * can be active for different channels at the same time. - * - * @since S60 5.0 - * @param[in] aBuffer Pointer to a data buffer - * @param[in] aCount Indicates data buffer size as a count of the data objects. - */ - void StartChannelDataL( const TSensrvChannelId aChannelId, TUint8* aBuffer, TInt aCount ); - - /** - * From MSsyChannelDataProvider - * Stops asynchronous data listening. The data buffer is not valid after call of - * this function. - * - * @since S60 5.0 - */ - void StopChannelDataL( const TSensrvChannelId aChannelId ); - - /** - * From MSsyChannelDataProvider - * Forces SSY to call BufferFilled() regardless of how many data items have been - * written to buffer. Even if no data items have yet been written, BufferFilled() - * must be called. - * - * @since S60 5.0 - */ - void ForceBufferFilledL( const TSensrvChannelId aChannelId ); - - /** - * Returns a pointer to a specified interface - to allow future extension - * of this class without breaking binary compatibility - * - * @since S60 5.0 - * @param aInterfaceUid Identifier of the interface to be retrieved - * @param aInterface A reference to a pointer that retrieves the specified interface. - */ - void GetChannelDataProviderInterfaceL( TUid aInterfaceUid, TAny*& aInterface ); - - /** - * Channel data item received - * - * @param[in] aMessage Contains channel item - */ - void ChannelDataReceivedL( TSsyReferenceMsg* aMessage ); - -private: - - /** - * C++ constructor. - * @param[in] aChannel Reference to channel this provider belongs to - */ - CSsyReferenceChannelDataProvider( CSsyReferenceChannel& aChannel ); - - /** - * Symbian 2nd phase constructor. - */ - void ConstructL(); - - /** - * Adds data into buffer. - * - *@param[in] aData Data to add to buffer - *@param[in] aSize Size of data - */ - void AddDataToBuffer( TUint8* aData, const TInt aSize ); - - /** - * Sends BufferFilled notification to MSsyCallback - */ - void SendBufferFilled(); - -private: // data - - /** - * Reference to channel for which this provider belongs to - */ - CSsyReferenceChannel& iChannel; - - /** - * Pointer to data buffer in Sensor Server side - */ - TUint8* iDataBuffer; - - /** - * Maximum requested data items - */ - TInt iMaxCount; - - /** - * Number of items in buffer - */ - TInt iDataCount; - - }; - -#endif // SSYREFERENCECHANNELDATAPROVIDER_H diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/inc/ssyreferencecmdhandler.h --- a/systemswstubs/ssyreference/inc/ssyreferencecmdhandler.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,148 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Command handler for SSY <--> Sensor messages -* -*/ - - -#ifndef SSYREFERENCECMDHANDLER_H -#define SSYREFERENCECMDHANDLER_H - -#include -#include "ssyreferenceconfig.h" - -// FORWARD DECLARATIONS -class CSsyReferenceChannel; - -/** - * Command handler class for handling commands of one channel. Each opened - * channel has its own instance of this class - * - * @lib ssyreferenceplugin.lib - * @since S60 5.0 - */ -class CSsyReferenceCmdHandler : public CActive - { - -public: - - /** - * Two-phase constructor - * - * @since S60 5.0 - * @param[in] aSsyChannel Reference to SSY Channel instance. - * @return CSsyReferenceCmdHandler* Pointer to created CSsyReferenceCmdHandler object - */ - static CSsyReferenceCmdHandler* NewL( CSsyReferenceChannel& aSsyChannel ); - - /** - * Virtual destructor - * - * @since S60 5.0 - */ - virtual ~CSsyReferenceCmdHandler(); - -// from base class CSsyControl - - /** - * Processes command specified in param aMessage. - * - * @since S60 5.0 - * @param[in] aMessage Contains command information to process - * @return void Symbian OS error code - */ - TInt ProcessCommand( TSsyReferenceMsg aMessage ); - - /** - * From CActive - */ - void RunL(); - - /** - * From CActive - */ - void DoCancel(); - - /** - * From CActive - */ - TInt RunError( TInt aError ); - - /** - * Callback function for DataItem generation - */ - static TInt DataItemCallback( TAny* aThis ); - - /** - * Handles data item generation. Called from DataItemCallback - */ - TInt GenerateChannelDataItem(); - -private: - - /** - * C++ constructor. - * - * @since S60 5.0 - * @param[in] aSsyChannel Reference to SSY Channel instance. - */ - CSsyReferenceCmdHandler( CSsyReferenceChannel& aSsyChannel ); - - /** - * Symbian 2nd phase constructor. - */ - void ConstructL(); - - /** - * Makes synchronous calls asynchronous - */ - void IssueRequest( TInt aError = KErrNone ); - - /** - * Sends response to channel - */ - void SendResponse( TInt aError = KErrNone ); - -private: // data - - /** - * Reference to SSY Conrtol to send responses for commands - */ - CSsyReferenceChannel& iSsyChannel; - - /** - * Pointer to currently processing message - */ - TSsyReferenceMsg* iMessage; - - /** - * Data item array - */ - TSsyRefDataItemArray iDataItemArray; - - /** - * Pointer to next item to generate in iDataItemArray - */ - TInt iDataItemPtr; - - /** - * Periodic timer for generating channel data - */ - CPeriodic* iTimer; - - }; - -#endif // SSYREFERENCECMDHANDLER_H - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/inc/ssyreferenceconfig.h --- a/systemswstubs/ssyreference/inc/ssyreferenceconfig.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,598 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Contains SSY Reference's channel configuration data -* -*/ - - - - -#ifndef SSYREFERENCECONFIG_H -#define SSYREFERENCECONFIG_H - -// INCLUDES -#include -#include -#include -#include -#include -#include -#include -#include - -// CONSTANTS -// Data item sizes -const TInt KSsyRefAxisDataItemSize = sizeof( TSensrvAccelerometerAxisData ); -const TInt KSsyRefTappingDataItemSize = sizeof( TSensrvTappingData ); -const TInt KSsyRefProximityDataItemSize = sizeof( TSensrvProximityData ); -const TInt KSsyRefAmbientLightDataItemSize = sizeof( TSensrvAmbientLightData ); -const TInt KSsyRefMagneticAxisDataItemSize = sizeof( TSensrvMagnetometerAxisData ); - -// ENUMS -enum TSsyReferenceFunctions - { - ESsyReferenceOpenChannel, - ESsyReferenceOpenChannelResp, - ESsyReferenceDataItemReceived, - ESsyReferenceCloseChannel, - ESsyReferenceCloseChannelResp, - ESsyReferenceStartChannelData, - ESsyReferenceStopChannelData - }; - -/** - * Base class for Channel data types. Contains iChannelDataType which is set - * by derived classes on construction. - */ -class TSsyRefChannelDataBase - { - public: - /** - * Enumeration for possible channel data types - */ - enum TSsyRefChannelDataType - { - ESsyRefChannelTypeTapping = 5000, - ESsyRefChannelTypeAxis, - ESsyRefChannelTypeProximity, - ESsyRefChannelTypeAmbientLight, - ESsyRefChannelTypeMagneticAxis - }; - - TInt ChannelDataType() const { return iChannelDataType; } - TInt Interval() const { return iInterval; } - - void SetTimestamp( const TTime aTimestamp ) { iTimestamp = aTimestamp; } - TTime Timestamp() const { return iTimestamp; } - - TInt Size() const { return iSize; } - - protected: - - /** - * Protected constructor as this class is not supposed to be instantiate - * directly. - */ - TSsyRefChannelDataBase() {} - - protected: // data - - /** - * Identifies the type of data type class derived from this base class - */ - TInt iChannelDataType; - - /** - * Interval. Indicates time in ms from previous item until next item is produced - */ - TInt iInterval; - - /** - * Timestamp. Time when this data item is generated. - */ - TTime iTimestamp; - - /** - * Size of one data item. This is filled by derived class - */ - TInt iSize; - - /** - * Axis data item values. - * Accessible from TSsyRefChannelDataAxis/TSsyRefChannelDataMagneticAxis classes - */ - TInt iXAxis; - TInt iYAxis; - TInt iZAxis; - /** - * Axis data calibrated values. - * Accessible from TSsyRefChannelDataMagneticAxis classes - */ - TInt iXAxisCalib; - TInt iYAxisCalib; - TInt iZAxisCalib; - - - /** - * Proximity data item values. - * Accessible only from TSsyRefChannelProximity class - */ - TInt iProximityState; - - /** - * AmbientLight data item values. - * Accessible only from TSsyRefChannelAmbientLight class - */ - TInt iAmbientLightState; - - /** - * Tapping data item values. Difrection of the tapping. - * Accessible only from TSsyRefChannelDataTapping class - */ - TInt iDirection; - }; - -// Type definition array for Data item base class -typedef RArray TSsyRefDataItemArray; - -/** - * Message item for SSY <--> Sensor communications - * Contains Channel ID for which the message belongs to, - * Function ID that identifies the command and - * error for error cases. - */ -class TSsyReferenceMsg - { - public: - - /** - * Constructor of the TSsyReferenceMsg - * - * @since S60 5.0 - * @param[in] aChannelId Channel identifier - * @param[in] aFunction See TSsyReferenceFunctions - */ - TSsyReferenceMsg( TInt aChannelId, TInt aFunction ) : - iChannelId( aChannelId ), - iFunction( aFunction ), - iError( KErrNone ) - {} - - /** - * Copy constructor of the TSsyReferenceMsg - * - * @since S60 5.0 - * @param[in] aMsg Object to be copied to constructed object - */ - TSsyReferenceMsg( const TSsyReferenceMsg& aMsg ) : - iChannelId( aMsg.iChannelId ), - iFunction( aMsg.iFunction ), - iError( aMsg.iError ) - {} - - TInt ChannelId() { return iChannelId; } - - void SetFunction( TInt aFunction ) { iFunction = aFunction; } - TInt Function() { return iFunction; } - - void SetError( TInt aError ) { iError = aError; } - TInt Error() { return iError; } - - void SetDataItem( TSsyRefChannelDataBase* aDataItem ) { iDataItem = aDataItem; } - TSsyRefChannelDataBase* DataItem() const { return iDataItem; } - - private: // data - - TInt iChannelId; // Identifies the channel - TInt iFunction; // Identifies the command - TInt iError; // Error is passed to response handler - - // Data item for received data. This is casted to correct data item - // class implementation according to ChannelDataType - TSsyRefChannelDataBase* iDataItem; - }; - -/** - * Tapping data type class implementation. - */ -class TSsyRefChannelDataTapping : public TSsyRefChannelDataBase - { - public: - - TSsyRefChannelDataTapping( TInt aDirection, TInt aInterval ) - { - iChannelDataType = ESsyRefChannelTypeTapping; - iSize = KSsyRefTappingDataItemSize; - iInterval = aInterval; - iDirection = aDirection; - } - - TInt Direction() const { return iDirection; } - }; - -/** - * XYZ Axis data type class implementation. - */ -class TSsyRefChannelDataAxis : public TSsyRefChannelDataBase - { - public: - - TSsyRefChannelDataAxis( TInt aXAxis, TInt aYAxis, TInt aZAxis, - TInt aInterval ) - { - iChannelDataType = ESsyRefChannelTypeAxis; - iSize = KSsyRefAxisDataItemSize; - iInterval = aInterval; - iXAxis = aXAxis; - iYAxis = aYAxis; - iZAxis = aZAxis; - } - - TInt XAxis() const { return iXAxis; } - TInt YAxis() const { return iYAxis; } - TInt ZAxis() const { return iZAxis; } - }; - - -/** - * Proximity data type class implementation. - */ -class TSsyRefChannelDataProximity : public TSsyRefChannelDataBase - { - public: - - TSsyRefChannelDataProximity( TInt aProximityState, TInt aInterval ) - { - iChannelDataType = ESsyRefChannelTypeProximity; - iSize = KSsyRefProximityDataItemSize; - iInterval = aInterval; - iProximityState = aProximityState; - } - - TInt ProximityState() const { return iProximityState; } - }; - -/** - * AmbientLight data type class implementation. - */ -class TSsyRefChannelDataAmbientLight : public TSsyRefChannelDataBase - { - public: - - TSsyRefChannelDataAmbientLight( TInt aAmbientLightState, TInt aInterval ) - { - iChannelDataType = ESsyRefChannelTypeAmbientLight; - iSize = KSsyRefAmbientLightDataItemSize; - iInterval = aInterval; - iAmbientLightState = aAmbientLightState; - } - - TInt AmbientLightState() const { return iAmbientLightState; } - }; - -/** - * XYZ Axis data type class implementation. - */ -class TSsyRefChannelDataMagneticAxis : public TSsyRefChannelDataBase - { - public: - - TSsyRefChannelDataMagneticAxis( TInt aXAxis, TInt aYAxis, TInt aZAxis, - TInt aXAxisCalib, TInt aYAxisCalib, TInt aZAxisCalib, TInt aInterval ) - { - iChannelDataType = ESsyRefChannelTypeMagneticAxis; - iSize = KSsyRefMagneticAxisDataItemSize; - iInterval = aInterval; - iXAxis = aXAxis; - iYAxis = aYAxis; - iZAxis = aZAxis; - iXAxisCalib = aXAxisCalib; - iYAxisCalib = aYAxisCalib; - iZAxisCalib = aZAxisCalib; - } - - TInt XAxis() const { return iXAxis; } - TInt YAxis() const { return iYAxis; } - TInt ZAxis() const { return iZAxis; } - TInt XAxisCalib() const { return iXAxisCalib; } - TInt YAxisCalib() const { return iYAxisCalib; } - TInt ZAxisCalib() const { return iZAxisCalib; } - }; - -/** - * Channel ID pair class for pairing config file channel id and - * Sensor Server generated channel ID. - * - */ -class TSsyRefChannelIdPair - { - public: - /** - * Constructor of the TSsyRefChannelIdPair - * - * @since S60 5.0 - * @param[in] aConfigChannelId Channel identifier from config file - */ - TSsyRefChannelIdPair( TInt aConfigChannelId ) : - iConfigChannelId( aConfigChannelId ) - {} - - TInt ConfigId() const { return iConfigChannelId; } - TInt ServerId() const { return iSrvChannelId; } - - void SetServerId( const TInt aSrvId ) { iSrvChannelId = aSrvId; } - - private: // data - - TInt iConfigChannelId; // Config file ID of the channel - TInt iSrvChannelId; // Sensor server assigned ID of the channel - }; - -typedef RArray TSsyRefChannelIdArray; - - -// CONSTANTS - -/** - * Configuration class for SSY reference plugin. Generates configured SSY channel information. - * This keeps reference SSY implementation independent from 'sensor' it uses. This class is fully - * modifiable regarding to the needs of this SSY. It may be for example accelerometer sensor - * without any changes in the SSY reference implementation. Only this class is modified. - * - * @lib ssyreferenceplugin.lib - * @since S60 5.0 - */ -class CSsyReferenceConfig : public CActive, public MMDXMLParserObserver - { - -public: - - /** - * Two-phase constructor - * - * @since S60 5.0 - * @return CSsyReferenceConfig* Pointer to created CSsyReferenceControl object - */ - static CSsyReferenceConfig* NewL(); - - /** - * Virtual destructor - * - * @since S60 5.0 - */ - virtual ~CSsyReferenceConfig(); - - /** - * From CActive - */ - void RunL(); - - /** - * From CActive - */ - void DoCancel(); - - /** - * From CActive - */ - TInt RunError( TInt aError ); - - /** - * From MMDXMLParserObserver - * - * Call back function used to inform a client of the Parser when a parsing operation completes. - * @since S60 5.0 - */ - void ParseFileCompleteL(); - - /** - * Starts parsing config file. This function blocks until file is parsed - * @since S60 5.0 - */ - void InitConfigL(); - - /** - * Total number of channels this SSY provides - * - * @since S60 5.0 - * @return TInt Count of channels this SSY is configured to provide - */ - TInt ChannelCount(); - - /** - * Generates channels this SSY is configured to provide - * - * @since S60 5.0 - * @param[in,out] aChannnelList Filled with generated channels by this configurator - */ - void GenerateChannels( RSensrvChannelInfoList& aChannelList ); - - /** - * Updates Sensor server's generated channel Ids - * - * @since S60 5.0 - * @param[in] aChannnelList Same list as GenerateChannels produces but - * this contains channel identifiers - */ - void UpdateChannelIds( RSensrvChannelInfoList aChannelList ); - - /** - * Reads all channel data information from config file and fills - * parameters with information - * - * @since S60 5.0 - * @param[in] aSrvChannelId Sensor server generated channel id of the target channel - * @param[in,out] aDataItemList Contains data item objects defined in config file. Each - * Data item is presented as Data Item class derived from TSsyRefChannelDataBase. - * List can contain only one type of derived channel data items - * @param[in,out] aStartInterval Contains start interval to start producing data items - */ - void GetChannelDataInformationL( const TInt aSrvChannelId, - TSsyRefDataItemArray& aDataItemList, - TInt& aStartInterval ); - - /** - * Reads sensor properties from config file and adds them to list - * - * @since S60 5.0 - * @param[out] aPropertyList List where to append properties - */ - void GetSensorPropertiesL( RSensrvPropertyList& aPropertyList ); - - /** - * Reads channel properties from config file and adds them to list - * - * @since S60 5.0 - * @param[in] aSenSrvChannelId Sensor server generated channel id - * @param[out] aPropertyList List where to append properties - */ - void GetChannelPropertiesL( const TInt aSrvChannelId, - RSensrvPropertyList& aPropertyList ); - -private: - - /** - * C++ constructor. - */ - CSsyReferenceConfig(); - - /** - * Symbian 2nd phase constructor. - */ - void ConstructL(); - - /** - * Makes synchronous calls asynchronous - */ - void IssueRequest( TInt aError = KErrNone ); - - /** - * Reads attribute value from element and casts it into TInt value - * - * @since S60 5.0 - * @param[in] aElement Element from where to read attribute - * @param[in] aAttrib Attribute name which to read - * @return TInt Integer value of read value - */ - TInt GetAttributeIntValue( CMDXMLElement& aElement, const TDesC& aAttrib ); - - /** - * Reads attribute value from element and casts it into literal value - * - * @since S60 5.0 - * @param[in] aElement Element from where to read attribute - * @param[in] aAttrib Attribute name which to read - * @param[in/out] aTarget Target descriptor where to copy read literal - */ - void GetAttributeStrValue( CMDXMLElement& aElement, const TDesC& aAttrib, TDes8& aTarget ); - - /** - * Reads attribute value from element and casts it into TReal value - * - * @since S60 5.0 - * @param[in] aElement Element from where to read attribute - * @param[in] aAttrib Attribute name which to read - * @return TReal value of the attribute - */ - TReal GetAttributeRealValue( CMDXMLElement& aElement, const TDesC& aAttrib ); - - /** - * Reads Hexadesimal attribute value from element and casts it into Integer value - * - * @since S60 5.0 - * @param[in] aElement Element from where to read attribute - * @param[in] aAttrib Attribute name which to read - * @return TUint Unsigned integer value of read Hexadesimal value - */ - TUint GetAttributeHexValue( CMDXMLElement& aElement, const TDesC& aAttrib ); - - /** - * Compares Sensor server generated channel IDs and return corresponding - * ConfigFile channel id - * - * @since S60 5.0 - * @param[in] aSrvChannelId SenServer generated channel ID for which pair is needed - * @return TInt ConfigFile channel ID that is paired with aSrvChannelId - */ - TInt ConfigChannelId( const TInt aSrvChannelId ) const; - - /** - * Searches channel element for given SensorServer generated channel ID - * - * @since S60 5.0 - * @param[in] aSrvChannelId SenServer generated channel ID identifying wanted channel element - * @return CMDXMLElement Pointer to found channel element or NULL if not found - */ - CMDXMLElement* ChannelElement( const TInt aSrvChannelId ); - - /** - * Reads properties from given element and adds them to list. - * Element can be either 'SsyGenealInformation' or 'ChannelItem' - * - * @since S60 5.0 - * @param[in] aElement Element from where to read properties - * @param[out] aPropertyList List where to append properties - */ - void GetElementPropertiesL( CMDXMLElement& aElement, RSensrvPropertyList& aPropertyList ); - - -private: // data - - /** - * Pointer of the config xml-file parser - */ - CMDXMLParser* iConfigParser; - - /** - * Contains Ssy general information element and all of its childs - */ - CMDXMLElement* iGenralInfoElement; - - /** - * Contains Ssy Channel information group element and all of its childs - * including each channel information and channel data for testing purpose - */ - CMDXMLElement* iChannelGroupElement; - - /** - * Number of channels defined in config file - */ - TInt iChannelCount; - - /** - * Active scheduler wait for blocking construction until config file is parsed - */ - CActiveSchedulerWait iSchedulerWait; - - /** - * Indicates is config file parsed - */ - TBool iConfigFileParsed; - - /** - * Channel ID pair array - */ - TSsyRefChannelIdArray iChannelPairArray; - - /** - * Elements of the config file. These needs to be stored - */ - CMDXMLDocument* iConfigFile; - CMDXMLElement* iSsyReferenceConfig; // Root of the config - - }; - -#endif //SSYREFERENCECONFIG_H - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/inc/ssyreferencecontrol.h --- a/systemswstubs/ssyreference/inc/ssyreferencecontrol.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,159 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Reference implementation of SSY Control -* -*/ - - -#ifndef SSYREFERENCECONTROL_H -#define SSYREFERENCECONTROL_H - -#include -#include "ssyreferenceconfig.h" - -// FORWARD DECLARATIONS -class CSsyReferenceChannel; - -/** - * Main control class for SSY. Controls sensor basic functionality and provides mandatory - * ECOM interface specific things. - * - * @lib ssyreferenceplugin.lib - * @since S60 5.0 - */ -class CSsyReferenceControl : public CSsyControl - { - -public: - - /** - * Two-phase constructor - * - * @since S60 5.0 - * @param[in] aSsyCallback Reference to SSY callback instance. - * @return CSsyReferenceControl* Pointer to created CSsyReferenceControl object - */ - static CSsyReferenceControl* NewL( MSsyCallback& aSsyCallback ); - - /** - * Virtual destructor - * - * @since S60 5.0 - */ - virtual ~CSsyReferenceControl(); - -// from base class CSsyControl - - /** - * From CSsyControl - * Request for SSY to open a sensor channel asynchronously. - * Response to the request is delivered through MSsyCallback::ChannelOpened(). - * Initilizes SSY (and the sensor) to be ready for other control commands via - * data and property providers. Multiple OpenChannel()-requests can be - * active for different channels at the same time. - * - * @since S60 5.0 - * @param[in] aChannelID Channel that is requested to be opened - * @return Symbian OS error code - */ - void OpenChannelL( TSensrvChannelId aChannelID ); - - /** - * From CSsyControl - * Request to close a sensor channel asynchronously. - * Response to the request is delivered through MSsyCallback::ChannelClosed(). - * Multiple CloseChannel()-requests can be active for different channels - * at the same time. - * - * @since S60 5.0 - * @param[in] aChannelID Channel that is reqeusted to be closed - * @leave Symbian OS error code - */ - void CloseChannelL( TSensrvChannelId aChannelID ); - - /** - * Reference to SSY Callback instance - */ - MSsyCallback& SsyCallback() const; - - /** - * Reference to SSY Config file - */ - CSsyReferenceConfig& SsyConfig() const; - /** - * Handles response to CSsyReferenceCmdHandler::ProcessCommand - * - * @since S60 5.0 - * @param[in] aMessage Contains information of the response - */ - void ProcessResponse( TSsyReferenceMsg* aMessage ); - - /** - * Search property of given property id from the channel properties and - * returns reference to that. Leaves with KErrNotFound if property is not found - * - * @since S60 5.0 - * @param[in] aPropertyId Property ID to locate - * @param[in] aArrayIndex Propertys array index - * @param[out] aProperty Contains found property - */ - void FindPropertyL( const TSensrvPropertyId aPropertyId, - const TInt aArrayIndex, - TSensrvProperty& aProperty ); - -private: - - /** - * C++ constructor. - * - * @since S60 5.0 - * @param[in] aSsyCallback Reference to SSY callback instance. - */ - CSsyReferenceControl( MSsyCallback& aSsyCallback ); - - /** - * Symbian 2nd phase constructor. - */ - void ConstructL(); - - /** - * Finds and returns pointer to channel - */ - CSsyReferenceChannel* FindChannelL( TSensrvChannelId aChannelID ); - -private: // data - - /** - * Reference to SSY CallBack to send responses to Sensor Server - */ - MSsyCallback& iSsyCallback; - - /** - * Pointer array of all channels provided by this SSY - */ - CArrayPtrFlat* iChannelArray; - - /** - * Pointer to config file parser - */ - CSsyReferenceConfig* iConfigFile; - - /** - * Property list of general properties of this SSY - */ - RSensrvPropertyList iProperties; - - }; - -#endif // SSYREFERENCECONTROL_H diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/inc/ssyreferencepropertyprovider.h --- a/systemswstubs/ssyreference/inc/ssyreferencepropertyprovider.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,140 +0,0 @@ -/* -* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Reference implementation of SSY Property Provider interface -* -*/ - - -#ifndef SSYREFERENCEPROPERTYPROVIDER_H -#define SSYREFERENCEPROPERTYPROVIDER_H - -#include - -class CSsyReferenceChannel; - -/** - * Channel property provider implementation. - * - * @lib ssyreferenceplugin.lib - * @since S60 5.0 - */ -class CSsyReferencePropertyProvider : public CBase, public MSsyPropertyProvider - { - -public: - - /** - * Two-phase constructor - * - * @since S60 5.0 - * @param[in] aChannel Reference to channel this provider belongs to - * @return CSsyReferenceChannelDataProvider* Pointer to created CSsyReferenceControl object - */ - static CSsyReferencePropertyProvider* NewL( CSsyReferenceChannel& aChannel ); - - /** - * Virtual destructor - * - * @since S60 5.0 - */ - virtual ~CSsyReferencePropertyProvider(); - -// from base class MSsyPropertyProvider - - /** - * From MSsyPropertyProvider - * Check if property value affects other sensor channels already open. - * If the new property value is legal but affects somehow other channels' properties, - * SSY must return list of the affected channels so that the sensor server can - * check if the client allowed to set this property. If the SSY value - * is not legal SSY must leave with KErrArgument-value. - * - * @since S60 5.0 - * @param[in] aProperty Property to be checked. - * @param[out] aAffectedChannels Return list of the channel which will be affected if the property - * value will be set. - * @leave KErrArgument If the property value is illegal. - */ - void CheckPropertyDependenciesL( const TSensrvChannelId aChannelId, - const TSensrvProperty& aProperty, - RSensrvChannelList& aAffectedChannels ); - - /** - * From MSsyPropertyProvider - * Set property for the channel. Before the sensor server sets the property value, - * it is checked with CheckPropertyDependenciesL()-function. - * This means a property value should always be valid for the SSY. - * - * @since S60 5.0 - * @param[in] aProperty Rereference to a property object to be set - */ - void SetPropertyL( const TSensrvChannelId aChannelId, - const TSensrvProperty& aProperty ); - - /** - * From MSsyPropertyProvider - * Get channel property value. The property parameter contains channel id and - * item index. SSY fills values and attributes to the property object. - * - * @since S60 5.0 - * @param[in, out] aProperty Reference to a property object to be filled - * with property values and attributes. - */ - void GetPropertyL( const TSensrvChannelId aChannelId, - TSensrvProperty& aProperty ); - - /** - * From MSsyPropertyProvider - * Get all channel properties. Returns all properties which are related to this channel. - * - * @since S60 5.0 - * @param[out] aChannelPropertyList List of the all properties of the channel. - */ - void GetAllPropertiesL( const TSensrvChannelId aChannelId, - RSensrvPropertyList& aChannelPropertyList ); - - /** - * Returns a pointer to a specified interface - to allow future extension - * of this class without breaking binary compatibility - * - * @since S60 5.0 - * @param aInterfaceUid Identifier of the interface to be retrieved - * @param aInterface A reference to a pointer that retrieves the specified interface. - */ - void GetPropertyProviderInterfaceL( TUid aInterfaceUid, - TAny*& aInterface ); - -private: - - /** - * C++ constructor. - * @param[in] aChannel Reference to channel this provider belongs to - */ - CSsyReferencePropertyProvider( CSsyReferenceChannel& aChannel ); - - /** - * Symbian 2nd phase constructor. - */ - void ConstructL(); - -private: // data - - /** - * Reference to channel for which this provider belongs to - */ - CSsyReferenceChannel& iChannel; - - }; - -#endif // SSYREFERENCEPROPERTYPROVIDER_H diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/inc/ssyreferencetrace.h --- a/systemswstubs/ssyreference/inc/ssyreferencetrace.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,110 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef SSYREFERENCETRACE_H -#define SSYREFERENCETRACE_H - -// INCLUDES -#include - -// PC-LINT OPTIONS -// Removes null statement not in line by itself warnings from -// COMPONENT_TRACE macros -//lint -esym(960,54) - -// Removes "area too small" pointer cast warnings. -//lint -e826 - - - -// CONSTANTS -// MACROS -#ifdef _DEBUG - - #ifdef THREAD_TRACE_FLAG - - #define THREAD_TRACE RDebug::Print(RThread().Name()); - - #else - - #define THREAD_TRACE - - #endif // #ifdef THREAD_TRACE_FLAG - - #ifdef BUFFER_TRACE_FLAG - - #define BUFFER_TRACE_DEBUG - #define DEBUG_PRINT_BUFFER DebugPrintBuffer(); - #define BUFFER_TRACE( a ) RDebug::Print a - - #else - - #define DEBUG_PRINT_BUFFER - #define BUFFER_TRACE( a ) - - #endif // #ifdef THREAD_TRACE_FLAG - - #ifdef COMPONENT_TRACE_FLAG - - #define COMPONENT_TRACE( a ) THREAD_TRACE;RDebug::Print a - #define COMPONENT_TRACE_DEBUG - - #else // #ifdef COMPONENT_TRACE_FLAG - - #define COMPONENT_TRACE( a ) - - #endif //#ifdef COMPONENT_TRACE_FLAG - - #ifdef API_TRACE_FLAG - - #define API_TRACE( a ) THREAD_TRACE;RDebug::Print a - #define API_TRACE_DEBUG - - #else //#ifdef API_TRACE_FLAG - - #define API_TRACE( a ) - - #endif //#ifdef API_TRACE_FLAG - - #ifdef ERROR_TRACE_FLAG - - #define ERROR_TRACE( a ) THREAD_TRACE;RDebug::Print a - #define ERROR_TRACE_DEBUG - - #else //#ifdef ERROR_TRACE_FLAG - - #define ERROR_TRACE( a ) - - #endif //#ifdef ERROR_TRACE_FLAG - -#else // #ifdef _DEBUG - - #define COMPONENT_TRACE( a ) - #define API_TRACE( a ) - #define ERROR_TRACE( a ) - #define BUFFER_TRACE( a ) - #define THREAD_TRACE - #define DEBUG_PRINT_BUFFER - -#endif //#ifdef _DEBUG - -#endif // SSYREFERENCETRACE_H - - -// End of File - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/rom/ssyreference.iby --- a/systemswstubs/ssyreference/rom/ssyreference.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Reference / stub implementation for Sensor framework SSY plugin -* -*/ - - -#ifndef SSYREFERENCE_IBY -#define SSYREFERENCE_IBY - -#ifdef RD_SENSOR_FW -ECOM_PLUGIN(ssyreferenceplugin.dll, ssyreferenceplugin.rsc) -data=ZPRIVATE\1020507E\reference\SsyReferenceConfig.xml \private\1020507E\reference\SsyReferenceConfig.xml -#endif // RD_SENSOR_FW - -#endif // SSYREFERENCE_IBY - -// End of File - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/src/ECOMEntryPoint.cpp --- a/systemswstubs/ssyreference/src/ECOMEntryPoint.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ECom entry point for creating ECom plugin -* -*/ - - - -// INCLUDE FILES -#include -#include -#include "ssyreferencecontrol.h" - -// Define the interface UIDs -const TImplementationProxy ImplementationTable[] = - { - IMPLEMENTATION_PROXY_ENTRY( 0x10205088, - CSsyReferenceControl::NewL ) - }; - -// The one and only exported function that is the ECom entry point -EXPORT_C const TImplementationProxy* ImplementationGroupProxy - (TInt& aTableCount) - { - aTableCount = sizeof( ImplementationTable ) / sizeof( TImplementationProxy ); - - return ImplementationTable; - } - -/** - * Standard Symbian OS DLL entry point. - */ -#ifndef EKA2 -TBool E32Dll(TDllReason) - { - return ETrue; - } -#endif // EKA2 - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/src/ssyreferencechannel.cpp --- a/systemswstubs/ssyreference/src/ssyreferencechannel.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,443 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Reference implementation of SSY Channel -* -*/ - - -#include // MSsyCallback -#include "ssyreferencechannel.h" -#include "ssyreferencecontrol.h" // SSY Control -#include "ssyreferencepropertyprovider.h" // iChannelPropertyProvider -#include "ssyreferencechanneldataprovider.h" // iChannelDataProvider -#include "ssyreferencetrace.h" -#include "ssyreferencecmdhandler.h" - - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// CSsyReferenceChannel C++ constructor -// --------------------------------------------------------------------------- -// -CSsyReferenceChannel::CSsyReferenceChannel( CSsyReferenceControl& aSsyControl, TSensrvChannelInfo aChannelInfo ) : - iSsyControl( aSsyControl ), - iChannelInfo( aChannelInfo ), - iState( ESsyReferenceChannelIdle ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::CSsyReferenceChannel()" ) ) ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::CSsyReferenceChannel() - return" ) ) ); - } - - -// --------------------------------------------------------------------------- -// Symbian 2nd phase constructor -// --------------------------------------------------------------------------- -// -void CSsyReferenceChannel::ConstructL() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::ConstructL()" ) ) ); - - // Create command handler - iCmdHandler = CSsyReferenceCmdHandler::NewL( *this ); - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::ConstructL() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceChannel::NewL -// --------------------------------------------------------------------------- -// -CSsyReferenceChannel* CSsyReferenceChannel::NewL( CSsyReferenceControl& aSsyControl, TSensrvChannelInfo aChannelInfo ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::NewL()" ) ) ); - CSsyReferenceChannel* self = new ( ELeave ) CSsyReferenceChannel( aSsyControl, aChannelInfo ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::NewL() - return" ) ) ); - return self; - } - -// --------------------------------------------------------------------------- -// Destructor -// --------------------------------------------------------------------------- -// -CSsyReferenceChannel::~CSsyReferenceChannel() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::~CSsyReferenceChannel()" ) ) ); - - // In case channel is not closed before destruction, providers are not deleted - if ( iChannelDataProvider ) - { - delete iChannelDataProvider; - iChannelDataProvider = NULL; - } - - if ( iChannelPropertyProvider ) - { - delete iChannelPropertyProvider; - iChannelPropertyProvider = NULL; - } - - if ( iCmdHandler ) - { - delete iCmdHandler; - iCmdHandler = NULL; - } - - iProperties.Reset(); - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::~CSsyReferenceChannel() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceChannel::ChannelId -// --------------------------------------------------------------------------- -// -TInt CSsyReferenceChannel::ChannelId() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::ChannelId() - %i" ), iChannelInfo.iChannelId ) ); - return iChannelInfo.iChannelId; - } - -// --------------------------------------------------------------------------- -// CSsyReferenceChannel::SsyControl -// --------------------------------------------------------------------------- -// -CSsyReferenceControl& CSsyReferenceChannel::SsyControl() const - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::SsyControl()" ) ) ); - return iSsyControl; - } - -// --------------------------------------------------------------------------- -// CSsyReferenceControl::SsyCmdHandler -// --------------------------------------------------------------------------- -// -CSsyReferenceCmdHandler& CSsyReferenceChannel::CommandHandler() const - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::SsyCmdHandler()" ) ) ); - return *iCmdHandler; - } - -// --------------------------------------------------------------------------- -// CSsyReferenceChannel::FindPropertyL -// --------------------------------------------------------------------------- -// -TSensrvProperty& CSsyReferenceChannel::FindPropertyL( - const TSensrvPropertyId aPropertyId, - TInt aItemIndex, - TInt aArrayIndex ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::FindPropertyL()" ) ) ); - TSensrvProperty* property = NULL; - TBool propertyFound( EFalse ); - - // Search property - for ( TInt i = 0; i < iProperties.Count() && !propertyFound; i++ ) - { - property = static_cast( &iProperties[i] ); - - // Compare property IDs and array index - if ( property->GetPropertyId() == aPropertyId ) - { - // Compare item index if it is given - if ( ( KErrNotFound == aItemIndex ) || ( property->PropertyItemIndex() == aItemIndex ) ) - { - // Correct property ID is found, now check is it array type of property. - // Either array indexes must match or propertys array index has to be array info - if ( ( property->GetArrayIndex() == aArrayIndex ) || - ( ( property->GetArrayIndex() == ESensrvArrayPropertyInfo ) && - ( ESensrvSingleProperty == aArrayIndex ) ) ) - { - // Correct array index found - propertyFound = ETrue; - } - } - } - } - - // Leave if not found - if ( !propertyFound ) - { - iSsyControl.FindPropertyL( aPropertyId, aArrayIndex, *property ); - } - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::FindPropertyL() - return" ) ) ); - return *property; - } - -// --------------------------------------------------------------------------- -// CSsyReferenceChannel::FindAndUpdatePropertyL -// --------------------------------------------------------------------------- -// -void CSsyReferenceChannel::FindAndUpdatePropertyL( const TSensrvProperty& aProperty ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::FindAndUpdatePropertyL()" ) ) ); - TBool propertyFound( EFalse ); - - // Search property - for ( TInt i = 0; i < iProperties.Count() && !propertyFound; i++ ) - { - // Compare property IDs - if ( iProperties[i].GetPropertyId() == aProperty.GetPropertyId() ) - { - // Compare item index if it is given - if ( ( KErrNotFound != aProperty.PropertyItemIndex() ) && - ( iProperties[i].PropertyItemIndex() == aProperty.PropertyItemIndex() ) ) - { - // Property found -> update if possible - if ( iProperties[i].ReadOnly() ) - { - User::Leave( KErrAccessDenied ); - } - // If modifiable, get type and update value - switch ( iProperties[i].PropertyType() ) - { - case ESensrvIntProperty: - { - TInt value( 0 ); - aProperty.GetValue( value ); - iProperties[i].SetValue( value ); - break; - } - case ESensrvRealProperty: - { - TReal value( 0 ); - aProperty.GetValue( value ); - iProperties[i].SetValue( (TReal) value ); - break; - } - case ESensrvBufferProperty: - { - TBuf8<20> propValue; - aProperty.GetValue( propValue ); - iProperties[i].SetValue( propValue ); - break; - } - default: - { - break; - } - } - propertyFound = ETrue; - } - } - } - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::FindPropertyL() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceChannel::GetProperties -// --------------------------------------------------------------------------- -// -void CSsyReferenceChannel::GetProperties( RSensrvPropertyList& aPropertyList ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::GetProperties()" ) ) ); - // Copy properties one by one to param aPropertyList - TInt propCount( iProperties.Count() ); - RSensrvPropertyList propList( propCount ); - - for ( TInt i = 0; i < propCount; i++ ) - { - propList.Append( iProperties[i] ); - } - - aPropertyList = propList; - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::GetProperties() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceChannel::UpdateState -// --------------------------------------------------------------------------- -// -void CSsyReferenceChannel::UpdateState( const TSsyReferenceChannelState aNewState ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::UpdateState() - %i" ), aNewState ) ); - iState = aNewState; - } - -// --------------------------------------------------------------------------- -// CSsyReferenceChannel::ProcessResponse -// --------------------------------------------------------------------------- -// -void CSsyReferenceChannel::ProcessResponse( TSsyReferenceMsg* aMessage ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::ProcessResponse()" ) ) ); - - if ( aMessage ) - { - switch ( aMessage->Function() ) - { - case ESsyReferenceOpenChannelResp: - { - // Open channel specific handling here - TRAPD( err, HandleOpenChannelRespL( aMessage->Error() ) ); - if ( KErrNone != err ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::ProcessResponse() - Error opening channel: %i" ), err ) ); - } - break; - } - case ESsyReferenceDataItemReceived: - { - // Send data item to data provider - TRAPD( err, iChannelDataProvider->ChannelDataReceivedL( aMessage ) ); - if ( KErrNone != err ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::ProcessResponse() - Error receiving data: %i" ), err ) ); - } - break; - } - case ESsyReferenceCloseChannelResp: - { - // Close channel specific handling here - HandleCloseChannelResp(); - break; - } - default: - { - // This command was not intended to process here, try Control class - iSsyControl.ProcessResponse( aMessage ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::ProcessResponse() - Unknown function" ) ) ); - } - } - } - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::ProcessResponse() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceChannel::OpenChannel -// --------------------------------------------------------------------------- -// -TInt CSsyReferenceChannel::OpenChannel() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::OpenChannel()" ) ) ); - - TInt err( KErrAlreadyExists ); - - // Check that this channel is not already open - if ( ESsyReferenceChannelIdle == iState ) - { - // Update state and issue request. Will continue in HandleOpenChannelResp - UpdateState( ESsyReferenceChannelOpening ); - - // Create message with function spesific information - // and pass it to command handler - err = iCmdHandler->ProcessCommand( TSsyReferenceMsg( ChannelId(), ESsyReferenceOpenChannel ) ); - } - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::OpenChannel() - return" ) ) ); - return err; - } - -// --------------------------------------------------------------------------- -// CSsyReferenceChannel::HandleOpenChannelResp -// --------------------------------------------------------------------------- -// -void CSsyReferenceChannel::HandleOpenChannelRespL( const TInt aError ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::HandleOpenChannelResp()" ) ) ); - - // Open channel asynhronously and complete request with MSsyCallback::ChannelOpened() when - // channel is opened. - - // Create instance of the data provider of this channel - iChannelDataProvider = CSsyReferenceChannelDataProvider::NewL( *this ); - // Create instance of the property provider of this channel - iChannelPropertyProvider = CSsyReferencePropertyProvider::NewL( *this ); - - TInt error( aError ); - - // If channel opening succeeds, update state to Open - if ( KErrNone == aError ) - { - // Update state to Open - UpdateState( ESsyReferenceChannelOpen ); - // Get channel properties - TRAP( error, iSsyControl.SsyConfig().GetChannelPropertiesL( ChannelId(), iProperties ) ); - } - else - { - // Channel opening failed, back to idle - UpdateState( ESsyReferenceChannelIdle ); - } - - // Complete transaction - iSsyControl.SsyCallback().ChannelOpened( ChannelId(), - error, - iChannelDataProvider, - iChannelPropertyProvider ); - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::HandleOpenChannelResp() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceChannel::CloseChannel -// --------------------------------------------------------------------------- -// -TInt CSsyReferenceChannel::CloseChannel() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::CloseChannel()" ) ) ); - - TInt err( KErrNotFound ); - - // Check that this channel is open - if ( ESsyReferenceChannelOpen == iState ) - { - // Update state and issue request. Will continue in HandleCloseChannelResp - UpdateState( ESsyReferenceChannelClosing ); - // Create message with function spesific information - // and pass it to command handler - err = iCmdHandler->ProcessCommand( TSsyReferenceMsg( ChannelId(), ESsyReferenceCloseChannel ) ); - } - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::CloseChannel() - return" ) ) ); - return err; - } - -// --------------------------------------------------------------------------- -// CSsyReferenceChannel::HandleCloseChannelResp -// --------------------------------------------------------------------------- -// -void CSsyReferenceChannel::HandleCloseChannelResp() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::HandleCloseChannelResp()" ) ) ); - - // Close channel and complete request with MSsyCallback::ChannelClosed() when - // channel is closed. - - // Delete providers - delete iChannelDataProvider; - iChannelDataProvider = NULL; - - delete iChannelPropertyProvider; - iChannelPropertyProvider = NULL; - - // Update state to idle - UpdateState( ESsyReferenceChannelIdle ); - - // Reset properties - iProperties.Reset(); - - // Complete transaction - iSsyControl.SsyCallback().ChannelClosed( ChannelId() ); - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannel::HandleCloseChannelResp() - return" ) ) ); - } - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/src/ssyreferencechanneldataprovider.cpp --- a/systemswstubs/ssyreference/src/ssyreferencechanneldataprovider.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,303 +0,0 @@ -/* -* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Reference implementation of SSY Channel Data Provider interface -* -*/ - - -#include "ssyreferencechanneldataprovider.h" -#include "ssyreferencetrace.h" -#include "ssyreferencechannel.h" -#include "ssyreferencecontrol.h" -#include "ssyreferencecmdhandler.h" -#include "ssycallback.h" - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// CSsyReferenceChannelDataProvider C++ constructor -// --------------------------------------------------------------------------- -// -CSsyReferenceChannelDataProvider::CSsyReferenceChannelDataProvider( CSsyReferenceChannel& aChannel ) : - iChannel( aChannel ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannelDataProvider::CSsyReferenceChannelDataProvider()" ) ) ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannelDataProvider::CSsyReferenceChannelDataProvider() - return" ) ) ); - } - - -// --------------------------------------------------------------------------- -// Symbian 2nd phase constructor -// --------------------------------------------------------------------------- -// -void CSsyReferenceChannelDataProvider::ConstructL() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannelDataProvider::ConstructL()" ) ) ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannelDataProvider::ConstructL() - return" ) ) ); - } - - -// --------------------------------------------------------------------------- -// CSsyReferenceChannelDataProvider::NewL -// --------------------------------------------------------------------------- -// -CSsyReferenceChannelDataProvider* CSsyReferenceChannelDataProvider::NewL( CSsyReferenceChannel& aChannel ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannelDataProvider::NewL()" ) ) ); - CSsyReferenceChannelDataProvider* self = new ( ELeave ) CSsyReferenceChannelDataProvider( aChannel ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannelDataProvider::NewL() - return" ) ) ); - return self; - } - -// --------------------------------------------------------------------------- -// Destructor -// --------------------------------------------------------------------------- -// -CSsyReferenceChannelDataProvider::~CSsyReferenceChannelDataProvider() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannelDataProvider::~CSsyReferenceChannelDataProvider()" ) ) ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannelDataProvider::~CSsyReferenceChannelDataProvider() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceChannelDataProvider::StartChannelDataL -// --------------------------------------------------------------------------- -// -void CSsyReferenceChannelDataProvider::StartChannelDataL( - const TSensrvChannelId aChannelId, - TUint8* aBuffer, - TInt aCount ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannelDataProvider::StartChannelDataL()" ) ) ); - - if ( iChannel.ChannelId() != aChannelId ) - { - User::Leave( KErrNotFound ); - } - - // Store buffer pointer - iDataBuffer = aBuffer; - iMaxCount = aCount; - iDataCount = 0; - - // Udpate channel state - iChannel.UpdateState( CSsyReferenceChannel::ESsyReferenceChannelReceiving ); - - // Start receiving - iChannel.CommandHandler().ProcessCommand( TSsyReferenceMsg( aChannelId, ESsyReferenceStartChannelData ) ); - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannelDataProvider::StartChannelDataL() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceChannelDataProvider::StopChannelDataL -// --------------------------------------------------------------------------- -// -void CSsyReferenceChannelDataProvider::StopChannelDataL( const TSensrvChannelId aChannelId ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannelDataProvider::StopChannelDataL()" ) ) ); - - // Leave if wrong channel - if ( iChannel.ChannelId() != aChannelId ) - { - User::Leave( KErrNotFound ); - } - - // Udpate channel state - iChannel.UpdateState( CSsyReferenceChannel::ESsyReferenceChannelOpen ); - - // Stop receiving - iChannel.CommandHandler().ProcessCommand( TSsyReferenceMsg( aChannelId, ESsyReferenceStopChannelData ) ); - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannelDataProvider::StopChannelDataL() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceChannelDataProvider::ForceBufferFilledL -// --------------------------------------------------------------------------- -// -void CSsyReferenceChannelDataProvider::ForceBufferFilledL( const TSensrvChannelId aChannelId ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannelDataProvider::ForceBufferFilledL()" ) ) ); - - // Leave if wrong channel - if ( iChannel.ChannelId() != aChannelId ) - { - User::Leave( KErrNotFound ); - } - - // Send current buffer. Channel keeps receiveing - SendBufferFilled(); - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannelDataProvider::ForceBufferFilledL() - return" ) ) ); - } - -// ----------------------------------------------------------------------------- -// CSensrvTestCases::GetChannelDataProviderInterfaceL -// ----------------------------------------------------------------------------- -// -void CSsyReferenceChannelDataProvider::GetChannelDataProviderInterfaceL( TUid aInterfaceUid, - TAny*& aInterface ) - { - aInterface = NULL; - - if ( aInterfaceUid.iUid == KSsyChannelDataProviderInterface1.iUid ) - { - aInterface = reinterpret_cast( - static_cast( this ) ); - } - } - -// --------------------------------------------------------------------------- -// CSsyReferenceChannelDataProvider::ChannelDataReceived -// --------------------------------------------------------------------------- -// -void CSsyReferenceChannelDataProvider::ChannelDataReceivedL( TSsyReferenceMsg* aMessage ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannelDataProvider::ChannelDataReceived()" ) ) ); - - // Get base class from message - TSsyRefChannelDataBase* dataItemBase = aMessage->DataItem(); - - if ( !dataItemBase ) - { - User::Leave( KErrArgument ); - } - - // get size of the object - TInt size( dataItemBase->Size() ); - - // First, resolve data item type - switch ( dataItemBase->ChannelDataType() ) - { - case TSsyRefChannelDataBase::ESsyRefChannelTypeTapping: - { - // Cast data item base to tapping data item - TSsyRefChannelDataTapping* tappingData = static_cast( dataItemBase ); - TSensrvTappingData senSrvTapping; - senSrvTapping.iTimeStamp = tappingData->Timestamp(); - senSrvTapping.iDirection = tappingData->Direction(); - - // Add mapped data item into buffer - AddDataToBuffer( reinterpret_cast( &senSrvTapping ), size ); - break; - } - case TSsyRefChannelDataBase::ESsyRefChannelTypeAxis: - { - // Cast data item base to Axis data item - TSsyRefChannelDataAxis* axisData = static_cast( dataItemBase ); - TSensrvAccelerometerAxisData senSrvAxis; - senSrvAxis.iTimeStamp = axisData->Timestamp(); - senSrvAxis.iAxisX = axisData->XAxis(); - senSrvAxis.iAxisY = axisData->YAxis(); - senSrvAxis.iAxisZ = axisData->ZAxis(); - - // Add data to buffer - AddDataToBuffer( reinterpret_cast( &senSrvAxis ), size ); - break; - } - case TSsyRefChannelDataBase::ESsyRefChannelTypeProximity: - { - // Cast data item base to tapping data item - TSsyRefChannelDataProximity* proximityData = static_cast( dataItemBase ); - TSensrvProximityData senSrvProximity; - senSrvProximity.iProximityState = ( TSensrvProximityData::TProximityState ) proximityData->ProximityState(); - - // Add mapped data item into buffer - AddDataToBuffer( reinterpret_cast( &senSrvProximity ), size ); - break; - } - case TSsyRefChannelDataBase::ESsyRefChannelTypeAmbientLight: - { - // Cast data item base to tapping data item - TSsyRefChannelDataAmbientLight* ambientLightData = static_cast( dataItemBase ); - TSensrvAmbientLightData senSrvAmbientLight; - senSrvAmbientLight.iAmbientLight = ambientLightData->AmbientLightState(); - - // Add mapped data item into buffer - AddDataToBuffer( reinterpret_cast( &senSrvAmbientLight ), size ); - break; - } - case TSsyRefChannelDataBase::ESsyRefChannelTypeMagneticAxis: - { - // Cast data item base to Axis data item - TSsyRefChannelDataMagneticAxis* axisData = static_cast( dataItemBase ); - TSensrvMagnetometerAxisData senSrvAxis; - senSrvAxis.iTimeStamp = axisData->Timestamp(); - senSrvAxis.iAxisXRaw = axisData->XAxis(); - senSrvAxis.iAxisYRaw = axisData->YAxis(); - senSrvAxis.iAxisZRaw = axisData->ZAxis(); - senSrvAxis.iAxisXCalibrated = axisData->XAxisCalib(); - senSrvAxis.iAxisYCalibrated = axisData->YAxisCalib(); - senSrvAxis.iAxisZCalibrated = axisData->ZAxisCalib(); - - // Add data to buffer - AddDataToBuffer( reinterpret_cast( &senSrvAxis ), size ); - break; - } - default: - { - // Unknown data item -> Leave - User::Leave( KErrUnknown ); - } - } - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannelDataProvider::ChannelDataReceived() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceChannelDataProvider::AddDataToBuffer -// --------------------------------------------------------------------------- -// -void CSsyReferenceChannelDataProvider::AddDataToBuffer( TUint8* aData, const TInt aSize ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannelDataProvider::AddDataToBuffer()" ) ) ); - // Write data to buffer. If buffer is full, send notification to SensorServer - - // Write data bytes one by one to buffer pointer. The actual buffer is in Sensor Server - for ( TInt i = 0; i < aSize; i++ ) - { - *iDataBuffer++ = *aData++; - } - - // Increase number of items count - iDataCount++; - - // Check is maximum data count received - if ( iDataCount == iMaxCount ) - { - // Send BufferFilled notification to Sensor server - SendBufferFilled(); - } - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannelDataProvider::AddDataToBuffer() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceChannelDataProvider::SendBufferFilled -// --------------------------------------------------------------------------- -// -void CSsyReferenceChannelDataProvider::SendBufferFilled() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannelDataProvider::SendBufferFilled()" ) ) ); - // Send BufferFilled notification to Sensor server - iChannel.SsyControl().SsyCallback().BufferFilled( iChannel.ChannelId(), iDataCount, iDataBuffer, iMaxCount ); - iDataCount = 0; - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceChannelDataProvider::SendBufferFilled() - return" ) ) ); - } - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/src/ssyreferencecmdhandler.cpp --- a/systemswstubs/ssyreference/src/ssyreferencecmdhandler.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,362 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Command handler for SSY <--> Sensor messages -* -*/ - - -#include -#include "ssyreferencecmdhandler.h" -#include "ssyreferencecontrol.h" -#include "ssyreferencechannel.h" -#include "ssyreferencetrace.h" - -// ======== CONSTANTS ======== -const TInt KSsyRefShortDelay = 100; - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// CSsyReferenceCmdHandler C++ constructor -// --------------------------------------------------------------------------- -// -CSsyReferenceCmdHandler::CSsyReferenceCmdHandler( CSsyReferenceChannel& aSsyChannel ) : - CActive( EPriorityNormal ), - iSsyChannel( aSsyChannel ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::CSsyReferenceCmdHandler()" ) ) ); - CActiveScheduler::Add( this ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::CSsyReferenceCmdHandler() - return" ) ) ); - } - - -// --------------------------------------------------------------------------- -// Symbian 2nd phase constructor -// --------------------------------------------------------------------------- -// -void CSsyReferenceCmdHandler::ConstructL() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::ConstructL()" ) ) ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::ConstructL() - return" ) ) ); - } - - -// --------------------------------------------------------------------------- -// CSsyReferenceCmdHandler::NewL -// --------------------------------------------------------------------------- -// -CSsyReferenceCmdHandler* CSsyReferenceCmdHandler::NewL( CSsyReferenceChannel& aSsyChannel ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::NewL()" ) ) ); - CSsyReferenceCmdHandler* self = new ( ELeave ) CSsyReferenceCmdHandler( aSsyChannel ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::NewL() - return" ) ) ); - return self; - } - -// --------------------------------------------------------------------------- -// Destructor -// --------------------------------------------------------------------------- -// -CSsyReferenceCmdHandler::~CSsyReferenceCmdHandler() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::~CSsyReferenceCmdHandler()" ) ) ); - - if ( iMessage ) - { - // Send ProcessResponse - iMessage->SetError( KErrCancel ); - iSsyChannel.ProcessResponse( iMessage ); - delete iMessage; - iMessage = NULL; - } - - if ( iTimer ) - { - iTimer->Cancel(); - delete iTimer; - } - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::~CSsyReferenceCmdHandler() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceCmdHandler::ProcessCommand -// --------------------------------------------------------------------------- -// -TInt CSsyReferenceCmdHandler::ProcessCommand( TSsyReferenceMsg aMessage ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::ProcessCommand()" ) ) ); - TInt err( KErrAlreadyExists ); - - // Special case, when channel is reciving, iMessage is not deleted after ProcessCommand - if ( aMessage.Function() == ESsyReferenceStopChannelData ) - { - // Stop 'receiving'. No need to handle this asynchronously - if ( iTimer ) - { - iTimer->Cancel(); - delete iTimer; - iTimer = NULL; - } - - iDataItemArray.Reset(); - iDataItemPtr = 0; - err = KErrNone; - // No need to send ProcessResponse either - delete iMessage; - iMessage = NULL; - } - else if ( !iMessage ) - { - TRAP(err, iMessage = new ( ELeave ) TSsyReferenceMsg( aMessage )); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::ProcessCommand() - error %d creatig TSsyReferenceMsg" ), err ) ); - - switch( aMessage.Function() ) - { - case ESsyReferenceStartChannelData: - { - // Get channel data items and start 'receiving' - IssueRequest(); - err = KErrNone; - break; - } - case ESsyReferenceOpenChannel: - { - // Open channel specific handling here - IssueRequest(); - err = KErrNone; - break; - } - case ESsyReferenceCloseChannel: - { - // Close channel specific handling here - IssueRequest(); - err = KErrNone; - break; - } - default: - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::ProcessCommand() - Unknown function" ) ) ); - err = KErrNotFound; - } - } - } - else - { - err = KErrUnknown; - } - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::ProcessCommand() - return" ) ) ); - return err; - } - -// --------------------------------------------------------------------------- -// CSsyReferenceCmdHandler::IssueRequest -// --------------------------------------------------------------------------- -// -void CSsyReferenceCmdHandler::IssueRequest( TInt aError ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::IssueRequest()" ) ) ); - // Provides synchronous function calls to be handled as asynchronous - if ( !IsActive() ) - { - TRequestStatus *s = &iStatus; - User::RequestComplete( s, aError ); - SetActive(); - } - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::IssueRequest() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceCmdHandler::SendResponse -// --------------------------------------------------------------------------- -// -void CSsyReferenceCmdHandler::SendResponse( TInt aError ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::SendResponse()" ) ) ); - // Send response to channel - if ( iMessage ) - { - iMessage->SetError( aError ); - iSsyChannel.ProcessResponse( iMessage ); - delete iMessage; - iMessage = NULL; - } - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::SendResponse() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceCmdHandler::RunL -// --------------------------------------------------------------------------- -// -void CSsyReferenceCmdHandler::RunL() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::RunL() - %i" ), iStatus.Int() ) ); - - TInt err( iStatus.Int() ); - - if ( iMessage ) - { - switch( iMessage->Function() ) - { - case ESsyReferenceStartChannelData: - { - TInt startInterval( 0 ); - - // Get all Channel data information from config file - iSsyChannel.SsyControl().SsyConfig(). - GetChannelDataInformationL( iMessage->ChannelId(), iDataItemArray, startInterval ); - - // Check that channel data items were found - if ( iDataItemArray.Count() ) - { - // If interval is zero, set small interval - if ( startInterval == 0 ) - { - startInterval = KSsyRefShortDelay; - } - - // wait that interval - if ( iTimer ) - { - iTimer->Cancel(); - delete iTimer; - iTimer = NULL; - } - - // Reset pointer - iDataItemPtr = 0; - - // Start timer and continue processing in callback function - iTimer = CPeriodic::NewL( EPriorityNormal ); - iTimer->Start( startInterval * 1000, 0, TCallBack( DataItemCallback, this ) ); - } - break; - } - case ESsyReferenceOpenChannel: - { - // Open channel response specific handling here - iMessage->SetFunction( ESsyReferenceOpenChannelResp ); - SendResponse(); - break; - } - case ESsyReferenceCloseChannel: - { - // Close channel response specific handling here - iMessage->SetFunction( ESsyReferenceCloseChannelResp ); - SendResponse(); - break; - } - default: - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::ProcessCommand() - Unknown function" ) ) ); - err = KErrNotFound; - } - } - } - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::RunL() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceCmdHandler::DoCancel -// --------------------------------------------------------------------------- -// -void CSsyReferenceCmdHandler::DoCancel() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::DoCancel()" ) ) ); - - // Handle cancel for this channel. Cancel any ongoing requests - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::DoCancel() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceCmdHandler::RunError -// --------------------------------------------------------------------------- -// -TInt CSsyReferenceCmdHandler::RunError( TInt /*aError*/ ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::RunError()" ) ) ); - - // Handle possible errors here and return KErrNone to prevent SSY from panic - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::RunError() - return" ) ) ); - return KErrNone; - } - -// --------------------------------------------------------------------------- -// CSsyReferenceCmdHandler::DataItemCallback -// --------------------------------------------------------------------------- -// -TInt CSsyReferenceCmdHandler::DataItemCallback( TAny* aThis ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::DataItemCallback()" ) ) ); - return static_cast( aThis )->GenerateChannelDataItem(); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceCmdHandler::GenerateChannelDataItem -// --------------------------------------------------------------------------- -// -TInt CSsyReferenceCmdHandler::GenerateChannelDataItem() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::GenerateChannelDataItem()" ) ) ); - - // Get next item from list and set pointer to next item - TSsyRefChannelDataBase dataItem = iDataItemArray[iDataItemPtr++]; - - // Get next item interval from data item - TInt nextInterval( dataItem.Interval() ); - - // Set timestamp to data item - TTime time; - time.HomeTime(); - dataItem.SetTimestamp( time ); - - // If interval is zero, set small interval - if ( nextInterval == 0 ) - { - nextInterval = KSsyRefShortDelay; - } - - // Add data item to message - iMessage->SetDataItem( &dataItem ); - - // If in last data item, set pointer back to first item - if ( iDataItemArray.Count() == iDataItemPtr ) - { - iDataItemPtr = 0; - } - - // Send response and start new timer - iMessage->SetFunction( ESsyReferenceDataItemReceived ); - iSsyChannel.ProcessResponse( iMessage ); - - if ( iTimer ) - { - delete iTimer; - iTimer = NULL; - } - - TRAP_IGNORE( iTimer = CPeriodic::NewL( EPriorityNormal ); - iTimer->Start( nextInterval * 1000, 0, TCallBack( DataItemCallback, this ) ); ) - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceCmdHandler::GenerateChannelDataItem() - return" ) ) ); - return KErrNone; - } - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/src/ssyreferenceconfig.cpp --- a/systemswstubs/ssyreference/src/ssyreferenceconfig.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,948 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Configuration implementation of this SSY -* -*/ - - -#include -#include -#include -#include -#include -#include - -#include "ssyreferencecontrol.h" -#include "ssyreferenceconfig.h" -#include "ssyreferencetrace.h" - - -// ======== CONSTANTS ======= -_LIT( KSsyReferenceCfgFileOrig, "Z:\\private\\1020507E\\reference\\SsyReferenceConfig.xml" ); -_LIT( KSsyReferenceCfgFileExt, "C:\\ssyreference\\SsyReferenceConfig.xml" ); - -// Config file definitions - -// Maximum attribute lenghth -const TInt KSsyRefMaxAttribLength = 20; - -// TAG DEFINITIONS -_LIT( KSsyRefRootTag, "SsyReferenceConfig" ); // Ssy general information tag -_LIT( KSsyRefGeneralInfoTag, "SsyGeneralInformation" ); // Ssy general information tag -_LIT( KSsyRefChannelInfoGroupTag, "ChannelInformationGroup" ); // Channel information group tag -_LIT( KSsyRefChannelItemTag, "ChannelItem" ); // Channel item tag -_LIT( KSsyRefChannelDataTag, "ChannelData" ); // Channel data tag -_LIT( KSsyRefChannelDataItemTag, "ChannelDataItem" ); // Channel data item tag - -_LIT( KSsyRefProperties, "Properties" ); // Properties tag -_LIT( KSsyRefPropertyItem, "PropertyItem" ); // PropertyItem tag - -// Data item definitions -_LIT( KSsyRefAxisDataItemTag, "SsyRefChannelDataAxis" ); // SsyRefChannelDataAxis data item tag -_LIT( KSsyRefXAxis, "XAxis" ); // XAxis from SsyRefChannelDataAxis -_LIT( KSsyRefYAxis, "YAxis" ); // YAxis from SsyRefChannelDataAxis -_LIT( KSsyRefZAxis, "ZAxis" ); // ZAxis from SsyRefChannelDataAxis - -_LIT( KSsyRefTappingDataItemTag, "SsyRefChannelDataTapping" ); // SsyRefChannelDataTapping data item tag -_LIT( KSsyRefDirection, "Direction" ); // Direction from SsyRefChannelDataTapping - -_LIT( KSsyRefProximityDataItemTag, "SsyRefChannelDataProximity" ); // SsyRefChannelDataProximity data item tag -_LIT( KSsyRefProximityState, "ProximityState" ); // ProximityStatus from SsyRefChannelDataProximity - -_LIT( KSsyRefAmbientLightDataItemTag, "SsyRefChannelDataAmbientLight" ); // SsyRefChannelDataAmbientLight data item tag -_LIT( KSsyRefAmbientLightState, "AmbientLightState" ); // AmbientLightStatus from SsyRefChannelDataAmbientLight - -_LIT( KSsyRefMagneticAxisDataItemTag, "SsyRefChannelDataMagneticAxis" ); // SsyRefChannelDataMagneticAxis data item tag -_LIT( KSsyRefXAxisCalib, "XAxisCalib" ); // XAxis from SsyRefChannelDataMagneticAxis -_LIT( KSsyRefYAxisCalib, "YAxisCalib" ); // YAxis from SsyRefChannelDataMagneticAxis -_LIT( KSsyRefZAxisCalib, "ZAxisCalib" ); // ZAxis from SsyRefChannelDataMagneticAxis - -// ATTRIBUTE DEFINITIONS -_LIT( KSsyRefChannelCount, "ChannelCount" ); // Channel count from ChannelInformationGroup -_LIT( KSsyRefChannelId, "ChannelId" ); // Channel ID from ChannelItem -_LIT( KSsyRefContextType, "ContextType" ); // Context type from ChannelItem -_LIT( KSsyRefQuantity, "Quantity" ); // Quantity from ChannelItem -_LIT( KSsyRefChannelType, "ChannelType" ); // ChannelType from ChannelItem -_LIT( KSsyRefLocation, "Location" ); // Location from ChannelItem -_LIT( KSsyRefVendorId, "Vendor" ); // Vendor from ChannelItem - - -// Channel data item specific attribute definitions -_LIT( KSsyRefStartInterval, "StartIntervalMs" ); // StartInterval from ChannelData -_LIT( KSsyRefDataItemCount, "count" ); // count from ChannelDataItem -_LIT( KSsyRefDataTypeID, "DataTypeId" ); // DataTypeId from ChannelDataItem -_LIT( KSsyRefInterval, "IntervalMs" ); // IntervalMs from ChannelDataItem - -// Property spesific attributes -_LIT( KSsyRefPropertyId, "PropertyId" ); // PropertyId from PropertyItem -_LIT( KSsyRefArrayIndex, "ArrayIndex" ); // ArrayIndex from PropertyItem -_LIT( KSsyRefItemIndex, "ItemIndex" ); // ItemIndex from PropertyItem -_LIT( KSsyRefPropertyValue, "PropertyValue" ); // PropertyValue from PorpertyItem -_LIT( KSsyRefPropertyType, "PropertyType" ); // PropertyType from PropertyItem -_LIT( KSsyRefMaxValue, "MaxValue" ); // MaxValue from PropertyItem -_LIT( KSsyRefMinValue, "MinValue" ); // MinValue from PorpertyItem -_LIT( KSsyRefReadOnly, "ReadOnly" ); // ReadOnly from PropertyItem - - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig C++ constructor -// --------------------------------------------------------------------------- -// -CSsyReferenceConfig::CSsyReferenceConfig() : - CActive( EPriorityMuchLess ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::CSsyReferenceConfig()" ) ) ); - CActiveScheduler::Add( this ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::CSsyReferenceConfig() - return" ) ) ); - } - - -// --------------------------------------------------------------------------- -// Symbian 2nd phase constructor -// --------------------------------------------------------------------------- -// -void CSsyReferenceConfig::ConstructL() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::ConstructL()" ) ) ); - // Create config file parser - iConfigParser = CMDXMLParser::NewL( this ); - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::ConstructL() - return" ) ) ); - } - - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig::NewL -// --------------------------------------------------------------------------- -// -CSsyReferenceConfig* CSsyReferenceConfig::NewL() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::NewL()" ) ) ); - CSsyReferenceConfig* self = new ( ELeave ) CSsyReferenceConfig(); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::NewL() - return" ) ) ); - return self; - } - -// --------------------------------------------------------------------------- -// Destructor -// --------------------------------------------------------------------------- -// -CSsyReferenceConfig::~CSsyReferenceConfig() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::~CSsyReferenceConfig()" ) ) ); - - if ( iConfigParser ) - { - delete iConfigParser; - iConfigParser = NULL; - } - - if ( iGenralInfoElement ) - { - delete iGenralInfoElement; - iGenralInfoElement = NULL; - } - - if ( iChannelGroupElement ) - { - delete iChannelGroupElement; - iChannelGroupElement = NULL; - } - - if ( iSsyReferenceConfig ) - { - delete iSsyReferenceConfig; - iSsyReferenceConfig = NULL; - } - - if ( iConfigFile ) - { - delete iConfigFile; - iConfigFile = NULL; - } - - iChannelPairArray.Reset(); - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::~CSsyReferenceConfig() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig::InitConfig -// --------------------------------------------------------------------------- -// -void CSsyReferenceConfig::InitConfigL() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::InitConfig()" ) ) ); - - // Open config file - RFs fileSession; - User::LeaveIfError( fileSession.Connect() ); - - // Locate extrenal file... - RFile file; - TInt err( file.Open( fileSession, KSsyReferenceCfgFileExt, EFileRead ) ); - file.Close(); - - // Check is external file found - if ( KErrNone == err ) - { - // Use SSY with external configuration - iConfigParser->ParseFile( fileSession, KSsyReferenceCfgFileExt ); - } - else - { - // Use SSY with original configuration - - // Start parsing file and wait notification to ParseFileCompleteL - // XML Parser takes ownership of the RFs and closes it when file is parsed - iConfigParser->ParseFile( fileSession, KSsyReferenceCfgFileOrig ); - } - - iConfigFileParsed = EFalse; - - // This active object has very low priority since XML parser uses Active objects also, - // so it is mandatory to let XML parser to complete sooner than this active object - IssueRequest(); - iSchedulerWait.Start(); // Blocks until file is parsed - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::InitConfig() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig::IssueRequest -// --------------------------------------------------------------------------- -// -void CSsyReferenceConfig::IssueRequest( TInt aError ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::IssueRequest()" ) ) ); - // Provides synchronous function calls to be handled as asynchronous - if ( !IsActive() ) - { - SetActive(); - TRequestStatus *s = &iStatus; - User::RequestComplete( s, aError ); - } - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::IssueRequest() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig::RunL -// --------------------------------------------------------------------------- -// -void CSsyReferenceConfig::RunL() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::RunL() - %i" ), iStatus.Int() ) ); - - if ( iConfigFileParsed ) - { - // Stop blocking - iSchedulerWait.AsyncStop(); - } - else - { - // Continue RunL loop - IssueRequest(); - } - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::RunL() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig::DoCancel -// --------------------------------------------------------------------------- -// -void CSsyReferenceConfig::DoCancel() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::DoCancel()" ) ) ); - - // Stop blocking - iSchedulerWait.AsyncStop(); - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::DoCancel() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig::RunError -// --------------------------------------------------------------------------- -// -TInt CSsyReferenceConfig::RunError( TInt /*aError*/ ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::RunError()" ) ) ); - - // Handle possible errors here and return KErrNone to prevent SSY from panic - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::RunError() - return" ) ) ); - return KErrNone; - } - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig::ParseFileCompleteL -// --------------------------------------------------------------------------- -// -void CSsyReferenceConfig::ParseFileCompleteL() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::ParseFileCompleteL()" ) ) ); - - ERROR_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::ParseFileCompleteL(): parse error=%d", iConfigParser->Error() ) ) ); - - // if the parser fails with KErrNoMemory, increase the default heap size for SSY's (key 3) in the repository 1020507E.txt exported by this component - __ASSERT_DEBUG( iConfigParser->ErrorSeverity() != EXMLFatal, User::Invariant() ); // OK to continue if not a fatal error - - // First get document - iConfigFile = iConfigParser->DetachXMLDoc(); - // Then get document element - CMDXMLElement* documentElement = iConfigFile->DocumentElement(); - // Get root element, 'SsyReferenceConfig' - iSsyReferenceConfig = documentElement->FirstChildOfType( KSsyRefRootTag ); - // Get gereral information element - iGenralInfoElement = iSsyReferenceConfig->FirstChildOfType( KSsyRefGeneralInfoTag ); - // Get channel information group element - iChannelGroupElement = iSsyReferenceConfig->FirstChildOfType( KSsyRefChannelInfoGroupTag ); - // Get channel count - iChannelCount = GetAttributeIntValue( *iChannelGroupElement, KSsyRefChannelCount ); - - // No need to delete documentElement, it is owned by iConfigFile. - documentElement = NULL; - iConfigFileParsed = ETrue; - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::ParseFileCompleteL() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig::GetAttributeIntValue -// --------------------------------------------------------------------------- -// -TInt CSsyReferenceConfig::GetAttributeIntValue( CMDXMLElement& aElement, const TDesC& aAttrib ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetAttributeIntValue()" ) ) ); - COMPONENT_TRACE( ( _L( " Element: %s", aElement.NodeName() ) ) ); - COMPONENT_TRACE( ( _L( " Attribute: %s", aAttrib ) ) ); - - TInt intValue( 0 ); - - // Check availability - if ( aElement.IsAttributeSpecified( aAttrib ) ) - { - // Buffer to where to read value - TBufC buffer( KNullDesC ); - TPtrC ptr( buffer ); - - // Read attribute value - aElement.GetAttribute( aAttrib, ptr ); - - // Cast literal value into TInt - TLex lexValue( ptr ); - lexValue.Val( intValue ); - } - - COMPONENT_TRACE( ( _L( " IntValue: %i", intValue ) ) ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetAttributeIntValue() - return" ) ) ); - return intValue; - } - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig::GetAttributeStrValue -// --------------------------------------------------------------------------- -// -void CSsyReferenceConfig::GetAttributeStrValue( CMDXMLElement& aElement, const TDesC& aAttrib, TDes8& aTarget ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetAttributeStrValue()" ) ) ); - COMPONENT_TRACE( ( _L( " Element: %s", aElement.NodeName() ) ) ); - COMPONENT_TRACE( ( _L( " Attribute: %s", aAttrib ) ) ); - - // Check availability - if ( aElement.IsAttributeSpecified( aAttrib ) ) - { - // Buffer to where to read value - TBufC buffer( KNullDesC ); - TPtrC ptr( buffer ); - - // Read attribute value - aElement.GetAttribute( aAttrib, ptr ); - - // Copy string from 16-bit descriptor to 8-bit descriptor - aTarget.Copy( ptr ); - } - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetAttributeStrValue() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig::GetAttributeHexValue -// --------------------------------------------------------------------------- -// -TUint CSsyReferenceConfig::GetAttributeHexValue( CMDXMLElement& aElement, const TDesC& aAttrib ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetAttributeHexValue()" ) ) ); - COMPONENT_TRACE( ( _L( " Element: %s", aElement.NodeName() ) ) ); - COMPONENT_TRACE( ( _L( " Attribute: %s", aAttrib ) ) ); - - TUint32 hexValue( 0 ); - - // Check availability - if ( aElement.IsAttributeSpecified( aAttrib ) ) - { - // Buffer to where to read value - TBufC buffer( KNullDesC ); - TPtrC ptr( buffer ); - - // Read attribute value - aElement.GetAttribute( aAttrib, ptr ); - - // Get bounded value and cast it into TUint32 (hex) - TRadix radix( EHex ); - TUint limit( 0xFFFFFFFF ); - - // Append string into Lex and skip first two characters, 0x - TLex lexValue( ptr ); - lexValue.Inc( 2 ); - - // Read value - lexValue.BoundedVal( hexValue, radix, limit ); - } - - COMPONENT_TRACE( ( _L( " HexValue: %x", hexValue ) ) ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetAttributeHexValue() - return" ) ) ); - return hexValue; - } - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig::GetAttributeRealValue -// --------------------------------------------------------------------------- -// -TReal CSsyReferenceConfig::GetAttributeRealValue( CMDXMLElement& aElement, const TDesC& aAttrib ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetAttributeRealValue()" ) ) ); - COMPONENT_TRACE( ( _L( " Element: %s", aElement.NodeName() ) ) ); - COMPONENT_TRACE( ( _L( " Attribute: %s", aAttrib ) ) ); - - TReal realValue( 0 ); - - // Check availability - if ( aElement.IsAttributeSpecified( aAttrib ) ) - { - - // Buffer to where to read value - TBufC buffer( KNullDesC ); - TPtrC ptr( buffer ); - - // Read attribute value - aElement.GetAttribute( aAttrib, ptr ); - - // Cast literal value into TReal - TLex lexValue( ptr ); - lexValue.Val( realValue ); - } - - COMPONENT_TRACE( ( _L( " IntValue: %i", realValue ) ) ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetAttributeRealValue() - return" ) ) ); - return realValue; - } - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig::ChannelCount -// --------------------------------------------------------------------------- -// -TInt CSsyReferenceConfig::ChannelCount() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::ChannelCount() - %i" ), iChannelCount ) ); - return iChannelCount; - } - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig::GenerateChannels -// --------------------------------------------------------------------------- -// -void CSsyReferenceConfig::GenerateChannels( RSensrvChannelInfoList& aChannelList ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GenerateChannels()" ) ) ); - - // Initialize channel pair array - TSsyRefChannelIdArray tempArray( iChannelCount ); - iChannelPairArray = tempArray; - - // Go through Channel group element and get all information - TSensrvChannelInfo channelInfo; - CMDXMLElement* channelElement = iChannelGroupElement->FirstChildOfType( KSsyRefChannelItemTag ); - - while( channelElement ) - { - // check is element correct type of node - if ( channelElement->NodeType() == CMDXMLNode::EElementNode ) - { - // read channel identifier - iChannelPairArray.Append( TSsyRefChannelIdPair( GetAttributeIntValue( *channelElement, KSsyRefChannelId ) ) ); - - // Read attributes - channelInfo.iContextType = ( TSensrvContextType ) GetAttributeIntValue( *channelElement, KSsyRefContextType ); - channelInfo.iQuantity = ( TSensrvQuantity ) GetAttributeIntValue( *channelElement, KSsyRefQuantity ); - channelInfo.iChannelType = ( TSensrvChannelTypeId ) GetAttributeHexValue( *channelElement, KSsyRefChannelType ); - GetAttributeStrValue( *channelElement, KSsyRefLocation, channelInfo.iLocation ); - GetAttributeStrValue( *channelElement, KSsyRefVendorId, channelInfo.iVendorId ); - channelInfo.iChannelDataTypeId = ( TSensrvChannelDataTypeId ) GetAttributeHexValue( *channelElement, KSsyRefDataTypeID ); - - // Calculate data item size based on channel type - switch ( channelInfo.iChannelType ) - { - case KSensrvChannelTypeIdAccelerometerXYZAxisData: - { - channelInfo.iDataItemSize = KSsyRefAxisDataItemSize; - break; - } - case KSensrvChannelTypeIdProximityMonitor: - { - channelInfo.iDataItemSize = KSsyRefProximityDataItemSize; - break; - } - case KSensrvChannelTypeIdAmbientLightData: - { - channelInfo.iDataItemSize = KSsyRefAmbientLightDataItemSize; - break; - } - case KSensrvChannelTypeIdAccelerometerWakeupData: - case KSensrvChannelTypeIdAccelerometerDoubleTappingData: - { - channelInfo.iDataItemSize = KSsyRefTappingDataItemSize; - break; - } - case KSensrvChannelTypeIdMagnetometerXYZAxisData: - { - channelInfo.iDataItemSize = KSsyRefMagneticAxisDataItemSize; - break; - } - default: - { - channelInfo.iDataItemSize = 0; - break; - } - } - - // Append channel info to list - aChannelList.Append( channelInfo ); - } - channelElement = static_cast( channelElement->NextSibling() ); - } - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GenerateChannels() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig::GetChannelDataInformation -// --------------------------------------------------------------------------- -// -void CSsyReferenceConfig::GetChannelDataInformationL( - const TInt aSrvChannelId, - TSsyRefDataItemArray& aDataItemList, - TInt& aStartInterval ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetChannelDataInformation()" ) ) ); - - // First, get correct config channel element corresponding to aSrvChannelId - CMDXMLElement* channelElement = ChannelElement( aSrvChannelId ); - - if ( channelElement ) - { - // Channel element found, get channel data group element - CMDXMLElement* groupElement = channelElement->FirstChildOfType( KSsyRefChannelDataTag ); - - if ( groupElement ) - { - // Get start interval - aStartInterval = GetAttributeIntValue( *groupElement, KSsyRefStartInterval ); - - // First, loop channel data items to get total count - CMDXMLElement* dataItemElement = groupElement->FirstChildOfType( KSsyRefChannelDataItemTag ); - - // Take channel data item type at this point. One channel can produce only one type of - // channel data item - TUint channelType( GetAttributeHexValue( *dataItemElement, KSsyRefDataTypeID ) ); - - TInt channelItemCount( 0 ); // Total number of data items - TInt definitionCount( 0 ); // Total number of different definitions - - // Go through elements and get counters - while ( dataItemElement ) - { - definitionCount++; - channelItemCount = channelItemCount + GetAttributeIntValue( *dataItemElement, KSsyRefDataItemCount ); - // This will return NULL if no next sibling found - dataItemElement = static_cast( dataItemElement->NextSibling() ); - } - - // Now, start all over to get item information - dataItemElement = groupElement->FirstChildOfType( KSsyRefChannelDataItemTag ); - - // Create temp array now that we know the data item count - TSsyRefDataItemArray tempArray( channelItemCount ); - - for ( TInt i = 0; i < definitionCount; i++ ) - { - // Check element type - if ( dataItemElement->NodeType() == CMDXMLNode::EElementNode ) - { - // First we get interval and count from channel item - TInt interval( GetAttributeIntValue( *dataItemElement, KSsyRefInterval ) ); - TInt countOfType( GetAttributeIntValue( *dataItemElement, KSsyRefDataItemCount ) ); - - // Read next child values to corresponding data type class - switch ( channelType ) - { - case TSensrvAccelerometerAxisData::KDataTypeId: - { - CMDXMLElement* axisDataElement = dataItemElement->FirstChildOfType( KSsyRefAxisDataItemTag ); - TInt axisX( GetAttributeIntValue( *axisDataElement, KSsyRefXAxis ) ); - TInt axisY( GetAttributeIntValue( *axisDataElement, KSsyRefYAxis ) ); - TInt axisZ( GetAttributeIntValue( *axisDataElement, KSsyRefZAxis ) ); - - // Create channel data type item - TSsyRefChannelDataAxis channelData( axisX, axisY, axisZ, interval ); - // add items into array - for ( TInt k = 0; k < countOfType; k++ ) - { - tempArray.Append( channelData ); - } - break; - } - case TSensrvTappingData::KDataTypeId: - { - CMDXMLElement* tappingDataElement = dataItemElement->FirstChildOfType( KSsyRefTappingDataItemTag ); - TInt direction( GetAttributeHexValue( *tappingDataElement, KSsyRefDirection ) ); - - // Create channel data type item - TSsyRefChannelDataTapping channelData( direction, interval ); - // add items into array - for ( TInt k = 0; k < countOfType; k++ ) - { - tempArray.Append( channelData ); - } - break; - } - case TSensrvProximityData::KDataTypeId: - { - CMDXMLElement* proximityDataElement = dataItemElement->FirstChildOfType( KSsyRefProximityDataItemTag ); - TInt state( GetAttributeIntValue( *proximityDataElement, KSsyRefProximityState ) ); - - // Create channel data type item - TSsyRefChannelDataProximity channelData( state, interval ); - // add items into array - for ( TInt k = 0; k < countOfType; k++ ) - { - tempArray.Append( channelData ); - } - break; - } - case TSensrvAmbientLightData::KDataTypeId: - { - CMDXMLElement* ambientLightDataElement = dataItemElement->FirstChildOfType( KSsyRefAmbientLightDataItemTag ); - TInt state( GetAttributeIntValue( *ambientLightDataElement, KSsyRefAmbientLightState ) ); - - // Create channel data type item - TSsyRefChannelDataAmbientLight channelData( state, interval ); - // add items into array - for ( TInt k = 0; k < countOfType; k++ ) - { - tempArray.Append( channelData ); - } - break; - } - case TSensrvMagnetometerAxisData::KDataTypeId: - { - CMDXMLElement* axisDataElement = dataItemElement->FirstChildOfType( KSsyRefMagneticAxisDataItemTag ); - TInt axisX( GetAttributeIntValue( *axisDataElement, KSsyRefXAxis ) ); - TInt axisY( GetAttributeIntValue( *axisDataElement, KSsyRefYAxis ) ); - TInt axisZ( GetAttributeIntValue( *axisDataElement, KSsyRefZAxis ) ); - TInt axisXCalib( GetAttributeIntValue( *axisDataElement, KSsyRefXAxisCalib ) ); - TInt axisYCalib( GetAttributeIntValue( *axisDataElement, KSsyRefYAxisCalib ) ); - TInt axisZCalib( GetAttributeIntValue( *axisDataElement, KSsyRefZAxisCalib ) ); - - // Create channel data type item - TSsyRefChannelDataMagneticAxis channelData( axisX, axisY, axisZ, - axisXCalib, axisYCalib, axisZCalib, interval ); - // add items into array - for ( TInt k = 0; k < countOfType; k++ ) - { - tempArray.Append( channelData ); - } - break; - } - default: - { - // Other data items are not supported - User::Leave( KErrGeneral ); - } - } - } - - // Get next channel data item element - dataItemElement = static_cast( dataItemElement->NextSibling() ); - } - - // Compress temp array in case there were comments - tempArray.Compress(); - - // copy information to param array - aDataItemList = tempArray; - } - else - { - User::Leave( KErrNotFound ); - } - } - else - { - User::Leave( KErrNotFound ); - } - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetChannelDataInformation() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig::GetElementPropertiesL -// --------------------------------------------------------------------------- -// -void CSsyReferenceConfig::GetElementPropertiesL( - CMDXMLElement& aElement, - RSensrvPropertyList& aPropertyList ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetElementPropertiesL()" ) ) ); - - // First we need 'Properties' element - CMDXMLElement* properties = aElement.FirstChildOfType( KSsyRefProperties ); - - if ( !properties ) - { - // Wrong element... or properties are not defined - User::Leave( KErrNotFound ); - } - - // Get first property get started - CMDXMLElement* propertyItem = properties->FirstChildOfType( KSsyRefPropertyItem ); - TInt propertyCount( 0 ); - - // Loop properties to get count of properties - while ( propertyItem ) - { - propertyCount++; - propertyItem = static_cast( propertyItem->NextSibling() ); // returns NULL if next not found - } - - if ( !propertyCount ) - { - // Check that there are properties - User::Leave( KErrNotFound ); - } - - // Temporary property list now that we know the property count - RSensrvPropertyList tempList( propertyCount ); - - // Start loop again from the start and read each property - propertyItem = properties->FirstChildOfType( KSsyRefPropertyItem ); - for ( TInt i = 0; i < propertyCount; i++ ) - { - // Check element type - if ( propertyItem->NodeType() == CMDXMLNode::EElementNode ) - { - // Read property values - const TSensrvPropertyId propertyId( ( TSensrvPropertyId )GetAttributeHexValue( *propertyItem, KSsyRefPropertyId ) ); - const TInt itemIndex( GetAttributeIntValue( *propertyItem, KSsyRefItemIndex ) ); - const TBool readOnly( ( TBool )GetAttributeIntValue( *propertyItem, KSsyRefReadOnly ) ); - const TSensrvPropertyType propertyType( ( TSensrvPropertyType ) GetAttributeIntValue( *propertyItem, KSsyRefPropertyType ) ); - - // Array index must be handled in different way as it is not mandatory. Little modification is needed as it may not exist in XML file - TInt arrayIndex( ESensrvSingleProperty ); - - // Extra check is needed, otherwise this value is always '0' when it should be 'ESensrvSingleProperty' by default - if ( propertyItem->IsAttributeSpecified( KSsyRefArrayIndex ) ) - { - // Attribute exists, now we can read the value - arrayIndex = GetAttributeIntValue( *propertyItem, KSsyRefArrayIndex ); - } - - // Resolve type, get correct type value and append property into list - switch ( propertyType ) - { - case ESensrvIntProperty: - { - const TInt intValue( GetAttributeIntValue( *propertyItem, KSsyRefPropertyValue ) ); - const TInt maxValue( GetAttributeIntValue( *propertyItem, KSsyRefMaxValue ) ); - const TInt minValue( GetAttributeIntValue( *propertyItem, KSsyRefMinValue ) ); - TSensrvProperty property( propertyId, itemIndex, intValue, maxValue, minValue, readOnly, propertyType ); - property.SetArrayIndex( arrayIndex ); - tempList.Append( property ); - break; - } - case ESensrvRealProperty: - { - const TReal intValue( GetAttributeRealValue( *propertyItem, KSsyRefPropertyValue ) ); - const TReal maxValue( GetAttributeRealValue( *propertyItem, KSsyRefMaxValue ) ); - const TReal minValue( GetAttributeRealValue( *propertyItem, KSsyRefMinValue ) ); - TSensrvProperty property( propertyId, itemIndex, intValue, maxValue, minValue, readOnly, propertyType ); - property.SetArrayIndex( arrayIndex ); - tempList.Append( property ); - break; - } - case ESensrvBufferProperty: - { - TBuf8 desValue; - GetAttributeStrValue( *propertyItem, KSsyRefPropertyValue, desValue ); - TSensrvProperty property( propertyId, itemIndex, desValue, readOnly, propertyType ); - property.SetArrayIndex( arrayIndex ); - tempList.Append( property ); - break; - } - default: - { - // Unknown property type -> leave - User::Leave( KErrArgument ); - } - } - } - - // Next property - propertyItem = static_cast( propertyItem->NextSibling() ); // returns NULL if next not found - } - - // Compress temp list in case there were comment nodes - tempList.Compress(); - - // copy temp list to parameter list - aPropertyList = tempList; - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetElementPropertiesL() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig::ChannelElement -// --------------------------------------------------------------------------- -// -CMDXMLElement* CSsyReferenceConfig::ChannelElement( const TInt aSrvChannelId ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::ChannelElement()" ) ) ); - - const TInt configId( ConfigChannelId( aSrvChannelId ) ); - TBool channelFound( EFalse ); - - // Loop channel group and match configId for the channel ID in element - CMDXMLElement* channelItemElement = iChannelGroupElement->FirstChildOfType( KSsyRefChannelItemTag ); - - for ( TInt i = 0; i < iChannelCount || !channelFound; i++ ) - { - TInt channelId( GetAttributeIntValue( *channelItemElement, KSsyRefChannelId ) ); - if ( configId == channelId ) - { - // Channel found, no need to loop - channelFound = ETrue; - } - else - { - // Take next channel - channelItemElement = static_cast( channelItemElement->NextSibling() ); - } - } - - // If not found, return NULL - if ( !channelFound ) - { - channelItemElement = NULL; - } - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::ChannelElement() - return" ) ) ); - return channelItemElement; - } - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig::UpdateChannelIds -// --------------------------------------------------------------------------- -// -void CSsyReferenceConfig::UpdateChannelIds( RSensrvChannelInfoList aChannelList ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::UpdateChannelIds()" ) ) ); - - - if ( ChannelCount() == aChannelList.Count() ) - { - for ( TInt i = 0; i < aChannelList.Count(); i++ ) - { - iChannelPairArray[i].SetServerId( aChannelList[i].iChannelId ); - } - } - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::UpdateChannelIds() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig::ConfigChannelId -// --------------------------------------------------------------------------- -// -TInt CSsyReferenceConfig::ConfigChannelId( const TInt aSrvChannelId ) const - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::ConfigChannelId()" ) ) ); - TInt returnValue( 0 ); - - for ( TInt i = 0; i < iChannelPairArray.Count(); i++ ) - { - if ( iChannelPairArray[i].ServerId() == aSrvChannelId ) - { - returnValue = iChannelPairArray[i].ConfigId(); - } - } - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::ConfigChannelId() - return" ) ) ); - return returnValue; - } - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig::GetSensorPropertiesL -// --------------------------------------------------------------------------- -// -void CSsyReferenceConfig::GetSensorPropertiesL( RSensrvPropertyList& aPropertyList ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetSensorPropertiesL()" ) ) ); - - // We already have SsyGeneralInformation element, read properties from that - GetElementPropertiesL( *iGenralInfoElement, aPropertyList ); - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetSensorPropertiesL() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceConfig::GetChannelPropertiesL -// --------------------------------------------------------------------------- -// -void CSsyReferenceConfig::GetChannelPropertiesL( - const TInt aSrvChannelId, - RSensrvPropertyList& aPropertyList ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetChannelPropertiesL()" ) ) ); - - // Get channel element first - CMDXMLElement* channelElement = ChannelElement( aSrvChannelId ); - - if ( !channelElement ) - { - // Leave, channel element is not found - User::Leave( KErrNotFound ); - } - - // Get properties of this channel element - GetElementPropertiesL( *channelElement, aPropertyList ); - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceConfig::GetChannelPropertiesL() - return" ) ) ); - } - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/src/ssyreferencecontrol.cpp --- a/systemswstubs/ssyreference/src/ssyreferencecontrol.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,280 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Reference implementation of SSY Control -* -*/ - - -#include // MSsyCallback -#include "ssyreferencecontrol.h" -#include "ssyreferencetrace.h" -#include "ssyreferencechannel.h" -#include "ssyreferencecmdhandler.h" - - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// CSsyReferenceControl C++ constructor -// --------------------------------------------------------------------------- -// -CSsyReferenceControl::CSsyReferenceControl( MSsyCallback& aSsyCallback ) : - iSsyCallback( aSsyCallback ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::CSsyReferenceControl()" ) ) ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::CSsyReferenceControl() - return" ) ) ); - } - - -// --------------------------------------------------------------------------- -// Symbian 2nd phase constructor -// --------------------------------------------------------------------------- -// -void CSsyReferenceControl::ConstructL() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::ConstructL()" ) ) ); - - // Create configurator and start config file parsing - iConfigFile = CSsyReferenceConfig::NewL(); - TRAPD( err, iConfigFile->InitConfigL() ); // This will block until config is ready - - if ( KErrNone != err ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::ConstructL() - Init config failed: %i" ), err ) ); - } - - // --------------------------------------------------------------- - - // Store channel count for later use - const TInt channelCount( iConfigFile->ChannelCount() ); - - // Instantiate channel info list - RSensrvChannelInfoList channelInfoList( channelCount ); - CleanupClosePushL( channelInfoList ); - - // Fills channel info list with generated channel info objects - iConfigFile->GenerateChannels( channelInfoList ); - - // Register channels. Sensor Server generates unique ID for each channel - iSsyCallback.RegisterChannelsL( channelInfoList ); - - // Update channel IDs to ConfigFile - iConfigFile->UpdateChannelIds( channelInfoList ); - - // Create channels - iChannelArray = new ( ELeave ) CArrayPtrFlat( channelCount ); - for ( TInt i = 0; i < channelCount; i++ ) - { - CSsyReferenceChannel* channel = CSsyReferenceChannel::NewL( *this, channelInfoList[i] ); - iChannelArray->AppendL( channel ); - } - - // Clean up - CleanupStack::PopAndDestroy( &channelInfoList ); - - // Get properties of this SSY. Leaves with KErrNotFound if not found. These properties are - // not mandatory, so we can ignore that leave - TRAP_IGNORE( iConfigFile->GetSensorPropertiesL( iProperties ) ); - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::ConstructL() - return" ) ) ); - } - - -// --------------------------------------------------------------------------- -// CSsyReferenceControl::NewL -// --------------------------------------------------------------------------- -// -CSsyReferenceControl* CSsyReferenceControl::NewL( MSsyCallback& aSsyCallback ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::NewL()" ) ) ); - CSsyReferenceControl* self = new ( ELeave ) CSsyReferenceControl( aSsyCallback ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::NewL() - return" ) ) ); - return self; - } - -// --------------------------------------------------------------------------- -// Destructor -// --------------------------------------------------------------------------- -// -CSsyReferenceControl::~CSsyReferenceControl() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::~CSsyReferenceControl()" ) ) ); - - if ( iChannelArray ) - { - if ( iChannelArray->Count() ) - { - iChannelArray->ResetAndDestroy(); - } - - delete iChannelArray; - } - - if ( iConfigFile ) - { - delete iConfigFile; - iConfigFile = NULL; - } - - iProperties.Reset(); - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::~CSsyReferenceControl() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceControl::SsyCallback -// --------------------------------------------------------------------------- -// -MSsyCallback& CSsyReferenceControl::SsyCallback() const - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::SsyCallback()" ) ) ); - return iSsyCallback; - } - -// --------------------------------------------------------------------------- -// CSsyReferenceControl::SsyConfig -// --------------------------------------------------------------------------- -// -CSsyReferenceConfig& CSsyReferenceControl::SsyConfig() const - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::SsyConfig()" ) ) ); - return *iConfigFile; - } - -// --------------------------------------------------------------------------- -// CSsyReferenceControl::FindPropertyL -// --------------------------------------------------------------------------- -// -void CSsyReferenceControl::FindPropertyL( - const TSensrvPropertyId aPropertyId, - const TInt aArrayIndex, - TSensrvProperty& aProperty ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::FindPropertyL()" ) ) ); - TSensrvProperty* property = NULL; - TBool propertyFound( EFalse ); - - // Search property - for ( TInt i = 0; i < iProperties.Count() && !propertyFound; i++ ) - { - property = static_cast( &iProperties[i] ); - - // Compare property IDs - if ( property->GetPropertyId() == aPropertyId ) - { - // Correct property ID is found, now check is it array type of property. - // Either array indexes must match or propertys array index has to be array info - if ( ( property->GetArrayIndex() == aArrayIndex ) || - ( ( property->GetArrayIndex() == ESensrvArrayPropertyInfo ) && - ( ESensrvSingleProperty == aArrayIndex ) ) ) - { - // Correct array index found - propertyFound = ETrue; - } - } - } - - // Leave if not found - if ( !propertyFound ) - { - User::Leave( KErrNotFound ); - } - - aProperty = *property; - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::FindPropertyL() - return" ) ) ); - } - - -// --------------------------------------------------------------------------- -// CSsyReferenceControl::FindChannel -// --------------------------------------------------------------------------- -// -CSsyReferenceChannel* CSsyReferenceControl::FindChannelL( TSensrvChannelId aChannelID ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::FindChannel()" ) ) ); - - if ( !iChannelArray ) - { - User::Leave( KErrNotFound ); - } - - const TInt channelCount( iChannelArray->Count() ); - CSsyReferenceChannel* channel = NULL; - - // Check that there are channels - if ( channelCount ) - { - // Loop channels until correct channel is found - for ( TInt i = 0; i < channelCount; i++ ) - { - channel = iChannelArray->At( i ); - - // Compare channel id - if ( channel->ChannelId() == aChannelID ) - { - // Channel found, no need to loop rest - i = channelCount; - } - } - } - - // Leave if channel is not found - if ( !channel ) - { - User::Leave( KErrNotFound ); - } - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::FindChannel() - return" ) ) ); - return channel; - } - -// --------------------------------------------------------------------------- -// CSsyReferenceControl::OpenChannelL -// --------------------------------------------------------------------------- -// -void CSsyReferenceControl::OpenChannelL( TSensrvChannelId aChannelID ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::OpenChannelL()" ) ) ); - // Find and open channel - User::LeaveIfError( FindChannelL( aChannelID )->OpenChannel() ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::OpenChannelL() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceControl::CloseChannelL -// --------------------------------------------------------------------------- -// -void CSsyReferenceControl::CloseChannelL( TSensrvChannelId aChannelID ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::CloseChannelL()" ) ) ); - // Find and close channel - User::LeaveIfError( FindChannelL( aChannelID )->CloseChannel() ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::CloseChannelL() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferenceControl::ProcessResponse -// --------------------------------------------------------------------------- -// -void CSsyReferenceControl::ProcessResponse( TSsyReferenceMsg* /*aMessage*/ ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::ProcessResponse()" ) ) ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferenceControl::ProcessResponse() - return" ) ) ); - } - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/ssyreference/src/ssyreferencepropertyprovider.cpp --- a/systemswstubs/ssyreference/src/ssyreferencepropertyprovider.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,170 +0,0 @@ -/* -* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Reference implementation of SSY Property Provider interface -* -*/ - - -#include "ssyreferencepropertyprovider.h" -#include "ssyreferencetrace.h" -#include "ssyreferencechannel.h" - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// CSsyReferencePropertyProvider C++ constructor -// --------------------------------------------------------------------------- -// -CSsyReferencePropertyProvider::CSsyReferencePropertyProvider( CSsyReferenceChannel& aChannel ) : - iChannel( aChannel ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferencePropertyProvider::CSsyReferencePropertyProvider()" ) ) ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferencePropertyProvider::CSsyReferencePropertyProvider() - return" ) ) ); - } - - -// --------------------------------------------------------------------------- -// Symbian 2nd phase constructor -// --------------------------------------------------------------------------- -// -void CSsyReferencePropertyProvider::ConstructL() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferencePropertyProvider::ConstructL()" ) ) ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferencePropertyProvider::ConstructL() - return" ) ) ); - } - - -// --------------------------------------------------------------------------- -// CSsyReferencePropertyProvider::NewL -// --------------------------------------------------------------------------- -// -CSsyReferencePropertyProvider* CSsyReferencePropertyProvider::NewL( CSsyReferenceChannel& aChannel ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferencePropertyProvider::NewL()" ) ) ); - CSsyReferencePropertyProvider* self = new ( ELeave ) CSsyReferencePropertyProvider( aChannel ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferencePropertyProvider::NewL() - return" ) ) ); - return self; - } - -// --------------------------------------------------------------------------- -// Destructor -// --------------------------------------------------------------------------- -// -CSsyReferencePropertyProvider::~CSsyReferencePropertyProvider() - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferencePropertyProvider::~CSsyReferencePropertyProvider()" ) ) ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferencePropertyProvider::~CSsyReferencePropertyProvider() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferencePropertyProvider::CheckPropertyDependenciesL -// --------------------------------------------------------------------------- -// -void CSsyReferencePropertyProvider::CheckPropertyDependenciesL( - const TSensrvChannelId /*aChannelId*/, - const TSensrvProperty& /*aProperty*/, - RSensrvChannelList& /*aAffectedChannels*/ ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferencePropertyProvider::CheckPropertyDependenciesL()" ) ) ); - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferencePropertyProvider::CheckPropertyDependenciesL() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferencePropertyProvider::SetPropertyL -// --------------------------------------------------------------------------- -// -void CSsyReferencePropertyProvider::SetPropertyL( - const TSensrvChannelId aChannelId, - const TSensrvProperty& aProperty ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferencePropertyProvider::SetPropertyL()" ) ) ); - - if ( iChannel.ChannelId() != aChannelId ) - { - User::Leave( KErrArgument ); - } - - // Search property. Leaves with KErrNotFound if property is not found. - // Leaves with KErrAccessDenied if found property is Read only - iChannel.FindAndUpdatePropertyL( aProperty ); - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferencePropertyProvider::SetPropertyL() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferencePropertyProvider::GetPropertyL -// --------------------------------------------------------------------------- -// -void CSsyReferencePropertyProvider::GetPropertyL( - const TSensrvChannelId aChannelId, - TSensrvProperty& aProperty ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferencePropertyProvider::GetPropertyL()" ) ) ); - - if ( iChannel.ChannelId() != aChannelId && aChannelId != 0 ) - { - User::Leave( KErrArgument ); - } - else - { - // Search property. Leaves with KErrNotFound if property is not found - aProperty = iChannel.FindPropertyL( - aProperty.GetPropertyId(), - aProperty.PropertyItemIndex(), - aProperty.GetArrayIndex() ); - } - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferencePropertyProvider::GetPropertyL() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferencePropertyProvider::GetAllPropertiesL -// --------------------------------------------------------------------------- -// -void CSsyReferencePropertyProvider::GetAllPropertiesL( - const TSensrvChannelId aChannelId, - RSensrvPropertyList& aChannelPropertyList ) - { - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferencePropertyProvider::GetAllPropertiesL()" ) ) ); - - if ( iChannel.ChannelId() != aChannelId ) - { - User::Leave( KErrArgument ); - } - - iChannel.GetProperties( aChannelPropertyList ); - - COMPONENT_TRACE( ( _L( "SSY Reference Plugin - CSsyReferencePropertyProvider::GetAllPropertiesL() - return" ) ) ); - } - -// --------------------------------------------------------------------------- -// CSsyReferencePropertyProvider::GetPropertyProviderInterfaceL -// --------------------------------------------------------------------------- -// -void CSsyReferencePropertyProvider::GetPropertyProviderInterfaceL( TUid aInterfaceUid, - TAny*& aInterface ) - { - aInterface = NULL; - - if ( aInterfaceUid.iUid == KSsyPropertyProviderInterface1.iUid ) - { - aInterface = reinterpret_cast( - static_cast( this ) ); - } - } - -// End of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/startupadaptationstub/data/10205053.rss --- a/systemswstubs/startupadaptationstub/data/10205053.rss Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Registry info resource file for StartupAdaptationStub ECOM -* plugin. -* -*/ - - - -// INCLUDES -#include "ecom/registryinfov2.rh" - -// RESOURCE DEFINITIONS -// --------------------------------------------------------- -// -// startupadaptationstub_registry_info -// Registry info resource. -// -// --------------------------------------------------------- -// -RESOURCE REGISTRY_INFO startupadaptationstub_registry_info - { - resource_format_version = RESOURCE_FORMAT_VERSION_2; - dll_uid = 0x10205053; - interfaces = - { - INTERFACE_INFO - { - interface_uid = 0x101F8768; - implementations = - { - IMPLEMENTATION_INFO - { - implementation_uid = 0x10205055; - version_no = 1; - display_name = "StartupAdaptationStub"; - default_data = ""; - opaque_data = ""; - rom_only = 1; - } - }; - } - }; - } - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/startupadaptationstub/group/bld.inf --- a/systemswstubs/startupadaptationstub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build info file for the StartupAdaptationStub ECom plugin. -* -*/ - - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS -../rom/startupadaptationstub.iby CORE_IBY_EXPORT_PATH(stubs,startupadaptationstub.iby) - -PRJ_MMPFILES -startupadaptationstub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/startupadaptationstub/group/startupadaptationstub.mmp --- a/systemswstubs/startupadaptationstub/group/startupadaptationstub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project definition file for project StartupAdaptationStub -* -*/ - - -// To get the OS_LAYER_SYSTEMINCLUDE-definition -#include - -TARGET startupadaptationstub.dll -CAPABILITY CAP_ECOM_PLUGIN -TARGETTYPE PLUGIN -UID 0x10009D8D 0x10205053 -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE StartupAdaptationStub.cpp -SOURCE StartupAdaptationStubModel.cpp -SOURCE CommandProcessingEngine.cpp -SOURCE ImplementationFactory.cpp -SOURCE sastubeventlistener.cpp - -USERINCLUDE ../inc - -OS_LAYER_SYSTEMINCLUDE - -START RESOURCE ../data/10205053.rss -TARGET startupadaptationstub.rsc -END - -LIBRARY euser.lib -LIBRARY ecom.lib -LIBRARY efsrv.lib - -LANG SC - -// >>> define to enable the tracing -// MACRO __TRACE_ALL__ -// <<< define to enable the tracing - -// >>> define to enable module test support -// MACRO __STARTER_MODULE_TEST_SUPPORT__ -// <<< define to enable module test support diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/startupadaptationstub/inc/CommandProcessingEngine.h --- a/systemswstubs/startupadaptationstub/inc/CommandProcessingEngine.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,126 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CCommandProcessingEngine class declaration. -* -*/ - - - -#ifndef __COMMANDPROCESSINGENGINE_H__ -#define __COMMANDPROCESSINGENGINE_H__ - -// INCLUDES -#include - -// FORWARD DECLARATIONS -class MCommandProcessingObserver; - -// CLASS DECLARATION - -/** -* ?one_line_short_description. CCommandProcessingEngine -* ?other_description_lines -* -* @lib ?library -* @since Series ?XX ?SeriesXX_version -*/ -class CCommandProcessingEngine : public CActive - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @param aObserver Command processing completion observer. - */ - static CCommandProcessingEngine* NewL( - MCommandProcessingObserver& aObserver ); - - /** - * Destructor. - */ - virtual ~CCommandProcessingEngine(); - - public: // New functions - - /** - * Append command to queue. - * - * @param aCommandId Command ID from the client. - * @param aDuration Timeout value in milliseconds. - */ - void ExecuteCommandL( const TInt aCommandId, const TInt aDuration ); - - public: // Functions from base classes - - /** - * From CActive. - * Handles an active object’s request completion event. - */ - void RunL(); - - /** - * From CActive. - * Handles a leave occurring in the request completion event handler - * RunL(). - * @param aError The leave code. - */ - TInt RunError( TInt aError ); - - /** - * From CActive. - * Implements cancellation of an outstanding request. - */ - void DoCancel(); - - private: - - /** - * C++ default constructor. - * @param aObserver Command processing completion observer. - */ - CCommandProcessingEngine( MCommandProcessingObserver& aObserver ); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - /** - * Set the timer and activate. - * - * @param aDuration Timeout value in milliseconds. - */ - void ActivateWithTimeout( const TInt aDuration ); - - private: // Data - - struct TCommandInfo - { - TInt iCommandId; - TInt iDuration; - }; - - typedef RArray RCommandArray; - - RCommandArray iCommands; // List of commands to process. - - RTimer iTimer; // A timer for emulating command processing time. - - // Command processing completion observer. - MCommandProcessingObserver& iObserver; - }; - -#endif // __COMMANDPROCESSINGENGINE_H__ - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/startupadaptationstub/inc/CommandProcessingObserver.h --- a/systemswstubs/startupadaptationstub/inc/CommandProcessingObserver.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: MCommandProcessingObserver class declaration. -* -*/ - - -#ifndef __COMMANDPROCESSINGOBSERVER_H__ -#define __COMMANDPROCESSINGOBSERVER_H__ - -// INCLUDES -#include - -/** -* An observer interface... -* -* @lib ? -* @since Series 60 3.0 -*/ -class MCommandProcessingObserver - { - public: - - /** - * A command has been processed. - * @param aCommandId A command identifier. - */ - virtual void CommandProcessedL( - const TInt aCommandId ) = 0; - - }; - -#endif // __COMMANDPROCESSINGOBSERVER_H__ - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/startupadaptationstub/inc/StartupAdaptationStub.h --- a/systemswstubs/startupadaptationstub/inc/StartupAdaptationStub.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,142 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CStartupAdaptationStub class declaration. -* -*/ - - - -#ifndef __STARTUPADAPTATIONSTUB_H__ -#define __STARTUPADAPTATIONSTUB_H__ - -// INCLUDES -#include "CommandProcessingObserver.h" -#include "sastubeventsender.h" -#include - -// FORWARD DECLARATIONS -class CCommandProcessingEngine; -class CStartupAdaptationStubModel; -class CSAStubEventListener; - -// CLASS DECLARATION - -/** -* A stub implementation of CStartupAdaptation interface. -* -* @lib StartupAdaptationStub.lib -* @since Series 60 3.0 -*/ -class CStartupAdaptationStub : - public CStartupAdaptation, - public MCommandProcessingObserver, - public MSAStubEventSender - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @param aConstructionParameters Construction parameters from the - * client. - */ - static CStartupAdaptationStub* NewL( TAny* aConstructionParameters ); - - /** - * Destructor. - */ - virtual ~CStartupAdaptationStub(); - - public: // Functions from base classes - - /** - * From CStartupAdaptation. - * Issue a command to startup adaptation. - * - * @param aCommandId A command identifier. - * @param aData Data associated with the command. - */ - virtual void CommandL( - const StartupAdaptation::TCommand aCommandId, - TDesC8& aData ); - - /** - * From CStartupAdaptation. - * Cancel a command. - * - * @param aCommandId A command identifier. - */ - virtual void CancelCommandL( - const StartupAdaptation::TCommand aCommandId ); - - /** - * From CStartupAdaptation. - * Get plugin implementation version. Major and minor version numbers - * are relevant. - * - * @return The plugin implementation version. - */ - virtual TVersion Version() const; - - /** - * From MCommandProcessingObserver. - * A command has been processed. - * @param aCommandId A command identifier. - */ - virtual void CommandProcessedL( - const TInt aCommandId ); - - /** - * From MSAStubEventSender. - * Send an event. - * - * @since S60 4.0 - * @param aEvent Identifies the event to send. - * @param aArg Optional paraneter for the event. - */ - virtual void SendEvent( const TInt aEvent, const TInt aArg ); - - private: - - /** - * C++ default constructor. - * @param anObserver Observer for command responses and events. - */ - CStartupAdaptationStub( MStartupAdaptationObserver* anObserver ); - - /** - * Performs the second phase construction of a CStartupAdaptationStub - * object. - */ - void ConstructL(); - - private: // Data - - // Observer for command responses and events. Not owned. - MStartupAdaptationObserver* iObserver; - - // The engine class that handles the 'processing' of requests. - CCommandProcessingEngine* iEngine; - - // Model containg the response values for the commands. - CStartupAdaptationStubModel* iModel; - - // Observer for indications to send events. - CSAStubEventListener* iEventListener; - }; - -// CLASS DECLARATION - -#endif // __STARTUPADAPTATIONSTUB_H__ - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/startupadaptationstub/inc/StartupAdaptationStubDebug.h --- a/systemswstubs/startupadaptationstub/inc/StartupAdaptationStubDebug.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Macros for debugging. -* -*/ - - - -#ifndef __STARTUPADAPTATIONSTUBDEBUG_H__ -#define __STARTUPADAPTATIONSTUBDEBUG_H__ - -// MACROS -#ifdef _DEBUG - #include - #define ERROR_DEBUG(X) RDebug::Print(X) - #define ERROR_DEBUG_1(X,Y1) RDebug::Print(X,Y1) - #define ERROR_DEBUG_2(X,Y1,Y2) RDebug::Print(X,Y1,Y2) -#else - #define ERROR_DEBUG(X) - #define ERROR_DEBUG_1(X,Y) - #define ERROR_DEBUG_2(X,Y1,Y2) -#endif - -#if defined _DEBUG && defined __TRACE_ALL__ - #include - #define RDEBUG(X) RDebug::Print(X) - #define RDEBUG_1(X,Y1) RDebug::Print(X,Y1) - #define RDEBUG_2(X,Y1,Y2) RDebug::Print(X,Y1,Y2) -#else - #define RDEBUG(X) - #define RDEBUG_1(X,Y) - #define RDEBUG_2(X,Y1,Y2) -#endif - -#endif // __STARTUPADAPTATIONSTUBDEBUG_H__ - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/startupadaptationstub/inc/StartupAdaptationStubModel.h --- a/systemswstubs/startupadaptationstub/inc/StartupAdaptationStubModel.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,127 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CStartupAdaptationStubModel class declaration. -* -*/ - - -#ifndef __STARTUPADAPTATIONSTUBMODEL_H__ -#define __STARTUPADAPTATIONSTUBMODEL_H__ - -#include -#include - -const TInt KNumResponseLists = 16; - -/** -* A model containing data used by the StartupAdaptationStub. -* -* @lib StartupAdaptationStub.lib -* @since Series 60 3.0 -*/ -NONSHARABLE_CLASS( CStartupAdaptationStubModel ) : public CBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - static CStartupAdaptationStubModel* NewL(); - - /** - * Destructor. - */ - virtual ~CStartupAdaptationStubModel(); - - public: // New functions - - TInt GetGlobalStateChangeResponse(); - void GetSecurityStateChangeResponse( - StartupAdaptation::TSecurityStateResponse& aResponse ); - void GetStartupModeResponse( - StartupAdaptation::TGlobalStartupModeResponse& aResponse ); - TInt GetSelftestResponse(); - void GetLanguageListResponse( - StartupAdaptation::RLanguageListResponse& aResponse ); - TInt GetRTCTimeValidityResponse(); - void GetSimChangedResponse( - StartupAdaptation::TBooleanResponse& aResponse ); - void GetSimOwnedResponse( - StartupAdaptation::TBooleanResponse& aResponse ); - TInt GetSetAlarmResponse(); - TInt GetCancelAlarmResponse(); - TInt GetResetResponse(); - TInt GetShutdownResponse(); - TInt GetRFSResponse(); - TInt GetActivateRfResponse(); - TInt GetDeactivateRfResponse(); - void GetHiddenResetResponse( - StartupAdaptation::TBooleanResponse& aResponse ); - - TInt GetDurationForNextCall( const TInt aCommandId ); - - private: - - typedef CArrayFixFlat CStructuredList; - - /** - * C++ default constructor. - */ - CStartupAdaptationStubModel(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - /** - * Read settings from config file. - */ - void ReadConfigFileL(); - - /** - * Initialize to default values (if config file does not exist or is - * corrupted). - */ - void InitToDefaultL(); - - TInt GetSimpleResponse( const TInt aIndex ); - TInt CalculateCurrentBaseIndex( const TInt aIndex ); - void UpdateCounter( const TInt aIndex ); - - static void ReadStructuredListL( - const TInt aNumParts, - TLex& aLexer, - CStructuredList& aList ); - - static TInt ReadDurationL( TLex& aLexer ); - - private: // Data - - struct TResponseData - { - TInt iParts; - TInt iCounter; - CStructuredList* iList; // Not owned - }; - - TResponseData iResponses[KNumResponseLists]; - - }; - -// CLASS DECLARATION - -#endif // __STARTUPADAPTATIONSTUBMODEL_H__ - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/startupadaptationstub/inc/sastubeventlistener.h --- a/systemswstubs/startupadaptationstub/inc/sastubeventlistener.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of CSAStubEventListener class. -* -*/ - - -#ifndef __SASTUBEVENTLISTENER_H__ -#define __SASTUBEVENTLISTENER_H__ - -#include -#include - -class MSAStubEventSender; - -/** - * Observer for Starter module test events. - * - * @lib None - * @since S60 4.0 - */ -class CSAStubEventListener : public CActive - { - -public: - - /** - * Second phase constructor. - * - * @param aSender Object that can send an event in response to an - * indication received from P&S. - * @since S60 4.0 - */ - static CSAStubEventListener* NewL( MSAStubEventSender& aSender ); - - virtual ~CSAStubEventListener(); - -protected: - - /** - * From CActive. - * Implements cancellation of an outstanding request. - * - * @since S60 4.0 - */ - virtual void DoCancel(); - - /** - * From CActive. - * Handles an active object's request completion event. - * Never leaves. - * - * @since S60 4.0 - */ - virtual void RunL(); - -private: - - /** - * First phase constructor. - * - * @param aSender Object that can send an event in response to an - * indication received from P&S. - * @since S60 4.0 - */ - CSAStubEventListener( MSAStubEventSender& aSender ); - - void ConstructL(); - -private: // data - - /** - * Handle to Publish&Subscribe key to observe. - */ - RProperty iProperty; - - /** - * Object that can send an event in response to an indication received from - * P&S. - */ - MSAStubEventSender& iSender; - - }; - -#endif // __SASTUBEVENTLISTENER_H__ diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/startupadaptationstub/inc/sastubeventsender.h --- a/systemswstubs/startupadaptationstub/inc/sastubeventsender.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of MSAStubEventSender interface class. -* -*/ - - -#ifndef __SASTUBEVENTSENDER_H__ -#define __SASTUBEVENTSENDER_H__ - -#include - -/** - * Interface representing object capable of sending Startup Adaptation events. - * - * @lib None - * @since S60 4.0 - */ -class MSAStubEventSender - { - -public: - - /** - * Send an event. - * - * @since S60 4.0 - * @param aEvent Identifies the event to send. - * @param aArg Optional paraneter for the event. - */ - virtual void SendEvent( const TInt aEvent, const TInt aArg ) = 0; - - }; - -#endif // __SASTUBEVENTSENDER_H__ diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/startupadaptationstub/rom/startupadaptationstub.iby --- a/systemswstubs/startupadaptationstub/rom/startupadaptationstub.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: StartupAdaptationStub provides dummy implementation of -* StartupAdaptation plugin interface. -* -*/ - - -#ifndef __STARTUPADAPTATIONSTUB_IBY__ -#define __STARTUPADAPTATIONSTUB_IBY__ - -ECOM_PLUGIN( startupadaptationstub.dll, startupadaptationstub.rsc ) - -#endif // __STARTUPADAPTATIONSTUB_IBY__ diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/startupadaptationstub/src/CommandProcessingEngine.cpp --- a/systemswstubs/startupadaptationstub/src/CommandProcessingEngine.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,178 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of CCommandProcessingEngine class. -* -*/ - - - -// INCLUDE FILES -#include "CommandProcessingEngine.h" -#include "CommandProcessingObserver.h" -#include "StartupAdaptationStubDebug.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CCommandProcessingEngine::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CCommandProcessingEngine* CCommandProcessingEngine::NewL( - MCommandProcessingObserver& aObserver ) - { - CCommandProcessingEngine* self = - new( ELeave ) CCommandProcessingEngine( aObserver ); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - - -// Destructor -CCommandProcessingEngine::~CCommandProcessingEngine() - { - Cancel(); - iTimer.Close(); - iCommands.Close(); - } - - -// ----------------------------------------------------------------------------- -// CCommandProcessingEngine::ExecuteCommandL -// -// ----------------------------------------------------------------------------- -// -void CCommandProcessingEngine::ExecuteCommandL( - const TInt aCommandId, - const TInt aDuration ) - { - RDEBUG_2( _L( "CCommandProcessingEngine::ExecuteCommandL( %d, %d )." ), aCommandId, aDuration ); - - TCommandInfo info; - info.iCommandId = aCommandId; - info.iDuration = aDuration; - iCommands.AppendL( info ); - - if ( !IsActive() ) // If already active, this happens at the end of RunL. - { - ActivateWithTimeout( aDuration ); - } - - RDEBUG( _L( "CCommandProcessingEngine::ExecuteCommandL finished." ) ); - } - - -// ----------------------------------------------------------------------------- -// CCommandProcessingEngine::RunL -// -// ----------------------------------------------------------------------------- -// -void CCommandProcessingEngine::RunL() - { - RDEBUG( _L( "CCommandProcessingEngine::RunL." ) ); - RDEBUG_1( _L( "Command count: %d." ), iCommands.Count() ); - - __ASSERT_ALWAYS( iCommands.Count() > 0, User::Invariant() ); - - const TInt& cmd = iCommands[0].iCommandId; - RDEBUG_1( _L( "Processed command( %d )." ), cmd ); - - iObserver.CommandProcessedL( cmd ); - - iCommands.Remove( 0 ); - - if ( iCommands.Count() > 0 ) // Check if there are more - { // commands waiting to be processed. - ActivateWithTimeout( iCommands[0].iDuration ); - } - - RDEBUG( _L( "CCommandProcessingEngine::RunL finished." ) ); - } - - -// ----------------------------------------------------------------------------- -// CCommandProcessingEngine::RunError -// -// ----------------------------------------------------------------------------- -// -TInt CCommandProcessingEngine::RunError( TInt aError ) - { - RDEBUG_1( _L( "CCommandProcessingEngine::RunError( %d )." ), aError ); - aError = aError; //To prevent compiler warning. - RDEBUG( _L( "CCommandProcessingEngine::RunError finished." ) ); - return KErrNone; - } - - -// ----------------------------------------------------------------------------- -// CCommandProcessingEngine::DoCancel -// -// ----------------------------------------------------------------------------- -// -void CCommandProcessingEngine::DoCancel() - { - RDEBUG( _L( "CCommandProcessingEngine::DoCancel." ) ); - - iTimer.Cancel(); - - RDEBUG( _L( "CCommandProcessingEngine::DoCancel finished." ) ); - } - - -// ----------------------------------------------------------------------------- -// CCommandProcessingEngine::CCommandProcessingEngine -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CCommandProcessingEngine::CCommandProcessingEngine( - MCommandProcessingObserver& aObserver ) - : CActive( EPriorityStandard ), iObserver( aObserver ) - { - CActiveScheduler::Add( this ); - } - - -// ----------------------------------------------------------------------------- -// CCommandProcessingEngine::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CCommandProcessingEngine::ConstructL() - { - User::LeaveIfError( iTimer.CreateLocal() ); - } - - -// ----------------------------------------------------------------------------- -// CCommandProcessingEngine::ActivateWithTimeout -// -// ----------------------------------------------------------------------------- -// -void CCommandProcessingEngine::ActivateWithTimeout( const TInt aDuration ) - { - RDEBUG( _L( "CCommandProcessingEngine::ActivateWithTimeout." ) ); - - iTimer.After( iStatus, 1000 * aDuration ); - SetActive(); - - RDEBUG( _L( "CCommandProcessingEngine::ActivateWithTimeout finished." ) ); - } - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/startupadaptationstub/src/ImplementationFactory.cpp --- a/systemswstubs/startupadaptationstub/src/ImplementationFactory.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: StartupAdaptationStub ECOM implementation factory. -* -*/ - - - -// INCLUDE FILES -#include "StartupAdaptationStub.h" -#include - -// LOCAL CONSTANTS AND MACROS - -// Define the interface UIDs. -const TImplementationProxy ImplementationTable[] = - { - // Remove PCLint note "C-style cast" - //lint -e1924 - // Remove PCLint warning "Suspicious cast" - //lint -e611 - IMPLEMENTATION_PROXY_ENTRY( 0x10205055, CStartupAdaptationStub::NewL ) - //lint +e1924 - //lint +e611 - }; - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// ----------------------------------------------------------------------------- -// ImplementationGroupProxy. -// -// ----------------------------------------------------------------------------- -// -EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount ) - { - aTableCount = sizeof( ImplementationTable ) / sizeof( TImplementationProxy ); - return ImplementationTable; - } - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/startupadaptationstub/src/StartupAdaptationStub.cpp --- a/systemswstubs/startupadaptationstub/src/StartupAdaptationStub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,352 +0,0 @@ -/* -* Copyright (c) 2004-2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of CStartupAdaptationStub class. -* -*/ - - - -// INCLUDE FILES -#include "StartupAdaptationStub.h" -#include "CommandProcessingEngine.h" -#include "StartupAdaptationStubModel.h" -#include "sastubeventlistener.h" -#include "StartupAdaptationStubDebug.h" -#include - -using namespace StartupAdaptation; - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStub::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CStartupAdaptationStub* CStartupAdaptationStub::NewL( TAny* aConstructionParameters ) - { - RDEBUG( _L( "CStartupAdaptationStub::NewL." ) ); - - CStartupAdaptationStub* self = - new( ELeave ) CStartupAdaptationStub( - static_cast( aConstructionParameters ) ); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - RDEBUG( _L( "CStartupAdaptationStub::NewL finished." ) ); - - return self; - } - - -// Destructor -CStartupAdaptationStub::~CStartupAdaptationStub() - { - RDEBUG( _L( "CStartupAdaptationStub::~CStartupAdaptationStub." ) ); - - delete iEventListener; - delete iModel; - delete iEngine; - - RDEBUG( _L( "CStartupAdaptationStub::~CStartupAdaptationStub finished." ) ); - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStub::CommandL -// -// ----------------------------------------------------------------------------- -// -void CStartupAdaptationStub::CommandL( - const TCommand aCommandId, - TDesC8& /*aData*/ ) - { - RDEBUG_1( _L( "CStartupAdaptationStub::CommandL( %d )." ), aCommandId ); - - TInt duration = iModel->GetDurationForNextCall( aCommandId ); - iEngine->ExecuteCommandL( aCommandId, duration ); - - RDEBUG( _L( "CStartupAdaptationStub::CommandL finished." ) ); - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStub::CommandL -// -// ----------------------------------------------------------------------------- -// -void CStartupAdaptationStub::CancelCommandL( - const TCommand /*aCommandId*/ ) - { - RDEBUG( _L( "CStartupAdaptationStub::CancelCommandL." ) ); - - iEngine->Cancel(); - - RDEBUG( _L( "CStartupAdaptationStub::CancelCommandL finished." ) ); - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStub::Version -// -// ----------------------------------------------------------------------------- -// -TVersion CStartupAdaptationStub::Version() const - { - return TVersion( 0, 1, 0 ); - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStub::CommandProcessedL -// -// ----------------------------------------------------------------------------- -// -void CStartupAdaptationStub::CommandProcessedL( - const TInt aCommandId ) - { - RDEBUG_1( _L( "CStartupAdaptationStub::CommandProcessedL( %d )." ), aCommandId ); - - switch ( aCommandId ) - { - case EGlobalStateChange: - { - TResponsePckg responsePckg( - iModel->GetGlobalStateChangeResponse() ); - iObserver->ResponseL( - static_cast( aCommandId ), - responsePckg ); - break; - } - case EExecuteSelftests: - { - TResponsePckg responsePckg( iModel->GetSelftestResponse() ); - iObserver->ResponseL( - static_cast( aCommandId ), - responsePckg ); - break; - } - case EValidateRTCTime: - { - TResponsePckg responsePckg( - iModel->GetRTCTimeValidityResponse() ); - iObserver->ResponseL( - static_cast( aCommandId ), - responsePckg ); - break; - } - case ESetWakeupAlarm: - { - TResponsePckg responsePckg( iModel->GetSetAlarmResponse() ); - iObserver->ResponseL( - static_cast( aCommandId ), - responsePckg ); - break; - } - case ECancelWakeupAlarm: - { - TResponsePckg responsePckg( KErrNone ); - iObserver->ResponseL( - static_cast( aCommandId ), - responsePckg ); - break; - } - case EExecuteReset: - { - TResponsePckg responsePckg( iModel->GetResetResponse() ); - iObserver->ResponseL( - static_cast( aCommandId ), - responsePckg ); - break; - } - case EExecuteShutdown: - { - TResponsePckg responsePckg( iModel->GetShutdownResponse() ); - iObserver->ResponseL( - static_cast( aCommandId ), - responsePckg ); - break; - } - case EExecuteDOSRfs: - { - TResponsePckg responsePckg( iModel->GetRFSResponse() ); - iObserver->ResponseL( - static_cast( aCommandId ), - responsePckg ); - break; - } - case EGetSimChanged: - { - TBooleanResponse response; - iModel->GetSimChangedResponse( response ); - TBooleanResponsePckg responsePckg( response ); - iObserver->ResponseL( - static_cast( aCommandId ), - responsePckg ); - break; - } - case EGetSimOwned: - { - TBooleanResponse response; - iModel->GetSimOwnedResponse( response ); - TBooleanResponsePckg responsePckg( response ); - iObserver->ResponseL( - static_cast( aCommandId ), - responsePckg ); - break; - } - case ESecurityStateChange: - { - TSecurityStateResponse response; - iModel->GetSecurityStateChangeResponse( response ); - TSecurityStateResponsePckg responsePckg( response ); - iObserver->ResponseL( - static_cast( aCommandId ), - responsePckg ); - break; - } - case EGetGlobalStartupMode: - { - TGlobalStartupModeResponse response; - iModel->GetStartupModeResponse( response ); - TGlobalStartupModeResponsePckg responsePckg( response ); - iObserver->ResponseL( - static_cast( aCommandId ), - responsePckg ); - break; - } - case EGetSIMLanguages: - { - RLanguageListResponse response; - CleanupClosePushL( response ); - iModel->GetLanguageListResponse( response ); - TLanguageListResponsePckg responsePckg( response ); - iObserver->ResponseL( - static_cast( aCommandId ), - responsePckg ); - CleanupStack::PopAndDestroy(); - break; - } - case EActivateRfForEmergencyCall: - { - TResponsePckg responsePckg( iModel->GetActivateRfResponse() ); - iObserver->ResponseL( - static_cast( aCommandId ), - responsePckg ); - break; - } - case EDeactivateRfAfterEmergencyCall: - { - TResponsePckg responsePckg( iModel->GetDeactivateRfResponse() ); - iObserver->ResponseL( - static_cast( aCommandId ), - responsePckg ); - break; - } - case EGetHiddenReset: - { - TBooleanResponse response; - iModel->GetHiddenResetResponse( response ); - TBooleanResponsePckg responsePckg( response ); - iObserver->ResponseL( - static_cast( aCommandId ), - responsePckg ); - break; - } - default: - RDEBUG_1( _L( "CStartupAdaptationStub: Unexpected command: %d." ), aCommandId ); - User::Panic( _L( "Unexpected command" ), KErrNotSupported ); - break; - }; - - - RDEBUG( _L( "CStartupAdaptationStub::CommandProcessedL finished." ) ); - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStub::SendEvent -// -// ----------------------------------------------------------------------------- -// -void CStartupAdaptationStub::SendEvent( const TInt aEvent, const TInt aArg ) - { - RDEBUG_2( _L( "CStartupAdaptationStub: SendEvent 0x%08x, 0x%08x." ), aEvent, aArg ); - - TInt errorCode = KErrNone; - TEvent eventID = static_cast( aEvent ); - if ( eventID == EFatalError ) - { - TFatalErrorTypePckg params( static_cast( aArg ) ); - TRAP( errorCode, iObserver->EventL( eventID, params ) ); - } - else if ( eventID == ESimEvent ) - { - TSimEventTypePckg params( static_cast( aArg ) ); - TRAP( errorCode, iObserver->EventL( eventID, params ) ); - } - else - { - TBuf8<1> dummy; - TRAP( errorCode, iObserver->EventL( eventID, dummy ) ); - } - - if ( errorCode != KErrNone ) - { - RDEBUG_1( _L( "CStartupAdaptationStub: EventL leave code %d." ), errorCode ); - } - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStub::CStartupAdaptationStub -// C++ default constructor can NOT contain any code, that might leave. -// ----------------------------------------------------------------------------- -// -CStartupAdaptationStub::CStartupAdaptationStub( - MStartupAdaptationObserver* anObserver ) - : iObserver( anObserver ), - iEventListener( NULL ) - { - RDEBUG( _L( "CStartupAdaptationStub::CStartupAdaptationStub." ) ); - - __ASSERT_ALWAYS( anObserver, User::Invariant() ); - - RDEBUG( _L( "CStartupAdaptationStub::CStartupAdaptationStub finished." ) ); - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStub::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CStartupAdaptationStub::ConstructL() - { - RDEBUG( _L( "CStartupAdaptationStub::ConstructL." ) ); - - iEngine = CCommandProcessingEngine::NewL( *this ); - iModel = CStartupAdaptationStubModel::NewL(); - -#ifdef __STARTER_MODULE_TEST_SUPPORT__ - iEventListener = CSAStubEventListener::NewL( *this ); -#endif // __STARTER_MODULE_TEST_SUPPORT__ - - RDEBUG( _L( "CStartupAdaptationStub::ConstructL finished." ) ); - } - - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/startupadaptationstub/src/StartupAdaptationStubModel.cpp --- a/systemswstubs/startupadaptationstub/src/StartupAdaptationStubModel.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,781 +0,0 @@ -/* -* Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CStartupAdaptationStubModel class definition. -* -*/ - - - -// INCLUDE FILES -#include "StartupAdaptationStubModel.h" -#include "StartupAdaptationStubDebug.h" -#include - -// CONSTANTS - -_LIT( KConfigFile, "C:\\private\\2000D766\\StartupAdaptationStubConf.txt" ); -const TInt KDefaultDuration( 1 ); // Default command duration in ms. - -const TInt KGlobalStateChangeIndex( 0 ); -const TInt KSecurityStateChangeIndex( 1 ); -const TInt KGlobalStartupModeIndex( 2 ); -const TInt KSelftestIndex( 3 ); -const TInt KLanguageListIndex( 4 ); -const TInt KRTCTimeIndex( 5 ); -const TInt KSimChangedIndex( 6 ); -const TInt KSimOwnedIndex( 7 ); -const TInt KSetAlarmIndex( 8 ); -const TInt KCancelAlarmIndex( 9 ); -const TInt KResetIndex( 10 ); -const TInt KShutdownIndex( 11 ); -const TInt KRFSIndex( 12 ); -const TInt KActivateRfIndex( 13 ); -const TInt KDeactivateRfIndex( 14 ); -const TInt KHiddenResetIndex( 15 ); - -using namespace StartupAdaptation; - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CStartupAdaptationStubModel* CStartupAdaptationStubModel::NewL() - { - RDEBUG( _L( "CStartupAdaptationStubModel::NewL." ) ); - - CStartupAdaptationStubModel* self = - new( ELeave ) CStartupAdaptationStubModel(); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - RDEBUG( _L( "CStartupAdaptationStubModel::NewL finished." ) ); - - return self; - } - - -// Destructor -CStartupAdaptationStubModel::~CStartupAdaptationStubModel() - { - RDEBUG( _L( "CStartupAdaptationStubModel::~CStartupAdaptationStubModel." ) ); - - for ( TInt i = 0; i < KNumResponseLists; i++ ) - { - delete iResponses[i].iList; - } - - RDEBUG( _L( "CStartupAdaptationStubModel::~CStartupAdaptationStubModel finished." ) ); - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::GetGlobalStateChangeResponse -// -// ----------------------------------------------------------------------------- -// -TInt CStartupAdaptationStubModel::GetGlobalStateChangeResponse() - { - RDEBUG( _L( "CStartupAdaptationStubModel::GetGlobalStateChangeResponse." ) ); - - TInt response = GetSimpleResponse( KGlobalStateChangeIndex ); - - RDEBUG_1( _L( "CStartupAdaptationStubModel::GetGlobalStateChangeResponse finished with %d." ), response ); - return response; - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::GetSecurityStateChangeResponse -// -// ----------------------------------------------------------------------------- -// -void CStartupAdaptationStubModel::GetSecurityStateChangeResponse( - StartupAdaptation::TSecurityStateResponse& aResponse ) - { - RDEBUG( _L( "CStartupAdaptationStubModel::GetSecurityStateChangeResponse." ) ); - - const TInt index = KSecurityStateChangeIndex; - __ASSERT_DEBUG( iResponses[index].iList != NULL, User::Invariant() ); - - CStructuredList& list = *( ( iResponses[index] ).iList ); - const TInt currentIndex = CalculateCurrentBaseIndex( index );; - - __ASSERT_DEBUG( list.Count() > 0, User::Invariant() ); - __ASSERT_DEBUG( currentIndex < list.Count() - 2, User::Invariant() ); - - aResponse.iErrorCode = list[currentIndex + 1 ]; - aResponse.iValue = - static_cast( list[currentIndex + 2 ] ); - - UpdateCounter( index ); - - RDEBUG( _L( "CStartupAdaptationStubModel::GetSecurityStateChangeResponse finished." ) ); - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::GetStartupModeResponse -// -// ----------------------------------------------------------------------------- -// -void CStartupAdaptationStubModel::GetStartupModeResponse( - StartupAdaptation::TGlobalStartupModeResponse& aResponse ) - { - RDEBUG( _L( "CStartupAdaptationStubModel::GetStartupModeResponse." ) ); - - const TInt index = KGlobalStartupModeIndex; - __ASSERT_DEBUG( iResponses[index].iList != NULL, User::Invariant() ); - - CStructuredList& list = *( ( iResponses[index] ).iList ); - const TInt currentIndex = CalculateCurrentBaseIndex( index );; - - __ASSERT_DEBUG( list.Count() > 0, User::Invariant() ); - __ASSERT_DEBUG( currentIndex < list.Count() - 2, User::Invariant() ); - - aResponse.iErrorCode = list[currentIndex + 1 ]; - aResponse.iValue = - static_cast( list[currentIndex + 2 ] ); - - UpdateCounter( index ); - - RDEBUG( _L( "CStartupAdaptationStubModel::GetStartupModeResponse finished." ) ); - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::GetSelftestResponse -// -// ----------------------------------------------------------------------------- -// -TInt CStartupAdaptationStubModel::GetSelftestResponse() - { - RDEBUG( _L( "CStartupAdaptationStubModel::GetSelftestResponse." ) ); - - TInt response = GetSimpleResponse( KSelftestIndex ); - - RDEBUG_1( _L( "CStartupAdaptationStubModel::GetSelftestResponse finished with %d." ), response ); - return response; - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::GetLanguageListResponse -// -// ----------------------------------------------------------------------------- -// -void CStartupAdaptationStubModel::GetLanguageListResponse( - StartupAdaptation::RLanguageListResponse& aResponse ) - { - RDEBUG( _L( "CStartupAdaptationStubModel::GetLanguageListResponse." ) ); - - const TInt index = KLanguageListIndex; - __ASSERT_DEBUG( iResponses[index].iList != NULL, User::Invariant() ); - - CStructuredList& list = *( ( iResponses[index] ).iList ); - const TInt currentIndex = CalculateCurrentBaseIndex( index );; - - __ASSERT_DEBUG( list.Count() > 0, User::Invariant() ); - __ASSERT_DEBUG( currentIndex < list.Count() - iResponses[ index ].iParts, - User::Invariant() ); - - aResponse.iErrorCode = list[ currentIndex + 1 ]; - for ( TInt i = 0; i < list[ currentIndex + 2 ]; i++ ) - { - aResponse.iLanguages.Append( - static_cast( list[ currentIndex + i + 3 ] ) ); - } - - UpdateCounter( index ); - - RDEBUG( _L( "CStartupAdaptationStubModel::GetLanguageListResponse finished." ) ); - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::GetRTCTimeValidityResponse -// -// ----------------------------------------------------------------------------- -// -TInt CStartupAdaptationStubModel::GetRTCTimeValidityResponse() - { - RDEBUG( _L( "CStartupAdaptationStubModel::GetRTCTimeValidityResponse." ) ); - - TInt response = GetSimpleResponse( KRTCTimeIndex ); - - RDEBUG_1( _L( "CStartupAdaptationStubModel::GetRTCTimeValidityResponse finished with %d." ), response ); - return response; - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::GetSimChangedResponse -// -// ----------------------------------------------------------------------------- -// -void CStartupAdaptationStubModel::GetSimChangedResponse( - StartupAdaptation::TBooleanResponse& aResponse ) - { - RDEBUG( _L( "CStartupAdaptationStubModel::GetSimChangedResponse." ) ); - - const TInt index = KSimChangedIndex; - __ASSERT_DEBUG( iResponses[index].iList != NULL, User::Invariant() ); - - CStructuredList& list = *( ( iResponses[index] ).iList ); - const TInt currentIndex = CalculateCurrentBaseIndex( index );; - - __ASSERT_DEBUG( list.Count() > 0, User::Invariant() ); - __ASSERT_DEBUG( currentIndex < list.Count() - 2, User::Invariant() ); - - aResponse.iErrorCode = list[currentIndex + 1]; - aResponse.iValue = static_cast( list[currentIndex + 2 ] ); - - UpdateCounter( index ); - - RDEBUG( _L( "CStartupAdaptationStubModel::GetSimChangedResponse finished." ) ); - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::GetSimOwnedResponse -// -// ----------------------------------------------------------------------------- -// -void CStartupAdaptationStubModel::GetSimOwnedResponse( - StartupAdaptation::TBooleanResponse& aResponse ) - { - RDEBUG( _L( "CStartupAdaptationStubModel::GetSimOwnedResponse." ) ); - - const TInt index = KSimOwnedIndex; - __ASSERT_DEBUG( iResponses[index].iList != NULL, User::Invariant() ); - - CStructuredList& list = *( ( iResponses[index] ).iList ); - const TInt currentIndex = CalculateCurrentBaseIndex( index );; - - __ASSERT_DEBUG( list.Count() > 0, User::Invariant() ); - __ASSERT_DEBUG( currentIndex < list.Count() - 2, User::Invariant() ); - - aResponse.iErrorCode = list[currentIndex + 1 ]; - aResponse.iValue = static_cast( list[currentIndex + 2 ] ); - - UpdateCounter( index ); - - RDEBUG( _L( "CStartupAdaptationStubModel::GetSimOwnedResponse finished." ) ); - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::GetSetAlarmResponse -// -// ----------------------------------------------------------------------------- -// -TInt CStartupAdaptationStubModel::GetSetAlarmResponse() - { - RDEBUG( _L( "CStartupAdaptationStubModel::GetSetAlarmResponse." ) ); - - TInt response = GetSimpleResponse( KSetAlarmIndex ); - - RDEBUG_1( _L( "CStartupAdaptationStubModel::GetSetAlarmResponse finished with %d." ), response ); - return response; - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::GetCancelAlarmResponse -// -// ----------------------------------------------------------------------------- -// -TInt CStartupAdaptationStubModel::GetCancelAlarmResponse() - { - RDEBUG( _L( "CStartupAdaptationStubModel::GetCancelAlarmResponse." ) ); - - TInt response = GetSimpleResponse( KCancelAlarmIndex ); - - RDEBUG_1( _L( "CStartupAdaptationStubModel::GetCancelAlarmResponse finished with %d." ), response ); - return response; - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::GetResetResponse -// -// ----------------------------------------------------------------------------- -// -TInt CStartupAdaptationStubModel::GetResetResponse() - { - RDEBUG( _L( "CStartupAdaptationStubModel::GetResetResponse." ) ); - - TInt response = GetSimpleResponse( KResetIndex ); - - RDEBUG_1( _L( "CStartupAdaptationStubModel::GetResetResponse finished with %d." ), response ); - return response; - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::GetShutdownResponse -// -// ----------------------------------------------------------------------------- -// -TInt CStartupAdaptationStubModel::GetShutdownResponse() - { - RDEBUG( _L( "CStartupAdaptationStubModel::GetShutdownResponse." ) ); - - TInt response = GetSimpleResponse( KShutdownIndex ); - - RDEBUG_1( _L( "CStartupAdaptationStubModel::GetShutdownResponse finished with %d." ), response ); - return response; - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::GetRFSResponse -// -// ----------------------------------------------------------------------------- -// -TInt CStartupAdaptationStubModel::GetRFSResponse() - { - RDEBUG( _L( "CStartupAdaptationStubModel::GetRFSResponse." ) ); - - TInt response = GetSimpleResponse( KRFSIndex ); - - RDEBUG_1( _L( "CStartupAdaptationStubModel::GetRFSResponse finished with %d." ), response ); - return response; - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::GetActivateRfResponse -// -// ----------------------------------------------------------------------------- -// -TInt CStartupAdaptationStubModel::GetActivateRfResponse() - { - RDEBUG( _L( "CStartupAdaptationStubModel::GetActivateRfResponse." ) ); - - TInt response = GetSimpleResponse( KActivateRfIndex ); - - RDEBUG_1( _L( "CStartupAdaptationStubModel::GetActivateRfResponse finished with %d." ), response ); - return response; - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::GetDeactivateRfResponse -// -// ----------------------------------------------------------------------------- -// -TInt CStartupAdaptationStubModel::GetDeactivateRfResponse() - { - RDEBUG( _L( "CStartupAdaptationStubModel::GetDeactivateRfResponse." ) ); - - TInt response = GetSimpleResponse( KDeactivateRfIndex ); - - RDEBUG_1( _L( "CStartupAdaptationStubModel::GetDeactivateRfResponse finished with %d." ), response ); - return response; - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::GetHiddenResetResponse -// -// ----------------------------------------------------------------------------- -// -void CStartupAdaptationStubModel::GetHiddenResetResponse( - StartupAdaptation::TBooleanResponse& aResponse ) - { - RDEBUG( _L( "CStartupAdaptationStubModel::GetHiddenResetResponse." ) ); - - const TInt index = KHiddenResetIndex; - __ASSERT_DEBUG( iResponses[index].iList != NULL, User::Invariant() ); - - CStructuredList& list = *( ( iResponses[index] ).iList ); - const TInt currentIndex = CalculateCurrentBaseIndex( index );; - - __ASSERT_DEBUG( list.Count() > 0, User::Invariant() ); - __ASSERT_DEBUG( currentIndex < list.Count() - 2, User::Invariant() ); - - aResponse.iErrorCode = list[currentIndex + 1 ]; - aResponse.iValue = static_cast( list[currentIndex + 2 ] ); - - UpdateCounter( index ); - - RDEBUG( _L( "CStartupAdaptationStubModel::GetHiddenResetResponse finished." ) ); - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::GetDurationForNextCall -// -// ----------------------------------------------------------------------------- -// -TInt CStartupAdaptationStubModel::GetDurationForNextCall( const TInt aCommandId ) - { - RDEBUG_1( _L( "CStartupAdaptationStubModel::GetDurationForNextCall( %d )" ), aCommandId ); - - TInt index = aCommandId - EGlobalStateChange; - if ( aCommandId >= EValidateRTCTime ) - { - // Skip the missing two commands. - index -= ( EValidateRTCTime - EGetSIMLanguages ); - } - - __ASSERT_DEBUG( iResponses[index].iList != NULL, User::Invariant() ); - - CStructuredList& list = *( ( iResponses[index] ).iList ); - const TInt currentIndex = CalculateCurrentBaseIndex( index );; - - __ASSERT_DEBUG( list.Count() > 0, User::Invariant() ); - __ASSERT_DEBUG( currentIndex < list.Count(), User::Invariant() ); - - const TInt duration = list[currentIndex]; - - RDEBUG_1( _L( "CStartupAdaptationStubModel::GetDurationForNextCall finished with %d." ), duration ); - return duration; - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::CStartupAdaptationStubModel -// C++ default constructor can NOT contain any code, that might leave. -// ----------------------------------------------------------------------------- -// -CStartupAdaptationStubModel::CStartupAdaptationStubModel() - { - RDEBUG( _L( "CStartupAdaptationStubModel::CStartupAdaptationStubModel." ) ); - - for ( TInt i = 0; i < KNumResponseLists; i++ ) - { - iResponses[i].iCounter = 0; - } - - iResponses[ KGlobalStateChangeIndex ].iParts = 1; - iResponses[ KSecurityStateChangeIndex ].iParts = 2; - iResponses[ KGlobalStartupModeIndex ].iParts = 2; - iResponses[ KSelftestIndex ].iParts = 1; - iResponses[ KLanguageListIndex ].iParts = 16; - iResponses[ KRTCTimeIndex ].iParts = 1; - iResponses[ KSimChangedIndex ].iParts = 2; - iResponses[ KSimOwnedIndex ].iParts = 2; - iResponses[ KSetAlarmIndex ].iParts = 1; - iResponses[ KCancelAlarmIndex ].iParts = 1; - iResponses[ KResetIndex ].iParts = 1; - iResponses[ KShutdownIndex ].iParts = 1; - iResponses[ KRFSIndex ].iParts = 1; - iResponses[ KActivateRfIndex ].iParts = 1; - iResponses[ KDeactivateRfIndex ].iParts = 1; - iResponses[ KHiddenResetIndex ].iParts = 2; - - RDEBUG( _L( "CStartupAdaptationStubModel::CStartupAdaptationStubModel finished." ) ); - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CStartupAdaptationStubModel::ConstructL() - { - RDEBUG( _L( "CStartupAdaptationStubModel::ConstructL." ) ); - - for ( TInt i = 0; i < KNumResponseLists; i++ ) - { - iResponses[i].iList = - new ( ELeave ) CStructuredList( iResponses[i].iParts + 1 ); - } - - TRAPD( errorCode, ReadConfigFileL() ); - if ( errorCode != KErrNone ) - { - RDEBUG_1( _L( "Configuration file does not exist or is corrupt (error code %d). Initializing to default configuration." ), errorCode ); - - InitToDefaultL(); - } - - RDEBUG( _L( "CStartupAdaptationStubModel::ConstructL finished." ) ); - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::ReadConfigFileL -// -// ----------------------------------------------------------------------------- -// -void CStartupAdaptationStubModel::ReadConfigFileL() - { - RDEBUG( _L( "CStartupAdaptationStubModel::ReadConfigFileL." ) ); - - RFs fs; - User::LeaveIfError( fs.Connect() ); - CleanupClosePushL( fs ); - - RFile file; - User::LeaveIfError( file.Open( fs, KConfigFile, EFileShareReadersOnly ) ); - CleanupClosePushL( file ); - - TFileText reader; - reader.Set( file ); - - TBuf<256> buf; - TLex lex( buf ); - - for ( TInt i = 0; i < KNumResponseLists; i++ ) - { - User::LeaveIfError( reader.Read( buf ) ); - - RDEBUG_1( _L( "CStartupAdaptationStubModel: Config line: %S." ), &buf ); - - lex.Assign( buf ); - ReadStructuredListL( - iResponses[ i ].iParts, lex, *( iResponses[ i ].iList ) ); - } - - CleanupStack::PopAndDestroy( 2 ); // file, fs - - RDEBUG( _L( "CStartupAdaptationStubModel::ReadConfigFileL finished." ) ); - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::InitToDefaultL -// -// ----------------------------------------------------------------------------- -// -void CStartupAdaptationStubModel::InitToDefaultL() - { - RDEBUG( _L( "CStartupAdaptationStubModel::InitToDefaultL." ) ); - - for ( TInt i = 0; i < KNumResponseLists; i++ ) - { - iResponses[i].iList->Reset(); - } - - iResponses[KGlobalStateChangeIndex].iList->AppendL( KDefaultDuration ); - iResponses[KGlobalStateChangeIndex].iList->AppendL( KErrNone ); - - iResponses[KSecurityStateChangeIndex].iList->AppendL( KDefaultDuration ); - iResponses[KSecurityStateChangeIndex].iList->AppendL( KErrNone ); - iResponses[KSecurityStateChangeIndex].iList->AppendL( EYes ); - iResponses[KSecurityStateChangeIndex].iList->AppendL( KDefaultDuration ); - iResponses[KSecurityStateChangeIndex].iList->AppendL( KErrNone ); - iResponses[KSecurityStateChangeIndex].iList->AppendL( ENoValue ); - iResponses[KSecurityStateChangeIndex].iList->AppendL( KDefaultDuration ); - iResponses[KSecurityStateChangeIndex].iList->AppendL( KErrNone ); - iResponses[KSecurityStateChangeIndex].iList->AppendL( ENo ); - iResponses[KSecurityStateChangeIndex].iList->AppendL( KDefaultDuration ); - iResponses[KSecurityStateChangeIndex].iList->AppendL( KErrNone ); - iResponses[KSecurityStateChangeIndex].iList->AppendL( ENo ); - iResponses[KSecurityStateChangeIndex].iList->AppendL( KDefaultDuration ); - iResponses[KSecurityStateChangeIndex].iList->AppendL( KErrNone ); - iResponses[KSecurityStateChangeIndex].iList->AppendL( ENo ); - iResponses[KSecurityStateChangeIndex].iList->AppendL( KDefaultDuration ); - iResponses[KSecurityStateChangeIndex].iList->AppendL( KErrNone ); - iResponses[KSecurityStateChangeIndex].iList->AppendL( ENoValue ); - iResponses[KSecurityStateChangeIndex].iList->AppendL( KDefaultDuration ); - iResponses[KSecurityStateChangeIndex].iList->AppendL( KErrNone ); - iResponses[KSecurityStateChangeIndex].iList->AppendL( ESimLockOk ); - - iResponses[KGlobalStartupModeIndex].iList->AppendL( KDefaultDuration ); - iResponses[KGlobalStartupModeIndex].iList->AppendL( KErrNone ); - iResponses[KGlobalStartupModeIndex].iList->AppendL( ENormal ); - - iResponses[KSelftestIndex].iList->AppendL( KDefaultDuration ); - iResponses[KSelftestIndex].iList->AppendL( KErrNone ); - - iResponses[KLanguageListIndex].iList->AppendL( KDefaultDuration ); - iResponses[KLanguageListIndex].iList->AppendL( KErrNotFound ); - for ( TInt i = 0; i < 15; i++ ) - { - iResponses[KLanguageListIndex].iList->AppendL( 0 ); - } - iResponses[KLanguageListIndex].iList->AppendL( KDefaultDuration ); - iResponses[KLanguageListIndex].iList->AppendL( KErrNotFound ); - for ( TInt i = 0; i < 15; i++ ) - { - iResponses[KLanguageListIndex].iList->AppendL( 0 ); - } - iResponses[KLanguageListIndex].iList->AppendL( KDefaultDuration ); - iResponses[KLanguageListIndex].iList->AppendL( KErrNotFound ); - for ( TInt i = 0; i < 15; i++ ) - { - iResponses[KLanguageListIndex].iList->AppendL( 0 ); - } - - iResponses[KRTCTimeIndex].iList->AppendL( KDefaultDuration ); - iResponses[KRTCTimeIndex].iList->AppendL( 0 ); - - iResponses[KSimChangedIndex].iList->AppendL( KDefaultDuration ); - iResponses[KSimChangedIndex].iList->AppendL( KErrNotFound ); - iResponses[KSimChangedIndex].iList->AppendL( EFalse ); - - iResponses[KSimOwnedIndex].iList->AppendL( KDefaultDuration ); - iResponses[KSimOwnedIndex].iList->AppendL( KErrNotFound ); - iResponses[KSimOwnedIndex].iList->AppendL( EFalse ); - - for ( TInt i = 8; i < KNumResponseLists - 1; i++ ) - { - iResponses[i].iList->AppendL( KDefaultDuration ); - iResponses[i].iList->AppendL( 0 ); - } - - iResponses[KHiddenResetIndex].iList->AppendL( KDefaultDuration ); - iResponses[KHiddenResetIndex].iList->AppendL( KErrNotSupported ); - iResponses[KHiddenResetIndex].iList->AppendL( EFalse ); - - RDEBUG( _L( "CStartupAdaptationStubModel::InitToDefaultL finished." ) ); - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::GetSimpleResponse -// -// ----------------------------------------------------------------------------- -// -TInt CStartupAdaptationStubModel::GetSimpleResponse( const TInt aIndex ) - { - RDEBUG( _L( "CStartupAdaptationStubModel::GetSimpleResponse." ) ); - __ASSERT_DEBUG( iResponses[aIndex].iList != NULL, User::Invariant() ); - - CStructuredList& list = *( ( iResponses[aIndex] ).iList ); - const TInt currentIndex = CalculateCurrentBaseIndex( aIndex );; - - RDEBUG_1( _L( "CStartupAdaptationStubModel: count = %d" ), list.Count() ); - - __ASSERT_DEBUG( list.Count() > 0, User::Invariant() ); - __ASSERT_DEBUG( currentIndex < list.Count() + 1, User::Invariant() ); - - TInt response = list[currentIndex + 1]; - - UpdateCounter( aIndex ); - - RDEBUG_1( _L( "CStartupAdaptationStubModel::GetSimpleResponse finished with %d." ), response ); - return response; - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::CalculateCurrentBaseIndex -// -// ----------------------------------------------------------------------------- -// -TInt CStartupAdaptationStubModel::CalculateCurrentBaseIndex( const TInt aIndex ) - { - RDEBUG_1( _L( "CStartupAdaptationStubModel::CalculateCurrentBaseIndex( %d )" ), aIndex ); - - const TInt counter = iResponses[aIndex].iCounter; - const TInt parts = iResponses[aIndex].iParts; - const TInt currentBaseIndex = counter * ( parts + 1 ); - - RDEBUG_1( _L( "CStartupAdaptationStubModel::CalculateCurrentBaseIndex finished with %d." ), currentBaseIndex ); - return currentBaseIndex; - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::UpdateCounter -// -// ----------------------------------------------------------------------------- -// -void CStartupAdaptationStubModel::UpdateCounter( const TInt aIndex ) - { - RDEBUG( _L( "CStartupAdaptationStubModel::UpdateCounter." ) ); - __ASSERT_DEBUG( iResponses[aIndex].iList != NULL, User::Invariant() ); - - CStructuredList& list = *( ( iResponses[aIndex] ).iList ); - TInt counter = iResponses[aIndex].iCounter; - const TInt parts = iResponses[aIndex].iParts; - - __ASSERT_DEBUG( list.Count() > 0, User::Invariant() ); - __ASSERT_DEBUG( counter * ( parts + 1 ) < list.Count(), User::Invariant() ); - - counter++; - - if ( counter == ( list.Count() / ( parts + 1 ) ) ) - { - iResponses[aIndex].iCounter = 0; - } - else - { - iResponses[aIndex].iCounter = counter; - } - - RDEBUG_1( _L( "CStartupAdaptationStubModel::UpdateCounter finished. New counter is %d" ), iResponses[aIndex].iCounter ); - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::ReadStructuredListL -// -// ----------------------------------------------------------------------------- -// -void CStartupAdaptationStubModel::ReadStructuredListL( - const TInt aNumParts, - TLex& aLexer, - CStructuredList& aList ) - { - RDEBUG( _L( "CStartupAdaptationStubModel::ReadStructuredListL." ) ); - - while ( !aLexer.Eos() ) - { - aList.AppendL( ReadDurationL( aLexer ) ); - - TUint val( 0 ); - User::LeaveIfError( aLexer.Val( val, EHex ) ); - aList.AppendL( val ); - - for ( TInt i = 0; i < aNumParts - 1; i++ ) - { - if ( aLexer.Get() != ',' ) User::Leave( KErrCorrupt ); - - User::LeaveIfError( aLexer.Val( val, EHex ) ); - aList.AppendL( val ); - } - - if ( !aLexer.Eos() && aLexer.Get() != ';' ) User::Leave( KErrCorrupt ); - } - - if ( aList.Count() == 0 ) User::Leave( KErrCorrupt ); - - RDEBUG_1( _L( "CStartupAdaptationStubModel::ReadStructuredListL finished. List length: %d" ), aList.Count() ); - } - - -// ----------------------------------------------------------------------------- -// CStartupAdaptationStubModel::ReadDurationL -// -// ----------------------------------------------------------------------------- -// -TInt CStartupAdaptationStubModel::ReadDurationL( TLex& aLexer ) - { - RDEBUG( _L( "CStartupAdaptationStubModel::ReadDurationL." ) ); - - TInt val = KDefaultDuration; - if ( aLexer.Peek() == '[' ) // Duration value is written to file - { - aLexer.Inc(); - User::LeaveIfError( aLexer.Val( val ) ); - if ( aLexer.Get() != ']' ) - { - User::Leave( KErrCorrupt ); - } - } - - RDEBUG_1( _L( "CStartupAdaptationStubModel::ReadDurationL finished with %d." ), val ); - return val; - } diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/startupadaptationstub/src/sastubeventlistener.cpp --- a/systemswstubs/startupadaptationstub/src/sastubeventlistener.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of CSAStubEventListener class. -* -*/ - - -#ifdef __STARTER_MODULE_TEST_SUPPORT__ - -#include "sastubeventlistener.h" -#include "sastubeventsender.h" -#include "startupadaptationstubdebug.h" - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// ?description_if_needed -// --------------------------------------------------------------------------- -// -CSAStubEventListener::CSAStubEventListener( MSAStubEventSender& aSender ) - : CActive( EPriorityStandard ), - iSender( aSender ) - { - CActiveScheduler::Add( this ); - } - -// --------------------------------------------------------------------------- -// ?description_if_needed -// --------------------------------------------------------------------------- -// -void CSAStubEventListener::ConstructL() - { - RProperty::Define( TUid::Uid( 0x0AA01499 ), 1, 0 ); - User::LeaveIfError( iProperty.Attach( TUid::Uid( 0x0AA01499 ), 1 ) ); - - iProperty.Subscribe( iStatus ); - SetActive(); - } - -// --------------------------------------------------------------------------- -// ?description_if_needed -// --------------------------------------------------------------------------- -// -CSAStubEventListener* CSAStubEventListener::NewL( MSAStubEventSender& aSender ) - { - CSAStubEventListener* self = new( ELeave ) CSAStubEventListener( aSender ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - return self; - } - -// --------------------------------------------------------------------------- -// ?description_if_needed -// --------------------------------------------------------------------------- -// -CSAStubEventListener::~CSAStubEventListener() - { - Cancel(); - - iProperty.Close(); - } - -// --------------------------------------------------------------------------- -// From class CActive. -// --------------------------------------------------------------------------- -// -void CSAStubEventListener::DoCancel() - { - iProperty.Cancel(); - } - -// --------------------------------------------------------------------------- -// From class CActive. -// --------------------------------------------------------------------------- -// -void CSAStubEventListener::RunL() - { - if ( iStatus == KErrNone ) - { - TInt newValue; - TInt errorCode = iProperty.Get( newValue ); - - if ( errorCode == KErrNone ) - { - RDEBUG_1( _L( "CStartupAdaptationStub: Event: 0x%08x." ), newValue ); - - iProperty.Set( 0 ); - TInt event = newValue & 0xFFFF0000; - event = event >> 16; - TInt arg = newValue & 0x0000FFFF; - - iSender.SendEvent( event, arg ); - } - } - - if ( iStatus != KErrCancel ) - { - iProperty.Subscribe( iStatus ); - SetActive(); - } - } - -#endif // __STARTER_MODULE_TEST_SUPPORT__ diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/sysdef_1_4_0.dtd --- a/systemswstubs/sysdef_1_4_0.dtd Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tiltcompensationstub/bwins/tiltcompensationu.def --- a/systemswstubs/tiltcompensationstub/bwins/tiltcompensationu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - ?Compensate@@YAHABVTTiltCompensationInput@@AAVTTiltCompensationOutput@@F@Z @ 1 NONAME ; int Compensate(class TTiltCompensationInput const &, class TTiltCompensationOutput &, short) - ?Compensate@@YAHABVTTiltCompensationInput@@AAVTTiltCompensationOutput@@FABV?$RArray@N@@@Z @ 2 NONAME ; int Compensate(class TTiltCompensationInput const &, class TTiltCompensationOutput &, short, class RArray const &) - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tiltcompensationstub/eabi/tiltcompensationu.def --- a/systemswstubs/tiltcompensationstub/eabi/tiltcompensationu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - _Z10CompensateRK22TTiltCompensationInputR23TTiltCompensationOutputs @ 1 NONAME - _Z10CompensateRK22TTiltCompensationInputR23TTiltCompensationOutputsRK6RArrayIdE @ 2 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tiltcompensationstub/group/bld.inf --- a/systemswstubs/tiltcompensationstub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information file for project Tilt Compensation SSY. -* -*/ - - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -tiltcompensationstub.mmp - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tiltcompensationstub/group/tiltcompensationstub.mmp --- a/systemswstubs/tiltcompensationstub/group/tiltcompensationstub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project definition file for project Tilt Compensation -* algorithm. -* -*/ - - -#include - -TARGET tiltcompensation.dll -TARGETTYPE dll -UID 0x1000008d 0x2000B5F7 - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE tiltcompensation.cpp - -OS_LAYER_SYSTEMINCLUDE - -USERINCLUDE . -USERINCLUDE ../inc - -LIBRARY euser.lib - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tiltcompensationstub/inc/common.h --- a/systemswstubs/tiltcompensationstub/inc/common.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Common definitions. -* -*/ - - -#ifndef COMMON_H -#define COMMON_H - -#include - -// CONSTANTS - -/** Panic codes */ -enum TPanicReason - { - EInvalidState, - EAlreadyServingTransaction, - ENotActive, - ENullPointer, - EInvalidTransactionId, - EInvalidEventId, - EIncorrectStateCount, - EAccelerometerChannelNotCreated, - EMagnetometerChannelNotCreated - }; - -#endif // COMMON_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tiltcompensationstub/inc/common/common.h --- a/systemswstubs/tiltcompensationstub/inc/common/common.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Common definitions. -* -*/ - - -#ifndef COMMON_H -#define COMMON_H - -#include - -// CONSTANTS - -/** Panic codes */ -enum TPanicReason - { - EInvalidState, - EAlreadyServingTransaction, - ENotActive, - ENullPointer, - EInvalidTransactionId, - EInvalidEventId, - EIncorrectStateCount, - EAccelerometerChannelNotCreated, - EMagnetometerChannelNotCreated - }; - -#endif // COMMON_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tiltcompensationstub/inc/common/trace.h --- a/systemswstubs/tiltcompensationstub/inc/common/trace.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,407 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef TRACE_H -#define TRACE_H - -#include - -#include "traceconfiguration.hrh" - -#ifdef TRACE_INTO_FILE -#include // RFileLogger -#else -#include // RDebug -#endif - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- -// - -/** -* Panic category. -*/ -_LIT( KPanicCat, "TILTSSY" ); - -/** -* Prefix trace macro to complete tracing with component name. -* Returns TDesC which can be used directly with RDebug or RFileLogger. -*/ -#define _PREFIX_TRACE( aMsg ) TPtrC( (const TText*)L"[TILT SSY]: " L##aMsg ) - -/** -* Prefix error trace -*/ -#define _PREFIX_ERROR( aMsg ) _PREFIX_TRACE( "[ERROR: %d]: " L##aMsg ) - -/** -* Prefix info trace. -*/ -#define _PREFIX_INFO( aMsg ) _PREFIX_TRACE( "[INFO]: " L##aMsg ) - -/** -* Prefix macro for strings -*/ -#define _PREFIX_CHAR( aMsg ) (const char*)"[TILT SSY]: " ##aMsg - -/** -* Define needed directories if TRACE_INTO_FILE macro in use -*/ -#ifdef TRACE_INTO_FILE - - _LIT( KDir, "TILT_SSY" ); - _LIT( KFile, "TILT_SSY.log" ); - _LIT( KFullPath, "c:\\logs\\TILT_SSY\\" ); - -#endif - -//----------------------------------------------------------------------------- -// Assert trace macros -//----------------------------------------------------------------------------- -// -#ifdef _DEBUG - - #define ASSERT_DEBUG_TRACE( aCond, aReason )\ - {\ - if( !( aCond ) )\ - {\ - RDebug::Printf( "[TILT SSY]: ASSERT in file: %s, function: %s, line: %u, reason: %d",\ - __FILE__, __FUNCTION__, __LINE__, aReason );\ - }\ - __ASSERT_DEBUG( aCond, User::Panic( KPanicCat, aReason ) );\ - } - -#else - - #define ASSERT_DEBUG_TRACE( aCond, aReason ) - -#endif - -//----------------------------------------------------------------------------- -// Error trace macros -//----------------------------------------------------------------------------- -// -#ifdef ERROR_TRACE - - /** - * Error trace definitions. - */ - #ifdef TRACE_INTO_FILE - - #define ERROR( aErr, aMsg )\ - {\ - if( aErr < KErrNone )\ - {\ - RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr );\ - }\ - } - #define ERROR_1( aErr, aMsg, aP1 )\ - {\ - if( aErr < KErrNone )\ - {\ - RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1 );\ - }\ - } - #define ERROR_2( aErr, aMsg, aP1, aP2 )\ - {\ - if( aErr < KErrNone )\ - {\ - RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1, aP2 );\ - }\ - } - #define ERROR_3( aErr, aMsg, aP1, aP2, aP3 )\ - {\ - if( aErr < KErrNone )\ - {\ - RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3 );\ - }\ - } - - #else//TRACE_INTO_FILE not defined - - #define ERROR( aErr, aMsg )\ - {\ - if( aErr < KErrNone )\ - {\ - RDebug::Print( _PREFIX_ERROR( aMsg ), aErr );\ - }\ - } - #define ERROR_1( aErr, aMsg, aP1 )\ - {\ - if( aErr < KErrNone )\ - {\ - RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1 );\ - }\ - } - #define ERROR_2( aErr, aMsg, aP1, aP2 )\ - {\ - if( aErr < KErrNone )\ - {\ - RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2 );\ - }\ - } - #define ERROR_3( aErr, aMsg, aP1, aP2, aP3 )\ - {\ - if( aErr < KErrNone )\ - {\ - RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3 );\ - }\ - } - - #endif//TRACE_INTO_FILE - - #define ERROR_GEN( aMsg ) ERROR( KErrGeneral, aMsg ) - #define ERROR_GEN_1( aMsg, aP1 ) ERROR_1( KErrGeneral, aMsg, aP1 ) - #define ERROR_GEN_2( aMsg, aP1, aP2 ) ERROR_2( KErrGeneral, aMsg, aP1, aP2 ) - #define ERROR_GEN_3( aMsg, aP1, aP2, aP3 ) ERROR_3( KErrGeneral, aMsg, aP1, aP2, aP3 ) - -#else//ERROR_TRACE not defined - - #define ERROR( aErr, aMsg ) - #define ERROR_1( aErr, aMsg, aP1 ) - #define ERROR_2( aErr, aMsg, aP1, aP2 ) - #define ERROR_3( aErr, aMsg, aP1, aP2, aP3 ) - #define ERROR_GEN( aMsg ) - #define ERROR_GEN_1( aMsg, aP1 ) - #define ERROR_GEN_2( aMsg, aP1, aP2 ) - #define ERROR_GEN_3( aMsg, aP1, aP2, aP3 ) - -#endif//ERROR_TRACE - -//----------------------------------------------------------------------------- -// Info trace macros -//----------------------------------------------------------------------------- -// -#ifdef INFO_TRACE - - /** - * Info log message definitions. - */ - #ifdef TRACE_INTO_FILE - - #define INFO( aMsg )\ - {\ - RFileLogger::Write( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ) );\ - } - #define INFO_1( aMsg, aP1 )\ - {\ - RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1 );\ - } - #define INFO_2( aMsg, aP1, aP2 )\ - {\ - RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1, aP2 );\ - } - #define INFO_3( aMsg, aP1, aP2, aP3 )\ - {\ - RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1, aP2, aP3 );\ - } - - #else//TRACE_INTO_FILE not defined - - #define INFO( aMsg )\ - {\ - RDebug::Print( _PREFIX_INFO( aMsg ) );\ - } - #define INFO_1( aMsg, aP1 )\ - {\ - RDebug::Print( _PREFIX_INFO( aMsg ), aP1 );\ - } - #define INFO_2( aMsg, aP1, aP2 )\ - {\ - RDebug::Print( _PREFIX_INFO( aMsg ), aP1, aP2 );\ - } - #define INFO_3( aMsg, aP1, aP2, aP3 )\ - {\ - RDebug::Print( _PREFIX_INFO( aMsg ), aP1, aP2, aP3 );\ - } - - #endif//TRACE_INTO_FILE - -#else//INFO_TRACE not defined - - #define INFO( aMsg ) - #define INFO_1( aMsg, aP1 ) - #define INFO_2( aMsg, aP1, aP2 ) - #define INFO_3( aMsg, aP1, aP2, aP3 ) - -#endif//INFO_TRACE - -//----------------------------------------------------------------------------- -// Trace current client thread name and process id -//----------------------------------------------------------------------------- -// -#ifdef CLIENT_TRACE - - #define CLIENT( aMessage )\ - {\ - RThread thread;\ - TInt err = aMessage.Client( thread );\ - if( err == KErrNone )\ - {\ - RProcess process;\ - err = thread.Process( process );\ - if( err == KErrNone )\ - {\ - TPtrC thredName( thread.Name() );\ - TUid processUid( process.SecureId() );\ - INFO_2( "Current client process UID: [%x], thread name: [%S]",\ - processUid,\ - &thredName );\ - }\ - process.Close();\ - }\ - thread.Close();\ - } - -#else - - #define CLIENT( aMessage ) - -#endif - -//----------------------------------------------------------------------------- -// Function trace macros -//----------------------------------------------------------------------------- -// -#ifdef FUNC_TRACE - - /** - * Function logging definitions. - */ - #ifdef TRACE_INTO_FILE - - #define FUNC( aMsg, aP1 )\ - {\ - TPtrC8 trace( _S8( aMsg ) );\ - RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, trace, aP1 );\ - }\ - - #else//TRACE_INTO_FILE not defined - - #define FUNC( aMsg, aP1 )\ - {\ - RDebug::Printf( aMsg, aP1 );\ - }\ - - #endif//TRACE_INTO_FILE - - /** - * Function trace helper class. - * - * NOTE: - * LC -methods cannot be trapped. Therefore if LC -method leaves - * END trace is used instead of LEAVE trace. - * If you have an idea how to round this problem please tell. - */ - _LIT8( KFuncNameTerminator, "(" ); - _LIT8( KFuncLeavePatternL, "L" ); - class TFuncLog - { - public: - static void Cleanup( TAny* aPtr ) - { - TFuncLog* self = static_cast< TFuncLog* >( aPtr ); - self->iLeft = ETrue; - FUNC( _PREFIX_CHAR("%S-LEAVE"), &self->iFunc ); // Leave detected - } - inline TFuncLog( const char* aFunc ) : - iFunc( aFunc ? _S8( aFunc ) : _S8("") ), - iLeft( EFalse ), - iCleanupItem( Cleanup, this ), - iCanLeave( EFalse ) - { - TInt pos( iFunc.Find( KFuncNameTerminator ) ); - if( pos != KErrNotFound ) - { - iFunc.Set( iFunc.Left( pos ) ); - iCanLeave = !iFunc.Right( KFuncLeavePatternL().Length() ).Compare( KFuncLeavePatternL ); - if ( iCanLeave ) - { - CleanupStack::PushL( iCleanupItem ); // Ignore warnings - } - } - FUNC( _PREFIX_CHAR("%S-START"), &iFunc ); - } - - inline ~TFuncLog() - { - if ( !iLeft ) - { - if ( iCanLeave ) - { - CleanupStack::Pop( this ); // Pop the cleanup item - } - FUNC( _PREFIX_CHAR("%S-END"), &iFunc ); // Normally finished - } - } - - private: // Data - TPtrC8 iFunc; - TBool iLeft; - TCleanupItem iCleanupItem; - TBool iCanLeave; - }; - #define FUNC_LOG TFuncLog _fl( __PRETTY_FUNCTION__ ); - -#else//FUNC_TRACE not defined - - #define FUNC_LOG - -#endif//FUNC_TRACE - -//----------------------------------------------------------------------------- -// Timestamp trace macros -//----------------------------------------------------------------------------- -// -#ifdef TIMESTAMP_TRACE - - #ifdef TRACE_INTO_FILE - - #define TIMESTAMP( aCaption )\ - {\ - TTime t;\ - t.HomeTime();\ - TDateTime dt = t.DateTime();\ - _LIT( KCaption, aCaption );\ - RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend,\ - _PREFIX_TRACE("[TIMESTAMP] %S %d:%02d:%02d.%d us"),\ - &KCaption, dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond() );\ - } - - #else//TRACE_INTO_FILE not defined - - #define TIMESTAMP( aCaption )\ - {\ - TTime t;\ - t.HomeTime();\ - TDateTime dt = t.DateTime();\ - _LIT( KCaption, aCaption );\ - RDebug::Print( _PREFIX_TRACE("[TIMESTAMP] %S %d:%02d:%02d.%d us"),\ - &KCaption, dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond() );\ - } - - #endif//TRACE_INTO_FILE - -#else//TIMESTAMP_TRACE not defined - - #define TIMESTAMP( aCaption ) - -#endif//TIMESTAMP_TRACE - -#endif diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tiltcompensationstub/inc/common/traceconfiguration.hrh --- a/systemswstubs/tiltcompensationstub/inc/common/traceconfiguration.hrh Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef TRACECONFIGURATION_HRH -#define TRACECONFIGURATION_HRH - -//----------------------------------------------------------------------------- -// Trace definitions -//----------------------------------------------------------------------------- -// - -/** -* Error trace enabled -*/ -#ifdef _DEBUG - #define ERROR_TRACE -#else - #undef ERROR_TRACE -#endif - -/** -* Info trace enabled -*/ -#ifdef _DEBUG - #define INFO_TRACE -#else - #undef INFO_TRACE -#endif - -/** -* Function trace enabled -*/ -#undef FUNC_TRACE - -/** -* Timestamp tracing on -*/ -#ifdef _DEBUG - #define TIMESTAMP_TRACE -#else - #undef TIMESTAMP_TRACE -#endif - -/** -* Tracing current client process and thread -*/ -#ifdef _DEBUG - #define CLIENT_TRACE -#else - #undef CLIENT_TRACE -#endif - -/** -* Tracing into file enabled, default RDebug -*/ -#undef TRACE_INTO_FILE - -#endif \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tiltcompensationstub/inc/trace.h --- a/systemswstubs/tiltcompensationstub/inc/trace.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,407 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef TRACE_H -#define TRACE_H - -#include - -#include "traceconfiguration.hrh" - -#ifdef TRACE_INTO_FILE -#include // RFileLogger -#else -#include // RDebug -#endif - -//----------------------------------------------------------------------------- -// Constants -//----------------------------------------------------------------------------- -// - -/** -* Panic category. -*/ -_LIT( KPanicCat, "TILTSSY" ); - -/** -* Prefix trace macro to complete tracing with component name. -* Returns TDesC which can be used directly with RDebug or RFileLogger. -*/ -#define _PREFIX_TRACE( aMsg ) TPtrC( (const TText*)L"[TILT SSY]: " L##aMsg ) - -/** -* Prefix error trace -*/ -#define _PREFIX_ERROR( aMsg ) _PREFIX_TRACE( "[ERROR: %d]: " L##aMsg ) - -/** -* Prefix info trace. -*/ -#define _PREFIX_INFO( aMsg ) _PREFIX_TRACE( "[INFO]: " L##aMsg ) - -/** -* Prefix macro for strings -*/ -#define _PREFIX_CHAR( aMsg ) (const char*)"[TILT SSY]: " ##aMsg - -/** -* Define needed directories if TRACE_INTO_FILE macro in use -*/ -#ifdef TRACE_INTO_FILE - - _LIT( KDir, "TILT_SSY" ); - _LIT( KFile, "TILT_SSY.log" ); - _LIT( KFullPath, "c:\\logs\\TILT_SSY\\" ); - -#endif - -//----------------------------------------------------------------------------- -// Assert trace macros -//----------------------------------------------------------------------------- -// -#ifdef _DEBUG - - #define ASSERT_DEBUG_TRACE( aCond, aReason )\ - {\ - if( !( aCond ) )\ - {\ - RDebug::Printf( "[TILT SSY]: ASSERT in file: %s, function: %s, line: %u, reason: %d",\ - __FILE__, __FUNCTION__, __LINE__, aReason );\ - }\ - __ASSERT_DEBUG( aCond, User::Panic( KPanicCat, aReason ) );\ - } - -#else - - #define ASSERT_DEBUG_TRACE( aCond, aReason ) - -#endif - -//----------------------------------------------------------------------------- -// Error trace macros -//----------------------------------------------------------------------------- -// -#ifdef ERROR_TRACE - - /** - * Error trace definitions. - */ - #ifdef TRACE_INTO_FILE - - #define ERROR( aErr, aMsg )\ - {\ - if( aErr < KErrNone )\ - {\ - RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr );\ - }\ - } - #define ERROR_1( aErr, aMsg, aP1 )\ - {\ - if( aErr < KErrNone )\ - {\ - RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1 );\ - }\ - } - #define ERROR_2( aErr, aMsg, aP1, aP2 )\ - {\ - if( aErr < KErrNone )\ - {\ - RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1, aP2 );\ - }\ - } - #define ERROR_3( aErr, aMsg, aP1, aP2, aP3 )\ - {\ - if( aErr < KErrNone )\ - {\ - RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3 );\ - }\ - } - - #else//TRACE_INTO_FILE not defined - - #define ERROR( aErr, aMsg )\ - {\ - if( aErr < KErrNone )\ - {\ - RDebug::Print( _PREFIX_ERROR( aMsg ), aErr );\ - }\ - } - #define ERROR_1( aErr, aMsg, aP1 )\ - {\ - if( aErr < KErrNone )\ - {\ - RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1 );\ - }\ - } - #define ERROR_2( aErr, aMsg, aP1, aP2 )\ - {\ - if( aErr < KErrNone )\ - {\ - RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2 );\ - }\ - } - #define ERROR_3( aErr, aMsg, aP1, aP2, aP3 )\ - {\ - if( aErr < KErrNone )\ - {\ - RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3 );\ - }\ - } - - #endif//TRACE_INTO_FILE - - #define ERROR_GEN( aMsg ) ERROR( KErrGeneral, aMsg ) - #define ERROR_GEN_1( aMsg, aP1 ) ERROR_1( KErrGeneral, aMsg, aP1 ) - #define ERROR_GEN_2( aMsg, aP1, aP2 ) ERROR_2( KErrGeneral, aMsg, aP1, aP2 ) - #define ERROR_GEN_3( aMsg, aP1, aP2, aP3 ) ERROR_3( KErrGeneral, aMsg, aP1, aP2, aP3 ) - -#else//ERROR_TRACE not defined - - #define ERROR( aErr, aMsg ) - #define ERROR_1( aErr, aMsg, aP1 ) - #define ERROR_2( aErr, aMsg, aP1, aP2 ) - #define ERROR_3( aErr, aMsg, aP1, aP2, aP3 ) - #define ERROR_GEN( aMsg ) - #define ERROR_GEN_1( aMsg, aP1 ) - #define ERROR_GEN_2( aMsg, aP1, aP2 ) - #define ERROR_GEN_3( aMsg, aP1, aP2, aP3 ) - -#endif//ERROR_TRACE - -//----------------------------------------------------------------------------- -// Info trace macros -//----------------------------------------------------------------------------- -// -#ifdef INFO_TRACE - - /** - * Info log message definitions. - */ - #ifdef TRACE_INTO_FILE - - #define INFO( aMsg )\ - {\ - RFileLogger::Write( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ) );\ - } - #define INFO_1( aMsg, aP1 )\ - {\ - RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1 );\ - } - #define INFO_2( aMsg, aP1, aP2 )\ - {\ - RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1, aP2 );\ - } - #define INFO_3( aMsg, aP1, aP2, aP3 )\ - {\ - RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1, aP2, aP3 );\ - } - - #else//TRACE_INTO_FILE not defined - - #define INFO( aMsg )\ - {\ - RDebug::Print( _PREFIX_INFO( aMsg ) );\ - } - #define INFO_1( aMsg, aP1 )\ - {\ - RDebug::Print( _PREFIX_INFO( aMsg ), aP1 );\ - } - #define INFO_2( aMsg, aP1, aP2 )\ - {\ - RDebug::Print( _PREFIX_INFO( aMsg ), aP1, aP2 );\ - } - #define INFO_3( aMsg, aP1, aP2, aP3 )\ - {\ - RDebug::Print( _PREFIX_INFO( aMsg ), aP1, aP2, aP3 );\ - } - - #endif//TRACE_INTO_FILE - -#else//INFO_TRACE not defined - - #define INFO( aMsg ) - #define INFO_1( aMsg, aP1 ) - #define INFO_2( aMsg, aP1, aP2 ) - #define INFO_3( aMsg, aP1, aP2, aP3 ) - -#endif//INFO_TRACE - -//----------------------------------------------------------------------------- -// Trace current client thread name and process id -//----------------------------------------------------------------------------- -// -#ifdef CLIENT_TRACE - - #define CLIENT( aMessage )\ - {\ - RThread thread;\ - TInt err = aMessage.Client( thread );\ - if( err == KErrNone )\ - {\ - RProcess process;\ - err = thread.Process( process );\ - if( err == KErrNone )\ - {\ - TPtrC thredName( thread.Name() );\ - TUid processUid( process.SecureId() );\ - INFO_2( "Current client process UID: [%x], thread name: [%S]",\ - processUid,\ - &thredName );\ - }\ - process.Close();\ - }\ - thread.Close();\ - } - -#else - - #define CLIENT( aMessage ) - -#endif - -//----------------------------------------------------------------------------- -// Function trace macros -//----------------------------------------------------------------------------- -// -#ifdef FUNC_TRACE - - /** - * Function logging definitions. - */ - #ifdef TRACE_INTO_FILE - - #define FUNC( aMsg, aP1 )\ - {\ - TPtrC8 trace( _S8( aMsg ) );\ - RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, trace, aP1 );\ - }\ - - #else//TRACE_INTO_FILE not defined - - #define FUNC( aMsg, aP1 )\ - {\ - RDebug::Printf( aMsg, aP1 );\ - }\ - - #endif//TRACE_INTO_FILE - - /** - * Function trace helper class. - * - * NOTE: - * LC -methods cannot be trapped. Therefore if LC -method leaves - * END trace is used instead of LEAVE trace. - * If you have an idea how to round this problem please tell. - */ - _LIT8( KFuncNameTerminator, "(" ); - _LIT8( KFuncLeavePatternL, "L" ); - class TFuncLog - { - public: - static void Cleanup( TAny* aPtr ) - { - TFuncLog* self = static_cast< TFuncLog* >( aPtr ); - self->iLeft = ETrue; - FUNC( _PREFIX_CHAR("%S-LEAVE"), &self->iFunc ); // Leave detected - } - inline TFuncLog( const char* aFunc ) : - iFunc( aFunc ? _S8( aFunc ) : _S8("") ), - iLeft( EFalse ), - iCleanupItem( Cleanup, this ), - iCanLeave( EFalse ) - { - TInt pos( iFunc.Find( KFuncNameTerminator ) ); - if( pos != KErrNotFound ) - { - iFunc.Set( iFunc.Left( pos ) ); - iCanLeave = !iFunc.Right( KFuncLeavePatternL().Length() ).Compare( KFuncLeavePatternL ); - if ( iCanLeave ) - { - CleanupStack::PushL( iCleanupItem ); // Ignore warnings - } - } - FUNC( _PREFIX_CHAR("%S-START"), &iFunc ); - } - - inline ~TFuncLog() - { - if ( !iLeft ) - { - if ( iCanLeave ) - { - CleanupStack::Pop( this ); // Pop the cleanup item - } - FUNC( _PREFIX_CHAR("%S-END"), &iFunc ); // Normally finished - } - } - - private: // Data - TPtrC8 iFunc; - TBool iLeft; - TCleanupItem iCleanupItem; - TBool iCanLeave; - }; - #define FUNC_LOG TFuncLog _fl( __PRETTY_FUNCTION__ ); - -#else//FUNC_TRACE not defined - - #define FUNC_LOG - -#endif//FUNC_TRACE - -//----------------------------------------------------------------------------- -// Timestamp trace macros -//----------------------------------------------------------------------------- -// -#ifdef TIMESTAMP_TRACE - - #ifdef TRACE_INTO_FILE - - #define TIMESTAMP( aCaption )\ - {\ - TTime t;\ - t.HomeTime();\ - TDateTime dt = t.DateTime();\ - _LIT( KCaption, aCaption );\ - RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend,\ - _PREFIX_TRACE("[TIMESTAMP] %S %d:%02d:%02d.%d us"),\ - &KCaption, dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond() );\ - } - - #else//TRACE_INTO_FILE not defined - - #define TIMESTAMP( aCaption )\ - {\ - TTime t;\ - t.HomeTime();\ - TDateTime dt = t.DateTime();\ - _LIT( KCaption, aCaption );\ - RDebug::Print( _PREFIX_TRACE("[TIMESTAMP] %S %d:%02d:%02d.%d us"),\ - &KCaption, dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond() );\ - } - - #endif//TRACE_INTO_FILE - -#else//TIMESTAMP_TRACE not defined - - #define TIMESTAMP( aCaption ) - -#endif//TIMESTAMP_TRACE - -#endif diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tiltcompensationstub/inc/traceconfiguration.hrh --- a/systemswstubs/tiltcompensationstub/inc/traceconfiguration.hrh Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef TRACECONFIGURATION_HRH -#define TRACECONFIGURATION_HRH - -//----------------------------------------------------------------------------- -// Trace definitions -//----------------------------------------------------------------------------- -// - -/** -* Error trace enabled -*/ -#ifdef _DEBUG - #define ERROR_TRACE -#else - #undef ERROR_TRACE -#endif - -/** -* Info trace enabled -*/ -#ifdef _DEBUG - #define INFO_TRACE -#else - #undef INFO_TRACE -#endif - -/** -* Function trace enabled -*/ -#undef FUNC_TRACE - -/** -* Timestamp tracing on -*/ -#ifdef _DEBUG - #define TIMESTAMP_TRACE -#else - #undef TIMESTAMP_TRACE -#endif - -/** -* Tracing current client process and thread -*/ -#ifdef _DEBUG - #define CLIENT_TRACE -#else - #undef CLIENT_TRACE -#endif - -/** -* Tracing into file enabled, default RDebug -*/ -#undef TRACE_INTO_FILE - -#endif \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tiltcompensationstub/rom/tiltcompensation.iby --- a/systemswstubs/tiltcompensationstub/rom/tiltcompensation.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Stub -* -*/ - -#ifndef __TILTCOMPENSATION_IBY__ -#define __TILTCOMPENSATION_IBY__ - -file=ABI_DIR\BUILD_DIR\tiltcompensation.dll SHARED_LIB_DIR\tiltcompensation.dll - -#endif __TILTCOMPENSATION_IBY__ - - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tiltcompensationstub/src/tiltcompensation.cpp --- a/systemswstubs/tiltcompensationstub/src/tiltcompensation.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,211 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Compensate function definition. -* -*/ - - -#include -#include -#include - -//----------------------------------------------------------------------------- -// Direction6D -//----------------------------------------------------------------------------- -// -EXPORT_C TInt Compensate( - const TTiltCompensationInput& aInput, - TTiltCompensationOutput& aOutput, - const TInt16 aPreviousTheta - ) - { - TReal target; - TReal source( 0 ); - TReal inputY( aInput.iMagneticVector.iY ); - TReal inputZ( aInput.iMagneticVector.iZ ); - - if( aInput.iMagneticVector.iY > 0 && aInput.iMagneticVector.iZ > 0 ) - // 0 - 90 degrees - { - source = inputY / inputZ; - } - if( aInput.iMagneticVector.iY > 0 && aInput.iMagneticVector.iZ < 0 ) - // 90 - 180 degrees - { - source = inputZ / inputY * -1; - } - if( aInput.iMagneticVector.iY < 0 && aInput.iMagneticVector.iZ < 0 ) - // 180 - 270 degrees - { - source = inputY / inputZ; - } - if( aInput.iMagneticVector.iY < 0 && aInput.iMagneticVector.iZ > 0 ) - // 270 - 360 degrees - { - source = inputZ / inputY * -1; - } - - Math::ATan( target, source ); - TInt16 declination( ( target * 180 ) / 3.14 ); - - if( aInput.iMagneticVector.iY > 0 && aInput.iMagneticVector.iZ > 0 ) - // 0 - 90 degrees - { - } - if( aInput.iMagneticVector.iY > 0 && aInput.iMagneticVector.iZ < 0 ) - // 90 - 180 degrees - { - declination = declination + 90; - } - if( aInput.iMagneticVector.iY < 0 && aInput.iMagneticVector.iZ < 0 ) - // 180 - 270 degrees - { - declination = declination + 180; - } - if( aInput.iMagneticVector.iY < 0 && aInput.iMagneticVector.iZ > 0 ) - // 270 - 360 degrees - { - declination = declination + 270; - } - - if( inputY == 0 && inputZ > 0 ) - { - declination = 0; - } - if( inputY > 0 && inputZ == 0 ) - { - declination = 90; - } - if( inputY == 0 && inputZ < 0 ) - { - declination = 180; - } - if( inputY < 0 && inputZ == 0 ) - { - declination = 270; - } - - if( ( aPreviousTheta < ( aOutput.iTheta + 5 ) ) && ( aPreviousTheta > ( aOutput.iTheta - 5 ) ) ) - { - aOutput.iTheta = aPreviousTheta; - } - - aOutput.iTheta = declination; - return KErrNone; - } - -//----------------------------------------------------------------------------- -// Direction6D -//----------------------------------------------------------------------------- -// -EXPORT_C TInt Compensate( - const TTiltCompensationInput& aInput, - TTiltCompensationOutput& aOutput, - const TInt16 aPreviousTheta, - const RParamsArray& aParamsArray ) - { - TReal target; - TReal source( 0 ); - TReal inputY( aInput.iMagneticVector.iY ); - TReal inputX( aInput.iMagneticVector.iX ); - - // Get parameters - for( TInt i = 0; i != aParamsArray.Count(); i++ ) - { - TInt parameter = aParamsArray[ i ]; - } - - if( aInput.iMagneticVector.iY > 0 && aInput.iMagneticVector.iX > 0 ) - // 0 - 90 degrees - { - source = inputX / inputY; - } - if( aInput.iMagneticVector.iY > 0 && aInput.iMagneticVector.iX < 0 ) - // 90 - 180 degrees - { - source = inputX / inputY * -1; - } - if( aInput.iMagneticVector.iY < 0 && aInput.iMagneticVector.iX < 0 ) - // 180 - 270 degrees - { - source = inputY / inputX; - } - if( aInput.iMagneticVector.iY < 0 && aInput.iMagneticVector.iX > 0 ) - // 270 - 360 degrees - { - source = inputX / inputY * -1; - } - - Math::ATan( target, source ); - TInt16 declination( ( target * 180 ) / 3.14 ); - - if( aInput.iMagneticVector.iY > 0 && aInput.iMagneticVector.iX > 0 ) - // 0 - 90 degrees - { - } - if( aInput.iMagneticVector.iY > 0 && aInput.iMagneticVector.iX < 0 ) - // 90 - 180 degrees - { - declination = declination + 90; - } - if( aInput.iMagneticVector.iY < 0 && aInput.iMagneticVector.iX < 0 ) - // 180 - 270 degrees - { - declination = declination + 180; - } - if( aInput.iMagneticVector.iY < 0 && aInput.iMagneticVector.iX > 0 ) - // 270 - 360 degrees - { - declination = declination + 270; - } - - if( inputY == 0 && inputX > 0 ) - { - declination = 0; - } - if( inputY > 0 && inputX == 0 ) - { - declination = 90; - } - if( inputY == 0 && inputX < 0 ) - { - declination = 180; - } - if( inputY < 0 && inputX == 0 ) - { - declination = 270; - } - - if( ( aPreviousTheta < ( aOutput.iTheta + 5 ) ) && ( aPreviousTheta > ( aOutput.iTheta - 5 ) ) ) - { - aOutput.iTheta = aPreviousTheta; - } - - // Filter data... - - // For testing purposes change angle with fixed values from input parameters - aOutput.iTheta = declination; - const TInt KAngleChange = 30; - aOutput.iTheta += ( aParamsArray[ 0 ] * KAngleChange ); - aOutput.iTheta += ( aParamsArray[ 1 ] * KAngleChange ); - aOutput.iTheta += ( aParamsArray[ 2 ] * KAngleChange ); - aOutput.iTheta += ( aParamsArray[ 3 ] * KAngleChange ); - aOutput.iTheta %= 360; // take modulo to avoid angle larger than 360 - // ... end for testing purposes - - - return KErrNone; - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tiltcompensationstub/src/tiltcompensation/tiltcompensation.cpp --- a/systemswstubs/tiltcompensationstub/src/tiltcompensation/tiltcompensation.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,186 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Compensate function definition. -* -*/ - - -#include -#include "tiltcompensation.h" - -//----------------------------------------------------------------------------- -// Direction6D -//----------------------------------------------------------------------------- -// -EXPORT_C TInt Compensate( - const TTiltCompensationInput& aInput, - TTiltCompensationOutput& aOutput, - ) - { - TReal target; - TReal source( 0 ); - TReal inputY( aInput.iMagneticVector.iY ); - TReal inputZ( aInput.iMagneticVector.iZ ); - - if( aInput.iMagneticVector.iY > 0 && aInput.iMagneticVector.iZ > 0 ) - // 0 - 90 degrees - { - source = inputY / inputZ; - } - if( aInput.iMagneticVector.iY > 0 && aInput.iMagneticVector.iZ < 0 ) - // 90 - 180 degrees - { - source = inputZ / inputY * -1; - } - if( aInput.iMagneticVector.iY < 0 && aInput.iMagneticVector.iZ < 0 ) - // 180 - 270 degrees - { - source = inputY / inputZ; - } - if( aInput.iMagneticVector.iY < 0 && aInput.iMagneticVector.iZ > 0 ) - // 270 - 360 degrees - { - source = inputZ / inputY * -1; - } - - Math::ATan( target, source ); - TInt16 declination( ( target * 180 ) / 3.14 ); - - if( aInput.iMagneticVector.iY > 0 && aInput.iMagneticVector.iZ > 0 ) - // 0 - 90 degrees - { - } - if( aInput.iMagneticVector.iY > 0 && aInput.iMagneticVector.iZ < 0 ) - // 90 - 180 degrees - { - declination = declination + 90; - } - if( aInput.iMagneticVector.iY < 0 && aInput.iMagneticVector.iZ < 0 ) - // 180 - 270 degrees - { - declination = declination + 180; - } - if( aInput.iMagneticVector.iY < 0 && aInput.iMagneticVector.iZ > 0 ) - // 270 - 360 degrees - { - declination = declination + 270; - } - - if( inputY == 0 && inputZ > 0 ) - { - declination = 0; - } - if( inputY > 0 && inputZ == 0 ) - { - declination = 90; - } - if( inputY == 0 && inputZ < 0 ) - { - declination = 180; - } - if( inputY < 0 && inputZ == 0 ) - { - declination = 270; - } - - aOutput.iTheta = declination; - return KErrNone; - } - -//----------------------------------------------------------------------------- -// Direction6D -//----------------------------------------------------------------------------- -// -EXPORT_C TInt Compensate( - const TTiltCompensationInput& aInput, - TTiltCompensationOutput& aOutput, - const RParamsArray& aParamsArray ) - { - TReal target; - TReal source( 0 ); - TReal inputY( aInput.iMagneticVector.iY ); - TReal inputZ( aInput.iMagneticVector.iZ ); - - // Get parameters - for( TInt i = 0; i != aParamsArray.Count(); i++ ) - { - TInt parameter = aParamsArray[ i ]; - } - - if( aInput.iMagneticVector.iY > 0 && aInput.iMagneticVector.iZ > 0 ) - // 0 - 90 degrees - { - source = inputY / inputZ; - } - if( aInput.iMagneticVector.iY > 0 && aInput.iMagneticVector.iZ < 0 ) - // 90 - 180 degrees - { - source = inputZ / inputY * -1; - } - if( aInput.iMagneticVector.iY < 0 && aInput.iMagneticVector.iZ < 0 ) - // 180 - 270 degrees - { - source = inputY / inputZ; - } - if( aInput.iMagneticVector.iY < 0 && aInput.iMagneticVector.iZ > 0 ) - // 270 - 360 degrees - { - source = inputZ / inputY * -1; - } - - Math::ATan( target, source ); - TInt16 declination( ( target * 180 ) / 3.14 ); - - if( aInput.iMagneticVector.iY > 0 && aInput.iMagneticVector.iZ > 0 ) - // 0 - 90 degrees - { - } - if( aInput.iMagneticVector.iY > 0 && aInput.iMagneticVector.iZ < 0 ) - // 90 - 180 degrees - { - declination = declination + 90; - } - if( aInput.iMagneticVector.iY < 0 && aInput.iMagneticVector.iZ < 0 ) - // 180 - 270 degrees - { - declination = declination + 180; - } - if( aInput.iMagneticVector.iY < 0 && aInput.iMagneticVector.iZ > 0 ) - // 270 - 360 degrees - { - declination = declination + 270; - } - - if( inputY == 0 && inputZ > 0 ) - { - declination = 0; - } - if( inputY > 0 && inputZ == 0 ) - { - declination = 90; - } - if( inputY == 0 && inputZ < 0 ) - { - declination = 180; - } - if( inputY < 0 && inputZ == 0 ) - { - declination = 270; - } - - aOutput.iTheta = declination; - return KErrNone; - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tvoutbehaviour/BWINS/tvoutbehaviouru.def --- a/systemswstubs/tvoutbehaviour/BWINS/tvoutbehaviouru.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - ?NewL@CTvOutBehaviour@@SAPAV1@XZ @ 1 NONAME ; class CTvOutBehaviour * CTvOutBehaviour::NewL(void) - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tvoutbehaviour/EABI/tvoutbehaviouru.def --- a/systemswstubs/tvoutbehaviour/EABI/tvoutbehaviouru.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - _ZN15CTvOutBehaviour4NewLEv @ 1 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tvoutbehaviour/group/bld.inf --- a/systemswstubs/tvoutbehaviour/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information file for tvoutbehaviour stub. -* -*/ - - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -tvoutbehaviour - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tvoutbehaviour/group/tvoutbehaviour.mmp --- a/systemswstubs/tvoutbehaviour/group/tvoutbehaviour.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project definition file for tvoutbehaviour stub. -* -*/ - - -#include - -TARGET tvoutbehaviour.dll -TARGETTYPE dll -UID 0x1000008D 0x101f6e00 - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -MW_LAYER_SYSTEMINCLUDE -USERINCLUDE ../inc - -SOURCEPATH ../src -SOURCE tvoutbehaviour.cpp -SOURCE tvoutbehaviourimpl.cpp - -LIBRARY euser.lib - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tvoutbehaviour/inc/tvoutbehaviourimpl.h --- a/systemswstubs/tvoutbehaviour/inc/tvoutbehaviourimpl.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CTvOutBehaviourImpl class declaration. -* -*/ - - -#ifndef __TVOUTBEHAVIOURIMPL_H__ -#define __TVOUTBEHAVIOURIMPL_H__ - -// INCLUDE FILES -#include -#include "tvoutbehaviour.h" - -// CLASS DECLARATION - -/** - * TV Out Behaviour Stub implementation. - * - * @lib tvoutbehaviour.lib - * @since S60 TB9.2 - */ -NONSHARABLE_CLASS(CTvOutBehaviourImpl) : public CTvOutBehaviour - { -public: - - /** - * Symbian two phased constructors. - * - * @since S60 TB9.2 - * @param None. - * @return CTvOutBehaviourImpl - */ - static CTvOutBehaviourImpl* NewL(); - - /** - * C++ destructor. - */ - virtual ~CTvOutBehaviourImpl(); - -protected: // From CTvOutBehaviour - - virtual TInt SetTvOutSettings(const TTvOutSettings& aParams); - virtual TInt DeActivateSettings(); - virtual TUint GetTvOutScreenDevices(); - virtual TInt GetTvOutDisplayNumber(); - virtual TInt GetTvOutSettings(TTvOutSettings& aParams); - virtual TInt SettingsListener(TRequestStatus& aStatus); - virtual TInt CancelSettingsListener(); - virtual TInt GetTvOutDefaultSettings(TTvOutSettings& aParams); - -private: - - CTvOutBehaviourImpl(); - }; - -#endif //__TVOUTBEHAVIOURIMPL_H__ - -// End of File - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tvoutbehaviour/rom/tvoutbehaviour.iby --- a/systemswstubs/tvoutbehaviour/rom/tvoutbehaviour.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: tvoutbehaviour ROM files. -* -*/ - -#ifndef TVOUTBEHAVIOUR_IBY -#define TVOUTBEHAVIOUR_IBY - -file=ABI_DIR\BUILD_DIR\tvoutbehaviour.dll sys\bin\tvoutbehaviour.dll - -#endif // TVOUTBEHAVIOUR_IBY -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tvoutbehaviour/src/tvoutbehaviour.cpp --- a/systemswstubs/tvoutbehaviour/src/tvoutbehaviour.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CTvOutBehaviour class implementation. -* -*/ - -#include "tvoutbehaviour.h" -#include "tvoutbehaviourimpl.h" - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// Symbian two phased constructor. -// --------------------------------------------------------------------------- -// -EXPORT_C CTvOutBehaviour* CTvOutBehaviour::NewL() - { - return CTvOutBehaviourImpl::NewL(); - } - -// End of File - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/tvoutbehaviour/src/tvoutbehaviourimpl.cpp --- a/systemswstubs/tvoutbehaviour/src/tvoutbehaviourimpl.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,111 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CTvOutBehaviourImpl class implementation. -* -*/ - -#include "tvoutbehaviourimpl.h" - -// ======== MEMBER FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// Symbian two phased constructor. -// --------------------------------------------------------------------------- -// -CTvOutBehaviourImpl* CTvOutBehaviourImpl::NewL() - { - CTvOutBehaviourImpl* self = new (ELeave) CTvOutBehaviourImpl(); - CleanupStack::Pop( self ); - return self; - } - -//--------------------------------------------------------------------------- -// CTvOutBehaviourImpl::~CTvOutBehaviourImpl -// -CTvOutBehaviourImpl::~CTvOutBehaviourImpl() - { - } - -//--------------------------------------------------------------------------- -// CTvOutBehaviourImpl::SetTvOutSettings -// -TInt CTvOutBehaviourImpl::SetTvOutSettings( const TTvOutSettings& /*aParams*/ ) - { - return KErrNotSupported; - } - -//--------------------------------------------------------------------------- -// CTvOutBehaviourImpl::DeActivateSettings -// -TInt CTvOutBehaviourImpl::DeActivateSettings() - { - return KErrNotSupported; - } - -//--------------------------------------------------------------------------- -// CTvOutBehaviourImpl::GetTvOutScreenDevices -// -TUint CTvOutBehaviourImpl::GetTvOutScreenDevices() - { - return EScreenNone; - } - -//--------------------------------------------------------------------------- -// CTvOutBehaviourImpl::GetTvOutDisplayNumber -// -TInt CTvOutBehaviourImpl::GetTvOutDisplayNumber() - { - return KErrNotSupported; - } - -//--------------------------------------------------------------------------- -// CTvOutBehaviourImpl::GetTvOutSettings -// -TInt CTvOutBehaviourImpl::GetTvOutSettings( TTvOutSettings& /*aParams*/ ) - { - return KErrNotSupported; - } - -//--------------------------------------------------------------------------- -// CTvOutBehaviourImpl::SettingsListener -// -TInt CTvOutBehaviourImpl::SettingsListener( TRequestStatus& /*aStatus*/ ) - { - return KErrNotSupported; - } - -//--------------------------------------------------------------------------- -// CTvOutBehaviourImpl::CancelSettingsListener -// -TBool CTvOutBehaviourImpl::CancelSettingsListener() - { - return EFalse; - } - -//--------------------------------------------------------------------------- -// CTvOutBehaviourImpl::GetTvOutDefaultSettings -// -TInt CTvOutBehaviourImpl::GetTvOutDefaultSettings( TTvOutSettings& /*aParams*/ ) - { - return KErrNotSupported; - } - -//--------------------------------------------------------------------------- -// CTvOutBehaviourImpl::CTvOutBehaviourImpl -// -CTvOutBehaviourImpl::CTvOutBehaviourImpl() - { - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/wiredbearerreference/data/10205074.rss --- a/systemswstubs/wiredbearerreference/data/10205074.rss Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used as an reference implementation. -* -*/ - - -// INCLUDE FILES -#include - -// RESOURCE DEFINITIONS -// -RESOURCE REGISTRY_INFO REMCONBEARERPLUGIN - { - resource_format_version = RESOURCE_FORMAT_VERSION_2; - dll_uid = 0x10205074; - interfaces = - { - INTERFACE_INFO - { - interface_uid = 0x10204546; - implementations = - { - // Accessory key event handler - IMPLEMENTATION_INFO - { - implementation_uid = 0x10205075; - version_no = 1; - display_name = "Wired Bearer Reference"; - default_data = ""; - opaque_data = ""; - rom_only = 1; - } - }; - } - }; - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/wiredbearerreference/group/WiredBearerReference.mmp --- a/systemswstubs/wiredbearerreference/group/WiredBearerReference.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used as an reference implementation. -* -*/ - - -#include - -TARGET WiredBearerReference.dll -#include -TARGETTYPE PLUGIN -UID 0x10009D8D 0x10205074 -VENDORID VID_DEFAULT - -START RESOURCE ../data/10205074.rss -TARGET WiredBearerReference.rsc -END - -MW_LAYER_SYSTEMINCLUDE - -USERINCLUDE ../inc -SOURCEPATH ../src -SOURCE WiredBearerReferencePluginProxy.cpp -SOURCE WiredAccessoryKeyEventHandler.cpp -SOURCE AdaptationMessage.cpp - -LIBRARY euser.lib -LIBRARY remconbearerplugin.lib -LIBRARY remcontypes.lib - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/wiredbearerreference/group/bld.inf --- a/systemswstubs/wiredbearerreference/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used as an reference implementation. -* -*/ - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -../rom/WiredBearerReference.iby CORE_OS_LAYER_IBY_EXPORT_PATH(WiredBearerReference.iby) - -PRJ_MMPFILES -WiredBearerReference.mmp -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/wiredbearerreference/inc/AdaptationMessage.h --- a/systemswstubs/wiredbearerreference/inc/AdaptationMessage.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used as an reference implementation. -* -*/ - - - -#ifndef ADAPTATIONMESSAGE_H -#define ADAPTATIONMESSAGE_H - -// INCLUDES -#include -#include "AdaptationMessageDefinitions.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION -NONSHARABLE_CLASS( TAdaptationMessage ); - -/** -* TASYMessage -* This class declarates the TASYMessage, which is a generic message class example. -* message class. -* -*/ -class TAdaptationMessage - { - public: // Constructors and destructor - - /** - * Constructor. - * @param aGroup Message group. - * @param aID Message ID. - * @param aData Pointer to data. - */ - TAdaptationMessage( const TUint32 aGroupId, const TUint32 aMessageId, - TDesC8& aData ); - - public: // New functions - - /** - * Returns message group - * @return Message group - */ - TUint32 GroupId(); - - /** - * Returns message id - * @return Message id - */ - TUint32 MessageId(); - - /** - * Returns message data - * @return Message data - */ - TDesC8& Data(); - - - private: // Data - // Group id - TUint32 iGroupId; - - // Message id - TUint32 iMessageId; - - // Message data - TDesC8& iData; - - }; - -#endif // ADAPTATIONMESSAGE_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/wiredbearerreference/inc/AdaptationMessageDefinitions.h --- a/systemswstubs/wiredbearerreference/inc/AdaptationMessageDefinitions.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used as an reference implementation. -* -*/ - - -#ifndef ADAPTATIONMESSAGEDEFINITIONS_H -#define ADAPTATIONMESSAGEDEFINITIONS_H - -// INCLUDES -#include // TRemConKeyEventData from accessoryremotecontrol (S60). - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -const TUint32 KBearerMessageGroupAccessoryEvent = 0x00010002; /* Message group for Accessory events */ -const TUint32 KBearerMessageGroupAccessoryKeyEvent = 0x00010014; /* Message group for Accessory key events */ - -// RemCon event definitions -// ----------------------------------------------------------------------------- -const TUint32 KBearerMsgAccessoryKeyEvent = 0x02000001; -typedef TPckgBuf< TRemConKeyEventData > TBearerMsgAccessoryKeyEventBuf; -// ----------------------------------------------------------------------------- - - -#endif // ADAPTATIONMESSAGEDEFINITIONS_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/wiredbearerreference/inc/MAdaptation.h --- a/systemswstubs/wiredbearerreference/inc/MAdaptation.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of MAdaptation class. MAdaptation class -* defines an example interface to receive events from Domestic OS. -* -*/ - - - -#ifndef MADAPTATION_H -#define MADAPTATION_H - -// INCLUDES -#include - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -class TAdaptationMessage; - -// CLASS DECLARATION - -/** -* MASYAdaptation -*/ -class MAdaptation - { - - public: // New functions - - /** - * Indicates bearer about received response message - * @return none - */ - virtual void ProcessResponseL( TAdaptationMessage& aMessage ) = 0; - - /** - * Indicates bearer about received error response message - * @return none - */ - virtual void ProcessErrorResponseL( TInt aErrorCode, TAdaptationMessage& aMessage ) = 0; - - /** - * Indicates bearer about received key event message. - * @return none - */ - virtual void RaiseEventL( TAdaptationMessage& aMessage ) = 0; - }; - -#endif // MADAPTATION_H - -// End of File \ No newline at end of file diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/wiredbearerreference/inc/WiredAccessoryKeyEventHandler.h --- a/systemswstubs/wiredbearerreference/inc/WiredAccessoryKeyEventHandler.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,245 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used as an reference implementation. -* -*/ - - - -#ifndef WIREDACCESSORYKEYEVENTHANDLER_H -#define WIREDACCESSORYKEYEVENTHANDLER_H - -// INCLUDES -#include -#include -#include -#include // from RemCon -#include -#include "MAdaptation.h" - -// CONSTANTS - -// MACROS - -// DATA TYPES - -// FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS -class TBearerParams; -class TAdaptationMessage; - -// CLASS DECLARATION - -/** -* Declaration of CWiredAccessoryKeyEventHandler class. -*/ -class CWiredAccessoryKeyEventHandler : public CRemConBearerPlugin, public MAdaptation, public MRemConBearerInterface - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @param aBearerParams - */ - static CWiredAccessoryKeyEventHandler* NewL( TBearerParams& aBearerParams ); - - /** - * Destructor. - */ - virtual ~CWiredAccessoryKeyEventHandler(); - - private: // Constructors - - /** - * C++ constructor. - * @param aBearerParams - */ - CWiredAccessoryKeyEventHandler( TBearerParams& aBearerParams ); - - /** - * Symbian 2nd phase constructor. - * @return void - */ - void ConstructL(); - - private: // Functions from base classes - - /** - * From CRemConBearerPlugin - * - * Called by RemCon server to get a pointer to - * an object which implements the bearer API - * @param aUid - * @return TAny* - */ - TAny* GetInterface( TUid aUid ); - - /** - * From MRemConBearerInterface - * - * Called by RemCon to retrieve a response on a - * connection. Must only be called as a result - * of a NewResponse up-call. - * @param aInterfaceUid - * @param aTransactionId - * @param aOperationId - * @param aData, On success, ownership is returned. - * @param aAddr - * @return Error code. - */ - TInt GetResponse( TUid& aInterfaceUid, - TUint& aTransactionId, - TUint& aOperationId, - RBuf8& aData, - TRemConAddress& aAddr ); - - /** - * From MRemConBearerInterface - * - * Called by RemCon to retrieve a command on a - * connection. Must only be called as a result of - * a NewCommand up-call. - * @param aInterfaceUid - * @param aTransactionId - * @param aOperationId - * @param aCommandData, On success, ownership is returned. - * @param aAddr - * @return Error code. - */ - TInt GetCommand( TUid& aInterfaceUid, - TUint& aTransactionId, - TUint& aOperationId, - RBuf8& aCommandData, - TRemConAddress& aAddr ); - - /** - * From MRemConBearerInterface - * - * Called by RemCon to send a command on a connection. - * The connection is not assumed to exist- the bearer - * is responsible for bringing up the requested. - * connection if necessary. - * @param aInterfaceUid - * @param aOperationId - * @param aTransactionId - * @param aData, On success, ownership is passed. - * @param aAddr - * @return Error code. - */ - TInt SendCommand( TUid aInterfaceUid, - TUint aOperationId, - TUint aTransactionId, - RBuf8& aData, - const TRemConAddress& aAddr ); - - /** - * From MRemConBearerInterface - * - * Called by RemCon to send a response on a connection. - * The connection is not assumed to exist- the bearer is - * responsible for bringing up the requested connection if necessary. - * @param aInterfaceUid - * @param aOperationId - * @param aTransactionId - * @param aData, On success, ownership is passed. - * @param aAddr - * @return Error code. - */ - TInt SendResponse( TUid aInterfaceUid, - TUint aOperationId, - TUint aTransactionId, - RBuf8& aData, - const TRemConAddress& aAddr ); - - /** - * From MRemConBearerInterface - * - * Called by RemCon to establish a bearer-level - * connection to another party. Completion is signalled - * back in ConnectConfirm. - * @param aAddr - * @return void - */ - void ConnectRequest( const TRemConAddress& aAddr ); - - /** - * From MRemConBearerInterface - * - * Called by RemCon to destroy a bearer-level connection to another party. - * Completion is signalled back in DisconnectConfirm. - * @param aAddr - * @return void - */ - void DisconnectRequest( const TRemConAddress& aAddr ); - - /** - * From MRemConBearerInterface - * - * Called by RemCon when either (a) the number of controller clients changes - * from 0 to 1 or from 1 to 0, or (b) the number of target clients changes - * from 0 to 1 or from 1 to 0. - * @param aControllerPresent - * @param aTargetPresent - */ - void ClientStatus( TBool aControllerPresent, TBool aTargetPresent ); - - /** - * From MRemConBearerInterface - * - * Called by RemCon to get the capabilities required to make/destroy - * connections over the bearer, and to send and receive messages over - * the bearer. - * @return TSecurityPolicy - */ - TSecurityPolicy SecurityPolicy() const; - - private: // Enumerations - - // internal states - enum TAccKeyEventHandlerState - { - EAccKeyEventHandlerStateUnknown = -1, - EAccKeyEventHandlerStateReady, - EAccKeyEventHandlerStateNewCommand - }; - - private: // Functions from base classes - - /** - * From MAdaptation - */ - - void ProcessResponseL( TAdaptationMessage& aMessage ); - - void ProcessErrorResponseL( TInt aErrorCode, TAdaptationMessage& aMessage ); - - void RaiseEventL( TAdaptationMessage& aMessage ); - - private: // Data - - // internal state - TAccKeyEventHandlerState iState; - - // event data - TUid iInterfaceUid; - TUint iOperationId; - TUint iTransactionId; - TBuf8<64> iData; - - }; - -#endif // WIREDACCESSORYKEYEVENTHANDLER_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/wiredbearerreference/inc/acc_debug.h --- a/systemswstubs/wiredbearerreference/inc/acc_debug.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,234 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Macro definitions for tracing and debugging purposes. -* -*/ - - -#ifndef ACC_DEBUG_H -#define ACC_DEBUG_H - -#ifdef _DEBUG - -// INCLUDES -#include - -// CONSTANTS -_LIT( KComponent, "[AccFW:Component]" ); -_LIT( KThisFile, "[AccFW:Component] - Trace this file: %s, line: %d, compiled: %s %s" ); -_LIT( KAssertion, "[AccFW:Component] - Assertion failed: File: %s, line: %d, compiled: %s %s" ); -_LIT( KPanic, "[AccFW:Component] - Panic occurred: File: %s, line: %d, compiled: %s %s" ); -_LIT8( KDATE, __DATE__ ); -_LIT8( KTIME, __TIME__ ); - -// DATA TYPES -enum TTraceType - { - ETraceInit, - ETraceAssert, - ETracePanic - }; - -// INLINE FUNCTIONS - - // ----------------------------------------------------------------------------- - // ThisFileFunc - // ----------------------------------------------------------------------------- - inline void ThisFileFunc( const TDesC8& aFile, - TInt aLine, - TTraceType aType = ETraceInit ) - { - HBufC* fileBuf = HBufC::New( aFile.Length() + 1 ); - HBufC* dateBuf = HBufC::New( 32 ); - HBufC* timeBuf = HBufC::New( 32 ); - - if ( fileBuf != NULL && dateBuf != NULL && timeBuf != NULL ) - { - fileBuf->Des().Copy( aFile ); - timeBuf->Des().Copy( KTIME ); - dateBuf->Des().Copy( KDATE ); - - if ( aType == ETraceInit ) - { - RDebug::Print( KThisFile, - fileBuf->Des().PtrZ(), - aLine, - dateBuf->Des().PtrZ(), - timeBuf->Des().PtrZ() ); - } - - else if ( aType == ETraceAssert ) - { - RDebug::Print( KAssertion, - fileBuf->Des().PtrZ(), - aLine, - dateBuf->Des().PtrZ(), - timeBuf->Des().PtrZ() ); - } - - else if ( aType == ETracePanic ) - { - RDebug::Print( KPanic, - fileBuf->Des().PtrZ(), - aLine, - dateBuf->Des().PtrZ(), - timeBuf->Des().PtrZ() ); - } - - else - { - - } - } - - else - { - RDebug::Print( _L( "Assertion and memory allocation failed!" ) ); - } - - delete fileBuf; - delete dateBuf; - delete timeBuf; - } - - // ----------------------------------------------------------------------------- - // TraceAssertFunc - // ----------------------------------------------------------------------------- - inline void TraceAssertFunc( const TDesC8& aFile, TInt aLine ) - { - ThisFileFunc( aFile, aLine, ETraceAssert ); - } - - // ----------------------------------------------------------------------------- - // TracePanicFunc - // ----------------------------------------------------------------------------- - inline void TracePanicFunc( const TDesC8& aFile, TInt aLine ) - { - ThisFileFunc( aFile, aLine, ETracePanic ); - User::Panic( KComponent, KErrGeneral ); - } - -// MACROS - #define PANIC_IF_FALSE( a ) if ( !( a ) )\ - TracePanicFunc( TPtrC8( ( TText8* ) __FILE__), __LINE__ ) - - #define PANIC_IF_TRUE( a ) if ( ( a ) )\ - TracePanicFunc( TPtrC8( ( TText8* ) __FILE__), __LINE__ ) - - #define PANIC_ALWAYS\ - TracePanicFunc( TPtrC8( ( TText8* ) __FILE__), __LINE__ ) - - // ----------------------------------------------------------------------------- - // COMPONENT_TRACE_FLAG - // ----------------------------------------------------------------------------- - #ifdef COMPONENT_TRACE_FLAG - - #define COMPONENT_TRACE_THIS_FILE\ - ThisFileFunc( TPtrC8( ( TText8* ) __FILE__), __LINE__ ) - - #define COM_TRACE_( AAA ) do\ - { _LIT( logStr, AAA ); RDebug::Print( logStr ); } while ( 0 ) - - #define COM_TRACE_1( AAA, BBB ) do\ - { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB ); } while ( 0 ) - - #define COM_TRACE_2( AAA, BBB, CCC ) do\ - { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB, CCC ); } while ( 0 ) - - #define COM_TRACE_3( AAA, BBB, CCC, DDD ) do\ - { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB, CCC, DDD ); } while ( 0 ) - - #define COM_TRACE_4( AAA, BBB, CCC, DDD, EEE ) do\ - { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB, CCC, DDD, EEE ); } while ( 0 ) - - #else - - #define COMPONENT_TRACE_THIS_FILE - - #define COM_TRACE_( AAA ) - #define COM_TRACE_1( AAA, BBB ) - #define COM_TRACE_2( AAA, BBB, CCC ) - #define COM_TRACE_3( AAA, BBB, CCC, DDD ) - #define COM_TRACE_4( AAA, BBB, CCC, DDD, EEE ) - - #endif // COMPONENT_TRACE_FLAG - - #define TRACE_ASSERT( a ) if ( !( a ) )\ - TraceAssertFunc( TPtrC8( ( TText8* ) __FILE__), __LINE__ ) - - #define TRACE_ASSERT_RETURN( a ) if ( !( ( a ) == KErrNone ) )\ - TraceAssertFunc( TPtrC8( ( TText8* ) __FILE__), __LINE__ ) - - #define TRACE_ASSERT_ALWAYS\ - TraceAssertFunc( TPtrC8( ( TText8* ) __FILE__ ), __LINE__ ) - - // ----------------------------------------------------------------------------- - // API_TRACE_FLAG - // ----------------------------------------------------------------------------- - #ifdef API_TRACE_FLAG - - #define API_TRACE_( AAA ) do\ - { _LIT( logStr, AAA ); RDebug::Print( logStr ); } while ( 0 ) - - #define API_TRACE_1( AAA, BBB ) do\ - { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB ); } while ( 0 ) - - #define API_TRACE_2( AAA, BBB, CCC ) do\ - { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB, CCC ); } while ( 0 ) - - #define API_TRACE_3( AAA, BBB, CCC, DDD ) do\ - { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB, CCC, DDD ); } while ( 0 ) - - #define API_TRACE_4( AAA, BBB, CCC, DDD, EEE ) do\ - { _LIT( logStr, AAA ); RDebug::Print( logStr, BBB, CCC, DDD, EEE ); } while ( 0 ) - - #else - - #define API_TRACE_( AAA ) - #define API_TRACE_1( AAA, BBB ) - #define API_TRACE_2( AAA, BBB, CCC ) - #define API_TRACE_3( AAA, BBB, CCC, DDD ) - #define API_TRACE_4( AAA, BBB, CCC, DDD, EEE ) - - #endif // API_TRACE_FLAG - -#else // _DEBUG - - #define TRACE_ASSERT( a ) - #define TRACE_ASSERT_RETURN( a ) a - #define TRACE_ASSERT_ALWAYS - - #define COM_TRACE_( AAA ) - #define COM_TRACE_1( AAA, BBB ) - #define COM_TRACE_2( AAA, BBB, CCC ) - #define COM_TRACE_3( AAA, BBB, CCC, DDD ) - #define COM_TRACE_4( AAA, BBB, CCC, DDD, EEE ) - - #define API_TRACE_( AAA ) - #define API_TRACE_1( AAA, BBB ) - #define API_TRACE_2( AAA, BBB, CCC ) - #define API_TRACE_3( AAA, BBB, CCC, DDD ) - #define API_TRACE_4( AAA, BBB, CCC, DDD, EEE ) - - #define COMPONENT_TRACE_THIS_FILE - - #define PANIC_IF_FALSE( a ) - #define PANIC_IF_TRUE( a ) - #define PANIC_ALWAYS - -#endif // _DEBUG - -#endif // ACC_DEBUG_H - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/wiredbearerreference/rom/WiredBearerReference.iby --- a/systemswstubs/wiredbearerreference/rom/WiredBearerReference.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#ifndef WIREDBEARERREFERENCE_IBY -#define WIREDBEARERREFERENCE_IBY - -ECOM_PLUGIN(WiredBearerReference.dll, WiredBearerReference.rsc) - -#endif // WIREDBEARERREFERENCE_IBY - -// End of File - diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/wiredbearerreference/src/AdaptationMessage.cpp --- a/systemswstubs/wiredbearerreference/src/AdaptationMessage.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The implementation of TAdaptationMessage example clas.s -* -*/ - - - -// INCLUDE FILES -#include "AdaptationMessage.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// TSASMessage::TSASMessage -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -TAdaptationMessage::TAdaptationMessage( const TUint32 aGroupId, const TUint32 aMessageId, TDesC8& aData ) - : iGroupId( aGroupId ), - iMessageId( aMessageId ), - iData( aData ) - { - } - -// ----------------------------------------------------------------------------- -// TSASMessage::GroupId() -// ----------------------------------------------------------------------------- -// -TUint32 TAdaptationMessage::GroupId() - { - - return iGroupId; - - } - -// ----------------------------------------------------------------------------- -// TSASMessage::MessageId() -// ----------------------------------------------------------------------------- -// -TUint32 TAdaptationMessage::MessageId() - { - - return iMessageId; - - } - -// ----------------------------------------------------------------------------- -// TSASMessage::Data() -// ----------------------------------------------------------------------------- -// -TDesC8& TAdaptationMessage::Data() - { - - return iData; - - } - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/wiredbearerreference/src/WiredAccessoryKeyEventHandler.cpp --- a/systemswstubs/wiredbearerreference/src/WiredAccessoryKeyEventHandler.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,380 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used as an reference implementation. -* -*/ - - -// INCLUDE FILES -#include -#include -#include -#include -#include -#include "WiredAccessoryKeyEventHandler.h" -#include "AdaptationMessage.h" - -#include "AdaptationMessageDefinitions.h" -#include "acc_debug.h" - -// EXTERNAL DATA STRUCTURES - -// EXTERNAL FUNCTION PROTOTYPES - -// CONSTANTS - -// MACROS - -// LOCAL CONSTANTS AND MACROS - -// MODULE DATA STRUCTURES - -// LOCAL FUNCTION PROTOTYPES - -// FORWARD DECLARATIONS - -// ============================= LOCAL FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CWiredAccessoryKeyEventHandler::CWiredAccessoryKeyEventHandler -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CWiredAccessoryKeyEventHandler::CWiredAccessoryKeyEventHandler( TBearerParams& aBearerParams ) - : CRemConBearerPlugin( aBearerParams ) - , iState( EAccKeyEventHandlerStateUnknown ) - , iOperationId( 0 ) - , iTransactionId( 0 ) - { - COM_TRACE_( "[AccFW:WiredBearerReference] CWiredAccessoryKeyEventHandler::CWiredAccessoryKeyEventHandler() - Enter" ); - COM_TRACE_( "[AccFW:WiredBearerReference] CWiredAccessoryKeyEventHandler::CWiredAccessoryKeyEventHandler() - Return" ); - - } - -// ----------------------------------------------------------------------------- -// CWiredAccessoryKeyEventHandler::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CWiredAccessoryKeyEventHandler::ConstructL() - { - COM_TRACE_( "[AccFW:WiredBearerReference] CWiredAccessoryKeyEventHandler::ConstructL() - Enter" ); - // - // initialization of event subscribe(s) can be done here. - // - iState = EAccKeyEventHandlerStateReady; - - - COM_TRACE_( "[AccFW:WiredBearerReference] CWiredAccessoryKeyEventHandler::ConstructL() - Return" ); - - } - -// ----------------------------------------------------------------------------- -// CWiredAccessoryKeyEventHandler::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CWiredAccessoryKeyEventHandler* CWiredAccessoryKeyEventHandler::NewL( TBearerParams& aBearerParams ) - { - CWiredAccessoryKeyEventHandler* self = new (ELeave) CWiredAccessoryKeyEventHandler( aBearerParams ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - return self; - } - -// Destructor -CWiredAccessoryKeyEventHandler::~CWiredAccessoryKeyEventHandler() - { - COM_TRACE_( "[AccFW:WiredBearerReference] CWiredAccessoryKeyEventHandler::~CWiredAccessoryKeyEventHandler() - Enter" ); - COM_TRACE_( "[AccFW:WiredBearerReference] CWiredAccessoryKeyEventHandler::~CWiredAccessoryKeyEventHandler() - Return" ); - } - -// ----------------------------------------------------------------------------- -// CWiredAccessoryKeyEventHandler::GetInterface -// ----------------------------------------------------------------------------- -// -TAny* CWiredAccessoryKeyEventHandler::GetInterface( TUid aUid ) - { - - COM_TRACE_( "[AccFW:WiredBearerReference] CWiredAccessoryKeyEventHandler::GetInterface() - Enter" ); - - - TAny* bearer = NULL; - - if ( aUid == TUid::Uid( KRemConBearerInterface1 ) ) - { - bearer = reinterpret_cast( static_cast( this ) ); - } - else - { - // Interface is not supported! - } - COM_TRACE_( "[AccFW:WiredBearerReference] CWiredAccessoryKeyEventHandler::GetInterface() - Return" ); - - return bearer; - } - -// ----------------------------------------------------------------------------- -// CWiredAccessoryKeyEventHandler::GetResponse -// ----------------------------------------------------------------------------- -// -TInt CWiredAccessoryKeyEventHandler::GetResponse( TUid& aInterfaceUid, - TUint& aTransactionId, - TUint& aOperationId, - RBuf8& aCommandData, - TRemConAddress& aAddr ) - { - - // Only events are forwarded, thus no need to implement get response - TInt err ( KErrNotSupported ); - - ( void ) aTransactionId; - ( void ) aOperationId; - ( void ) aCommandData; - ( void ) aAddr; - ( void ) aInterfaceUid; - - return err; - } - -// ----------------------------------------------------------------------------- -// CSACAccessoryKeyEventHandler::GetCommand -// ----------------------------------------------------------------------------- -// -TInt CWiredAccessoryKeyEventHandler::GetCommand( TUid& aInterfaceUid, - TUint& aTransactionId, - TUint& aOperationId, - RBuf8& aCommandData, - TRemConAddress& aAddr ) - { - - COM_TRACE_( "[AccFW:WiredBearerReference] CWiredAccessoryKeyEventHandler::GetCommand() - Enter" ); - TInt err ( KErrNone ); - - if ( iState != EAccKeyEventHandlerStateNewCommand ) - { - err = KErrNotReady; - } - else - { - aInterfaceUid = iInterfaceUid; - aTransactionId = iTransactionId++; - aOperationId = iOperationId; - - aAddr.BearerUid() = Uid(); - aAddr.Addr() = KNullDesC8(); - - iState = EAccKeyEventHandlerStateReady; - - TRAP( err, aCommandData.CreateL( iData ) ); - - if ( err != KErrNone ) - { - //GetCommand - failed to create data - } - } - - COM_TRACE_( "[AccFW:WiredBearerReference] CWiredAccessoryKeyEventHandler::GetCommand() - Return" ); - return err; - } - -// ----------------------------------------------------------------------------- -// CWiredAccessoryKeyEventHandler::SendCommand -// ----------------------------------------------------------------------------- -// -TInt CWiredAccessoryKeyEventHandler::SendCommand( TUid aInterfaceUid, - TUint aOperationId, - TUint aTransactionId, - RBuf8& aData, - const TRemConAddress& aAddr ) - { - - // Only events are forwarded, thus no need to implement send command - TInt err ( KErrNotSupported ); - - ( void ) aTransactionId; - ( void ) aOperationId; - ( void ) aAddr; - ( void ) aInterfaceUid; - ( void ) aData; - - return err; - } - -// ----------------------------------------------------------------------------- -// CWiredAccessoryKeyEventHandler::SendResponse -// ----------------------------------------------------------------------------- -// -TInt CWiredAccessoryKeyEventHandler::SendResponse( TUid aInterfaceUid, - TUint aOperationId, - TUint aTransactionId, - RBuf8& aData, - const TRemConAddress& aAddr ) - { - - // Only events are forwarded, thus no need to implement send response - TInt err ( KErrNotSupported ); - - ( void ) aTransactionId; - ( void ) aOperationId; - ( void ) aAddr; - ( void ) aInterfaceUid; - ( void ) aData; - - return err; - } - -// ----------------------------------------------------------------------------- -// CWiredAccessoryKeyEventHandler::ConnectRequest -// ----------------------------------------------------------------------------- -// -void CWiredAccessoryKeyEventHandler::ConnectRequest( const TRemConAddress& aAddr ) - { - - COM_TRACE_( "[AccFW:WiredBearerReference] CWiredAccessoryKeyEventHandler::ConnectRequest() - Enter" ); - - - TInt err = Observer().ConnectConfirm( aAddr, KErrNone ); - - if ( err != KErrNone ) - { - // ConnectConfirm failed - } - - COM_TRACE_( "[AccFW:WiredBearerReference] CWiredAccessoryKeyEventHandler::ConnectRequest() - Return" ); - } - -// ----------------------------------------------------------------------------- -// CWiredAccessoryKeyEventHandler::DisconnectRequest -// ----------------------------------------------------------------------------- -// -void CWiredAccessoryKeyEventHandler::DisconnectRequest( const TRemConAddress& aAddr ) - { - COM_TRACE_( "[AccFW:WiredBearerReference] CWiredAccessoryKeyEventHandler::DisconnectRequest() - Enter" ); - - Observer().DisconnectConfirm( aAddr, KErrNone ); - - COM_TRACE_( "[AccFW:WiredBearerReference] CWiredAccessoryKeyEventHandler::DisconnectRequest() - Return" ); - } - -// ----------------------------------------------------------------------------- -// CWiredAccessoryKeyEventHandler::ClientStatus -// ----------------------------------------------------------------------------- -// -void CWiredAccessoryKeyEventHandler::ClientStatus( TBool aControllerPresent, TBool aTargetPresent ) - { - ( void ) aTargetPresent; - ( void ) aControllerPresent; - } - -// ----------------------------------------------------------------------------- -// CWiredAccessoryKeyEventHandler::SecurityPolicy -// ----------------------------------------------------------------------------- -// -TSecurityPolicy CWiredAccessoryKeyEventHandler::SecurityPolicy() const - { - - COM_TRACE_( "[AccFW:WiredBearerReference] CWiredAccessoryKeyEventHandler::SecurityPolicy() - Enter" ); - TSecurityPolicy securityPolicy ( ECapabilitySwEvent ); - COM_TRACE_( "[AccFW:WiredBearerReference] CWiredAccessoryKeyEventHandler::SecurityPolicy() - Return" ); - return securityPolicy; - } - -// ----------------------------------------------------------------------------- -// CWiredAccessoryKeyEventHandler::ProcessResponseL -// ----------------------------------------------------------------------------- -// -void CWiredAccessoryKeyEventHandler::ProcessResponseL( TAdaptationMessage& aMessage ) - { - ( void ) aMessage; - } - -// ----------------------------------------------------------------------------- -// CWiredAccessoryKeyEventHandler::ProcessErrorResponseL -// ----------------------------------------------------------------------------- -// -void CWiredAccessoryKeyEventHandler::ProcessErrorResponseL( TInt aErrorCode, - TAdaptationMessage& aMessage ) - { - ( void ) aErrorCode; - ( void ) aMessage; - } - -// ----------------------------------------------------------------------------- -// CWiredAccessoryKeyEventHandler::RaiseEventL -// ----------------------------------------------------------------------------- -// -void CWiredAccessoryKeyEventHandler::RaiseEventL( TAdaptationMessage& aMessage ) - { - - COM_TRACE_( "[AccFW:WiredBearerReference] CWiredAccessoryKeyEventHandler::RaiseEventL() - Enter" ); - //Accessory key events are received from Accessory Driver/Domestic OS. - - if ( iState != EAccKeyEventHandlerStateReady ) - { - User::Leave( KErrNotReady ); - } - - // only key events are supported - if ( aMessage.GroupId() != KBearerMessageGroupAccessoryEvent && aMessage.MessageId() != KBearerMessageGroupAccessoryKeyEvent ) - { - User::Leave( KErrArgument ); - } - - TRemConMessageType type( ERemConCommand ); - - // Note! - // following uid 0x102069AA should be used if platform key event converter is used, - // uid is hard coded to platfrom converter which is returned to remotecontrol. - // Data should give as format defined in S60_Accessory_Key_Event_Handling_API_Specification_C.doc. - const TInt KWireBearerUid = 0x102069AA; - - TInt err = Observer().BearerToInterface( TUid::Uid( KWireBearerUid ), - aMessage.Data(), - aMessage.Data(), - iInterfaceUid, - iOperationId, - type, - iData ); - if ( err == KErrNotSupported ) - { - - } - else if ( err == KErrNone ) - { - iState = EAccKeyEventHandlerStateNewCommand; - - TRemConAddress addr; - addr.BearerUid() = Uid(); - addr.Addr() = KNullDesC8(); - - err = Observer().NewCommand( addr ); - - if ( err != KErrNone ) - { - User::Leave( err ); - } - } - else - // leave if converting fails - { - User::Leave( err ); - } - - COM_TRACE_( "[AccFW:WiredBearerReference] CWiredAccessoryKeyEventHandler::RaiseEventL() - Return" ); - } - -// End of File diff -r b7e5ed8c1342 -r e71858845f73 systemswstubs/wiredbearerreference/src/WiredBearerReferencePluginProxy.cpp --- a/systemswstubs/wiredbearerreference/src/WiredBearerReferencePluginProxy.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Used as an reference implementation. -* -*/ - - -// INCLUDE FILES -#include -#include "WiredAccessoryKeyEventHandler.h" - -// CONSTANTS -const TImplementationProxy ImplementationTable[] = - { - IMPLEMENTATION_PROXY_ENTRY( 0x10205075, CWiredAccessoryKeyEventHandler::NewL )//lint !e611 - }; - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// ----------------------------------------------------------------------------- -// TImplementationProxy* ImplementationGroupProxy -// ----------------------------------------------------------------------------- -EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aCount ) - { - aCount = sizeof ( ImplementationTable ) / sizeof ( TImplementationProxy ); - - return ImplementationTable; - } - -// End of File - diff -r b7e5ed8c1342 -r e71858845f73 tactileclickplugin_stub/bwins/tactileclickpluginu.def --- a/tactileclickplugin_stub/bwins/tactileclickpluginu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - ?CreateClickMakerL@@YAPAVCClickMaker@@XZ @ 1 NONAME ; class CClickMaker * CreateClickMakerL(void) - ?Instance@MTactileFeedbackServer@@SAPAV1@XZ @ 2 NONAME ; class MTactileFeedbackServer * MTactileFeedbackServer::Instance(void) - diff -r b7e5ed8c1342 -r e71858845f73 tactileclickplugin_stub/eabi/tactileclickpluginu.def --- a/tactileclickplugin_stub/eabi/tactileclickpluginu.def Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -EXPORTS - _Z17CreateClickMakerLv @ 1 NONAME - _ZN22MTactileFeedbackServer8InstanceEv @ 2 NONAME - diff -r b7e5ed8c1342 -r e71858845f73 tactileclickplugin_stub/group/bld.inf --- a/tactileclickplugin_stub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information file for click maker plugin stub. -* Part of: Tactile Feedback. -* -*/ - -#ifdef RD_TACTILE_FEEDBACK - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS -../rom/tactileclickpluginstub.iby CORE_IBY_EXPORT_PATH(stubs,tactileclickpluginstub.iby) - -PRJ_MMPFILES -tactileclickpluginstub.mmp - -#endif // RD_TACTILE_FEEDBACK diff -r b7e5ed8c1342 -r e71858845f73 tactileclickplugin_stub/group/tactileclickpluginstub.mmp --- a/tactileclickplugin_stub/group/tactileclickpluginstub.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This is stub for compilation and running of Tactile Feedback -* dependent components, when the real implementation is not -* available. -* Part of: Tactile Feedback. -* -*/ - - -#include - -// To get the MW_LAYER_SYSTEMINCLUDE-definition -#include - -TARGET tactileclickplugin.dll -TARGETTYPE DLL -UID 0x10004F63 0x2000B493 - -CAPABILITY ALL -TCB -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE tactileclickpluginstub.cpp -SOURCE tactilefeedbackserverstub.cpp - -USERINCLUDE ../inc - -// Default system include paths for middleware layer modules. -MW_LAYER_SYSTEMINCLUDE - -LIBRARY euser.lib - diff -r b7e5ed8c1342 -r e71858845f73 tactileclickplugin_stub/inc/tactileclickpluginstub.h --- a/tactileclickplugin_stub/inc/tactileclickpluginstub.h Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,173 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The click maker plugin, which -* handles key events at window server process. -* Part of: Tactile Feedback. -* -*/ - - -#ifndef C_TACTILECLICKPLUGIN_H -#define C_TACTILECLICKPLUGIN_H - - - -#include - -#include "tactilefeedbackserver.h" - - - -/** - * The click maker plugin to be used as stub when the real plugin is - * not available. - * - * All connections fail with KErrNotSupported, which will essentially - * disable feedback support on client side. - * - * @lib tactilefeedbackresolver.dll - * @since S60 v5.0 - */ -NONSHARABLE_CLASS( CTactileClickPlugin ): - public CClickMaker, - public MTactileFeedbackServer - { -public: - - static CTactileClickPlugin* NewL(); - - virtual ~CTactileClickPlugin(); - -// from base class CClickMaker - - /** - * From CClickMaker. - * This function is called by the window server whenever there is a - * key event, to generate the sound. - * - * The key events are not used by this plugin actually, because this - * plug-in's purpose is to handle only pointer events. - * - * @since S60 v5.0 - * @param aType - The type of the key event. - * @param aEvent - The key event details. - */ - void KeyEvent( TEventCode aType,const TKeyEvent& aEvent ); - - /** - * From CClickMaker. - * This function is called by the window server whenever there is a - * pointer event, to generate the sound. - * - * Not used by this plug-in because there is not enough information in - * the pointer event for resolving the actual area and window where - * pointer event was hit. Intead pointer events are handled in - * OtherEvent -function. - * - * @since S60 v5.0 - * @param aEvent - The pointer event details. - */ - void PointerEvent( const TPointerEvent& aEvent ); - - /** - * From CClickMaker. - * This function is a "future expansion" or the original click maker API, - * and it has been taken into use by this plugin for getting more - * information about the pointer event than what is possible to pass as - * parameter to PointerEvent -function. - * - * This stub ignores all events. - * - * @since S60 v5.0 - * @param aType - The type of the event. - * @param aParam - Pointer to data package containing the pointer event, - * window identifier where pointer event hit, and window - * group identifier of the window group where the window - * belongs to. - */ - void OtherEvent( TInt aType, TAny* aParam=NULL ); - - /** - * From CClickMaker. - * Implemented to enable this plug-in to communicate with the window - * server client. - * - * Area registry management communication (such as creating or closing - * an application) is communicated through this function. - * - * In practice communication is done between this plug-in, and - * Tactile Feedback Client API implementation. - * - * This plugin completes connect requests with KErrNotSupported, and all - * other requests with KErrNone without actually doing any actions. - * - * @since S60 v5.0 - * @param aOpcode - Opcode of the command sent by Client API - * @param aArgs - Pointer to the data sent by client. - */ - TInt CommandReplyL( TInt aOpcode, TAny* aArgs ); - - -// from base class MTactileFeedbackServer - - /** - * From MTactileFeedbackServer. - * Direct feedback service for Anim Dll plugins. - * - * This stub ignores all instant feedback requests. - * - * @since S60 v5.0 - * @param aType - Logical feedback type to play. - */ - void InstantFeedback( TTouchLogicalFeedback aType ); - -private: - - CTactileClickPlugin(); - - void ConstructL(); - - /** - * Handles data parsing when new client connects to this plugin. - * - * No real functionality in this stub. - * - * @param aArgs - Pointer to the data sent by client. - * @return Always KErrNotSupported in this stub. - */ - TInt HandleConnectL( TAny* aArgs ); - - /** - * Handles data parsing when new client connects to this plugin. - * - * No real functionality in this stub. - * - * @param aArgs - Pointer to the data sent by client. - */ - void HandleDisconnectL( TAny* aArgs ); - - /** - * Handles direct feedback request from Tactile Client API. - * - * No real functionality in this stub. - * - * @param aArgs - Pointer to the data sent by client. - * @return KErrNone if operation succeeded, otherwise one of standand - * Symbian OS error codes. - */ - TInt HandleImmediateFeedbackL( TAny* aArgs ); - }; - - -#endif // C_TACTILECLICKPLUGIN_H diff -r b7e5ed8c1342 -r e71858845f73 tactileclickplugin_stub/layers.sysdef.xml --- a/tactileclickplugin_stub/layers.sysdef.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - -]> - - - - - - - - - - diff -r b7e5ed8c1342 -r e71858845f73 tactileclickplugin_stub/rom/tactileclickpluginstub.iby --- a/tactileclickplugin_stub/rom/tactileclickpluginstub.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This is the IBY file of Tactile Click Plugin stub. -* Part of: Tactile Feedback. -* -*/ - - - -#ifndef TACTILECLICKPLUGIN_IBY -#define TACTILECLICKPLUGIN_IBY - -#ifdef RD_TACTILE_FEEDBACK - -#include - -file=ABI_DIR\BUILD_DIR\tactileclickplugin.dll SHARED_LIB_DIR\tactileclickplugin.dll - -#endif // RD_TACTILE_FEEDBACK - -#endif // TACTILECLICKPLUGIN_IBY diff -r b7e5ed8c1342 -r e71858845f73 tactileclickplugin_stub/src/tactileclickpluginstub.cpp --- a/tactileclickplugin_stub/src/tactileclickpluginstub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,190 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The click maker plugin, which -* handles key events at window server process. -* Part of: Tactile Feedback. -* -*/ - - - -#include -#include "tactileclickpluginstub.h" - - -/** - * These are used as opcodes (function number) in IPC communication - * between Tactile Feedback Client and the server hosting - * Tactile Area Registry (currently window server) - */ -enum TTactileFeedbackOpCodes - { - ETactileOpCodeConnect = 200, - ETactileOpCodeDisconnect = 201, - ETactileOpCodeImmediateFeedback = 202 - }; - - - -// ======== MEMBER FUNCTIONS ======== - - -CTactileClickPlugin::CTactileClickPlugin() - { - } - - -void CTactileClickPlugin::ConstructL() - { - // We need to store ourselves to thead local storage, so that - // Anim Dll plugins can access the feedback functionality - Dll::SetTls( this ); - } - - -// --------------------------------------------------------------------------- -// We really have to trap ConstructL, because construction of click maker -// plug-in must not fail (otherwise WSERV will panic, resulting in KERN 4 and -// re-boot of whole device). -// --------------------------------------------------------------------------- -// -CTactileClickPlugin* CTactileClickPlugin::NewL() - { - CTactileClickPlugin* self = new( ELeave ) CTactileClickPlugin; - TRAP_IGNORE( self->ConstructL() ); - return self; - } - - -CTactileClickPlugin::~CTactileClickPlugin() - { - } - - -// --------------------------------------------------------------------------- -// From class CClickMaker. -// No implementation needed -// --------------------------------------------------------------------------- -// -void CTactileClickPlugin::KeyEvent( - TEventCode /*aType*/, const TKeyEvent& /*aEvent*/ ) - { - } - -// --------------------------------------------------------------------------- -// From class CClickMaker. -// No implementation needed -// --------------------------------------------------------------------------- -// -void CTactileClickPlugin::PointerEvent( const TPointerEvent& /*aEvent*/ ) - { - } - -// --------------------------------------------------------------------------- -// From class CClickMaker. -// --------------------------------------------------------------------------- -// -void CTactileClickPlugin::OtherEvent( TInt /*aType*/, TAny* /*aParam*/ ) - { - } - - -// --------------------------------------------------------------------------- -// From class CClickMaker. -// This is run when client calls RSoundPlugin::CommandReply -function. -// -// Handling of individual commands has been moved to dedicated functions, -// because data handling requires some effort and relively complex code. -// This is due to the mistake in CClickMaker API design, as the data is -// not delivered in the same format as it was passed to RSoundPlugin on -// client side (client gives data in descriptor, but here the descriptor -// needs to be re-built from TAny* pointer, and in addition the lenght -// of data needs to be known based on command id). -// --------------------------------------------------------------------------- -// -TInt CTactileClickPlugin::CommandReplyL( TInt aOpcode, TAny* aArgs ) - { - TInt errCode = KErrNone; - - switch ( aOpcode ) - { - case ETactileOpCodeConnect: - errCode = HandleConnectL( aArgs ); - break; - case ETactileOpCodeDisconnect: - HandleDisconnectL( aArgs ); - break; - case ETactileOpCodeImmediateFeedback: - errCode = HandleImmediateFeedbackL( aArgs ); - break; - default: - break; - } - - return errCode; - }; - - -// --------------------------------------------------------------------------- -// -// --------------------------------------------------------------------------- -// -void CTactileClickPlugin::InstantFeedback( TTouchLogicalFeedback /*aType*/ ) - { - } - - -// --------------------------------------------------------------------------- -// This is not real plugin --> Always return KErrNotSupported -// --------------------------------------------------------------------------- -// -TInt CTactileClickPlugin::HandleConnectL( TAny* /*aArgs*/ ) - { - return KErrNotSupported; - } - - -// --------------------------------------------------------------------------- -// No need to do anything here -// --------------------------------------------------------------------------- -// -void CTactileClickPlugin::HandleDisconnectL( TAny* /*aArgs*/ ) - { - } - - -// --------------------------------------------------------------------------- -// No need to do anything here -// --------------------------------------------------------------------------- -// -TInt CTactileClickPlugin::HandleImmediateFeedbackL( TAny* /*aArgs*/ ) - { - return KErrNone; - } - - -// ======== GLOBAL FUNCTIONS ======== - -// --------------------------------------------------------------------------- -// Function with this signature needs to be the first exported function -// in click maker plugin DLLs. -// -// Constructs and returns an instance to tactile click maker plugin. -// --------------------------------------------------------------------------- -// -EXPORT_C CClickMaker* CreateClickMakerL() - { - CTactileClickPlugin* clickMaker = CTactileClickPlugin::NewL(); - return clickMaker; - } diff -r b7e5ed8c1342 -r e71858845f73 tactileclickplugin_stub/src/tactilefeedbackserverstub.cpp --- a/tactileclickplugin_stub/src/tactilefeedbackserverstub.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of the method for accessing -* MTactileFeedbackServer -instance -* Part of: Tactile Feedback. -* -*/ - - -#include "tactileclickpluginstub.h" -#include "tactilefeedbackserver.h" - - - - -EXPORT_C MTactileFeedbackServer* MTactileFeedbackServer::Instance() - { - CTactileClickPlugin* clickPlugin = NULL; - - TAny* tmpPtr = Dll::Tls(); - - if ( tmpPtr ) - { - clickPlugin = static_cast( tmpPtr ); - } - - return clickPlugin; - } - - diff -r b7e5ed8c1342 -r e71858845f73 tactileclickplugin_stub/sysdef_1_4_0.dtd --- a/tactileclickplugin_stub/sysdef_1_4_0.dtd Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r b7e5ed8c1342 -r e71858845f73 wlanhwinit_stub/bwinscw/wlanhwinitU.DEF --- a/wlanhwinit_stub/bwinscw/wlanhwinitU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -EXPORTS - ??1CWlanHwInit@@UAE@XZ @ 1 NONAME ; CWlanHwInit::~CWlanHwInit(void) - ?GetHwInitData@CWlanHwInit@@UAEXPAPBEAAI01@Z @ 2 NONAME ; void CWlanHwInit::GetHwInitData(unsigned char const * *, unsigned int &, unsigned char const * *, unsigned int &) - ?GetHwTestData@CWlanHwInit@@UAEHIAAVTDes8@@@Z @ 3 NONAME ; int CWlanHwInit::GetHwTestData(unsigned int, class TDes8 &) - ?GetHwTestInitData@CWlanHwInit@@UAEXPAPBEAAI01@Z @ 4 NONAME ; void CWlanHwInit::GetHwTestInitData(unsigned char const * *, unsigned int &, unsigned char const * *, unsigned int &) - ?GetMacAddress@CWlanHwInit@@UAEHAAUTMacAddr@@@Z @ 5 NONAME ; int CWlanHwInit::GetMacAddress(struct TMacAddr &) - ?NewL@CWlanHwInit@@SAPAV1@XZ @ 6 NONAME ; class CWlanHwInit * CWlanHwInit::NewL(void) - ?SetHwTestData@CWlanHwInit@@UAEHIAAVTDesC8@@@Z @ 7 NONAME ; int CWlanHwInit::SetHwTestData(unsigned int, class TDesC8 &) - diff -r b7e5ed8c1342 -r e71858845f73 wlanhwinit_stub/eabi/wlanhwinitU.DEF --- a/wlanhwinit_stub/eabi/wlanhwinitU.DEF Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -EXPORTS - _ZN11CWlanHwInit13GetHwInitDataEPPKhRjS2_S3_ @ 1 NONAME - _ZN11CWlanHwInit13GetHwTestDataEjR5TDes8 @ 2 NONAME - _ZN11CWlanHwInit13GetMacAddressER8TMacAddr @ 3 NONAME - _ZN11CWlanHwInit13SetHwTestDataEjR6TDesC8 @ 4 NONAME - _ZN11CWlanHwInit17GetHwTestInitDataEPPKhRjS2_S3_ @ 5 NONAME - _ZN11CWlanHwInit4NewLEv @ 6 NONAME - _ZN11CWlanHwInitD0Ev @ 7 NONAME - _ZN11CWlanHwInitD1Ev @ 8 NONAME - _ZN11CWlanHwInitD2Ev @ 9 NONAME - _ZThn4_N11CWlanHwInit13GetHwInitDataEPPKhRjS2_S3_ @ 10 NONAME ; ## - _ZThn4_N11CWlanHwInit13GetHwTestDataEjR5TDes8 @ 11 NONAME ; ## - _ZThn4_N11CWlanHwInit13GetMacAddressER8TMacAddr @ 12 NONAME ; ## - _ZThn4_N11CWlanHwInit13SetHwTestDataEjR6TDesC8 @ 13 NONAME ; ## - _ZThn4_N11CWlanHwInit17GetHwTestInitDataEPPKhRjS2_S3_ @ 14 NONAME ; ## - diff -r b7e5ed8c1342 -r e71858845f73 wlanhwinit_stub/group/bld.inf --- a/wlanhwinit_stub/group/bld.inf Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* -* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Component definition file used for building the WLAN HW Init -* -*/ - -/* -* %version: 11 % -*/ - -#include - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -// Export iby file -../rom/wlanhwinit.iby CORE_IBY_EXPORT_PATH(stubs,wlanhwinit.iby) - -PRJ_MMPFILES -wlanhwinit.mmp diff -r b7e5ed8c1342 -r e71858845f73 wlanhwinit_stub/group/wlanhwinit.mmp --- a/wlanhwinit_stub/group/wlanhwinit.mmp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project definition file for the WLAN HW Init -* -*/ - -/* -* %version: 7 % -*/ - -#include - -TARGET wlanhwinit.dll -TARGETTYPE dll -UID 0x1000008d 0x10207267 - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -#if defined( ARMCC ) -DEFFILE ../eabi/ -#elif defined( WINSCW ) -DEFFILE ../bwinscw/ -#elif defined( WINS ) -DEFFILE ../bwins/ -#else -DEFFILE ../bmarm/ -#endif - -SOURCEPATH ../src -SOURCE wlanhwinit.cpp - -USERINCLUDE ../inc -OS_LAYER_SYSTEMINCLUDE - -LIBRARY euser.lib diff -r b7e5ed8c1342 -r e71858845f73 wlanhwinit_stub/layers.sysdef.xml --- a/wlanhwinit_stub/layers.sysdef.xml Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - -]> - - - - - - - - - - diff -r b7e5ed8c1342 -r e71858845f73 wlanhwinit_stub/rom/wlanhwinit.iby --- a/wlanhwinit_stub/rom/wlanhwinit.iby Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: IBY file for the WLAN HW Init -* -*/ - -/* -* %version: 4 % -*/ - -#ifndef WLANHWINIT_IBY -#define WLANHWINIT_IBY - -file=ABI_DIR\BUILD_DIR\wlanhwinit.dll SHARED_LIB_DIR\wlanhwinit.dll - -#endif // WLANHWINIT_IBY diff -r b7e5ed8c1342 -r e71858845f73 wlanhwinit_stub/src/wlanhwinit.cpp --- a/wlanhwinit_stub/src/wlanhwinit.cpp Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,116 +0,0 @@ -/* -* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The implementation of CWlanHwInit class -* -*/ - -/* -* %version: 5 % -*/ - -#include - -// ============================ MEMBER FUNCTIONS =============================== - -CWlanHwInit::CWlanHwInit() : - iMain( NULL ) - { - } - -void CWlanHwInit::ConstructL() - { - } - -EXPORT_C CWlanHwInit* CWlanHwInit::NewL() - { - CWlanHwInit* self = new( ELeave ) CWlanHwInit; - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -EXPORT_C CWlanHwInit::~CWlanHwInit() - { - } - -// ----------------------------------------------------------------------------- -// CWlanHwInit::GetHwInitData -// ----------------------------------------------------------------------------- -// -EXPORT_C void CWlanHwInit::GetHwInitData( - const TUint8** aInitData, - TUint& aInitLength, - const TUint8** aFwData, - TUint& aFwLength ) - { - *aInitData = NULL; - aInitLength = 0; - *aFwData = NULL; - aFwLength = 0; - } - -// ----------------------------------------------------------------------------- -// CWlanHwInit::GetMacAddress -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CWlanHwInit::GetMacAddress( - TMacAddr& aMacAddress ) - { - aMacAddress.iMacAddress[0] = 0x00; - aMacAddress.iMacAddress[1] = 0xE0; - aMacAddress.iMacAddress[2] = 0xDE; - aMacAddress.iMacAddress[3] = 0xAD; - aMacAddress.iMacAddress[4] = 0xBE; - aMacAddress.iMacAddress[5] = 0xEF; - return KErrNone; - } - -// ----------------------------------------------------------------------------- -// CWlanHwInit::GetHwTestInitData -// ----------------------------------------------------------------------------- -// -EXPORT_C void CWlanHwInit::GetHwTestInitData( - const TUint8** aInitData, - TUint& aInitLength, - const TUint8** aFwData, - TUint& aFwLength ) - { - *aInitData = NULL; - aInitLength = 0; - *aFwData = NULL; - aFwLength = 0; - } - -// ----------------------------------------------------------------------------- -// CWlanHwInit::GetHwTestData -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CWlanHwInit::GetHwTestData( - TUint /*aId*/, - TDes8& /*aData*/ ) - { - return KErrNotSupported; - } - -// ----------------------------------------------------------------------------- -// CWlanHwInit::SetHwTestData -// ----------------------------------------------------------------------------- -// -EXPORT_C TInt CWlanHwInit::SetHwTestData( - TUint /*aId*/, - TDesC8& /*aData*/ ) - { - return KErrNotSupported; - } diff -r b7e5ed8c1342 -r e71858845f73 wlanhwinit_stub/sysdef_1_4_0.dtd --- a/wlanhwinit_stub/sysdef_1_4_0.dtd Tue Sep 07 08:19:48 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -