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: fmradio preset station information |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CMFRADIOPRESET_H |
|
19 #define CMFRADIOPRESET_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 |
|
24 // FORWARD DECLARATIONS |
|
25 |
|
26 // CONSTANTS |
|
27 |
|
28 /** |
|
29 * fmradio preset station information |
|
30 */ |
|
31 class CFMRadioPreset : public CBase |
|
32 { |
|
33 |
|
34 public: |
|
35 /** |
|
36 * Two-phased constructor. |
|
37 */ |
|
38 static CFMRadioPreset* NewL(); |
|
39 /** |
|
40 * Destructor. |
|
41 */ |
|
42 virtual ~CFMRadioPreset(); |
|
43 |
|
44 public: // New functions |
|
45 /* |
|
46 * Set name for the preset |
|
47 * @param aName new name for the preset |
|
48 */ |
|
49 void SetPresetNameL( const TDesC& aName ); |
|
50 /* |
|
51 * Returns preset name |
|
52 * @return name |
|
53 */ |
|
54 const TDesC& PresetName(); |
|
55 /* |
|
56 * Set of the preset valid |
|
57 * @param aValid ETrue is the name is set valid |
|
58 */ |
|
59 void SetPresetNameValid( TBool aValid ); |
|
60 /* |
|
61 * Returns the validity of the preset name |
|
62 * @return ETrue if the name is valid, otherwise EFalse |
|
63 */ |
|
64 TBool PresetNameValid(); |
|
65 /* |
|
66 * Set frequency for the preset |
|
67 * @param aFrequency frequency to set |
|
68 */ |
|
69 void SetPresetFrequency( TInt aFrequency ); |
|
70 /* |
|
71 * Returns preset frequency |
|
72 * @return frequency |
|
73 */ |
|
74 TInt PresetFrequency(); |
|
75 |
|
76 /* |
|
77 * set station web url |
|
78 * @param aUrl url to set |
|
79 */ |
|
80 void SetPresetUrlL( const TDesC& aUrl ); |
|
81 |
|
82 /* |
|
83 * Gets station web url |
|
84 * @return url |
|
85 */ |
|
86 const TDesC& PresetUrl(); |
|
87 |
|
88 private: |
|
89 /** |
|
90 * C++ default constructor. |
|
91 */ |
|
92 CFMRadioPreset(); |
|
93 /** |
|
94 * EPOC default constructor. |
|
95 */ |
|
96 void ConstructL(); |
|
97 |
|
98 private: // data |
|
99 // station name |
|
100 RBuf iStationName; |
|
101 // station frequency |
|
102 TInt iStationFrequency; |
|
103 // Validity of the station name |
|
104 TBool iNameIsValid; |
|
105 // station web url |
|
106 RBuf iStationUrl; |
|
107 |
|
108 }; |
|
109 |
|
110 |
|
111 #endif // CMFRADIOPRESET_H |
|