videofeeds/clientapi/inc/MIptvMyVideosClientObserver.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2006-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:    My Videos Client API*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MIPTVMYVIDEOSCLIENTOBSERVER_H
       
    21 #define MIPTVMYVIDEOSCLIENTOBSERVER_H
       
    22 
       
    23 #include "CIptvUtil.h"
       
    24 
       
    25 /**
       
    26  * Observer for My Videos API that needs to be implemented by application.
       
    27  *
       
    28  * @lib IptvClientApi.dll
       
    29  */
       
    30 class MIptvMyVideosClientObserver
       
    31     {
       
    32 
       
    33 public:
       
    34 
       
    35     /**
       
    36      * The event type for ContentsUpdated callback method.
       
    37      */
       
    38     enum TIptvContentUpdatedEventType
       
    39         {
       
    40         EContentUpdated,    // Major changes, all content should be updated
       
    41         EAdded,             // Individual video added
       
    42         EUpdated,           // Individual video updated
       
    43         ERemoved            // Individual video deleted
       
    44         };
       
    45 
       
    46     /**
       
    47      * Helper event class for ContentsUpdated callback method.
       
    48      */
       
    49     class TIptvContentUpdatedEvent
       
    50         {
       
    51 
       
    52     public:
       
    53 
       
    54         /**
       
    55          * The type of the change
       
    56          */
       
    57         TIptvContentUpdatedEventType    iEventType;
       
    58 
       
    59         /**
       
    60          * The drive number, this can be 0 in some cases.
       
    61          */
       
    62         TInt iDrive;
       
    63 
       
    64         /**
       
    65          * Drive specific file ID identifier, this can be 0 in some cases.
       
    66          */
       
    67         TIptvFileId iFileId;
       
    68         };
       
    69 
       
    70 // New functions
       
    71 
       
    72     /**
       
    73      * Asynchronous callback observer function signaling application that
       
    74      * My Videos video contents has changed.
       
    75      */
       
    76     virtual void ContentsUpdated( TIptvContentUpdatedEvent aEvent ) = 0;
       
    77 
       
    78     /**
       
    79      * Asynchronous response callback function to video GetTotalVideoLenght().
       
    80      * Result is provided asynchronously because calculation may take some
       
    81      * time.
       
    82      *
       
    83      * @param aTotalPlayTime Total play time in seconds.
       
    84      * @param aTotalFileSize Total file size in kilo bytes.
       
    85      */
       
    86     virtual void TotalVideoLenghtResponse(
       
    87         TIptvPlayTime aTotalPlayTime,
       
    88         TIptvFileSize aTotalFileSize ) = 0;
       
    89 
       
    90     /**
       
    91      * Asynchronous callback function signaling that copy or move operation
       
    92      * has been finished.
       
    93      *
       
    94      * @param aServerStatus    Request status.
       
    95      *                           KErrNone if no error,
       
    96      *                           KErrCancel if cancelled, etc.
       
    97      * @param aOperationStatus Status of actual copy or move operation.
       
    98      *                           KErrNone if no error,
       
    99      *                           KErrDiskFull if disk full, etc.
       
   100      * @param aFailed          If several items was copied or moved and some
       
   101      *                         failed, the count of failed items.
       
   102      */
       
   103     virtual void CopyOrMoveResponse(
       
   104         TInt aServerStatus,
       
   105         TInt aOperationStatus,
       
   106         TInt aFailed ) = 0;
       
   107 
       
   108     /**
       
   109      * Asynchronous callback function signaling that delete operation has
       
   110      * been finished.
       
   111      *
       
   112      * @param aStatus Status of delete operation.
       
   113      *                  KErrNone if no error,
       
   114      *                  KErrDiskFull if disk full, etc.
       
   115      */
       
   116     virtual void DeleteResponse( TInt aStatus ) = 0;
       
   117 
       
   118     };
       
   119 
       
   120 #endif // MIPTVMYVIDEOSCLIENTOBSERVER_H