phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/RPhCltCallNotify.cpp
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:  Call Notify
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 //  Include Files
       
    21 #include "RPhCltCallNotify.h"
       
    22 #include "RPhCltServer.h"
       
    23 #include "PhCltClientServer.h"
       
    24 
       
    25 // ============================= LOCAL FUNCTIONS ===============================
       
    26 
       
    27 
       
    28 
       
    29 // ============================ MEMBER FUNCTIONS ===============================
       
    30 
       
    31 // -----------------------------------------------------------------------------
       
    32 // RPhCltCallNotify::RPhCltCallNotify
       
    33 // C++ constructor can NOT contain any code, that
       
    34 // might leave.
       
    35 // -----------------------------------------------------------------------------
       
    36 //
       
    37 RPhCltCallNotify::RPhCltCallNotify() 
       
    38     : RSubSessionBase()
       
    39     {
       
    40     }
       
    41 
       
    42 
       
    43 // -----------------------------------------------------------------------------
       
    44 // RPhCltCallNotify::Open
       
    45 // -----------------------------------------------------------------------------
       
    46 //
       
    47 TInt RPhCltCallNotify::Open( RPhCltServer& aServer )
       
    48     {
       
    49     return CreateSubSession( 
       
    50         aServer,
       
    51         EPhoneServerNotifySubSessionOpen,
       
    52         TIpcArgs() );
       
    53     }
       
    54 
       
    55 
       
    56 // -----------------------------------------------------------------------------
       
    57 // RPhCltCallNotify::Close
       
    58 // -----------------------------------------------------------------------------
       
    59 //
       
    60 void RPhCltCallNotify::Close()
       
    61     {
       
    62     CloseSubSession( EPhoneServerNotifySubSessionClose );
       
    63     }
       
    64 
       
    65 
       
    66 // -----------------------------------------------------------------------------
       
    67 // RPhCltCallNotify::NotifyCallAttempt
       
    68 // 
       
    69 // -----------------------------------------------------------------------------
       
    70 //
       
    71 void RPhCltCallNotify::NotifyCallAttempt( 
       
    72     TRequestStatus& aStatus,
       
    73     TPckg< TInt >& aDataLength )
       
    74     {
       
    75     SendReceive( 
       
    76         EPhoneServerNotifySubSessionNotifyCallRequest, 
       
    77         TIpcArgs( &aDataLength ), 
       
    78         aStatus );
       
    79     }
       
    80 
       
    81 
       
    82 // -----------------------------------------------------------------------------
       
    83 // RPhCltCallNotify::CancelNotifyCallAttempt
       
    84 //
       
    85 // -----------------------------------------------------------------------------
       
    86 //
       
    87 void RPhCltCallNotify::CancelNotifyCallAttempt() const
       
    88     {
       
    89     SendReceive( 
       
    90         EPhoneServerNotifySubSessionNotifyCallRequestCancel,
       
    91         TIpcArgs() );
       
    92     }
       
    93 
       
    94 
       
    95 // -----------------------------------------------------------------------------
       
    96 // RPhCltCallNotify::RespondClient
       
    97 // 
       
    98 // -----------------------------------------------------------------------------
       
    99 //
       
   100 TInt RPhCltCallNotify::RespondClient( const TInt aResultCode )
       
   101     {
       
   102     return Send( 
       
   103         EPhoneServerNotifySubSessionReportCallResult,
       
   104         TIpcArgs( aResultCode ) );
       
   105     }
       
   106  
       
   107  // -----------------------------------------------------------------------------
       
   108 // RPhCltCallNotify::GetDialData
       
   109 // 
       
   110 // -----------------------------------------------------------------------------
       
   111 //   
       
   112  void RPhCltCallNotify::GetDialData( TDes8& aData )
       
   113     {
       
   114     
       
   115     SendReceive( 
       
   116         EPhoneServerNotifySubSessionDialData, 
       
   117         TIpcArgs( &aData) );
       
   118     }
       
   119 
       
   120 // -----------------------------------------------------------------------------
       
   121 // RPhCltCallNotify::NotifyEmergencyCall
       
   122 // 
       
   123 // -----------------------------------------------------------------------------
       
   124 //
       
   125 void RPhCltCallNotify::NotifyEmergencyCall( 
       
   126     TRequestStatus& aStatus,
       
   127     TDes8& aEmergencyNumber
       
   128      )
       
   129     {
       
   130     SendReceive( 
       
   131         EPhoneServerNotifyEmergencySubSessionNotifyCallRequest, 
       
   132         TIpcArgs( &aEmergencyNumber ), 
       
   133         aStatus );
       
   134     }
       
   135 
       
   136 // -----------------------------------------------------------------------------
       
   137 // RPhCltCallNotify::CancelNotifyEmergencyCall
       
   138 //
       
   139 // -----------------------------------------------------------------------------
       
   140 //
       
   141 void RPhCltCallNotify::CancelNotifyEmergencyCall() const
       
   142     {
       
   143     SendReceive( 
       
   144         EPhoneServerNotifyEmergencySubSessionNotifyCallRequestCancel,
       
   145         TIpcArgs() );
       
   146     }
       
   147 
       
   148 
       
   149 // -----------------------------------------------------------------------------
       
   150 // RPhCltCallNotify::RespondEmergencyToClient
       
   151 // 
       
   152 // -----------------------------------------------------------------------------
       
   153 //
       
   154 TInt RPhCltCallNotify::RespondEmergencyToClient( const TInt aResultCode )
       
   155     {
       
   156     return Send( 
       
   157         EPhoneServerNotifyEmergencySubSessionReportCallResult,
       
   158         TIpcArgs( aResultCode ) );
       
   159     }
       
   160 
       
   161  // -----------------------------------------------------------------------------
       
   162 // RPhCltCallNotify::NotifyComHandCommand
       
   163 // 
       
   164 // Notifies when a Command handler request arrives.
       
   165 // -----------------------------------------------------------------------------
       
   166 //
       
   167 void RPhCltCallNotify::NotifyComHandCommand( 
       
   168     TRequestStatus& aStatus, 
       
   169     TDes8& aCommandArgs )
       
   170     {
       
   171     SendReceive( 
       
   172         EPhoneServerComHandNotifySubSessionComHandRequest, 
       
   173         TIpcArgs( &aCommandArgs ),
       
   174         aStatus );
       
   175     }
       
   176 
       
   177 
       
   178 // -----------------------------------------------------------------------------
       
   179 // RPhCltCallNotify::CancelNotifyComHandCommand
       
   180 // 
       
   181 // Cancel pending command handler request notification.
       
   182 // -----------------------------------------------------------------------------
       
   183 //
       
   184 void RPhCltCallNotify::CancelNotifyComHandCommand() const
       
   185     {
       
   186     SendReceive( 
       
   187         EPhoneServerComHandNotifySubSessionComHandRequestCancel, 
       
   188         TIpcArgs() );
       
   189     }
       
   190 
       
   191 
       
   192 // -----------------------------------------------------------------------------
       
   193 // RPhCltCallNotify::RespondComHandClient
       
   194 // 
       
   195 // Respond to client's command handler request.
       
   196 // -----------------------------------------------------------------------------
       
   197 //
       
   198 TInt RPhCltCallNotify::RespondComHandClient( 
       
   199     const TInt aResultCode )
       
   200     {
       
   201     return Send( 
       
   202         EPhoneServerComHandNotifySubSessionReportComHandResult, 
       
   203         TIpcArgs( aResultCode ) );
       
   204     }
       
   205 
       
   206 // End of File