imageeditor/imageeditorApp/src/CMGXRemConTarget.cpp
changeset 1 edfc90759b9f
equal deleted inserted replaced
0:57d4cdd99204 1:edfc90759b9f
       
     1 /*
       
     2 * Copyright (c) 2010 Ixonos Plc.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the "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 * Ixonos Plc
       
    14 *
       
    15 * Description: 
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 /*
       
    21 */
       
    22 
       
    23 // INCLUDE FILES
       
    24 #include <remconcoreapitarget.h>
       
    25 #include <remconinterfaceselector.h>
       
    26 #include <aknconsts.h>					
       
    27 
       
    28 #include <e32debug.h>
       
    29 
       
    30 
       
    31 #include "cmgxremcontarget.h"
       
    32 
       
    33 //MACROS
       
    34 
       
    35 #ifdef _DEBUG
       
    36 #define TRACES(x)    x
       
    37 #else
       
    38 #define TRACES(x)
       
    39 #endif
       
    40 
       
    41 
       
    42 // CONSTANTS
       
    43 
       
    44 // ================= MEMBER FUNCTIONS =======================
       
    45 
       
    46 // C++ default constructor can NOT contain any code, that
       
    47 // might leave.
       
    48 //
       
    49 CMGXRemConTarget::CMGXRemConTarget(MMGXMediakeyObserver* aObserver) : iObserver(aObserver)
       
    50     {
       
    51     }
       
    52 
       
    53 // EPOC default constructor can leave.
       
    54 void CMGXRemConTarget::ConstructL()
       
    55     {
       
    56     // Create interface selector.
       
    57     iInterfaceSelector = CRemConInterfaceSelector::NewL();
       
    58     // Create a new CRemConCoreApiTarget, owned by the interface selector.
       
    59     iCoreTarget = CRemConCoreApiTarget::NewL(*iInterfaceSelector, *this);
       
    60     // Start being a target.
       
    61     iInterfaceSelector->OpenTargetL();
       
    62     }
       
    63 
       
    64 // Two-phased constructor.
       
    65 CMGXRemConTarget* CMGXRemConTarget::NewL(MMGXMediakeyObserver* aObserver)
       
    66     {
       
    67     CMGXRemConTarget* self = new (ELeave) CMGXRemConTarget(aObserver);
       
    68     CleanupStack::PushL(self);
       
    69     self->ConstructL();
       
    70     CleanupStack::Pop();
       
    71     return self;
       
    72     }
       
    73 
       
    74 // Destructor
       
    75 CMGXRemConTarget::~CMGXRemConTarget()
       
    76     {
       
    77     delete iInterfaceSelector;
       
    78     // iCoreTarget was owned by iInterfaceSelector.
       
    79     iCoreTarget = NULL;
       
    80     }
       
    81 
       
    82 // ---------------------------------------------------------
       
    83 // CMGXRemConTarget::MrccatoCommand
       
    84 // ---------------------------------------------------------
       
    85 //
       
    86 void CMGXRemConTarget::MrccatoCommand(TRemConCoreApiOperationId aOperationId, TRemConCoreApiButtonAction aButtonAct)
       
    87 		{
       
    88 		TRACES( RDebug::Print( _L( "CMGXRemConTarget::MrccatoCommand: buttonact:%d >>"), aButtonAct ) );
       
    89 		switch (aOperationId)
       
    90 		    {
       
    91 		    case ERemConCoreApiVolumeUp:
       
    92 		        iObserver->HandleVolumeUpL();
       
    93 		        break;
       
    94 		    case ERemConCoreApiVolumeDown:
       
    95 		        iObserver->HandleVolumeDownL();
       
    96 		        break;
       
    97 		        
       
    98 		    default:
       
    99 		        break;
       
   100 		    }
       
   101 		TRACES( RDebug::Print( _L( "CMGXRemConTarget::MrccatoCommand << ") ));
       
   102 		}
       
   103 
       
   104 // ---------------------------------------------------------
       
   105 // CDmhRemConTarget::MrccatoPlay
       
   106 // ---------------------------------------------------------
       
   107 //
       
   108 void CMGXRemConTarget::MrccatoPlay(TRemConCoreApiPlaybackSpeed /*aSpeed*/, TRemConCoreApiButtonAction /*aButtonAct*/)
       
   109 	{
       
   110 	TRACES( RDebug::Print( _L( "CMGXRemConTarget::MrccatoPlay <<") ));
       
   111 	}
       
   112 	
       
   113 // ---------------------------------------------------------
       
   114 // CDmhRemConTarget::MrccatoTuneFunction
       
   115 // ---------------------------------------------------------
       
   116 //
       
   117 void CMGXRemConTarget::MrccatoTuneFunction(TBool /*aTwoPart*/, TUint /*aMajorChannel*/, TUint /*aMinorChannel*/, TRemConCoreApiButtonAction /*aButtonAct*/)
       
   118 	{
       
   119 	
       
   120 	}
       
   121 	
       
   122 // ---------------------------------------------------------
       
   123 // CDmhRemConTarget::MrccatoSelectDiskFunction
       
   124 // ---------------------------------------------------------
       
   125 //
       
   126 void CMGXRemConTarget::MrccatoSelectDiskFunction(TUint /*aDisk*/, TRemConCoreApiButtonAction /*aButtonAct*/)
       
   127 	{
       
   128 	
       
   129 	}
       
   130 	
       
   131 // ---------------------------------------------------------
       
   132 // CMGXRemConTarget::MrccatoSelectAvInputFunction
       
   133 // ---------------------------------------------------------
       
   134 //
       
   135 void CMGXRemConTarget::MrccatoSelectAvInputFunction(TUint8 /*aAvInputSignalNumber*/, TRemConCoreApiButtonAction /*aButtonAct*/)
       
   136 	{
       
   137 	
       
   138 	}
       
   139 	
       
   140 // ---------------------------------------------------------
       
   141 // CMGXRemConTarget::MrccatoSelectAudioInputFunction
       
   142 // ---------------------------------------------------------
       
   143 //
       
   144 void CMGXRemConTarget::MrccatoSelectAudioInputFunction(TUint8 /*aAudioInputSignalNumber*/, TRemConCoreApiButtonAction /*aButtonAct*/)
       
   145 	{
       
   146 	
       
   147 	}
       
   148 	
       
   149 //  End of File