internetradio2.0/actionhandlerinc/iractionhandler.h
changeset 14 896e9dbc5f19
parent 12 608f67c22514
child 15 065198191975
equal deleted inserted replaced
12:608f67c22514 14:896e9dbc5f19
     1 /*
       
     2 * Copyright (c) 2008-2008 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:  Action handler providing LIW based API for external use.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef IRACTIONHANDLER_H
       
    20 #define IRACTIONHANDLER_H
       
    21 
       
    22 #include <ahplugin.h>
       
    23 
       
    24 /**
       
    25  * Action handler provides LIW -based interface for external use (e.g. Homescreen) 
       
    26  * 
       
    27  * The action handler communicates with IR via IR's Publish & Subscribe API.
       
    28  * 
       
    29  */
       
    30 NONSHARABLE_CLASS( CIRActionHandler ) : public CAHPlugin
       
    31     {
       
    32 public:
       
    33     /**
       
    34      * Two-phased constructor. 
       
    35      */
       
    36     static CIRActionHandler* NewL();
       
    37 
       
    38     /**
       
    39      * Destructor
       
    40      */
       
    41     ~CIRActionHandler();
       
    42     
       
    43     // From base class CAHPlugin
       
    44     TInt ExecuteActionL( const CLiwMap* aMap );
       
    45     
       
    46 private:
       
    47     /**
       
    48      * C++ constructor.
       
    49      */
       
    50     CIRActionHandler();
       
    51     
       
    52     /**
       
    53      * Second phase constructor.
       
    54      */
       
    55     void ConstructL();
       
    56     
       
    57 private:
       
    58      
       
    59     /**
       
    60      * Mutes VRA.
       
    61      */
       
    62     void Stop();
       
    63     
       
    64     /**
       
    65      * Unmutes VRA.
       
    66      */
       
    67     void Play();
       
    68     
       
    69      /**
       
    70      * Invokes VRA to go to now playing view.
       
    71      */
       
    72     void StartToNowPlayingL();
       
    73     
       
    74     /**
       
    75      * Extracts the value of the given mapname to given string.
       
    76      * Reserves memory to argument aString.
       
    77      * 
       
    78      * @param aMap The map containing the mapname-string pairs.
       
    79      * @param aString Descriptor where the value is extracted.
       
    80      * @param aMapName The searched map name. 
       
    81      */
       
    82     TInt ExtractStringL( const CLiwMap* aMap, RBuf& aString, const TDesC8& aMapName );
       
    83     };
       
    84 
       
    85 #endif /* IRACTIONHANDLER_H */