2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Declaration of FavouritesWapAp
19 #ifndef FAVOURITES_WAP_AP_H
20 #define FAVOURITES_WAP_AP_H
29 * TFavouritesWapAp is the representation one the Access Point used in favourites.
30 * In addition to the AP Uid-s an item may hold "Use default" and "Unset/Null" values.
32 class TFavouritesWapAp
35 public: // construction
38 * C++ default constructor. Initializes to "Default".
41 IMPORT_C TFavouritesWapAp();
46 * Assignment operator (from another TFavouritesWapAp).
48 * @param aAp AP to assign from.
49 * @return TFavouritesWapAp
51 IMPORT_C TFavouritesWapAp& operator= ( const TFavouritesWapAp& aAp );
54 * Assignment operator (from TUint32).
55 * "Null" and "Default" properties cleared.
57 * @param aApId AP id to assign from.
58 * @return TFavouritesWapAp
60 IMPORT_C TFavouritesWapAp& operator= ( TUint32 aApId );
65 * Set value is unset. Any previous value is lost.
69 IMPORT_C void SetNull();
72 * Set value is "Default". Any previous value is lost.
76 IMPORT_C void SetDefault();
79 * Set value. "Null" and "Default" properties cleared.
81 * @param aApId AP id to set.
84 IMPORT_C void SetApId( TUint32 aApId );
89 * Check if value is unset.
91 * @return ETrue if value is unset.
93 IMPORT_C TBool IsNull() const;
96 * Check if value is "Default".
98 * @return ETrue if value is "Default".
100 IMPORT_C TBool IsDefault() const;
103 * Get the AP id. If the value is "Null" or "Default", this method
104 * panics. Check those before calling this method!
108 IMPORT_C TUint32 ApId() const;
110 public: // (But not exported): Streaming
113 * Externalize into a stream.
115 * @param aStream The stream to externalize to.
118 void ExternalizeL( RWriteStream& aStream ) const;
121 * Internalize from a stream.
123 * @param aStream The stream to externalize from.
125 void InternalizeL( RReadStream& aStream );
129 /// RFavouritesTable writes this into database.
130 friend class RFavouritesSrvTable;
135 * This enum holds the value kind ("Null", "Default" or just normal).
139 ENormal, ///< Has real value (not special).
140 ENull, ///< Has "Null" value.
141 EDefault ///< Has "Default value".
147 * AP id. Meaningless if value is "Null" or "Default".
154 TValueKind iValueKind;