internetradio2.0/ircommon/inc/irbrowsecatagoryitems.h
changeset 14 896e9dbc5f19
equal deleted inserted replaced
12:608f67c22514 14:896e9dbc5f19
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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:
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef IRBROWSECATAGORYITEMS_H
       
    19 #define IRBROWSECATAGORYITEMS_H
       
    20 
       
    21 #include <e32base.h>
       
    22 
       
    23 class RReadStream;
       
    24 class RWriteStream;
       
    25 
       
    26 /**
       
    27  * This class provides the basic structure to hold the browse information 
       
    28  * information that come from the isds server.
       
    29  * It also provides the basic getter and setter functions to 
       
    30  * manage the browse information.
       
    31  * @code
       
    32  * CIRBrowseCatagoryItems* browse = CIRBrowseCatagoryItems::NewL()
       
    33  * browse->SetXXX();
       
    34  * browse->GetXXX()
       
    35  * *browse = *browse2
       
    36  * delete browse;
       
    37  * @endcode
       
    38  *   
       
    39  */
       
    40 class CIRBrowseCatagoryItems : public CBase
       
    41     {
       
    42 public :
       
    43 
       
    44     /**
       
    45      * CIRBrowseCatagoryItems::NewL()
       
    46      * Static function
       
    47      * standard two phased constructor
       
    48      * @return CIRBrowseCatagoryItems*
       
    49      */
       
    50     IMPORT_C static CIRBrowseCatagoryItems* NewL();
       
    51     
       
    52     /**
       
    53      * CIRBrowseCatagoryItems::NewL()
       
    54      * Static function
       
    55      * standard two phased constructor
       
    56      * @return CIRBrowseCatagoryItems*
       
    57      */
       
    58     IMPORT_C static CIRBrowseCatagoryItems* NewLC();
       
    59 
       
    60     /**
       
    61      * CIRBrowseCatagoryItems::ConstructL()
       
    62      * standard second phase constructor
       
    63      */
       
    64     void ConstructL() const;
       
    65 
       
    66     /**
       
    67      * CIRBrowseCatagoryItems::~CIRBrowseCatagoryItems()
       
    68      * standard C++ destructor
       
    69      */
       
    70     ~CIRBrowseCatagoryItems();
       
    71 
       
    72     /**
       
    73      * CIRBrowseCatagoryItems::SetTextL()
       
    74      * sets the category name and category id
       
    75      */
       
    76     IMPORT_C void SetTextL( const TDesC& aCatName, const TDesC& aCatId );
       
    77 
       
    78     /**
       
    79      * CIRBrowseCatagoryItems::SetSize()
       
    80      * sets the count of the no of items present under that type
       
    81      */
       
    82     IMPORT_C void SetSize( const TDesC& aCatSize );
       
    83     
       
    84     /**
       
    85      * CIRBrowseCatagoryItems::SetGetOperation()
       
    86      * sets the url that is used to get the next level of data
       
    87      */
       
    88     IMPORT_C void SetGetOperation( const TDesC& aCatGetOperation );
       
    89     
       
    90     /**
       
    91      * CIRBrowseCatagoryItems::SetBannerUrl()
       
    92      * Set data Banner Url
       
    93      * @param TDesC
       
    94      */
       
    95     IMPORT_C void SetBannerUrl( const TDesC& aBannerUrl );
       
    96     
       
    97     /**
       
    98      * CIRBrowseCatagoryItems::SetClickThroughUrl( )
       
    99      * Set data Banner Url
       
   100      * @param TDesC
       
   101      */
       
   102     IMPORT_C void SetClickThroughUrl( const TDesC& aClickThroughUrl );
       
   103 
       
   104     /**
       
   105      * CIRBrowseCatagoryItems::ExternalizeL()
       
   106      * Externalizes the data from file
       
   107      * @param RWriteStream
       
   108      */
       
   109     IMPORT_C void ExternalizeL( RWriteStream& aStream ) const;
       
   110 
       
   111     /**
       
   112      *CIRBrowseCatagoryItems::InternalizeL()
       
   113      *Internalizes the data from file
       
   114      *@param RWriteStream&
       
   115      */
       
   116     IMPORT_C void InternalizeL( RReadStream& aStream );
       
   117 
       
   118 public:
       
   119     //category name
       
   120     HBufC* iCatName;
       
   121     //category id
       
   122     HBufC* iCatId;
       
   123     //get operation
       
   124     HBufC* iCatGetOperation;
       
   125     //no of entities
       
   126     TInt iSize;
       
   127     //For Advertisements
       
   128     HBufC* iCatBannerUrl;
       
   129     HBufC* iCatClickThroughUrl;
       
   130     };
       
   131     
       
   132 #endif// IRBROWSECATAGORYITEMS_H