phoneclientserver/phoneclient/Src/CommandHandler/CPhCltComHandImplementation.cpp
changeset 46 2fa1fa551b0b
parent 42 35488577e233
child 48 78df25012fda
equal deleted inserted replaced
42:35488577e233 46:2fa1fa551b0b
     1 /*
       
     2 * Copyright (c) 2003-2004 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:  Implementation of the PhoneClient  interface.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include    "cphcltcomhandimplementation.h" 
       
    22 
       
    23 // ============================ MEMBER FUNCTIONS ===============================
       
    24 
       
    25 // -----------------------------------------------------------------------------
       
    26 // CPhCltCommandHandlerImplementation::CPhCltCommandHandlerImplementation
       
    27 // 
       
    28 // C++ constructor can NOT contain any code, that might leave.
       
    29 // -----------------------------------------------------------------------------
       
    30 //
       
    31 CPhCltCommandHandlerImplementation::CPhCltCommandHandlerImplementation()
       
    32     {
       
    33     }
       
    34 
       
    35 
       
    36 // -----------------------------------------------------------------------------
       
    37 // CPhCltCommandHandlerImplementation::ConstructL
       
    38 // 
       
    39 // Symbian 2nd phase constructor can leave.
       
    40 // -----------------------------------------------------------------------------
       
    41 //
       
    42 void CPhCltCommandHandlerImplementation::ConstructL()
       
    43     {
       
    44     User::LeaveIfError( iServer.Connect() );    
       
    45     User::LeaveIfError (iCommandHandler.Open( iServer ) ); 
       
    46     }
       
    47 
       
    48 
       
    49 // -----------------------------------------------------------------------------
       
    50 // CPhCltCommandHandlerImplementation::NewL
       
    51 // 
       
    52 // Two-phased constructor.
       
    53 // -----------------------------------------------------------------------------
       
    54 //
       
    55 CPhCltCommandHandlerImplementation* CPhCltCommandHandlerImplementation::NewL()
       
    56     {
       
    57     CPhCltCommandHandlerImplementation* self = 
       
    58         new (ELeave) CPhCltCommandHandlerImplementation();   
       
    59 
       
    60     CleanupStack::PushL( self );
       
    61     self->ConstructL();
       
    62     CleanupStack::Pop();
       
    63     return self;
       
    64     }
       
    65     
       
    66 
       
    67 // -----------------------------------------------------------------------------
       
    68 // CPhCltCommandHandlerImplementation::~CPhCltCommandHandlerImplementation
       
    69 // 
       
    70 // Destructor.
       
    71 // -----------------------------------------------------------------------------
       
    72 //
       
    73 CPhCltCommandHandlerImplementation::~CPhCltCommandHandlerImplementation()
       
    74     {
       
    75     // Close Subsession.
       
    76     iCommandHandler.Close();
       
    77     iServer.Close();
       
    78     }
       
    79 
       
    80 // -----------------------------------------------------------------------------
       
    81 // CPhCltCommandHandlerImplementation::Atd
       
    82 // 
       
    83 // Dial. Only voice call is supported.
       
    84 // -----------------------------------------------------------------------------
       
    85 //
       
    86 void CPhCltCommandHandlerImplementation::Atd(
       
    87     TRequestStatus& aStatus, 
       
    88     const TPhCltTelephoneNumber& aTelephoneNumber )
       
    89     {
       
    90     iCommandHandler.Atd( aStatus, aTelephoneNumber );
       
    91     }
       
    92  
       
    93 // -----------------------------------------------------------------------------
       
    94 // CPhCltCommandHandlerImplementation::Ata
       
    95 // 
       
    96 // Answer the call. 
       
    97 // -----------------------------------------------------------------------------
       
    98 //
       
    99 void CPhCltCommandHandlerImplementation::Ata(
       
   100     TRequestStatus& aStatus )
       
   101     {
       
   102     iCommandHandler.Ata( aStatus );
       
   103     }
       
   104 
       
   105 
       
   106 // -----------------------------------------------------------------------------
       
   107 // CPhCltCommandHandlerImplementation::Chld
       
   108 // 
       
   109 // Call hold and multiparty handling.
       
   110 // -----------------------------------------------------------------------------
       
   111 //
       
   112 void CPhCltCommandHandlerImplementation::Chld(
       
   113     TRequestStatus& aStatus, 
       
   114     const TPhCltChldCommand aChldCommand,
       
   115     const TUint aCallNumber )
       
   116     {
       
   117     iCommandHandler.Chld( aStatus, aChldCommand, aCallNumber );
       
   118     }
       
   119 
       
   120 
       
   121 // -----------------------------------------------------------------------------
       
   122 // CPhCltCommandHandlerImplementation::Chup
       
   123 // 
       
   124 // Hangup current call.
       
   125 // -----------------------------------------------------------------------------
       
   126 //
       
   127 void CPhCltCommandHandlerImplementation::Chup(
       
   128     TRequestStatus& aStatus )
       
   129     {
       
   130     iCommandHandler.Chup( aStatus );
       
   131     }
       
   132 
       
   133 
       
   134 // -----------------------------------------------------------------------------
       
   135 // CPhCltCommandHandlerImplementation::Vts
       
   136 // 
       
   137 // DTMF sending, starting and stopping in same function. 
       
   138 // -----------------------------------------------------------------------------
       
   139 //
       
   140 void CPhCltCommandHandlerImplementation::Vts(
       
   141     TRequestStatus& aStatus, 
       
   142     const TPhCltDtmfTone aDtmfTone,
       
   143     const TPhCltDtmfAction aAction )
       
   144     {
       
   145     iCommandHandler.Vts( aStatus, aDtmfTone, aAction );
       
   146     }
       
   147 
       
   148 // -----------------------------------------------------------------------------
       
   149 // CPhCltCommandHandlerImplementation::CancelAsyncRequest
       
   150 // 
       
   151 // Cancel the ongoing asynchronous request.
       
   152 // -----------------------------------------------------------------------------
       
   153 //
       
   154 void CPhCltCommandHandlerImplementation::CancelAsyncRequest( 
       
   155     const TPhCltComHandCommand aReqToCancel )
       
   156     {
       
   157     iCommandHandler.CancelAsyncRequest( aReqToCancel );
       
   158     }
       
   159 
       
   160 // -----------------------------------------------------------------------------
       
   161 // CPhCltCommandHandlerImplementation::MuteMicrophone
       
   162 // -----------------------------------------------------------------------------
       
   163 //
       
   164 
       
   165 void CPhCltCommandHandlerImplementation::MuteMicrophone( 
       
   166     TRequestStatus& aStatus, const TBool aMute )
       
   167     {
       
   168     iCommandHandler.MuteMicrophone( aStatus, aMute );
       
   169     }
       
   170 
       
   171 // -----------------------------------------------------------------------------
       
   172 // CPhCltCommandHandlerImplementation::MuteRingingTone
       
   173 // -----------------------------------------------------------------------------
       
   174 //
       
   175 
       
   176 void CPhCltCommandHandlerImplementation::MuteRingingTone( 
       
   177     TRequestStatus& aStatus  )
       
   178     {
       
   179     iCommandHandler.MuteRingingTone( aStatus );
       
   180     }
       
   181     
       
   182 
       
   183 
       
   184 //  End of File