javamanager/javainstaller/appinstuiplugin/inc/asyncwaitcallback.h
branchRCL_3
changeset 14 04becd199f91
equal deleted inserted replaced
13:f5050f1da672 14:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2005-2009 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:  This class implements general wait object for calling a desired
       
    15 *                callback function after asynchronous notification
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef ASYNCWAITCALLBACK_H
       
    22 #define ASYNCWAITCALLBACK_H
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 
       
    27 namespace Java
       
    28 {
       
    29 namespace Installer
       
    30 {
       
    31 
       
    32 /**
       
    33  * This class implements wait object for calling a desired
       
    34  * callback function after rendezvous returns specified
       
    35  * reason code from the process that this object is listening to.
       
    36  *
       
    37  */
       
    38 NONSHARABLE_CLASS(CAsyncWaitCallBack) : public CActive
       
    39 {
       
    40 public:  // Constructors and destructor
       
    41 
       
    42     static CAsyncWaitCallBack* NewL(TCallBack aCallBack);
       
    43 
       
    44     // Destructor.
       
    45     virtual ~CAsyncWaitCallBack();
       
    46 
       
    47 public:  // From base classes
       
    48 
       
    49     // from base class CActive
       
    50 
       
    51     void RunL();
       
    52 
       
    53     void DoCancel();
       
    54 
       
    55 public:
       
    56 
       
    57     void Wait(RProcess aProcessToListen, TInt aActivatingReasonCode);
       
    58 
       
    59 
       
    60 private:
       
    61 
       
    62     // Constructor.
       
    63     CAsyncWaitCallBack();
       
    64 
       
    65     // 2nd phase constructor.
       
    66     void ConstructL(TCallBack aCallBack);
       
    67 
       
    68 
       
    69 private: //  Data
       
    70 
       
    71     // Callback member
       
    72     TCallBack   iCallBack;
       
    73 
       
    74     // When request completes with this status code,
       
    75     // callback is called.
       
    76     TInt iActivatingReasonCode;
       
    77 
       
    78     RProcess iProcessToListen;
       
    79 
       
    80 };
       
    81 
       
    82 } // Installer
       
    83 } // Java
       
    84 
       
    85 #endif // ASYNCWAITCALLBACK_H