mmserv/radioutility/fmpresetutility/src/RadioFmPresetChannel.h
branchRCL_3
changeset 20 0ac9a5310753
parent 0 71ca22bcf22a
equal deleted inserted replaced
19:095bea5f582e 20:0ac9a5310753
       
     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:  Defines radio channel's structure.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef RADIOFMPRESETCHANNEL_H
       
    19 #define RADIOFMPRESETCHANNEL_H
       
    20 
       
    21 #include <babitflags.h>
       
    22 
       
    23 // Forward declare implementation class.
       
    24 class CRadioFmPresetUtility;
       
    25 class RWriteStream;
       
    26 class RReadStream;
       
    27 
       
    28 namespace MiscInfo
       
    29 {
       
    30     enum DataIds
       
    31     {
       
    32         Local = 0,
       
    33         Favourite = 1,
       
    34         UserRename = 2
       
    35     };
       
    36 }
       
    37 
       
    38 // CLASS DECLARATION
       
    39 /**
       
    40 *  define preset channel structure.
       
    41 *
       
    42 *  @lib FmPresetUtility.lib
       
    43 *  @since Series 60 3.0
       
    44 */
       
    45 class TPresetChannel
       
    46     {
       
    47     public:
       
    48         /**
       
    49         * default constructor.
       
    50         */	
       
    51         TPresetChannel();
       
    52         /**
       
    53         * Get channel Name.
       
    54         * @since Series 60 3.0
       
    55         * @return channel name
       
    56         */
       
    57        TFmPresetName GetChannelName() const;
       
    58         /**
       
    59         * Get channel frequency.
       
    60         * @since Series 60 3.0
       
    61         * @return channel frequency
       
    62         */
       
    63         TInt GetChannelFrequency() const;
       
    64         /**
       
    65         * set channel name.
       
    66         * @since Series 60 3.0
       
    67         * @param aStationName new channel name
       
    68         * @return none
       
    69         */    
       
    70         void SetChannelName(const TFmPresetName& aStationName );
       
    71         /**
       
    72         * Set channel url.
       
    73         * @since Series 60 5.2
       
    74         * @param aStationUrl new channel Url
       
    75         * @return none
       
    76         */
       
    77         void SetChannelUrl(const TFmPresetUrl& aStationUrl );
       
    78         /**
       
    79         * Get channel url.
       
    80         * @since Series 60 5.2
       
    81         * @return channel url
       
    82         */        
       
    83         TFmPresetUrl ChannelUrl() const;
       
    84         /**
       
    85         * Set channel programme type.
       
    86         * @since Series 60 5.2
       
    87         * @param aPTY new channel PTY
       
    88         * @return none
       
    89         */        
       
    90         void SetChannelPty(const TUint aPTY);
       
    91         /**
       
    92         * Get channel programme type.
       
    93         * @since Series 60 5.2
       
    94         * @return channel PTY
       
    95         */      
       
    96 		TUint ChannelPty() const;
       
    97         /**
       
    98         * Set channel programme identification code.
       
    99         * @since Series 60 5.2
       
   100         * @param aPI - the new channel PI-code
       
   101         * @return none
       
   102         */
       
   103         void SetChannelPI(const TUint aPI);
       
   104         /**
       
   105         * Get channel programme identification code.
       
   106         * @since Series 60 5.2
       
   107         * @return channel PI-code
       
   108         */      
       
   109         TUint ChannelPI() const;        
       
   110         /**
       
   111         * Set or clear channel favourite info.
       
   112         * @since Series 60 5.2
       
   113         * @param aFavourite - the new channel favourite info
       
   114         * @return none
       
   115         */
       
   116         void SetChannelFavouriteInfo(const TBool aFavourite);
       
   117         /**
       
   118         * Get channel favourite info.
       
   119         * @since Series 60 5.2
       
   120         * @return channel favourite info
       
   121         */      
       
   122         TBool ChannelFavouriteInfo() const;        
       
   123         
       
   124         /**
       
   125         * Set or clear channel user rename info.
       
   126         * @since Series 60 5.2
       
   127         * @param aUserRename - the new channel favourite info
       
   128         * @return none
       
   129         */
       
   130         void SetChannelUserRenameInfo(const TBool aUserRename);
       
   131         /**
       
   132         * Get channel user rename info.
       
   133         * @since Series 60 5.2
       
   134         * @return channel user rename
       
   135         */      
       
   136         TBool ChannelUserRenameInfo() const;
       
   137         /**
       
   138         * Save channel frequency.
       
   139         * @since Series 60 3.0
       
   140         * @param aFrequency - the new channel frequency
       
   141         * @return none
       
   142         */
       
   143         void SaveChannelFrequency(const TInt aFrequency );	
       
   144         /**
       
   145         * Serialize the data to stream.
       
   146         * @since Series 60 3.0
       
   147         * @param aStream - used for write stream
       
   148         * @return none
       
   149         */
       
   150         void ExternalizeL(RWriteStream & aStream ) const;
       
   151         /**
       
   152         * Deserialize the data out of stream.
       
   153         * @since Series 60 3.0
       
   154     	* @param aStream  used for read stream	
       
   155         * @return none
       
   156         */
       
   157         void InternalizeL(RReadStream & aStream );
       
   158       
       
   159     private:
       
   160         //the preset channel name
       
   161 		TFmPresetName iPresetChannelName;
       
   162 		//the preset channel url
       
   163 		TFmPresetUrl iPresetChannelUrl;
       
   164 		//the preset channel frequency
       
   165 		TInt iPresetChannelFrequency;
       
   166 		//the preset channel Program Type
       
   167 		TUint iPresetChannelPTY;
       
   168 		//the preset channel Programme Identification code
       
   169 		TUint iPresetChannelPI;
       
   170         //the preset channel local, favourite and user renamed info
       
   171 		TBitFlags32 iPresetChannelMisc;
       
   172     };
       
   173 
       
   174 #endif  // RADIOFMPRESETCHANNEL_H
       
   175 
       
   176 // End of File