mobilemessaging/mmsui/viewerinc/MmsViewerChangeSlideOperation.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2002-2006 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 "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 *       CMmsViewerChangeSlideOperation, asynchronous operation for object saving
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef __MMSVIEWERCHANGESLIDEOPERATION_H
       
    23 #define __MMSVIEWERCHANGESLIDEOPERATION_H
       
    24 
       
    25 // INCLUDES
       
    26 
       
    27 #include <e32base.h>
       
    28 #include <e32std.h>
       
    29 
       
    30 #include <unislideloader.h>
       
    31 #include "UniMmsViewerDocument.h"
       
    32 
       
    33 #include "MmsViewerOperation.h"
       
    34 
       
    35 
       
    36 // CONSTANTS
       
    37 
       
    38 // MACROS
       
    39 
       
    40 // FORWARD DECLARATIONS
       
    41 
       
    42 class CMmsViewerHeader;
       
    43 class CMsgEditorView;
       
    44 
       
    45 // DATA TYPES
       
    46 
       
    47 // FUNCTION PROTOTYPES
       
    48 
       
    49 // CLASS DECLARATION
       
    50 
       
    51 /**
       
    52 * CMmsViewerChangeSlideOperation, Storage for single attachment in presentation. 
       
    53 *
       
    54 * @since 2.0
       
    55 */
       
    56 class CMmsViewerChangeSlideOperation : public CMmsViewerOperation,
       
    57                                        public MUniSlideLoaderObserver
       
    58     {
       
    59     public:  // New methods
       
    60 
       
    61         /**
       
    62         * Factory method that creates this object.
       
    63         *
       
    64         * @since    3.0
       
    65         */
       
    66         CMmsViewerChangeSlideOperation(
       
    67             MMmsViewerOperationObserver& aOperationObserver,
       
    68             CMmsViewerDocument& aDocument,
       
    69             CMmsViewerHeader& aHeader,
       
    70             CUniSlideLoader& aSlideLoader,
       
    71             CMsgEditorView& aView,
       
    72             RFs& aFs );
       
    73 
       
    74         /**
       
    75         * Destructor
       
    76         *
       
    77         * @since    3.0
       
    78         */
       
    79         virtual ~CMmsViewerChangeSlideOperation();
       
    80 
       
    81         /**
       
    82         *
       
    83         */
       
    84         void ChangeSlide( TInt aNextNum );
       
    85 
       
    86         /** 
       
    87         * Reloads control
       
    88         */
       
    89         void ReLoadControlL( CMsgMediaControl* aControl, CUniObject* aObject );
       
    90 
       
    91     private:
       
    92 
       
    93         /**
       
    94         * From MMms/UniSlideLoaderObserver
       
    95         */
       
    96         void SlideLoadReady( TInt aError );
       
    97 
       
    98         /**
       
    99         * From CActive
       
   100         */
       
   101         void DoCancel();
       
   102 
       
   103         /**
       
   104         * From CActive
       
   105         */
       
   106         void RunL();
       
   107     
       
   108         /**
       
   109         * From CActive
       
   110         */
       
   111         TInt RunError( TInt aError );
       
   112 
       
   113         /**
       
   114         *
       
   115         */
       
   116         void DoChangeSlideStepL();
       
   117 
       
   118         /**
       
   119         *
       
   120         */
       
   121         void DoResetViewL();
       
   122 
       
   123         /**
       
   124         *
       
   125         */
       
   126         void DoLoadL();
       
   127 
       
   128         /**
       
   129         *
       
   130         */
       
   131         void DoFinalizeL();
       
   132 
       
   133     protected: 
       
   134        
       
   135         /**
       
   136         * 2nd phase constructor.
       
   137         *
       
   138         * @since    2.0
       
   139         */
       
   140         void ConstructL();
       
   141 
       
   142     protected: // data
       
   143 
       
   144         enum TMmsViewerChangeSlideState
       
   145             {
       
   146             EMmsViewerChangeSlideResetView,
       
   147             EMmsViewerChangeSlideLoad,
       
   148             EMmsViewerChangeSlideFinalize,
       
   149             EMmsViewerChangeSlideEnd
       
   150             };
       
   151 
       
   152         CMmsViewerHeader&           iHeader;
       
   153         CUniSlideLoader&            iSlideLoader;
       
   154         CMsgEditorView&             iView;
       
   155         TInt                        iNextNum;
       
   156 
       
   157         TMmsViewerChangeSlideState  iChangeSlideState;
       
   158     };
       
   159 
       
   160 #endif // __MMSVIEWERCHANGESLIDEOPERATION_H