javauis/amms_qt/src_tuner/native/inc/tammstunerpreset.h
changeset 23 98ccebc37403
equal deleted inserted replaced
21:2a9601315dfc 23:98ccebc37403
       
     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:  Helper class for preset handling, reads and writes preset
       
    15 *                values in/out stream.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef TAMMSTUNERPRESET_H
       
    22 #define TAMMSTUNERPRESET_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class RWriteStream;
       
    30 class RReadStream;
       
    31 
       
    32 // CONSTANTS
       
    33 const TInt KPresetNameLength = 100;
       
    34 
       
    35 // CLASS DECLARATION
       
    36 /**
       
    37 *  Helper class for preset handling, reads and writes preset
       
    38 *  values in/out stream.
       
    39 *
       
    40 *  @lib ?library
       
    41 *  @since ?Series60_version
       
    42 */
       
    43 NONSHARABLE_CLASS(TAMMSTunerPreset)
       
    44 {
       
    45 public:
       
    46 
       
    47     /**
       
    48     * C++ default constructor.
       
    49     */
       
    50     TAMMSTunerPreset();
       
    51 
       
    52     /**
       
    53     * Setter for preset name.
       
    54     */
       
    55     void SetPresetName(const TDesC* aPresetName);
       
    56 
       
    57     /**
       
    58     * Setter for preset frequency.
       
    59     */
       
    60     void SetPresetFrequency(const TInt aPresetFrequency);
       
    61 
       
    62     /**
       
    63     * Setter for preset stereo mode.
       
    64     */
       
    65     void SetPresetStereoMode(const TInt aPresetStereoMode);
       
    66 
       
    67     /**
       
    68     * Getter for preset name.
       
    69     */
       
    70     TPtrC PresetName();
       
    71 
       
    72     /**
       
    73     * Getter for preset frequency.
       
    74     */
       
    75     TInt PresetFrequency();
       
    76 
       
    77     /**
       
    78     * Getter for preset stereo mode.
       
    79     */
       
    80     TInt PresetStereoMode();
       
    81 
       
    82     /**
       
    83     * Serialize the data to stream.
       
    84     * @param aStream - used for write stream
       
    85     */
       
    86     void ExternalizeL(RWriteStream &aStream) const;
       
    87 
       
    88     /**
       
    89     * deserialize the data out of stream.
       
    90     * @param aStream  used for read stream
       
    91     */
       
    92     void InternalizeL(RReadStream &aStream);
       
    93 
       
    94 private:
       
    95 
       
    96     TBuf<KPresetNameLength> iPresetName;
       
    97     TInt iPresetFrequency;
       
    98     TInt iPresetStereoMode;
       
    99 
       
   100 };
       
   101 
       
   102 #endif // TAMMSTUNERPRESET_H
       
   103 
       
   104 // End of File