videofeeds/utils/inc/iptvlastwatchedapi.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 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 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:    Interface for getting and setting the Video Center's last*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_IPTVLASTWATCHEDAPI_H
       
    21 #define C_IPTVLASTWATCHEDAPI_H
       
    22 
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 class CIptvLastWatchedData;
       
    27 
       
    28 /**
       
    29  *  Last watched API
       
    30  *
       
    31  *  VideoCenter Main UI has the last watched item, data of that item can be set 
       
    32  *  and get via this API. This needs to be used only when there is no Space UI 
       
    33  *  support available, but last watched item's data should be accessible.
       
    34  *
       
    35  *  @lib IptvUtil.lib
       
    36  *  @since S60 v3.1
       
    37  */
       
    38 class CIptvLastWatchedApi : public CBase
       
    39     {
       
    40 
       
    41 public:
       
    42 
       
    43     IMPORT_C static CIptvLastWatchedApi* NewL();
       
    44     IMPORT_C static CIptvLastWatchedApi* NewLC();
       
    45 
       
    46     /**
       
    47      * Destructor.
       
    48      */
       
    49     virtual ~CIptvLastWatchedApi();
       
    50 
       
    51     /**
       
    52      * Overwrites the last watched data to local datafile with given data.
       
    53      * If given data is invalid, previous data will be lost anyway.
       
    54      * Creates the datafile if necessary.
       
    55      *
       
    56      * @since S60 v3.1
       
    57      * @param aData data to be set
       
    58      * @return System-wide error code
       
    59      */
       
    60     IMPORT_C TInt SetLastWatchedDataL( CIptvLastWatchedData& aData );
       
    61 
       
    62     /**
       
    63      * Gets the last watched data from local datafile.
       
    64      *
       
    65      * @since S60 v3.1
       
    66      * @param aData data to be get
       
    67      * @return System-wide error code
       
    68      */
       
    69     IMPORT_C TInt GetLastWatchedDataL( CIptvLastWatchedData& aData );
       
    70 
       
    71     /**
       
    72      * Updates last play point to last watched local datafile.
       
    73      *
       
    74      * @since S60 v3.2
       
    75      * @param aLastVideoPlayPoint New last play point.
       
    76      * @return System-wide error code
       
    77      */
       
    78     IMPORT_C TInt UpdateLastVideoPlayPointL(
       
    79         const TUint32 aLastVideoPlayPoint );
       
    80 
       
    81 private:
       
    82 
       
    83     CIptvLastWatchedApi();
       
    84 
       
    85     void ConstructL();
       
    86     
       
    87 private: // data
       
    88 
       
    89     /**
       
    90      * File server session.
       
    91      */
       
    92     RFs iFsSession;
       
    93     
       
    94     };
       
    95 
       
    96 #endif // C_IPTVLASTWATCHEDAPI_H