videofeeds/clientapi/inc/CIptvVodDlDownloadList.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2006 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef CIPTVVODDLDOWNLOADLIST_H
       
    23 #define CIPTVVODDLDOWNLOADLIST_H
       
    24 
       
    25 //  INCLUDES
       
    26 #include <e32base.h>
       
    27 #include "MIptvStreamObject.h"
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 // MACROS
       
    32 
       
    33 // DATA TYPES
       
    34 
       
    35 // FUNCTION PROTOTYPES
       
    36 
       
    37 // FORWARD DECLARATIONS
       
    38 class CIptvVodDlDownloadListItem;
       
    39 class CIptvMyVideosGlobalFileId;
       
    40 class RWriteStream;
       
    41 class RReadStream;
       
    42 
       
    43 // CLASS DECLARATION
       
    44 
       
    45 /**
       
    46 *  Used with CIptvVodDlClient::GetDownloadListL method.
       
    47 *
       
    48 *  @lib IptvClientApi.lib
       
    49 */
       
    50 class CIptvVodDlDownloadList : public CBase, public MIptvStreamObject
       
    51     {
       
    52     public:  // Constructors and destructor
       
    53         
       
    54         /**
       
    55         * Two-phased constructor.
       
    56         */
       
    57         IMPORT_C static CIptvVodDlDownloadList* NewL();
       
    58         
       
    59         /**
       
    60         * Destructor.
       
    61         */
       
    62         IMPORT_C virtual ~CIptvVodDlDownloadList();
       
    63 
       
    64     public: // New functions
       
    65         
       
    66         /**
       
    67         * Initializes this object from stream.
       
    68         * @param aStream stream to read data from
       
    69         */
       
    70         IMPORT_C void InternalizeL(RReadStream& aStream);
       
    71 
       
    72         /**
       
    73         * Writes this object to stream.
       
    74         * @param aStream stream to write data to.
       
    75         */
       
    76         IMPORT_C void ExternalizeL(RWriteStream& aStream);
       
    77 
       
    78         /**
       
    79         * Counts externalize size.
       
    80         */
       
    81         IMPORT_C TUint32 CountExternalizeSize();
       
    82 
       
    83         /**
       
    84          * Get pointer to list item.
       
    85          * Items which have iGlobalFileIdIsValid as EFalse are not returned. 
       
    86          * @param aGlobalFileId
       
    87          * @return returns pointer to list item, ownership does not move, caller MAY NOT free the pointer.
       
    88          */        
       
    89         IMPORT_C CIptvVodDlDownloadListItem* GetListItem(CIptvMyVideosGlobalFileId& aGlobalFileId);
       
    90         
       
    91 
       
    92         /**
       
    93          * Get pointer to list item by service id and content id.
       
    94          * @param aServiceId
       
    95          * @param aContentId
       
    96          * @return returns pointer to list item, ownership does not move, caller MAY NOT free the pointer.
       
    97          */
       
    98         IMPORT_C CIptvVodDlDownloadListItem* GetListItem(TUint32 aServiceId, TUint32 aContentId);
       
    99 
       
   100         /**
       
   101          * Delete item.
       
   102          * @param aGlobalFileId
       
   103          * @return System-wide error code.
       
   104          */
       
   105         IMPORT_C TInt Delete(CIptvMyVideosGlobalFileId& aGlobalFileId);
       
   106         
       
   107         /**
       
   108          * Delete item.
       
   109          * @param aServiceId
       
   110          * @param aContentId
       
   111          * @return System-wide error code.
       
   112          */                
       
   113         IMPORT_C TInt Delete(TUint32 aServiceId, TUint32 aContentId);
       
   114         
       
   115     private:
       
   116 
       
   117         /**
       
   118         * C++ default constructor.
       
   119         */
       
   120         CIptvVodDlDownloadList();
       
   121 
       
   122         /**
       
   123         * By default Symbian 2nd phase constructor is private.
       
   124         */
       
   125         void ConstructL();
       
   126 
       
   127     public:     // Data
       
   128             
       
   129         /**
       
   130         * Contains download items.
       
   131         */
       
   132         RArray<CIptvVodDlDownloadListItem*> iList;
       
   133             
       
   134     };
       
   135 
       
   136 #endif      // CIPTVVODDLDOWNLOADLIST_H   
       
   137             
       
   138 // End of File