phoneclientserver/phoneclient/Src/ExtCall/ExtCall_Aiw/RPhCltExtCall.cpp
changeset 46 2fa1fa551b0b
parent 42 35488577e233
child 48 78df25012fda
equal deleted inserted replaced
42:35488577e233 46:2fa1fa551b0b
     1 /*
       
     2 * Copyright (c) 2002-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:  Ext Call
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include    "rphcltserver.h" 
       
    22 #include    "rphcltextcall.h" 
       
    23 #include    "cphcltextphonedialdata.h" 
       
    24 #include    "phcltclientserver.h" 
       
    25 
       
    26 // ============================ MEMBER FUNCTIONS ===============================
       
    27 
       
    28 
       
    29 // -----------------------------------------------------------------------------
       
    30 // RPhCltExtCall::RPhCltExtCall
       
    31 // C++ constructor can NOT contain any code, that
       
    32 // might leave.
       
    33 // -----------------------------------------------------------------------------
       
    34 //
       
    35 RPhCltExtCall::RPhCltExtCall() 
       
    36     : RSubSessionBase()
       
    37     {    
       
    38     }
       
    39 
       
    40 
       
    41 // -----------------------------------------------------------------------------
       
    42 // RPhCltExtCall::Open
       
    43 // 
       
    44 // Creates a subsession, as part of the given session.
       
    45 // -----------------------------------------------------------------------------
       
    46 //
       
    47 TInt RPhCltExtCall::Open( RPhCltServer& aServer )
       
    48     {
       
    49     __ASSERT_ALWAYS( aServer.Handle(), User::Panic( 
       
    50         KPhClientPanicCategory, 
       
    51         EPhCltClientSidePanicNullHandle ) );
       
    52 
       
    53     return CreateSubSession( 
       
    54         aServer, 
       
    55         EPhoneServerExtCallSubSessionOpen, 
       
    56         TIpcArgs() );
       
    57     }
       
    58 
       
    59 
       
    60 // -----------------------------------------------------------------------------
       
    61 // RPhCltExtCall::Close
       
    62 // 
       
    63 // Closes the subsession.
       
    64 // -----------------------------------------------------------------------------
       
    65 //
       
    66 void RPhCltExtCall::Close()
       
    67     {
       
    68     CloseSubSession( EPhoneServerExtCallSubSessionClose );
       
    69     }
       
    70 
       
    71 
       
    72 // -----------------------------------------------------------------------------
       
    73 // RPhCltExtCall::Dial
       
    74 // 
       
    75 // Sends a dial request to the server.
       
    76 // -----------------------------------------------------------------------------
       
    77 //
       
    78 void RPhCltExtCall::Dial( 
       
    79     TRequestStatus& aStatus, 
       
    80     TDesC8& aData, TInt aLength )
       
    81     {
       
    82     __ASSERT_ALWAYS( SubSessionHandle(), User::Panic( KPhClientPanicCategory,
       
    83         EPhCltClientSidePanicNullHandle ) );
       
    84     
       
    85     TPckg< TInt > pDataLength( aLength );
       
    86     SendReceive(  
       
    87         EPhoneServerExtCallSubSessionMakeCall, 
       
    88         TIpcArgs( &aData, aLength ), 
       
    89         aStatus ); 
       
    90     }
       
    91 
       
    92 
       
    93 // -----------------------------------------------------------------------------
       
    94 // RPhCltExtCall::CancelDial
       
    95 // 
       
    96 // Cancels the pending dial request.
       
    97 // -----------------------------------------------------------------------------
       
    98 //
       
    99 void RPhCltExtCall::CancelDial() const
       
   100     {
       
   101     __ASSERT_ALWAYS( const_cast< RPhCltExtCall* >( this )->SubSessionHandle(), 
       
   102         User::Panic( 
       
   103             KPhClientPanicCategory, EPhCltClientSidePanicNullHandle ) );
       
   104 
       
   105     SendReceive( 
       
   106         EPhoneServerExtCallSubSessionMakeCallCancel, 
       
   107         TIpcArgs() );
       
   108     }
       
   109 
       
   110 
       
   111 //  End of File