videofeeds/vcnsuiengine/inc/vcxnsserviceproviderif.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_VCXNSAPPSERVICEPROVIDERIF_H
       
    22 #define M_VCXNSAPPSERVICEPROVIDERIF_H
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32base.h>
       
    26 
       
    27 // CLASS DECLARATION
       
    28 class MVcxNsServiceProviderObserver;
       
    29 class CVcxNsService;
       
    30 
       
    31 /**
       
    32 * Class MVcxNsServiceProviderIf 
       
    33 * Interface for using UI engine's service provider
       
    34 *
       
    35 * @lib vcxnsuiengine.lib
       
    36 */
       
    37 class MVcxNsServiceProviderIf
       
    38     {
       
    39 
       
    40 public:
       
    41 
       
    42     /**
       
    43      * RegisterObserver.
       
    44      * @param aObserver Observer
       
    45      */
       
    46     virtual void RegisterObserver( MVcxNsServiceProviderObserver* aObserver ) = 0;
       
    47 
       
    48     /**
       
    49      * DeRegisterObserver.
       
    50      * @param aObserver Observer
       
    51      */
       
    52     virtual void DeRegisterObserver( MVcxNsServiceProviderObserver* aObserver ) = 0;
       
    53 
       
    54     /**
       
    55      * Gets all subscribed services.
       
    56      *
       
    57      * @return Vod services.
       
    58      */
       
    59     virtual RPointerArray<CVcxNsService>& GetSubscribedServicesL() = 0 ;
       
    60     
       
    61     /**
       
    62      * Gets all services under active service group.
       
    63      * @return Group service list for active service group.
       
    64      */
       
    65     virtual RPointerArray<CVcxNsService>& GetActiveGroupListL() = 0;
       
    66 
       
    67     /**
       
    68      * Opens selected service.
       
    69      *
       
    70      * @param aIndex Index of the service to be opened.
       
    71      */
       
    72     virtual void OpenServiceL( TInt aIndex ) = 0 ;
       
    73 
       
    74     /**
       
    75      * Open service with given service id. 
       
    76      * 
       
    77      * @param aServiceId Id of service to open
       
    78      */
       
    79     virtual void OpenServiceL( TUint32 aServiceId ) = 0;
       
    80 
       
    81     /**
       
    82      * Remove service
       
    83      *
       
    84      * @param aIndex Index of the service to be removed.
       
    85      */
       
    86     virtual void RemoveServiceL( TInt aIndex ) = 0;
       
    87     
       
    88     /**
       
    89      * Get pointer to service data
       
    90      * @param aIndex Index of the service in list
       
    91      * @return Pointer to service data.
       
    92      *         NULL returned, if service data not found
       
    93      */
       
    94     virtual CVcxNsService* GetServiceData( TInt aIndex ) = 0;
       
    95     
       
    96     /**
       
    97      * Return pointer to active service data
       
    98      * @return Pointer to active service data.
       
    99      *         NULL returned, if service data not found
       
   100      */
       
   101     virtual CVcxNsService* GetActiveServiceData() = 0;
       
   102 
       
   103     /**
       
   104      * Handle the back command by choosing new application state.
       
   105      * @return Was the back event consumed. If EFalse, 
       
   106      *         the back event should be handled by caller.     
       
   107      */
       
   108     virtual TBool HandleBack() = 0;
       
   109 
       
   110     /**
       
   111      * Start ecg update for all visible feeds.
       
   112      */
       
   113     virtual void RefreshAllServicesL() = 0;
       
   114     
       
   115     /**
       
   116      * Open video directory.
       
   117      */
       
   118     virtual void OpenVideoDirectoryL() = 0;
       
   119 
       
   120     /**
       
   121      * Manage account for selected service.
       
   122      * @param aSelected Selected item index
       
   123      */
       
   124     virtual void ManageAccountL( TInt aSelected ) = 0;
       
   125     
       
   126     /**
       
   127      * Save authentication data for service.
       
   128      * This handles data for active service.
       
   129      * @param aUserName username
       
   130      * @param aPasswd passwd
       
   131      */
       
   132     virtual void SetAuthenticationDataL( 
       
   133             const TDesC& aUserName, 
       
   134             const TDesC& aPasswd ) = 0;
       
   135 
       
   136     /**
       
   137       * Checks if feed has more details than just name
       
   138       * 
       
   139       * @param aSelected Index of selected item
       
   140       * @return Does the feed have other details than just name
       
   141       */
       
   142      virtual TBool HasFeedDetails( TInt aSelected ) = 0;
       
   143      
       
   144      /**
       
   145       * Moves a service from given position to another.
       
   146       * 
       
   147       * @param aSourceIndex where from move the service
       
   148       * @param aTargetIndex  where to move the service.
       
   149       * @return error code
       
   150       */
       
   151      virtual TInt MoveServiceL( TInt aSourceIndex, TInt aTargetIndex ) = 0;
       
   152      
       
   153      /**
       
   154       * Check if item has account management uri.
       
   155       * @param aSelected Index of selected item.
       
   156       * @return ETrue if account management uri available.
       
   157       */
       
   158      virtual TBool HasAccountManagementUri( TInt aSelected ) = 0;
       
   159      
       
   160     };
       
   161 
       
   162 #endif // MVCXNSAPPSERVICEPROVIDERIF_H