videofeeds/vcnsuiengine/inc/vcxnscontentproviderif.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2008 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 M_VCXNSAPPCONTENTPROVIDERIF_H
       
    22 #define M_VCXNSAPPCONTENTPROVIDERIF_H
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32base.h>
       
    26 
       
    27 
       
    28 // CLASS DECLARATION
       
    29 class MVcxNsContentProviderObserver;
       
    30 class CVcxNsContent;
       
    31 
       
    32 /**
       
    33 * Class MVcxNsContentProviderIf 
       
    34 * Interface for using UI engine's content provider
       
    35 *
       
    36 * @lib vcxnsuiengine.lib
       
    37 */
       
    38 class MVcxNsContentProviderIf
       
    39     {
       
    40 
       
    41 public:
       
    42 
       
    43     /**
       
    44      * RegisterObserver.
       
    45      * @param aObserver Observer
       
    46      */
       
    47     virtual void RegisterObserver( MVcxNsContentProviderObserver* aObserver ) = 0;
       
    48 
       
    49     /**
       
    50      * DeRegisterObserver.
       
    51      * @param aObserver Observer
       
    52      */
       
    53     virtual void DeRegisterObserver( MVcxNsContentProviderObserver* aObserver ) = 0;
       
    54 
       
    55     /**
       
    56      * Get contents with highlighted position
       
    57      * @param aHighlight On return, highlight index for content list
       
    58      * @return Array of contents.
       
    59      */
       
    60     virtual RPointerArray<CVcxNsContent>& GetContentsL( TInt& aHighlight ) = 0;
       
    61 
       
    62     /**
       
    63      * Gets contents.
       
    64      *
       
    65      * @return Vod contents
       
    66      */
       
    67     virtual RPointerArray<CVcxNsContent>& GetContentsL() = 0;
       
    68 
       
    69     /**
       
    70      * Starts the content update.
       
    71      *
       
    72      * @return KErrNone or one of the system wide error codes.
       
    73      */
       
    74     virtual TInt RefreshContentsL() = 0;
       
    75     
       
    76     /**
       
    77      * Starts download of given content item.
       
    78      * @param aIndex Index of the content to be downloaded
       
    79      * @return KErrNone or one of the system wide error codes.
       
    80      */
       
    81     virtual TInt StartDownloadL( TInt aIndex ) = 0;
       
    82     
       
    83     /**
       
    84      * Pause download of given content item.
       
    85      * 
       
    86      * @param aIndex Index of the content item.
       
    87      * @return KErrNone or one of the system wide error codes.
       
    88      */
       
    89     virtual TInt PauseDownloadL( TInt aIndex ) = 0;
       
    90     
       
    91     /**
       
    92      * Resume download of given content item.
       
    93      * 
       
    94      * @param aIndex Index of the content item.
       
    95      * @return KErrNone or one of the system wide error codes.
       
    96      */
       
    97     virtual TInt ResumeDownloadL( TInt aIndex ) = 0;
       
    98     
       
    99     /**
       
   100      * Resume download of given content item.
       
   101      * 
       
   102      * @param aContent Content details
       
   103      * @return KErrNone or one of the system wide error codes.
       
   104      */
       
   105     virtual TInt ResumeDownloadL( CVcxNsContent& aContent ) = 0;
       
   106     
       
   107     /**
       
   108      * Cancels downloading of given content item.
       
   109      * 
       
   110      * @param aIndex Index of the content item.
       
   111      * @return KErrNone or one of the system wide error codes.
       
   112      */
       
   113     virtual TInt CancelDownloadL( TInt aIndex ) = 0;
       
   114 
       
   115     
       
   116     /**
       
   117      * Checks if video has more details than just name
       
   118      * 
       
   119      * @param aSelected Index of selected item
       
   120      * @return Does the video have other details than just name
       
   121      */
       
   122     virtual TBool HasVideoDetailsL( TInt aSelected ) = 0;
       
   123     
       
   124     /**
       
   125      * Fetches full video details
       
   126      * 
       
   127      * @param aSelected Index of selected item
       
   128       * @return Content full details
       
   129      */
       
   130     virtual CVcxNsContent* GetFullDetailsL ( TInt aSelected ) = 0;
       
   131     
       
   132     /**
       
   133      * Save content view highlight for currently active category. 
       
   134      * @param aHighlight Highlight index to save.
       
   135      */
       
   136     virtual void SetContentHighlight( TInt aHighlight ) = 0;
       
   137     
       
   138     };
       
   139 
       
   140 #endif // MVCXNSAPPCONTENTPROVIDERIF_H