pushmtm/MtmUiInc/PushViewServiceOp.h
branchRCL_3
changeset 64 6385c4c93049
parent 63 4baee4f15982
child 65 8e6fa1719340
equal deleted inserted replaced
63:4baee4f15982 64:6385c4c93049
     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:  Declaration of CPushViewServiceOp.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef PUSHVIEWSERVICEOP_H
       
    21 #define PUSHVIEWSERVICEOP_H
       
    22 
       
    23 // INCLUDE FILES
       
    24 
       
    25 #include "PushMtmUiOperation.h"
       
    26 #include <e32base.h>
       
    27 #include <apparc.h>
       
    28 #include <apaserverapp.h>
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 
       
    32 class CDocumentHandler;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37 * This asynchronous operation is responsible for launching the appropriate 
       
    38 * application (embedded if possible) that is capable of rendering the content 
       
    39 * of a SP simple push message.
       
    40 * The operation uses the Document Handler to lauch the appropriate handler 
       
    41 * application for the given content.
       
    42 */
       
    43 class CPushViewServiceOp : public CPushMtmUiOperation,
       
    44                            public MAknServerAppExitObserver
       
    45     {
       
    46     public: // Constructors and destructor
       
    47 
       
    48         /**
       
    49         * Constructor.
       
    50         * @param aSession Message Server Session to be used by this operation.
       
    51         * @param aEntryId Id of entry to operate on.
       
    52         * @param aObserverStatus Observer's status.
       
    53         */
       
    54         CPushViewServiceOp( CMsvSession& aSession, 
       
    55                             TMsvId aEntryId, 
       
    56                             TRequestStatus& aObserverStatus );
       
    57 
       
    58         /**
       
    59         * Destructor.
       
    60         */
       
    61         virtual ~CPushViewServiceOp();
       
    62 
       
    63     public: // Functions from CPushMtmOperation
       
    64 
       
    65         /**
       
    66         * Start or restart the operation.
       
    67         * Current implementation calls Cancel and invokes RunL.
       
    68         * Derived classes may override this.
       
    69         */
       
    70         void StartL();
       
    71 
       
    72     protected: // Functions from base classes
       
    73 
       
    74         /**
       
    75         * Current implementation calls SignalObserver( KErrNone ).
       
    76         * Derived classes should override this and also should 
       
    77         * call SignalObserver.
       
    78         */
       
    79         void RunL();
       
    80 
       
    81         /**
       
    82         * Cancel protocol implementation.
       
    83         */
       
    84         void DoCancel();
       
    85 
       
    86         /**
       
    87         * Leave handler protocol implementation: it is called when 
       
    88         * RunL leaves. The observer is signaled if a leave occures. 
       
    89         * The leave code is not forwarded to the scheduler.
       
    90         */
       
    91         TInt RunError( TInt aError );
       
    92 
       
    93     protected: // From MAknServerAppExitObserver
       
    94 
       
    95         void HandleServerAppExit( TInt aReason );
       
    96 
       
    97     private: // Data
       
    98 
       
    99         CDocumentHandler* iDocHandler; ///< Owned.
       
   100     };
       
   101 
       
   102 #endif // PUSHVIEWSERVICEOP_H
       
   103 
       
   104 // End of file.