landmarks/locationlandmarks/localaccess/inc/EPos_CPosLmLocalInternalOpActive.h
changeset 0 667063e416a2
equal deleted inserted replaced
-1:000000000000 0:667063e416a2
       
     1 /*
       
     2 * Copyright (c) 2005 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: Active help object for running an internal operation.
       
    15 *
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPOSLMLOCALINTERNALOPACTIVE_H
       
    21 #define CPOSLMLOCALINTERNALOPACTIVE_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class MPosLmLocalInternalOpExecutor;
       
    30 class CPosLmOperation;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 * Active help object for running an internal operation.
       
    36 */
       
    37 NONSHARABLE_CLASS(CPosLmLocalInternalOpActive) : public CActive
       
    38     {
       
    39     public:  // Constructors and destructor
       
    40 
       
    41         /**
       
    42         * Two-phased constructor.
       
    43         * @param aExecutor An internal operation executor.
       
    44         * @param aOp An internal operation.
       
    45         */
       
    46         static CPosLmLocalInternalOpActive* NewL(
       
    47         /* IN */        MPosLmLocalInternalOpExecutor& aExecutor,
       
    48         /* IN */        CPosLmOperation* aOp
       
    49         );
       
    50 
       
    51         /**
       
    52         * Destructor.
       
    53         */
       
    54         virtual ~CPosLmLocalInternalOpActive();
       
    55 
       
    56      public: // New functions
       
    57 
       
    58         /**
       
    59         * Performs a single step of the internal operation asynchronously using
       
    60         * this active object.
       
    61         *
       
    62         * @param aClientStatus Client status; will be sent back to the executor
       
    63         *   when the asynchronous call to the internal operation completes.
       
    64         * @param aClientProgress Client progress; will be sent back to the
       
    65         *   executor when the asynchronous call to the internal operation
       
    66         *   completes.
       
    67         */
       
    68         void DoNext(
       
    69         /* IN */        TRequestStatus& aClientStatus,
       
    70         /* IN */        TReal32& aClientProgress
       
    71         );
       
    72 
       
    73         /**
       
    74         * Performs a single step of the internal operation without using this
       
    75         * active object to run it.
       
    76         *
       
    77         * @param aStatus A request status.
       
    78         * @param aProgress Progress of the internal operation.
       
    79         */
       
    80         void InternalOpNextStep(
       
    81         /* IN */        TRequestStatus& aStatus,
       
    82         /* IN */        TReal32& aProgress
       
    83         );
       
    84 
       
    85     public: // Functions from base classes
       
    86 
       
    87         /**
       
    88         * From CActive.
       
    89         *
       
    90         * Implements cancellation of an outstanding request.
       
    91         */
       
    92         void DoCancel();
       
    93 
       
    94         /**
       
    95         * From CActive.
       
    96         *
       
    97         * Handles request completion event.
       
    98         */
       
    99         void RunL();
       
   100 
       
   101     private:
       
   102 
       
   103         /**
       
   104         * C++ default constructor.
       
   105         * @param aExecutor An internal operation executor.
       
   106         * @param aOp An internal operation.
       
   107         */
       
   108         CPosLmLocalInternalOpActive(
       
   109         /* IN */        MPosLmLocalInternalOpExecutor& aExecutor,
       
   110         /* IN */        CPosLmOperation* aOp
       
   111         );
       
   112 
       
   113         // Prohibit copy constructor if not deriving from CBase.
       
   114         CPosLmLocalInternalOpActive(
       
   115             const CPosLmLocalInternalOpActive&);
       
   116         // Prohibit assigment operator if not deriving from CBase.
       
   117         CPosLmLocalInternalOpActive& operator=(
       
   118             const CPosLmLocalInternalOpActive&);
       
   119 
       
   120     private:    // Data
       
   121 
       
   122         // Internal op executor
       
   123         MPosLmLocalInternalOpExecutor* iExecutor;
       
   124 
       
   125         // Internal op
       
   126         CPosLmOperation* iOp;
       
   127 
       
   128         TReal32 iProgress;
       
   129 
       
   130          // Client status
       
   131         TRequestStatus* iClientStatus;
       
   132 
       
   133         // Client progress
       
   134         TReal32* iClientProgress;
       
   135 
       
   136     };
       
   137 
       
   138 #endif      // CPOSLMLOCALINTERNALOPACTIVE_H
       
   139 
       
   140 // End of File