fmradio/fmradioactionhandler/inc/fmradioactionhandler.h
changeset 0 f3d95d9c00ab
equal deleted inserted replaced
-1:000000000000 0:f3d95d9c00ab
       
     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:  Declaration for the class CFMRadioActionHandler.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef FMRADIOACTIONHANDLER_H
       
    19 #define FMRADIOACTIONHANDLER_H
       
    20 
       
    21 #include <ahplugin.h>
       
    22 
       
    23 /**
       
    24  * Action handler provides LIW -based interface for external use (e.g. Homescreen) 
       
    25  * 
       
    26  * The action handler communicates with FM Radio via FM Radio's Publish & Subscribe API.
       
    27  * 
       
    28  * @lib fmradioactionhandler.lib
       
    29  */
       
    30 NONSHARABLE_CLASS( CFMRadioActionHandler ) : public CAHPlugin
       
    31     {
       
    32 public:
       
    33     /**
       
    34      * Two-phased constructor. 
       
    35      */
       
    36     static CFMRadioActionHandler* NewL();
       
    37 
       
    38     /**
       
    39      * Destructor
       
    40      */
       
    41     ~CFMRadioActionHandler();
       
    42     
       
    43     // From base class CAHPlugin
       
    44     TInt ExecuteActionL( const CLiwMap* aMap );
       
    45     
       
    46 private:
       
    47     /**
       
    48      * C++ constructor.
       
    49      */
       
    50     CFMRadioActionHandler();
       
    51     
       
    52     /**
       
    53      * Second phase constructor.
       
    54      */
       
    55     void ConstructL();
       
    56     
       
    57 private:
       
    58     /**
       
    59      * Invokes step to previous preset.
       
    60      */
       
    61     void StepPrevious();
       
    62     
       
    63     /**
       
    64      * Invokes step to next preset. 
       
    65      */
       
    66     void StepNext();
       
    67     
       
    68     /**
       
    69      * Mutes radio.
       
    70      */
       
    71     void Mute();
       
    72     
       
    73     /**
       
    74      * Unmutes radio.
       
    75      */
       
    76     void Unmute();
       
    77     
       
    78     /**
       
    79      * Invokes seek up.
       
    80      */
       
    81     void SeekUp();
       
    82     
       
    83     /**
       
    84      * Invokes seek down.
       
    85      */
       
    86     void SeekDown();
       
    87 
       
    88     /**
       
    89      * Invokes to go to now playing view.
       
    90      */
       
    91     void StartToNowPlayingL();
       
    92     
       
    93     /**
       
    94      * Generates start now playing command tail.
       
    95      * 
       
    96      * @return start now playing command tail. 
       
    97      */
       
    98     const TPtrC8 GenerateStartNowPlayingCommandTail();
       
    99     
       
   100     /**
       
   101      * Extracts the value of the given mapname to given string.
       
   102      * Reserves memory to argument aString.
       
   103      * 
       
   104      * @param aMap The map containing the mapname-string pairs.
       
   105      * @param aString Descriptor where the value is extracted.
       
   106      * @param aMapName The searched map name. 
       
   107      */
       
   108     TInt ExtractStringL( const CLiwMap* aMap, RBuf& aString, const TDesC8& aMapName );
       
   109     };
       
   110 
       
   111 #endif /* FMRADIOACTIONHANDLER_H*/