camerauis/cameraapp/generic/inc/CamVolumeKeyObserver.h
branchRCL_3
changeset 54 bac7acad7cb3
parent 0 1ddebce53859
equal deleted inserted replaced
53:61bc0f252b2b 54:bac7acad7cb3
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Observes Remote Controller Framework for volume key presses*
       
    15 */
       
    16 
       
    17 
       
    18 #ifndef CAMVOLKEYOBSERVER_H
       
    19 #define CAMVOLKEYOBSERVER_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <remconcoreapitargetobserver.h>
       
    23 #include "CamZoomPane.h"
       
    24   
       
    25 // FORWARD DECLARATIONS
       
    26 class CRemConInterfaceSelector;
       
    27 class CRemConCoreApiTarget;
       
    28 class CCamRemConKeyResponse;
       
    29 class CCamZoomPane;
       
    30 
       
    31 /**
       
    32 * Observer interface for volume key events
       
    33 * 
       
    34 * since @3.1
       
    35 *
       
    36 */
       
    37 class MCamVolumeKeyObserver
       
    38 	{
       
    39 public:
       
    40 	/**
       
    41 	* Report volume keys events to observer
       
    42 	* @since 3.1
       
    43 	* @param aOperationId Volume key up Volume key down event
       
    44 	* @param aButtonAct button action (press, release, click)
       
    45 	*/
       
    46 	virtual void HandleVolumeKeyEvent( TRemConCoreApiOperationId aOperationId,
       
    47                             			TRemConCoreApiButtonAction aButtonAct ) = 0;
       
    48 	};
       
    49 
       
    50 // CLASS DECLARATION
       
    51 
       
    52 /**
       
    53 *  Observes Remote Controller Framework
       
    54 *  
       
    55 *  @since 3.1
       
    56 */
       
    57 class CCamRemConObserver 
       
    58     : public CBase, public MRemConCoreApiTargetObserver
       
    59     {
       
    60     public:  // Constructors and destructor      
       
    61         
       
    62         /**
       
    63         * Two-phased constructor.
       
    64         * @param aZoomPane zoom pane instance
       
    65         * @return new instance.
       
    66         */
       
    67         static CCamRemConObserver* NewL( MCamVolumeKeyObserver& aObserver );
       
    68 
       
    69         /**
       
    70         * Destructor.
       
    71         */
       
    72         ~CCamRemConObserver();
       
    73 
       
    74     public: // New functions
       
    75         
       
    76     protected:
       
    77 
       
    78         /**
       
    79         * from MRemConCoreApiTargetObserver interface class.
       
    80         * A command has been received. 
       
    81         * @param aOperationId The operation ID of the command.
       
    82         * @param aButtonAct The button action associated with the command.
       
    83         */
       
    84         void MrccatoCommand( TRemConCoreApiOperationId aOperationId, 
       
    85                              TRemConCoreApiButtonAction aButtonAct );
       
    86 
       
    87         /**
       
    88         * from MRemConCoreApiTargetObserver interface class.
       
    89         * not used
       
    90         */
       
    91         void MrccatoPlay(TRemConCoreApiPlaybackSpeed aSpeed, 
       
    92 		                        TRemConCoreApiButtonAction aButtonAct);
       
    93 
       
    94         /**
       
    95         * from MRemConCoreApiTargetObserver interface class.
       
    96         * not used
       
    97         */
       
    98         void MrccatoTuneFunction(TBool aTwoPart, 
       
    99                         		TUint aMajorChannel, 
       
   100                         		TUint aMinorChannel,
       
   101                         		TRemConCoreApiButtonAction aButtonAct);
       
   102 
       
   103         /**
       
   104         * from MRemConCoreApiTargetObserver interface class.
       
   105         * not used
       
   106         */
       
   107         void MrccatoSelectDiskFunction(TUint aDisk,
       
   108                         		TRemConCoreApiButtonAction aButtonAct);
       
   109 	
       
   110         /**
       
   111         * from MRemConCoreApiTargetObserver interface class.
       
   112         * not used
       
   113         */
       
   114         void MrccatoSelectAvInputFunction(TUint8 aAvInputSignalNumber,
       
   115                         		TRemConCoreApiButtonAction aButtonAct);
       
   116 
       
   117         /**
       
   118         * from MRemConCoreApiTargetObserver interface class.
       
   119         * not used
       
   120         */
       
   121         void MrccatoSelectAudioInputFunction(TUint8 aAudioInputSignalNumber,
       
   122                         		TRemConCoreApiButtonAction aButtonAct);
       
   123 
       
   124     private:
       
   125 
       
   126         /**
       
   127         * C++ default constructor.
       
   128         * @since 3.1
       
   129         * @param aZoomPane instance of zoom pane
       
   130         */
       
   131         CCamRemConObserver( MCamVolumeKeyObserver& aObserver );
       
   132 
       
   133         /**
       
   134         * By default Symbian 2nd phase constructor is private.
       
   135         */
       
   136         void ConstructL();
       
   137         
       
   138     private:    // Data
       
   139         
       
   140         // Remote Controller
       
   141         CRemConInterfaceSelector* iInterfaceSelector;  
       
   142         
       
   143         // Remote Controller
       
   144         CRemConCoreApiTarget* iCoreTarget;
       
   145         
       
   146         // Key response
       
   147         CCamRemConKeyResponse* iActiveRemCon;
       
   148         
       
   149         // zoom pane
       
   150         MCamVolumeKeyObserver& iObserver;
       
   151     };
       
   152 
       
   153 #endif      // CAMVOLKEYOBSERVER_H
       
   154             
       
   155 // End of File