videoplayerapp/mpxvideoplayer/inc/mpxvideoplayeriadupdate.h
branchRCL_3
changeset 64 3eb824b18d67
equal deleted inserted replaced
60:f87e8c4ac026 64:3eb824b18d67
       
     1 /*
       
     2 * Copyright (c) 2004-2010 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:    IAD update handling.
       
    15 * 
       
    16 */
       
    17 
       
    18 
       
    19 // Version : %version: 1 %
       
    20 
       
    21 
       
    22 #ifndef CMPXVIDEOPLAYERIADUPDATE_H
       
    23 #define CMPXVIDEOPLAYERIADUPDATE_H
       
    24 
       
    25 #include <e32std.h>
       
    26 #include <iaupdateobserver.h>
       
    27 
       
    28 class CIAUpdate;
       
    29 class CIAUpdateParameters;
       
    30 class MMPXViewUtility;
       
    31 
       
    32 
       
    33 /**
       
    34  * This class handles IAD update.
       
    35  */
       
    36 NONSHARABLE_CLASS( CMpxVideoPlayerIadUpdate ) : public CBase, public MIAUpdateObserver
       
    37     {
       
    38 
       
    39 public: // Constructors and destructor
       
    40 
       
    41     /**
       
    42      * Two-phased constructor.
       
    43      * @param aViewUtility Reference to view utility
       
    44      */
       
    45     static CMpxVideoPlayerIadUpdate* NewL( MMPXViewUtility& aViewUtility );
       
    46 
       
    47     /**
       
    48      * Destructor.
       
    49      */
       
    50     virtual ~CMpxVideoPlayerIadUpdate();
       
    51    
       
    52 public: // New methods
       
    53 
       
    54     /**
       
    55      * Start IAD update process.
       
    56      */
       
    57     void StartL();
       
    58 
       
    59 private: // Constructors and destructor
       
    60 
       
    61     /**
       
    62      * C++ default constructor.
       
    63      * @param aViewUtility Reference to view utility
       
    64      */
       
    65     CMpxVideoPlayerIadUpdate( MMPXViewUtility& aViewUtility );
       
    66 
       
    67     /**
       
    68     * By default Symbian 2nd phase constructor is private.
       
    69     */
       
    70     void ConstructL();
       
    71 
       
    72 private: // New methods
       
    73 
       
    74     /** 
       
    75      * From MIAUpdateObserver.
       
    76      * This callback function is called when the update checking operation has completed.
       
    77      *
       
    78      * @param aErrorCode The error code of the observed update operation.
       
    79      *                   KErrNone for successful completion, 
       
    80      *                   otherwise a system wide error code.
       
    81      * @param aAvailableUpdates Number of the updates that were found available.
       
    82      *
       
    83      * @since S60 v3.2
       
    84      */
       
    85     void CheckUpdatesComplete( TInt aErrorCode, TInt aAvailableUpdates );
       
    86 
       
    87 
       
    88     /** 
       
    89      * From MIAUpdateObserver.
       
    90      * This callback function is called when an update operation has completed.
       
    91      * Even if multiple functions are provided to start different update operations,
       
    92      * this callback function is always called after an update operation has completed.
       
    93      *
       
    94      * @param aErrorCode The error code of the completed update operation.
       
    95      *                   KErrNone for successful completion, 
       
    96      *                   otherwise a system wide error code.
       
    97      * @param aResult Details about the completed update operation.
       
    98      *                Ownership is transferred.
       
    99      *
       
   100      * @since S60 v3.2
       
   101      */
       
   102     void UpdateComplete( TInt aErrorCode, CIAUpdateResult* aResultDetails );
       
   103 
       
   104 
       
   105     /** 
       
   106      * From MIAUpdateObserver.
       
   107      * This callback function is called when an update query operation has completed.
       
   108      *
       
   109      * @param aErrorCode The error code of the observed query operation.
       
   110      *                   KErrNone for successful completion, 
       
   111      *                   otherwise a system wide error code.
       
   112      * @param aUpdateNow ETrue informs that an update operation should be started.
       
   113      *                   EFalse informs that there is no need to start an update
       
   114      *                   operation.
       
   115      * @since Series 60 3.2
       
   116      */
       
   117     void UpdateQueryComplete( TInt aErrorCode, TBool aUpdateNow );
       
   118 
       
   119 
       
   120     /**
       
   121      * Parses SDP file.
       
   122      * @since Series 60 3.2
       
   123      * @param none.
       
   124      * @return none.
       
   125      */
       
   126     void Delete();
       
   127 
       
   128 private: // Data
       
   129 
       
   130     /**
       
   131      * IAD update API.
       
   132      */
       
   133     CIAUpdate* iUpdate;
       
   134 
       
   135     /**
       
   136      * IAD update parameters.
       
   137      */
       
   138     CIAUpdateParameters* iParameters;
       
   139 
       
   140     /**
       
   141      * Reference to view utility.
       
   142      */
       
   143     MMPXViewUtility& iViewUtility;
       
   144 
       
   145     };
       
   146 
       
   147 #endif // CMPXVIDEOPLAYERIADUPDATE_H
       
   148