phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerActive.h
changeset 0 ff3b6d0fd310
child 19 7d48bed6ce0c
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     1 /*
       
     2 * Copyright (c) 2002-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:  Declaration of CPhoneHandlerActive class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPHONEHANDLERACTIVE_H
       
    20 #define CPHONEHANDLERACTIVE_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 // CONSTANTS
       
    26 
       
    27 // MACROS
       
    28 
       
    29 // DATA TYPES
       
    30 
       
    31 // FUNCTION PROTOTYPES
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class MPhoneHandlerObserver;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39 *  Active object used to call asynchronous requests.
       
    40 *
       
    41 *  @lib PhoneCmdHandler
       
    42 *  @since S60 3.1
       
    43 */
       
    44 NONSHARABLE_CLASS( CPhoneHandlerActive ) : public CActive
       
    45 	{
       
    46 	public:	// Constructors and destructor
       
    47 	
       
    48 		/**
       
    49         * Two-phased constructor.
       
    50         */
       
    51 		static CPhoneHandlerActive* NewL( MPhoneHandlerObserver& aObserver );
       
    52 	
       
    53 		/**
       
    54         * Destructor.
       
    55         */
       
    56 		~CPhoneHandlerActive();
       
    57 	
       
    58 	public: // New functions
       
    59 	
       
    60 		/**
       
    61         * From CActive. Indicates that the active object has issued a request 
       
    62         * and that it is now outstanding.  
       
    63         * @since S60 3.1
       
    64         * @return 
       
    65         */
       
    66 		void SetActive();
       
    67 		
       
    68 	public: // Functions from base classes
       
    69 		
       
    70 	protected:  // New functions
       
    71     
       
    72     protected:  // Functions from base classes
       
    73     
       
    74     	/**
       
    75         * From CActive. Handles an active object’s request completion event.
       
    76         */
       
    77     	void RunL();
       
    78 	
       
    79 		/**
       
    80         * From CActive. Implements cancellation of an outstanding request.
       
    81         */
       
    82 		void DoCancel();
       
    83 	
       
    84 		/**
       
    85         * From CActive. Handles a leave occurring in the request completion 
       
    86         * event handler RunL().
       
    87         */
       
    88 		TInt RunError( TInt aError );
       
    89 
       
    90 	private:
       
    91 		
       
    92 		/**
       
    93         * C++ default constructor.
       
    94         */
       
    95 		CPhoneHandlerActive( MPhoneHandlerObserver& aObserver );
       
    96 	
       
    97 		/**
       
    98         * By default Symbian 2nd phase constructor is private.
       
    99         */
       
   100 		void ConstructL();
       
   101 	
       
   102 	public:     // Data
       
   103     
       
   104     protected:  // Data
       
   105     
       
   106     private:    // Data
       
   107 		
       
   108 		// Notifies caller of an asynchronous request when request has been 
       
   109 		// completed.  
       
   110 		MPhoneHandlerObserver& iObserver;
       
   111 		
       
   112 	public:     // Friend classes
       
   113 
       
   114     protected:  // Friend classes
       
   115 
       
   116     private:    // Friend classes
       
   117 	};
       
   118 
       
   119 #endif // CPHONEHANDLERACTIVE_H
       
   120 
       
   121 // End of File