phoneclientserver/phoneclient/Src/Notifier/RPhCltExtCallNotify.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 
       
    22 #include    "RPhCltCallNotify.h"
       
    23 #include    "PhCltClientServer.h"
       
    24 #include    "RPhCltServer.h"
       
    25 
       
    26 
       
    27 
       
    28 // ============================= LOCAL FUNCTIONS ===============================
       
    29 
       
    30 
       
    31 
       
    32 // ============================ MEMBER FUNCTIONS ===============================
       
    33 
       
    34 // -----------------------------------------------------------------------------
       
    35 // RPhCltExtCallNotify::RPhCltExtCallNotify
       
    36 // C++ constructor can NOT contain any code, that
       
    37 // might leave.
       
    38 // -----------------------------------------------------------------------------
       
    39 //
       
    40 EXPORT_C RPhCltCallNotify::RPhCltCallNotify() 
       
    41     : RSubSessionBase()
       
    42     {
       
    43     }
       
    44 
       
    45 
       
    46 // -----------------------------------------------------------------------------
       
    47 // RPhCltExtCallNotify::Open
       
    48 // -----------------------------------------------------------------------------
       
    49 //
       
    50 EXPORT_C TInt RPhCltCallNotify::Open( RPhCltServer& aServer )
       
    51     {
       
    52     return CreateSubSession( 
       
    53         aServer,
       
    54         EPhoneServerNotifySubSessionOpen,
       
    55         TIpcArgs() );
       
    56     }
       
    57 
       
    58 
       
    59 // -----------------------------------------------------------------------------
       
    60 // RPhCltExtCallNotify::Close
       
    61 // -----------------------------------------------------------------------------
       
    62 //
       
    63 EXPORT_C void RPhCltCallNotify::Close()
       
    64     {
       
    65     CloseSubSession( EPhoneServerNotifySubSessionClose );
       
    66     }
       
    67 
       
    68 
       
    69 // -----------------------------------------------------------------------------
       
    70 // RPhCltExtCallNotify::NotifyCallAttempt
       
    71 // 
       
    72 // -----------------------------------------------------------------------------
       
    73 //
       
    74 EXPORT_C void RPhCltCallNotify::NotifyCallAttempt( 
       
    75     TRequestStatus& aStatus,
       
    76     TDes8& aCallArgs )
       
    77     {
       
    78     SendReceive( 
       
    79         EPhoneServerNotifySubSessionNotifyCallRequest, 
       
    80         TIpcArgs( &aCallArgs ), 
       
    81         aStatus );
       
    82     }
       
    83 
       
    84 
       
    85 // -----------------------------------------------------------------------------
       
    86 // RPhCltExtCallNotify::CancelNotifyCallAttempt
       
    87 //
       
    88 // -----------------------------------------------------------------------------
       
    89 //
       
    90 EXPORT_C void RPhCltCallNotify::CancelNotifyCallAttempt() const
       
    91     {
       
    92     SendReceive( 
       
    93         EPhoneServerNotifySubSessionNotifyCallRequestCancel,
       
    94         TIpcArgs() );
       
    95     }
       
    96 
       
    97 
       
    98 // -----------------------------------------------------------------------------
       
    99 // RPhCltExtCallNotify::RespondClient
       
   100 // 
       
   101 // -----------------------------------------------------------------------------
       
   102 //
       
   103 EXPORT_C TInt RPhCltCallNotify::RespondClient( const TInt aResultCode )
       
   104     {
       
   105     return Send( 
       
   106         EPhoneServerNotifySubSessionReportCallResult,
       
   107         TIpcArgs( aResultCode ) );
       
   108     }
       
   109   
       
   110  // -----------------------------------------------------------------------------
       
   111 // RPhCltExtCallNotify::NotifyComHandCommand
       
   112 // 
       
   113 // Notifies when a Command handler request arrives.
       
   114 // -----------------------------------------------------------------------------
       
   115 //
       
   116 EXPORT_C void RPhCltCallNotify::NotifyComHandCommand( 
       
   117     TRequestStatus& aStatus, 
       
   118     TDes8& aCommandArgs )
       
   119     {
       
   120     SendReceive( 
       
   121         EPhoneServerComHandNotifySubSessionComHandRequest, 
       
   122         TIpcArgs( &aCommandArgs ),
       
   123         aStatus );
       
   124     }
       
   125 
       
   126 
       
   127 // -----------------------------------------------------------------------------
       
   128 // RPhCltExtCallNotify::CancelNotifyComHandCommand
       
   129 // 
       
   130 // Cancel pending command handler request notification.
       
   131 // -----------------------------------------------------------------------------
       
   132 //
       
   133 EXPORT_C void RPhCltCallNotify::CancelNotifyComHandCommand() const
       
   134     {
       
   135     SendReceive( 
       
   136         EPhoneServerComHandNotifySubSessionComHandRequestCancel, 
       
   137         TIpcArgs() );
       
   138     }
       
   139 
       
   140 
       
   141 // -----------------------------------------------------------------------------
       
   142 // RPhCltExtCallNotify::RespondComHandClient
       
   143 // 
       
   144 // Respond to client's command handler request.
       
   145 // -----------------------------------------------------------------------------
       
   146 //
       
   147 EXPORT_C TInt RPhCltCallNotify::RespondComHandClient( 
       
   148     const TInt aResultCode )
       
   149     {
       
   150     return Send( 
       
   151         EPhoneServerComHandNotifySubSessionReportComHandResult, 
       
   152         TIpcArgs( aResultCode ) );
       
   153     }
       
   154 
       
   155 
       
   156 // End of File