phoneclientserver/phoneclient/Inc/CommandHandler/RPhCltCommandHandler.h
changeset 0 ff3b6d0fd310
child 19 7d48bed6ce0c
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     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:  This class is used to perform command handler originated 
       
    15 *                commands.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef RPHCLTCOMMANDHANDLER_H
       
    21 #define RPHCLTCOMMANDHANDLER_H
       
    22 
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 #include <PhCltTypes.h>
       
    27 //#include "CPhCltCommandHandlerNotify.h"
       
    28 #include "CPhCltCommandHandler.h"
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class RPhCltServer;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 *  PhoneClient command handler interface.
       
    37 *  The user of this API has to take care that there is only at most one 
       
    38 *  request, i.e. function call, ongoing (active) at the time. However, the 
       
    39 *  corresponding Cancel method can be called while request is ongoing.
       
    40 *  
       
    41 *  @lib PhoneClient.lib
       
    42 *  @since 3.2
       
    43 
       
    44 */
       
    45 class RPhCltCommandHandler
       
    46 :   public RSubSessionBase
       
    47     {
       
    48     public:  // Constructors and destructor
       
    49         
       
    50         /**
       
    51         * Constructor.
       
    52         */
       
    53         RPhCltCommandHandler();
       
    54 
       
    55 
       
    56     public: // New functions
       
    57 
       
    58         /**
       
    59         * Open subsession to server.
       
    60         * 
       
    61         * @param aServer Pre-opened server session.
       
    62         * @return Symbian OS error code of the success of the opening.
       
    63         */
       
    64         TInt Open( RPhCltServer& aServer );
       
    65 
       
    66 
       
    67         /**
       
    68         * Close subsession.
       
    69         */
       
    70         void Close();
       
    71 
       
    72         /**
       
    73         * Dial. Only voice call is supported.
       
    74         *
       
    75         * @param aStatus The status updated when function call is completed.
       
    76         *                KErrNone if successful, Symbian error code otherwise.
       
    77         * @param aTelephoneNumber The telephony number .
       
    78         */
       
    79             
       
    80 		void Atd(
       
    81             TRequestStatus& aStatus, 
       
    82             const TPhCltTelephoneNumber& aTelephoneNumber );
       
    83 		
       
    84 
       
    85         /**
       
    86         * Answer the call. 
       
    87         * Does not need response according to specification.
       
    88         *  
       
    89         * @param aStatus The status updated when function call is completed.
       
    90         *                KErrNone if successful, Symbian error code otherwise.
       
    91         *                KErrNotReady if there is no call to be answered.
       
    92         */
       
    93         void Ata(
       
    94             TRequestStatus& aStatus );
       
    95 
       
    96 
       
    97         /**
       
    98         * Call hold and multiparty handling.
       
    99         * 
       
   100         * @param aStatus The status updated when function call is completed.
       
   101         *                KErrNone if successful, Symbian error code otherwise.
       
   102         * @param aChldCommand The command to be performed.
       
   103         * @param aCallNumber The call number where the command specified in
       
   104         *                    aChldCommand is targeted. 
       
   105         *                    Not used currently.
       
   106         */
       
   107         void Chld(
       
   108             TRequestStatus& aStatus, 
       
   109             const TPhCltChldCommand aChldCommand,
       
   110             const TUint aCallNumber );
       
   111 
       
   112 
       
   113         /**
       
   114         * Hang up current call.
       
   115         * Does not need response according to specification.
       
   116         *  
       
   117         * @param aStatus The status updated when function call is completed.
       
   118         *                KErrNone if successful, Symbian error code otherwise.
       
   119         */
       
   120         void Chup(
       
   121             TRequestStatus& aStatus );
       
   122 
       
   123 
       
   124         /**
       
   125         * DTMF sending, starting and stopping in same function. 
       
   126         * Does not need response according to specification.
       
   127         *
       
   128         * @param aStatus The status updated when function call is completed.
       
   129         *                KErrNone if successful, Symbian error code otherwise.
       
   130         * @param aDtmfTone The DTMF tone to be sent.
       
   131         * @param aActivation Desired DTMF action.
       
   132         */
       
   133         void Vts(
       
   134             TRequestStatus& aStatus, 
       
   135             const TPhCltDtmfTone aDtmfTone,
       
   136             const TPhCltDtmfAction aAction );
       
   137 
       
   138         /**
       
   139         * Cancel the ongoing asynchronous request.
       
   140         *
       
   141         * @param aReqToCancel The request to be canceled.
       
   142         */
       
   143         void CancelAsyncRequest( 
       
   144             const TPhCltComHandCommand aReqToCancel );
       
   145 
       
   146         /**
       
   147         * Mute Microphone.
       
   148         *
       
   149         * @since 2.8
       
   150         * @param aStatus The status updated when function call is completed.
       
   151         *                KErrNone if successful, Symbian error code otherwise.
       
   152         * @param aMute ETrue if Mic Mute is set on.
       
   153         */
       
   154         void MuteMicrophone(
       
   155             TRequestStatus& aStatus,
       
   156             const TBool aMute );
       
   157 
       
   158 
       
   159         /**
       
   160         * Mute RingingTone.
       
   161         *
       
   162         * @since 2.8
       
   163         * @param aStatus The status updated when function call is completed.
       
   164         *                KErrNone if successful, Symbian error code otherwise.
       
   165         */
       
   166         void MuteRingingTone(
       
   167             TRequestStatus& aStatus );
       
   168             
       
   169     private:
       
   170 
       
   171         // Prohibit copy constructor if not deriving from CBase.
       
   172         RPhCltCommandHandler( const RPhCltCommandHandler& );
       
   173 
       
   174         // Prohibit assigment operator if not deriving from CBase.
       
   175         RPhCltCommandHandler& operator=( const RPhCltCommandHandler& );
       
   176 
       
   177 
       
   178     private:    // Data
       
   179 
       
   180         // Command handler arguments.
       
   181         TPckgBuf< TPhCltComHandCommandParameters >  iComHandParams;
       
   182     };
       
   183 
       
   184 #endif      // RPHCLTCOMMANDHANDLER_H
       
   185             
       
   186 // End of File