phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerResponse.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 CPhoneHandlerResponse class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPHONEHANDLERRESPONSE_H
       
    20 #define CPHONEHANDLERRESPONSE_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include "PhoneHandlerService.h"
       
    24 #include "PhoneHandlerObserver.h"
       
    25 #include <RemConExtensionApi.h>
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // MACROS
       
    30 
       
    31 // DATA TYPES
       
    32 
       
    33 // FUNCTION PROTOTYPES
       
    34 
       
    35 // FORWARD DECLARATIONS
       
    36 class CPhoneHandlerControl;
       
    37 class CPhoneHandlerActive;
       
    38 
       
    39 // CLASS DECLARATION
       
    40 
       
    41 /**
       
    42 *  Handles answer call key press.
       
    43 *
       
    44 *  @lib PhoneCmdHandler
       
    45 *  @since S60 3.1
       
    46 */
       
    47 NONSHARABLE_CLASS( CPhoneHandlerResponse ) : public CBase,
       
    48 											 public MPhoneHandlerService,
       
    49 											 public MPhoneHandlerObserver
       
    50 											   
       
    51     {
       
    52     public:  // Constructors and destructor
       
    53         
       
    54         /**
       
    55         * Two-phased constructor.
       
    56         */
       
    57         static CPhoneHandlerResponse* NewL( CPhoneHandlerControl& aControl );
       
    58         
       
    59         /**
       
    60         * Destructor.
       
    61         */
       
    62         virtual ~CPhoneHandlerResponse();
       
    63 
       
    64     public: // New functions
       
    65     
       
    66     	/**
       
    67         * Sets response message. This method has to be called before Process() 
       
    68         * is called.
       
    69         * @since S60 3.1
       
    70         * @param aOperation operation to which response is sent
       
    71         * @param aError Symbian OS error code
       
    72         * @return void
       
    73         */
       
    74         void SetResponse( TRemConExtCallHandlingApiOperationId aOperation, 
       
    75     					  TInt aError );
       
    76 	            
       
    77     public: // Functions from base classes
       
    78         
       
    79         /**
       
    80         * From MPhoneHandlerService. Sends response to RemCon FW.
       
    81         * @since S60 3.1
       
    82         * @return void
       
    83         */
       
    84         void Process();
       
    85         
       
    86         /**
       
    87         * From MPhoneHandlerService. Deletes service.
       
    88         * @since S60 3.1
       
    89         * @return void
       
    90         */
       
    91         void Delete();
       
    92         
       
    93         /**
       
    94         * From MPhoneHandlerObserver. Notifies when asynchronous request has 
       
    95         * been completed.
       
    96         * @since S60 3.1
       
    97         * @param aError request error code
       
    98         * @return void
       
    99         */
       
   100         void RequestCompleted( const TInt aError );
       
   101                     
       
   102     protected:  // New functions
       
   103             
       
   104     protected:  // Functions from base classes
       
   105         
       
   106     private:
       
   107 
       
   108         /**
       
   109         * C++ default constructor.
       
   110         */
       
   111         CPhoneHandlerResponse( CPhoneHandlerControl& aControl );
       
   112 
       
   113         /**
       
   114         * By default Symbian 2nd phase constructor is private.
       
   115         */
       
   116         void ConstructL();
       
   117     
       
   118     public:     // Data
       
   119     
       
   120     protected:  // Data
       
   121     
       
   122     private:    // Data
       
   123     
       
   124         // active object for asynchronous requests
       
   125         CPhoneHandlerActive* iActive;
       
   126         
       
   127         // reference to control
       
   128         CPhoneHandlerControl& iControl;
       
   129         
       
   130         // iOperation is used to give response to exact RemConExtensionApi
       
   131         // command
       
   132         TRemConExtCallHandlingApiOperationId iOperation;
       
   133         
       
   134         // Response code
       
   135         TInt iError;
       
   136     
       
   137     public:     // Friend classes
       
   138    
       
   139     protected:  // Friend classes
       
   140    
       
   141     private:    // Friend classes
       
   142    
       
   143     };
       
   144 
       
   145 #endif      // CPHONEHANDLERRESPONSE_H   
       
   146             
       
   147 // End of File