videofeeds/server/IptvEpgManager/inc/CIptvEpgVodClientImpl.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2004-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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CIPTVEPGVODCLIENTIMPL_H
       
    22 #define CIPTVEPGVODCLIENTIMPL_H
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32std.h>
       
    26 #include "CIptvUtil.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CIptvEpgDb;
       
    30 class CIptvVodContentCategoryBriefDetails;
       
    31 class CIptvVodContentContentBriefDetails;
       
    32 class CIptvVodContentContentFullDetails;
       
    33 class CIptvEpgSession;
       
    34 class CIptvMediaContent;
       
    35 class CIptvSearchManager;
       
    36 
       
    37 // CLASS DECLARATION
       
    38 class CIptvEpgVodClientImpl : public CBase
       
    39     {
       
    40     public:
       
    41 
       
    42         /**
       
    43          * Two-phased constructor.
       
    44          * @param 
       
    45          */
       
    46         static CIptvEpgVodClientImpl* NewL( CIptvEpgDb& aEpgDb,
       
    47         									CIptvEpgSession& aSession,
       
    48         									CIptvSearchManager* aSearchManager );
       
    49 
       
    50         /**
       
    51          * Destructor.
       
    52          */
       
    53         ~CIptvEpgVodClientImpl();
       
    54                                                                                         
       
    55         /**
       
    56         * Get list of ECG categories. 
       
    57         * The ownership of the returned list is transferred to caller.
       
    58         * The order of categories is defined by database originated from service provider.
       
    59         * @since
       
    60         * @param aParentCategoryId Points to category ID which sub-categories should be listed. If NULL, the root is referenced.
       
    61         * @param aCategoryList Reference to a storage where pointer to created category list is returned.
       
    62         * @return Error code, KErrNone if no errors, 
       
    63         * KErrCouldNotConnect if server is needs permission for connection, otherwise one of the system wide error codes.
       
    64         */
       
    65         TInt GetEcgCategoryListL(TIptvCategoryId aParentCategoryId, RPointerArray<CIptvVodContentCategoryBriefDetails>& aCategoryList);
       
    66 
       
    67         /**
       
    68         * Get full detais of one category item.
       
    69         * The ownership of the returned data is transferred to caller.
       
    70         * @since                Engine 1.1
       
    71         * @param aCategoryId    Selected category ID identifier.
       
    72         * @param aCategory      Reference to a full details data returned.
       
    73         * @return               Error code, KErrNone if no errors.
       
    74         */
       
    75         TInt GetCategoryDetailsL(TIptvCategoryId aCategoryId, CIptvVodContentCategoryBriefDetails& aCategory);
       
    76 
       
    77         /**
       
    78         * Get parent category ID identifier. 
       
    79         * This method allows application to browse toward root category, then two consecutive calls are needed.
       
    80         * @since
       
    81         * @param aCategoryId Points to category ID which parent category is requested.
       
    82         * @param aParentId Reference to a storage where parent ID is returned.
       
    83         * @return Error code, KErrNone if no errors, 
       
    84         * KErrCouldNotConnect if server is needs permission for connection, otherwise one of the system wide error codes.
       
    85         */
       
    86         TInt GetParentCategoryL(TIptvCategoryId aCategoryId, TIptvCategoryId& aParentId);
       
    87 
       
    88         /**
       
    89         * Get list of ECG contents in the specified category in order defined by database originated from service provider.
       
    90         * The ownership of the returned list is transferred to caller.
       
    91         * @since
       
    92         * @param aCategoryId Selected category ID identifier
       
    93         * @param aSearchString A search string used to filter contents search. If NULL, no filtering issued.
       
    94         * @param aFrom The start index for listed contents. If NULL, start from the first one.
       
    95         * @param aAmount Amount of content elementes to be listes. If NULL, all starting from aFrom.
       
    96         * @param aTotalAmount Poiter to a variable where total amount of content is returned.
       
    97         * @param aEcgList Reference to returned ECG list items.
       
    98         * @return Error code, KErrNone if no errors, 
       
    99         * KErrCouldNotConnect if server is needs permission for connection, otherwise one of the system wide error codes.
       
   100         */
       
   101         TInt GetEcgListL(TIptvCategoryId aCategoryId, TDesC& aSearchString, TUint32 aFrom, TUint32 aAmount, TUint32& aTotalAmount, RPointerArray<CIptvVodContentContentBriefDetails>& aEcgList);
       
   102 
       
   103         /**
       
   104         * Get list of all ECG contents in alphabetical order.
       
   105         * The ownership of the returned list is transferred to caller.
       
   106         * @since
       
   107         * @param aSearchString A search string used to filter contents search. If NULL, no filtering issued.
       
   108         * @param aFrom The start index for listed contents. If NULL, start from the first one.
       
   109         * @param aAmount Amount of content elementes to be listes. If NULL, all starting from aFrom.
       
   110         * @param aTotalAmount Poiter to a variable where total amount of content is returned.
       
   111         * @param aEcgList Reference to returned ECG list items.
       
   112         * @return Error code, KErrNone if no errors, 
       
   113         * KErrCouldNotConnect if server is needs permission for connection, otherwise one of the system wide error codes.
       
   114         */
       
   115         TInt GetEcgAllListL(TDesC& aSearchString, TUint32 aFrom, TUint32 aAmount, TUint32& aTotalAmount, RPointerArray<CIptvVodContentContentBriefDetails>& aEcgList);
       
   116 
       
   117         /**
       
   118         * Get full detais of one content item.
       
   119         * The ownership of the returned data is transferred to caller.
       
   120         * @since
       
   121         * @param aContentId Selected content ID identifier.
       
   122         * @param aContentFullDetails Reference to returned full details data.
       
   123         * @return Error code, KErrNone if no errors, 
       
   124         * KErrCouldNotConnect if server is needs permission for connection, otherwise one of the system wide error codes.
       
   125         */
       
   126         TInt GetContentDetailsL(TIptvContentId aContentId, CIptvVodContentContentFullDetails& aContentFullDetails);
       
   127       
       
   128         /**
       
   129         * Get time when service was last updated.
       
   130         * @since
       
   131         * @param aTime Reference to TTime object.
       
   132         * @return Error code, KErrNone if no errors, otherwise one of the system wide error codes.
       
   133         */
       
   134         TInt GetUpdateTimeL(TTime& aTime);
       
   135 
       
   136         // Engine 1.1
       
   137         TInt GetContentAccessListL(TUint32 aContentId, RPointerArray<CIptvMediaContent>& aContents);
       
   138         CIptvMediaContent* GetContentAccessL(TUint32 aContentId, TUint32 aIndex);
       
   139         TInt SetLastPositionL(TUint32 aId, TUint32 aIndex, TUint32 aPosition);
       
   140         TInt SetMpxIdL( TUint32 aContentId, TUint32 aCaIndex, TUint32 aMpxId ); 
       
   141         TBool IsVodUpdateNeededL();
       
   142     private:    // New functions           
       
   143         /**
       
   144         * C++ default constructor.
       
   145         */
       
   146         CIptvEpgVodClientImpl( CIptvEpgDb& aEpgDb,
       
   147         					   CIptvEpgSession& aSession,
       
   148         					   CIptvSearchManager* aSearchManager );
       
   149 
       
   150         /**
       
   151         * By default Symbian 2nd phase constructor is private.
       
   152         * @param 
       
   153         */
       
   154         void ConstructL();
       
   155                                                   
       
   156     private:    // Data members 
       
   157                
       
   158         CIptvEpgDb& iEpgDb;
       
   159         
       
   160         CIptvSearchManager* iSearchManager;
       
   161 
       
   162         RArray<TUint32> iCategories;
       
   163 
       
   164         CIptvEpgSession& iSession;
       
   165     };
       
   166 
       
   167 #endif  // CIPTVEPGVODCLIENTIMPL_H
       
   168 
       
   169 // End of File