phoneclientserver/phoneclient/Inc/ExtCall/ExtCall_Aiw/RPhCltCallNotify.h
changeset 46 2fa1fa551b0b
parent 42 35488577e233
child 48 78df25012fda
equal deleted inserted replaced
42:35488577e233 46:2fa1fa551b0b
     1 /*
       
     2 * Copyright (c) 2002 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:  RCallNotify observer getting notifications about call requests
       
    15 *                from Phone Server.
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef RPHCLTCALLNOTIFY_H
       
    20 #define RPHCLTCALLNOTIFY_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 
       
    26 //  FORWARD DECLARATIONS
       
    27 class RPhCltServer;
       
    28 class CPhCltExtPhoneDialData;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  RCallNotify observer getting notifications about call requests
       
    34 *  from Phone Server.
       
    35 *
       
    36 *  @lib phoneclient.lib
       
    37 *  @since 1.0
       
    38 */
       
    39 class RPhCltCallNotify : public RSubSessionBase
       
    40     {
       
    41     public: // Constructors and destructors.
       
    42 
       
    43         /**
       
    44          * Constructor.
       
    45          */
       
    46         RPhCltCallNotify();
       
    47 
       
    48 
       
    49     public: // New functions
       
    50 
       
    51         /**
       
    52         * Open subsession to server.
       
    53         * 
       
    54         * @param aServer Pre-opened server session.
       
    55         * @return Symbian OS error code of the success of the opening.
       
    56         */
       
    57         TInt Open( RPhCltServer& aServer );
       
    58 
       
    59         /**
       
    60         * Close subsession.
       
    61         */
       
    62         void Close();
       
    63     
       
    64         /**
       
    65         * Notifies when a call request arrives.
       
    66         *
       
    67         * @param aStatus Status to be changed when call request have arrived.
       
    68         * @param aDatalength  Dial data length.
       
    69         */
       
    70         void NotifyCallAttempt( 
       
    71             TRequestStatus& aStatus, 
       
    72            TPckg< TInt >& aDataLength );
       
    73         /**
       
    74         * Cancel pending call attempt notification.
       
    75         */
       
    76         void CancelNotifyCallAttempt() const;
       
    77         
       
    78         /**
       
    79         * Respond to client request to make a call
       
    80         *
       
    81         * @param aResultCode Result of the response.
       
    82         */
       
    83         TInt RespondClient( const TInt aResultCode );
       
    84         
       
    85         void GetDialData( TDes8& aData );
       
    86         
       
    87         /**
       
    88         * Notifies when a emergency call request arrives.
       
    89         *
       
    90         * @param aStatus Status to be changed when call request have arrived.
       
    91         * @param aEmergencyNumber 
       
    92         *
       
    93         */
       
    94         void NotifyEmergencyCall( 
       
    95             TRequestStatus& aStatus,
       
    96             TDes8& aEmergencyNumber
       
    97              );
       
    98         /**
       
    99         * Cancel pending call attempt notification.
       
   100         */
       
   101         void CancelNotifyEmergencyCall() const;
       
   102         
       
   103         /**
       
   104         * Respond to client request to make a emergency call
       
   105         *
       
   106         * @param aResultCode Result of the response.
       
   107         * @return Symbian OS error code of the success of the opening.
       
   108         */
       
   109         TInt RespondEmergencyToClient( const TInt aResultCode ); 
       
   110         
       
   111         /**
       
   112         * Notifies when a Command handler request arrives.
       
   113         *
       
   114         * @param aStatus Status to be changed when command handler request
       
   115         *                has arrived.
       
   116         * @param aCommandArgs Command argument storage place. 
       
   117         *                     That is, packaged version of class 
       
   118         *                     TPhCltComHandCommandParameters.
       
   119         */
       
   120         void NotifyComHandCommand( 
       
   121             TRequestStatus& aStatus, 
       
   122             TDes8& aCommandArgs );
       
   123 
       
   124         /**
       
   125         * Cancel pending command handler request notification.
       
   126         */
       
   127         void CancelNotifyComHandCommand() const;
       
   128         
       
   129         /**
       
   130         * Respond to client's command handler request.
       
   131         *
       
   132         * @param aResultCode Result of the response 
       
   133         *        (previous function execution).
       
   134         * @return KErrNone if respond succeeded, otherwise Symbian error code.
       
   135         */
       
   136         TInt RespondComHandClient( const TInt aResultCode );
       
   137  
       
   138     };
       
   139 
       
   140 
       
   141 #endif    // RPHCLTCALLNOTIFY_H
       
   142 
       
   143 // End of File