radioengine/settings/api/cradioregion.h
changeset 23 a2b50a479edf
parent 19 afea38384506
child 24 6df133bd92e1
equal deleted inserted replaced
19:afea38384506 23:a2b50a479edf
     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     /**
       
    88     * Name Get the name of region
       
    89     * @return Name of region
       
    90     */
       
    91     IMPORT_C const TDesC16& Name() const;
       
    92 
       
    93     /**
       
    94     * SettingItemName Get the name of region for setting item
       
    95     * @return Name of region
       
    96     */
       
    97     IMPORT_C const TDesC16& SettingItemName() const;
       
    98 
       
    99 private:
       
   100 
       
   101     CRadioRegion();
       
   102 
       
   103     void ConstructL( TResourceReader& aRr );
       
   104 
       
   105 private: // data
       
   106     
       
   107     /** Id of the region*/
       
   108     TRadioRegion            iId;
       
   109     /** Step interval*/
       
   110     TUint16                 iStepSize;
       
   111     /** Min frequency */
       
   112     TUint32                 iMinFreq;
       
   113     /** Max frequency */
       
   114     TUint32                 iMaxFreq;
       
   115     /** Decimal count */
       
   116     TInt                    iDecimalCount;
       
   117     /** Country code*/
       
   118     RRadioCountryCodeArray  iCountryCodes;
       
   119     /** Region name*/
       
   120     HBufC*                  iName;
       
   121     /** Region name for setting item*/
       
   122     HBufC*                  iSettingName;
       
   123 
       
   124     };
       
   125 
       
   126 #endif // CRADIOREGION_H