phoneclientserver/phoneclient/Inc/Ihf/RPhCltIhf.h
changeset 0 ff3b6d0fd310
child 19 7d48bed6ce0c
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     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:  Session for Ihf mode handling in phone client.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef RPHCLTIHF_H
       
    19 #define RPHCLTIHF_H
       
    20 
       
    21 // INCLUDES
       
    22 #include    <etelmm.h>            // ETel
       
    23 
       
    24 #include "PhCltTypes.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class RWsSession;
       
    28 class RPhCltServer;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 /**
       
    32 *  Session for Ihf mode handling in phone client.
       
    33 *
       
    34 *  @lib phoneclient.lib
       
    35 *  @since 1.0
       
    36 */
       
    37 class RPhCltIhf : public RSubSessionBase
       
    38     {
       
    39 
       
    40     public:  // Constructors and destructor  
       
    41 
       
    42         /**
       
    43         * Constructor.
       
    44         */      
       
    45         IMPORT_C RPhCltIhf();
       
    46 
       
    47 
       
    48     public: // New functions    
       
    49 
       
    50         /**
       
    51         * Creates a subsession with the phone server.
       
    52         * 
       
    53         * @param aServer Pre-opened server session.
       
    54         * @param aPriority Priority for the active object handling notify 
       
    55         *                  events. Not used.
       
    56         * @return Symbian OS standard error code.
       
    57         */      
       
    58         IMPORT_C TInt Open( 
       
    59             RPhCltServer& aServer, 
       
    60             TInt aPriority = CActive::EPriorityStandard );
       
    61 
       
    62         /**
       
    63         * Closes the subsession. Cancels all notify requests.
       
    64         * Remember to call this to a connected session in some point.
       
    65         */
       
    66         IMPORT_C void Close();
       
    67 
       
    68 
       
    69     public: // API
       
    70         
       
    71         /**
       
    72         * Set Ihf mode
       
    73         *
       
    74         * @param aMode ETrue to set IHF mode on, otherwise set IHF mode off
       
    75         * @param aShowNote ETrue if the IHF activation/deactivation note 
       
    76         *                  should be shown
       
    77         * @return Standard Symbian OS error code. Note, if the note can't be 
       
    78         *         shown, the system will not return any error code. The error 
       
    79         *         code just means the IHF mode changing is failed. If aMode is 
       
    80         *         same as current IHF mode of the system, KErrAlreadyExist will
       
    81         *         be returned.
       
    82         *         If the headset or other audio accessory is connected, then 
       
    83         *         IHF mode can't be activated, and KErrAccessDenied will be 
       
    84         *         returned.
       
    85         */
       
    86         IMPORT_C TInt SetIhfMode( 
       
    87             TBool aMode, 
       
    88             TBool aShowNote = EFalse );
       
    89     
       
    90         /**
       
    91         * Set Ihf mode for Phone application only.
       
    92         *
       
    93         * @param aMode ETrue to set IHF mode on, otherwise set IHF mode off
       
    94         * @param aShowNote ETrue if the IHF activation/deactivation note should
       
    95         *                  be shown
       
    96         * @return Standard Symbian OS error code. Note, if the note can't be 
       
    97         *         shown, the system will not return any error code. The error 
       
    98         *         code just means the IHF mode changing is failed. If aMode is 
       
    99         *         same as current IHF mode of the system, KErrAlreadyExist will
       
   100         *         be returned.
       
   101         *         If the headset or other audio accessory is connected, then IHF
       
   102         *         mode can't be activated, and KErrAccessDenied will be 
       
   103         *         returned.
       
   104         */
       
   105         IMPORT_C TInt SetIhfModeFromPhone( 
       
   106             TBool aMode, 
       
   107             TBool aShowNote = EFalse );
       
   108 
       
   109     };
       
   110 
       
   111 #endif // RPHCLTIHF_H