audiostubs/devsoundextensions_stubs/addeddevsoundcontrolcistub/src/AddedDevSoundControlCIStub.cpp
changeset 43 e71858845f73
parent 40 b7e5ed8c1342
child 46 e1758cbb96ac
equal deleted inserted replaced
40:b7e5ed8c1342 43:e71858845f73
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: Audio Stubs -  Custom Interface stub implementation for AddedDevSoundControl.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include <e32debug.h>
       
    21 #include "AddedDevSoundControlCIStub.h"
       
    22 
       
    23 // EXTERNAL DATA STRUCTURES
       
    24 
       
    25 // EXTERNAL FUNCTION PROTOTYPES
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // MACROS
       
    30 
       
    31 // LOCAL CONSTANTS AND MACROS
       
    32 
       
    33 // MODULE DATA STRUCTURES
       
    34 
       
    35 // LOCAL FUNCTION PROTOTYPES
       
    36 
       
    37 // FORWARD DECLARATIONS
       
    38 
       
    39 // ============================= LOCAL FUNCTIONS ===============================
       
    40 
       
    41 // ============================ MEMBER FUNCTIONS ===============================
       
    42 
       
    43 /**
       
    44  * CAddedDevSoundControlCI::CAddedDevSoundControlCI
       
    45  * C++ default constructor can NOT contain any code, that might leave.
       
    46  */
       
    47 CAddedDevSoundControlCI::CAddedDevSoundControlCI()
       
    48     {
       
    49     }
       
    50 
       
    51 /**
       
    52  * CAddedDevSoundControlCI::ConstructL
       
    53  * Symbian 2nd phase constructor can leave.
       
    54  */
       
    55 void CAddedDevSoundControlCI::ConstructL()
       
    56     {
       
    57     }
       
    58 
       
    59 /**
       
    60  * CAddedDevSoundControlCI::NewL
       
    61  * Two-phased constructor.
       
    62  */
       
    63 EXPORT_C CAddedDevSoundControlCI* CAddedDevSoundControlCI::NewL()
       
    64     {
       
    65 	CAddedDevSoundControlCI* self = new (ELeave)CAddedDevSoundControlCI;
       
    66 	CleanupStack::PushL(self);
       
    67 	self->ConstructL();
       
    68 	CleanupStack::Pop(self);
       
    69 	return self;
       
    70     }
       
    71 
       
    72 /**
       
    73  * Destructor
       
    74  */
       
    75 EXPORT_C CAddedDevSoundControlCI::~CAddedDevSoundControlCI()
       
    76     {
       
    77     }
       
    78 
       
    79 
       
    80 // From CAddedDevSoundControl
       
    81 
       
    82 /**
       
    83  * Handles DevSound observer’s request to alter DevSound's behavior
       
    84  * for Pause. Can be called after DevSound creation. Must be called
       
    85  * prior to calling Pause to take effect. When value is True, the
       
    86  * Pause will halt the resource and keep all buffers sent to the
       
    87  * DevSound interface intact for playing upon resuming. When the value
       
    88  * is False, Pause will cause buffers to be flushed and any associated
       
    89  * resources freed. Should return a KErrNotSupported if the DevSound
       
    90  * behavior cannot be altered.
       
    91  *
       
    92  * (other items defined in the header)
       
    93  */
       
    94 EXPORT_C TInt CAddedDevSoundControlCI::SetHwAwareness(TBool aHwAware)
       
    95     {
       
    96     iHwAware = aHwAware;
       
    97 
       
    98 #ifdef _DEBUG
       
    99     RDebug::Print(_L("CAddedDevSoundControlCI::SetHwAwareness [%d]"), iHwAware);
       
   100 #endif //_DEBUG
       
   101 
       
   102     return KErrNone;
       
   103     }
       
   104 
       
   105 /**
       
   106  * Handles DevSound observer’s request to pause the audio resources
       
   107  * and explicitly flush the buffers. Must be in the Playing state in
       
   108  * order to function properly. Should return KErrNotSupported if the
       
   109  * feature is not available.
       
   110  *
       
   111  * (other items defined in the header)
       
   112  */
       
   113 EXPORT_C TInt CAddedDevSoundControlCI::PauseAndFlush()
       
   114     {
       
   115 #ifdef _DEBUG
       
   116     RDebug::Print(_L("CAddedDevSoundControlCI::PauseAndFlush [OK]"));
       
   117 #endif //_DEBUG
       
   118 
       
   119     return KErrNone;
       
   120     }
       
   121 
       
   122 
       
   123 // End of file