browserutilities/browserdialogsprovider/Inc/PhotoOperationWait.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 2002 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 __PHOTOOPERATIONWAIT_H
       
    22 #define __PHOTOOPERATIONWAIT_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 #include <apparc.h>
       
    27 #include <AknServerApp.h>
       
    28 
       
    29 //  FORWARD DECLARATIONS
       
    30 
       
    31 //  CONSTANTS
       
    32 
       
    33 
       
    34 /**
       
    35 *  Helper class for Async2Sync trick.
       
    36 *  
       
    37 *  @lib Browser.app
       
    38 *  @since Series 60 1.2
       
    39 */
       
    40 class CPhotoOperationWait:  public CActive,
       
    41                             public MAknServerAppExitObserver
       
    42 
       
    43     {
       
    44     public:     // New functions
       
    45         
       
    46         /**
       
    47         * Set view activation
       
    48         * @since 1.2
       
    49         * @param aViewActivate
       
    50         */
       
    51         void SetViewActivate( TBool aViewActivate );
       
    52         
       
    53         /**
       
    54         * Is view activation started?
       
    55         * @since 1.2
       
    56         * @return ETrue if view activation is started
       
    57         */
       
    58         TBool IsStarted();
       
    59                                 
       
    60         /**
       
    61         * Two-phased constructor.
       
    62         * @param aPriority Execution priority
       
    63         */
       
    64         static CPhotoOperationWait* NewL( TInt aPriority = EPriorityStandard );
       
    65         
       
    66         /**
       
    67         * Destructor.
       
    68         */
       
    69         ~CPhotoOperationWait();
       
    70 
       
    71     public:     // From MApaEmbeddedDocObserver
       
    72 
       
    73         /**        
       
    74         * @since 3.0
       
    75         * @param aMode Exit mode
       
    76         */
       
    77         void HandleServerAppExit( TInt aReason );
       
    78            
       
    79     public:     // From CActive 
       
    80         
       
    81         void Activate();  
       
    82         void Wait();
       
    83         void RunL();
       
    84         void DoCancel();
       
    85 
       
    86     
       
    87     public:
       
    88         /**
       
    89         * Open the active scheduler.
       
    90         * @since 1.2
       
    91         * @return -
       
    92         */
       
    93         void OpenPhotoalbum();
       
    94     
       
    95     
       
    96         /**
       
    97         * Stop the active scheduler.
       
    98         * @since 1.2
       
    99         * @return - 
       
   100         */
       
   101         void ClosePhotoAlbumObserver();
       
   102     
       
   103     
       
   104     protected:    // New functions
       
   105         
       
   106         /**
       
   107         * @since 1.2
       
   108         * @param aPriority Execution priority
       
   109         */
       
   110         CPhotoOperationWait( TInt aPriority );
       
   111     
       
   112     private:    // Data
       
   113         
       
   114         CActiveSchedulerWait iSafeWait;
       
   115         TBool iViewActivate;
       
   116     };
       
   117 
       
   118 #endif  //__PHOTOOPERATIONWAIT_H