javauis/amms_akn/src_tuner/native/inc/ammstunerfactory.h
branchRCL_3
changeset 83 26b2b12093af
parent 19 04becd199f91
equal deleted inserted replaced
77:7cee158cb8cd 83:26b2b12093af
       
     1 /*
       
     2 * Copyright (c) 2005 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:  This class is used to create tuner player and control
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef AMMSTUNERFACTORY_H
       
    21 #define AMMSTUNERFACTORY_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 #include "CAMMSTunerControl.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CAMMSTunerPlayer;
       
    30 class CAMMSTunerControl;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 /**
       
    34 *  This class is used to create tuner player and control.
       
    35 *  It parses locator parameters and set them to control.
       
    36 */
       
    37 
       
    38 NONSHARABLE_CLASS(AMMSTunerFactory)
       
    39 {
       
    40 public:  // Constructors and destructor
       
    41 
       
    42     /**
       
    43     * Destructor.
       
    44     */
       
    45     virtual ~AMMSTunerFactory();
       
    46 
       
    47 public: // New functions
       
    48 
       
    49     /**
       
    50     * ?member_description.
       
    51     * @param aTunerPlayer
       
    52     * @param aLocatorParams
       
    53     */
       
    54     static void CreatePlayerL(CAMMSTunerPlayer** aTunerPlayer,
       
    55                               const TDesC* aLocatorParams);
       
    56 
       
    57 protected:  // New functions
       
    58 
       
    59     /**
       
    60     * Parse all locator parameters.
       
    61     * @param aLocatorParams
       
    62     * @param aFrequency
       
    63     * @param aStereoMode
       
    64     * @param aPreset
       
    65     */
       
    66     static void ParseParamsL(const TDesC* aLocatorParams,
       
    67                              TInt& aFrequency,
       
    68                              TInt& aStereoMode,
       
    69                              TInt& aPreset);
       
    70 
       
    71     /**
       
    72     * Parses frequency parameter
       
    73     * @param aFrequency - locator's frequency parameter
       
    74     * @return frequency in TInt
       
    75     */
       
    76     static TInt ParseFreqL(const TPtrC aFrequency);
       
    77 
       
    78     /**
       
    79     * Converts TPtrC to TReal using TLex.
       
    80     * @param aHertz - hertzs in TPtrC
       
    81     * @return hertzs in TReal
       
    82     */
       
    83     static TReal TDesCToTRealL(const TPtrC aHertz);
       
    84 
       
    85 private:
       
    86 
       
    87     /**
       
    88     * C++ default constructor.
       
    89     */
       
    90     AMMSTunerFactory();
       
    91 };
       
    92 
       
    93 #endif // AMMSTUNERFACTORY_H
       
    94 
       
    95 // End of File