phonecmdhandler/phonecmdhnlr/src/PhoneHandlerVoiceDial.cpp
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 // INCLUDE FILES
    19 // INCLUDE FILES
    20 #include    "phonehandlervoicedial.h" 
    20 #include    "PhoneHandlerVoiceDial.h"
    21 #include    "phonehandlercontrol.h" 
    21 #include 	"PhoneHandlerControl.h"
    22 #include    "phonehandlerdebug.h" 
    22 #include 	"PhoneHandlerDebug.h"
    23 #include    <RemConCallHandlingTarget.h> 
    23 #include 	<RemConCallHandlingTarget.h>
    24 #include    <cphcltcommandhandler.h> 
    24 #include	<CPhCltCommandHandler.h>
    25 
    25 
    26 // EXTERNAL DATA STRUCTURES
    26 // EXTERNAL DATA STRUCTURES
    27 
    27 
    28 // EXTERNAL FUNCTION PROTOTYPES  
    28 // EXTERNAL FUNCTION PROTOTYPES  
    29 
    29 
    48 // C++ default constructor can NOT contain any code, that
    48 // C++ default constructor can NOT contain any code, that
    49 // might leave.
    49 // might leave.
    50 // -----------------------------------------------------------------------------
    50 // -----------------------------------------------------------------------------
    51 //
    51 //
    52 CPhoneHandlerVoiceDial::CPhoneHandlerVoiceDial( 
    52 CPhoneHandlerVoiceDial::CPhoneHandlerVoiceDial( 
    53                             CPhoneHandlerControl& aControl,
    53 							CPhoneHandlerControl& aControl,
    54                             TRemConExtCallHandlingApiOperationId aOperation )
    54 							TRemConExtCallHandlingApiOperationId aOperation )
    55 : iControl( aControl ), 
    55 : iControl( aControl ), 
    56   iOperation( aOperation )
    56   iOperation( aOperation )
    57     {
    57     {
    58     }
    58     }
    59 
    59 
    63 // -----------------------------------------------------------------------------
    63 // -----------------------------------------------------------------------------
    64 //
    64 //
    65 void CPhoneHandlerVoiceDial::ConstructL()
    65 void CPhoneHandlerVoiceDial::ConstructL()
    66     {
    66     {
    67     COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::ConstructL() start" );
    67     COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::ConstructL() start" );
    68         
    68 	    
    69     LoadServiceL();
    69     LoadServiceL();
    70     
    70     
    71     COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::ConstructL() end" );
    71     COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::ConstructL() end" );
    72     }
    72 	}
    73 
    73 
    74 // -----------------------------------------------------------------------------
    74 // -----------------------------------------------------------------------------
    75 // CPhoneHandlerVoiceDial::NewL
    75 // CPhoneHandlerVoiceDial::NewL
    76 // Two-phased constructor.
    76 // Two-phased constructor.
    77 // -----------------------------------------------------------------------------
    77 // -----------------------------------------------------------------------------
    78 //
    78 //
    79 CPhoneHandlerVoiceDial* CPhoneHandlerVoiceDial::NewL( 
    79 CPhoneHandlerVoiceDial* CPhoneHandlerVoiceDial::NewL( 
    80                             CPhoneHandlerControl& aControl, 
    80 							CPhoneHandlerControl& aControl, 
    81                             TRemConExtCallHandlingApiOperationId aOperation )
    81 							TRemConExtCallHandlingApiOperationId aOperation )
    82     {
    82     {
    83     COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::NewL() start" );
    83     COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::NewL() start" );
    84         
    84 	    
    85     CPhoneHandlerVoiceDial* self = new( ELeave ) CPhoneHandlerVoiceDial( 
    85     CPhoneHandlerVoiceDial* self = new( ELeave ) CPhoneHandlerVoiceDial( 
    86                                                     aControl, 
    86     												aControl, 
    87                                                     aOperation );
    87     												aOperation );
    88     
    88     
    89     CleanupStack::PushL( self );
    89     CleanupStack::PushL( self );
    90     self->ConstructL();
    90     self->ConstructL();
    91     CleanupStack::Pop( self );
    91     CleanupStack::Pop( self );
    92 
    92 
    93     COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::NewL() end" );
    93 	COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::NewL() end" );
    94         
    94 		
    95     return self;
    95     return self;
    96     }
    96     }
    97 
    97 
    98     
    98     
    99 // Destructor
    99 // Destructor
   100 CPhoneHandlerVoiceDial::~CPhoneHandlerVoiceDial()
   100 CPhoneHandlerVoiceDial::~CPhoneHandlerVoiceDial()
   101     {
   101     {
   102     COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::~CPhoneHandlerVoiceDial()" );
   102     COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::~CPhoneHandlerVoiceDial()" );
   103     
   103 	
   104     }
   104     }
   105 
   105 
   106 // -----------------------------------------------------------------------------
   106 // -----------------------------------------------------------------------------
   107 // CPhoneHandlerVoiceDial::Process
   107 // CPhoneHandlerVoiceDial::Process
   108 // Starts to process service.
   108 // Starts to process service.
   109 // (other items were commented in a header).
   109 // (other items were commented in a header).
   110 // -----------------------------------------------------------------------------
   110 // -----------------------------------------------------------------------------
   111 //
   111 //
   112 void CPhoneHandlerVoiceDial::Process()
   112 void CPhoneHandlerVoiceDial::Process()
   113     {
   113 	{
   114     COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::Process()" );
   114 	COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::Process()" );
   115 
   115 
   116 #if 0 // removed due to SCB CR PMEO-7JRFAX      
   116 #if 0 // removed due to SCB CR PMEO-7JRFAX		
   117     iCommandHandler->Bvra( GetStatus(), iControl.VoiceDialStatus() ); 
   117 	iCommandHandler->Bvra( GetStatus(), iControl.VoiceDialStatus() ); 
   118 #endif // #if 0     
   118 #endif // #if 0 	
   119     Activate(); 
   119 	Activate();	
   120     }
   120 	}
   121 
   121 
   122 // -----------------------------------------------------------------------------
   122 // -----------------------------------------------------------------------------
   123 // CPhoneHandlerVoiceDial::Delete
   123 // CPhoneHandlerVoiceDial::Delete
   124 // (other items were commented in a header).
   124 // (other items were commented in a header).
   125 // -----------------------------------------------------------------------------
   125 // -----------------------------------------------------------------------------
   126 //
   126 //
   127 void CPhoneHandlerVoiceDial::Delete()
   127 void CPhoneHandlerVoiceDial::Delete()
   128     {
   128 	{
   129     COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::Delete()" );
   129 	COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::Delete()" );
   130         
   130 		
   131     delete this;
   131 	delete this;
   132     }
   132 	}
   133 
   133 
   134 // -----------------------------------------------------------------------------
   134 // -----------------------------------------------------------------------------
   135 // CPhoneHandlerVoiceDial::RequestCompleted
   135 // CPhoneHandlerVoiceDial::RequestCompleted
   136 // Handler for completed asynchronous calls.
   136 // Handler for completed asynchronous calls.
   137 // (other items were commented in a header).
   137 // (other items were commented in a header).
   138 // -----------------------------------------------------------------------------
   138 // -----------------------------------------------------------------------------
   139 //
   139 //
   140 void CPhoneHandlerVoiceDial::RequestCompleted( const TInt aError )
   140 void CPhoneHandlerVoiceDial::RequestCompleted( const TInt aError )
   141     {
   141     {
   142     COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::RequestCompleted() aError=%d, iState=%d", aError, iState );
   142     COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::RequestCompleted() aError=%d, iState=%d", aError, iState );
   143         
   143 	    
   144     switch( iState )
   144 	switch( iState )
   145         {
   145 		{
   146         case EPhoneHandlerState1:
   146 		case EPhoneHandlerState1:
   147             {
   147 			{
   148             NextState();
   148 			NextState();
   149             iControl.CommandInitiator().SendResponse( GetStatus(), 
   149 			iControl.CommandInitiator().SendResponse( GetStatus(), 
   150                                                       iOperation,
   150 													  iOperation,
   151                                                       aError );
   151 													  aError );
   152             Activate();
   152 			Activate();
   153             break;
   153 			break;
   154             }
   154 			}
   155             
   155 			
   156         case EPhoneHandlerState2:
   156 		case EPhoneHandlerState2:
   157             {
   157 			{
   158             IdleState();
   158 			IdleState();
   159             delete this; 
   159 			delete this; 
   160             break;
   160 			break;
   161             }
   161 			}
   162             
   162 			
   163         default:
   163 		default:
   164             {
   164 			{
   165             COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::RequestCompleted() Unspecified state" );
   165 			COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::RequestCompleted() Unspecified state" );
   166             break;
   166 			break;
   167             }
   167 			}
   168         };
   168 		};
   169     }
   169 	}
   170     
   170     
   171 // ========================== OTHER EXPORTED FUNCTIONS =========================
   171 // ========================== OTHER EXPORTED FUNCTIONS =========================
   172 
   172 
   173 //  End of File  
   173 //  End of File