phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerCallBase.h
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
    18 
    18 
    19 #ifndef CPHONEHANDLERCALLBASE
    19 #ifndef CPHONEHANDLERCALLBASE
    20 #define CPHONEHANDLERCALLBASE
    20 #define CPHONEHANDLERCALLBASE
    21 
    21 
    22 //  INCLUDES
    22 //  INCLUDES
    23 #include "phonehandlerservice.h" 
    23 #include "PhoneHandlerService.h"
    24 #include "phonehandlerobserver.h" 
    24 #include "PhoneHandlerObserver.h"
    25 #include <e32base.h>
    25 #include <e32base.h>
    26 #include <rphcltserver.h> 
    26 #include <RPhCltServer.h>
    27 
    27 
    28 // CONSTANTS
    28 // CONSTANTS
    29 
    29 
    30 // MACROS
    30 // MACROS
    31 
    31 
    44 *
    44 *
    45 *  @lib PhoneCmdHandler
    45 *  @lib PhoneCmdHandler
    46 *  @since S60 3.1
    46 *  @since S60 3.1
    47 */
    47 */
    48 NONSHARABLE_CLASS( CPhoneHandlerCallBase ) : public CBase,
    48 NONSHARABLE_CLASS( CPhoneHandlerCallBase ) : public CBase,
    49                                              public MPhoneHandlerService, 
    49 											 public MPhoneHandlerService, 
    50                                              public MPhoneHandlerObserver
    50 											 public MPhoneHandlerObserver
    51     {
    51     {
    52     protected:  // Constructors and destructor
    52     protected:  // Constructors and destructor
    53         
    53         
    54         /**
    54         /**
    55         * C++ default constructor.
    55         * C++ default constructor.
    63 
    63 
    64     public: // New functions
    64     public: // New functions
    65     
    65     
    66     public: // Functions from base classes
    66     public: // Functions from base classes
    67     
    67     
    68         /**
    68     	/**
    69         * From MPhoneHandlerService. Starts to process an asynchronous request.
    69         * From MPhoneHandlerService. Starts to process an asynchronous request.
    70         * @since Series 60 3.1
    70         * @since Series 60 3.1
    71         * @param 
    71         * @param 
    72         * @return 
    72         * @return 
    73         */
    73         */
    79         * @param 
    79         * @param 
    80         * @return 
    80         * @return 
    81         */
    81         */
    82         virtual void Delete() = 0;
    82         virtual void Delete() = 0;
    83     
    83     
    84         /**
    84     	/**
    85         * From MPhoneHandlerObserver. Notifies when asynchronous request has
    85         * From MPhoneHandlerObserver. Notifies when asynchronous request has
    86         * been completed.
    86         * been completed.
    87         * @since S60 3.1
    87         * @since S60 3.1
    88         * @param aError Result code of request processing.
    88         * @param aError Result code of request processing.
    89         * @return void
    89         * @return void
    90         */
    90         */
    91         virtual void RequestCompleted( const TInt aError ) = 0;
    91         virtual void RequestCompleted( const TInt aError ) = 0;
    92             
    92 	        
    93     protected:  // New functions
    93     protected:  // New functions
    94         
    94         
    95         /**
    95         /**
    96         * Initializes service that executes call handling key presses.
    96         * Initializes service that executes call handling key presses.
    97         * @since S60 3.1
    97         * @since S60 3.1
   105         * @since S60 3.1
   105         * @since S60 3.1
   106         * @param void
   106         * @param void
   107         * @return void
   107         * @return void
   108         */
   108         */
   109         void NextState();
   109         void NextState();
   110         
   110 		
   111         /**
   111 		/**
   112         * Called when service isn't running (e.g. when it's completed).
   112         * Called when service isn't running (e.g. when it's completed).
   113         * @since S60 3.1
   113         * @since S60 3.1
   114         * @param void
   114         * @param void
   115         * @return void
   115         * @return void
   116         */
   116         */
   117         void IdleState();
   117 		void IdleState();
   118         
   118 		
   119         /**
   119 		/**
   120         * Returns an active object's TRequestStatus for asynchronous calls.
   120         * Returns an active object's TRequestStatus for asynchronous calls.
   121         * @since S60 3.1
   121         * @since S60 3.1
   122         * @param void
   122         * @param void
   123         * @return void
   123         * @return void
   124         */
   124         */
   125         TRequestStatus& GetStatus();
   125 		TRequestStatus& GetStatus();
   126         
   126 		
   127         /**
   127 		/**
   128         * Activates an active object for asynchronous calls.
   128         * Activates an active object for asynchronous calls.
   129         * @since S60 3.1
   129         * @since S60 3.1
   130         * @param void
   130         * @param void
   131         * @return void
   131         * @return void
   132         */
   132         */
   133         void Activate();    
   133 		void Activate(); 	
   134         
   134 		
   135     protected:  // Functions from base classes
   135     protected:  // Functions from base classes
   136     
   136     
   137     private:
   137     private:
   138 
   138 
   139     public:     // Data
   139     public:     // Data
   140            
   140            
   141     protected:  // Data
   141     protected:  // Data
   142        
   142        
   143         // call handling service states 
   143        	// call handling service states 
   144         enum TPhoneHandlerServiceState
   144         enum TPhoneHandlerServiceState
   145         {
   145 		{
   146         EPhoneHandlerStateIdle      = 0,
   146     	EPhoneHandlerStateIdle		= 0,
   147         EPhoneHandlerState1         = 1,           
   147     	EPhoneHandlerState1			= 1,		   
   148         EPhoneHandlerState2         = 2,
   148     	EPhoneHandlerState2			= 2,
   149         EPhoneHandlerState3         = 3
   149     	EPhoneHandlerState3			= 3
   150         };
   150      	};
   151         
   151     	
   152         // stores service state
   152     	// stores service state
   153         TPhoneHandlerServiceState iState;
   153     	TPhoneHandlerServiceState iState;
   154         
   154     	
   155         // pointer to API providing call handling services
   155     	// pointer to API providing call handling services
   156         CPhCltCommandHandler* iCommandHandler; // owned
   156     	CPhCltCommandHandler* iCommandHandler; // owned
   157 
   157 
   158     private:    // Data
   158     private:    // Data
   159                         
   159                         
   160         // Provides a handle to a dynamically loadable DLL.
   160         // Provides a handle to a dynamically loadable DLL.
   161         RLibrary iLibrary;
   161         RLibrary iLibrary;