favouritesitem.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : FavouritesItem.h 
00004 *  Part of     : Favourites Engine
00005 *  Interface   : Favourites Engine API
00006 *  Description : Declaration of FavouritesItem
00007 *  Version     : %Version%
00008 *
00009 *  Copyright (C) 2004 Nokia Corporation.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation. All rights are reserved. Copying, 
00013 *  including reproducing, storing,  adapting or translating, any 
00014 *  or all of this material requires the prior written consent of 
00015 *  Nokia Corporation. This material also contains confidential 
00016 *  information which may not be disclosed to others without the 
00017 *  prior written consent of Nokia Corporation.
00018 *
00019 * ============================================================================
00020 */
00021 
00022 #ifndef FAVOURITES_ITEM_H
00023 #define FAVOURITES_ITEM_H
00024 
00025 //  INCLUDES
00026 
00027 #include <e32base.h>
00028 #include <FavouritesLimits.h>
00029 #include <FavouritesWapAp.h>
00030 
00031 // FORWARD DECLARATION
00032 
00033 class CFavouritesItemImpl;
00034 class RWriteStream;
00035 class RReadStream;
00036 
00037 // CLASS DECLARATION
00038 
00044 class CFavouritesItem: public CBase
00045     {
00046 
00047     public:     // Data types
00048 
00052         enum TType  
00053             {
00054            /*
00055             * Invalid value, can not be set for a CFavouritesItem 
00056             * @see For more informaiton on ENone, see CFavouritesItem.
00057             */
00058             ENone,  
00059            /*
00060             * Favourites item
00061             * @see For more informaiton on ENone, see CFavouritesItem.
00062             */            
00063             EItem,  
00064            /*
00065             * Favourites folder.
00066             * @see For more informaiton on ENone, see CFavouritesItem.
00067             */
00068             EFolder 
00069             };
00070 
00071     public:     // Constructors and destructor
00072         
00079         IMPORT_C static CFavouritesItem* NewLC();
00080 
00086         IMPORT_C static CFavouritesItem* NewL();
00087 
00092         IMPORT_C virtual ~CFavouritesItem();
00093 
00099         IMPORT_C CFavouritesItem& operator=
00100             ( const CFavouritesItem& aCopyFrom );
00101 
00102     public:     // Query
00103 
00109         IMPORT_C TInt Uid() const;
00110 
00116         IMPORT_C TInt ParentFolder() const;
00117 
00125         IMPORT_C TType Type() const;
00126 
00132         IMPORT_C const TPtrC Name() const;
00133 
00139         IMPORT_C const TPtrC Url() const;
00140 
00146         IMPORT_C TFavouritesWapAp WapAp() const;
00147 
00153         IMPORT_C const TPtrC UserName() const;
00154 
00160         IMPORT_C const TPtrC Password() const;
00161 
00167         IMPORT_C TInt32 ContextId() const;
00168 
00174         IMPORT_C TBool IsItem() const;
00175 
00181         IMPORT_C TBool IsFolder() const;
00182 
00188         IMPORT_C TBool IsFactoryItem() const;
00189 
00196         IMPORT_C TBool IsReadOnly() const;
00197 
00209         IMPORT_C TTime Modified() const;
00210 
00211     public:     // update
00212 
00218         IMPORT_C void ClearL();
00219 
00226         IMPORT_C void SetParentFolder( TInt aId );
00227 
00235         IMPORT_C void SetType( TType aType );
00236 
00244         IMPORT_C void SetNameL( const TDesC& aName );
00245 
00253         IMPORT_C void SetUrlL( const TDesC& aUrl );
00254 
00261         IMPORT_C void SetWapAp( const TFavouritesWapAp& aAccessPoint );
00262 
00270         IMPORT_C void SetUserNameL( const TDesC& aUserName );
00271 
00279         IMPORT_C void SetPasswordL( const TDesC& aPassword );
00280 
00287         IMPORT_C void SetContextId( TInt32 aContextId );
00288 
00289     public:     // (But not exported:) Streaming
00290 
00297         void ExternalizeL( RWriteStream& aStream ) const;
00298 
00305         void InternalizeL( RReadStream& aStream );
00306 
00307     private:    // Constructors
00308         
00313         CFavouritesItem();
00314 
00319         void ConstructL();
00320 
00321     private:    // Data
00322 
00323         CFavouritesItemImpl* iImpl; 
00324 
00325     private:    // friends
00326 
00327         // Setting UID and accessing implementation is granted to this.
00328         friend class RFavouritesDb;
00329 
00330     };
00331 
00332 #endif
00333             
00334 // End of File

Copyright © Nokia Corporation 2001-2008
Back to top