browserutilities/feedsengine/FeedsServer/Common/inc/PackedFolder.h
changeset 0 dd21522fd290
child 36 0ed94ceaa377
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     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 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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Is a serialized version of CFolderIem suitable for transfer between
       
    15 *                client and server.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef PACKED_FOLDER_H
       
    21 #define PACKED_FOLDER_H
       
    22 
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32base.h>
       
    26 
       
    27 #include "LeakTracker.h"
       
    28 #include "Packed.h"
       
    29 
       
    30 // CONSTANTS
       
    31 
       
    32 // MACROS
       
    33 
       
    34 // DATA TYPES
       
    35 
       
    36 // FUNCTION PROTOTYPES
       
    37 
       
    38 // FORWARD DECLARATIONS
       
    39 
       
    40 // CLASS DECLARATION
       
    41 
       
    42 
       
    43 /**
       
    44 *  Is a serialized version of CFolderItem suitable for transfer between client and server.
       
    45 *
       
    46 *  \b Library: FeedsEngine.lib
       
    47 *
       
    48 *  @since 3.1
       
    49 */
       
    50 class CPackedFolder: public CPacked
       
    51     {
       
    52     public: // Destructor
       
    53         /**
       
    54         * Two-phased constructor.
       
    55         */
       
    56         static CPackedFolder* NewL();
       
    57 
       
    58         /**
       
    59         * Destructor.
       
    60         */        
       
    61         virtual ~CPackedFolder();
       
    62         
       
    63         
       
    64     public: // New Methods
       
    65         /**
       
    66         * Insert the begining of a folder.
       
    67         *
       
    68         * @since 3.1
       
    69         * @param aTitle The folder's title.
       
    70         * @param aEntryId The unique id for this entry.
       
    71         * @return Void
       
    72         */
       
    73         void FolderBeginsL(const TDesC& aTitle, TInt aEntryId = 0, TInt aStatus = KErrNone);
       
    74         
       
    75         /**
       
    76         * Insert the ending of a folder.
       
    77         *
       
    78         * @since 3.1
       
    79         * @return Void
       
    80         */
       
    81         void FolderEndsL();
       
    82         
       
    83         /**
       
    84         * Insert a feed.
       
    85         *
       
    86         * @since 3.1
       
    87         * @param aTitle The feed's title.
       
    88         * @param aFeedUrl The feed's url.
       
    89         * @param aLastUpdate The feed's timestamp.
       
    90         * @param aUnreadCount The number of unread topics.
       
    91         * @param aEntryId The unique id for this entry.
       
    92         * @param aFeedId The id of the feed.
       
    93         * @return void.
       
    94         */
       
    95         void AddFeedL( const TDesC& aTitle, const TDesC& aFeedUrl, 
       
    96                 const TTime& aLastUpdate, TInt aFreq, TInt aStatus = KErrNone, TInt aUnreadCount = 0, TInt aEntryId = 0, TInt aFeedId = 0);
       
    97 
       
    98         /**
       
    99         * Insert the begining of a mini item.
       
   100         *
       
   101         * @since 3.2
       
   102         * @return Void
       
   103         */
       
   104         void ItemBeginsL();
       
   105 
       
   106         /**
       
   107         * Insert the ending of a mini item.
       
   108         *
       
   109         * @since 3.2
       
   110         * @return Void
       
   111         */
       
   112         void ItemEndsL();
       
   113 
       
   114         /**
       
   115         * Called when when packing is done.
       
   116         *
       
   117         * @since 3.1
       
   118         * @return void.
       
   119         */
       
   120         void DoneL();
       
   121 
       
   122         /**
       
   123         * Extract the folder item's attributes.
       
   124         *
       
   125         * @since 3.1
       
   126         * @param aTitle The item's title.
       
   127         * @param aUrl The item's url.
       
   128         * @param aEntryId The item's entry id.
       
   129         * @param aFeedId The item's feed id or 0 if its a folder.
       
   130         * @param aTimestamp The item's timestamp.
       
   131         * @param aUnreadCount The number of unread topics.
       
   132         * @param aStatus The feed status.
       
   133         * @param aFreq The frequency for auto updating.
       
   134         * @return void.
       
   135         */
       
   136         void ExtractAttributes(TPtrC& aTitle, TPtrC& aUrl, TInt& aEntryId, 
       
   137                 TInt& aFeedId, TTime& aTimestamp, TInt& aUnreadCount, TInt &aStatus, TInt& aFreq) const;
       
   138 
       
   139 
       
   140     protected:  // New Methods
       
   141         /**
       
   142         * C++ default constructor.
       
   143         */
       
   144         CPackedFolder(TInt aTokenArrayInc, TInt aStringTableInc);
       
   145         
       
   146         /**
       
   147         * By default Symbian 2nd phase constructor is private.
       
   148         */
       
   149         void ConstructL();
       
   150         
       
   151     private:
       
   152         TLeakTracker  iLeakTracker;
       
   153     };
       
   154 
       
   155 
       
   156 #endif      // PACKED_FOLDER_H
       
   157             
       
   158 // End of File