radioengine/settings/api/cradioregion.h
changeset 13 46974bebc798
child 14 63aabac4416d
equal deleted inserted replaced
0:f3d95d9c00ab 13:46974bebc798
       
     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 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 #include "radioengine.hrh"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CRadioRegion;
       
    29 class TResourceReader;
       
    30 
       
    31 // DATA TYPES
       
    32 typedef RPointerArray<CRadioRegion> RRadioRegionArray;
       
    33 typedef RPointerArray<HBufC16> RRadioCountryCodeArray;
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38 *  Class CRadioRegion provides information about FM region
       
    39 */
       
    40 NONSHARABLE_CLASS( CRadioRegion ) : public CBase
       
    41     {
       
    42 public:
       
    43 
       
    44     static CRadioRegion* NewL( TResourceReader& aRr );
       
    45 
       
    46     ~CRadioRegion();
       
    47 
       
    48 // New methods
       
    49 
       
    50     /**
       
    51     * Id Get the id of region
       
    52     * @return id of region
       
    53     */
       
    54     IMPORT_C TRadioRegion Id() const;
       
    55 
       
    56     /**
       
    57     * StepSize Get the step interval of region
       
    58     * @return Step size
       
    59     */
       
    60     IMPORT_C TUint32 StepSize() const;
       
    61 
       
    62     /**
       
    63     * Get the minimum frequency of region
       
    64     * @return Minimum frequency
       
    65     */
       
    66     IMPORT_C TUint32 MinFrequency() const;
       
    67 
       
    68     /**
       
    69     * Get the maximum frequency of region
       
    70     * @return Maximum frequency
       
    71     */
       
    72     IMPORT_C TUint32 MaxFrequency() const;
       
    73 
       
    74     /**
       
    75     * Get the decimal count of region.
       
    76     * @return Decimal count.
       
    77     */
       
    78     IMPORT_C TInt DecimalCount() const;
       
    79 
       
    80     /**
       
    81     * CountryCode Get the country code of region
       
    82     * @return Country code, or empty descriptor if country code doesn't exist
       
    83     */
       
    84     IMPORT_C const RRadioCountryCodeArray& CountryCodes();
       
    85 
       
    86     /**
       
    87     * Name Get the name of region
       
    88     * @return Name of region
       
    89     */
       
    90     IMPORT_C const TDesC16& Name() const;
       
    91 
       
    92     /**
       
    93     * SettingItemName Get the name of region for setting item
       
    94     * @return Name of region
       
    95     */
       
    96     IMPORT_C const TDesC16& SettingItemName() const;
       
    97 
       
    98 private:
       
    99 
       
   100     CRadioRegion();
       
   101 
       
   102     void ConstructL( TResourceReader& aRr );
       
   103 
       
   104 private: // data
       
   105     
       
   106     /** Id of the region*/
       
   107     TRadioRegion            iId;
       
   108     /** Step interval*/
       
   109     TUint16                 iStepSize;
       
   110     /** Min frequency */
       
   111     TUint32                 iMinFreq;
       
   112     /** Max frequency */
       
   113     TUint32                 iMaxFreq;
       
   114     /** Decimal count */
       
   115     TInt                    iDecimalCount;
       
   116     /** Country code*/
       
   117     RRadioCountryCodeArray  iCountryCodes;
       
   118     /** Region name*/
       
   119     HBufC*                  iName;
       
   120     /** Region name for setting item*/
       
   121     HBufC*                  iSettingName;
       
   122 
       
   123     };
       
   124 
       
   125 #endif // CRADIOREGION_H