radioengine/settings/api/cradioregion.h
branchRCL_3
changeset 20 93c594350b9a
parent 19 cce62ebc198e
equal deleted inserted replaced
19:cce62ebc198e 20:93c594350b9a
     1 /*
       
     2 * Copyright (c) 2009 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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CRADIOREGION_H
       
    19 #define CRADIOREGION_H
       
    20 
       
    21 
       
    22 // System includes
       
    23 #include <e32base.h>
       
    24 
       
    25 // User includes
       
    26 #include "radioengine.hrh"
       
    27 
       
    28 // Forward declarations
       
    29 class CRadioRegion;
       
    30 class TResourceReader;
       
    31 
       
    32 // Data types
       
    33 typedef RPointerArray<CRadioRegion> RRadioRegionArray;
       
    34 typedef RPointerArray<HBufC16> RRadioCountryCodeArray;
       
    35 
       
    36 // Class declaration
       
    37 
       
    38 /**
       
    39 *  Class CRadioRegion provides information about FM region
       
    40 */
       
    41 NONSHARABLE_CLASS( CRadioRegion ) : public CBase
       
    42     {
       
    43 public:
       
    44 
       
    45     static CRadioRegion* NewL( TResourceReader& aRr );
       
    46 
       
    47     ~CRadioRegion();
       
    48 
       
    49 // New methods
       
    50 
       
    51     /**
       
    52     * Id Get the id of region
       
    53     * @return id of region
       
    54     */
       
    55     IMPORT_C TRadioRegion Id() const;
       
    56 
       
    57     /**
       
    58     * StepSize Get the step interval of region
       
    59     * @return Step size
       
    60     */
       
    61     IMPORT_C TUint32 StepSize() const;
       
    62 
       
    63     /**
       
    64     * Get the minimum frequency of region
       
    65     * @return Minimum frequency
       
    66     */
       
    67     IMPORT_C TUint32 MinFrequency() const;
       
    68 
       
    69     /**
       
    70     * Get the maximum frequency of region
       
    71     * @return Maximum frequency
       
    72     */
       
    73     IMPORT_C TUint32 MaxFrequency() const;
       
    74 
       
    75     /**
       
    76     * Get the decimal count of region.
       
    77     * @return Decimal count.
       
    78     */
       
    79     IMPORT_C TInt DecimalCount() const;
       
    80 
       
    81     /**
       
    82     * CountryCode Get the country code of region
       
    83     * @return Country code, or empty descriptor if country code doesn't exist
       
    84     */
       
    85     IMPORT_C const RRadioCountryCodeArray& CountryCodes();
       
    86 
       
    87 private:
       
    88 
       
    89     CRadioRegion();
       
    90 
       
    91     void ConstructL( TResourceReader& aRr );
       
    92 
       
    93 private: // data
       
    94     
       
    95     /** Id of the region*/
       
    96     TRadioRegion            iId;
       
    97     /** Step interval*/
       
    98     TUint32                 iStepSize;
       
    99     /** Min frequency */
       
   100     TUint32                 iMinFreq;
       
   101     /** Max frequency */
       
   102     TUint32                 iMaxFreq;
       
   103     /** Decimal count */
       
   104     TInt                    iDecimalCount;
       
   105     /** Country code*/
       
   106     RRadioCountryCodeArray  iCountryCodes;
       
   107 
       
   108     };
       
   109 
       
   110 #endif // CRADIOREGION_H