phoneclientserver/phoneclient/Inc/CommandHandler/RPhCltCommandHandlerNotify.h
changeset 46 2fa1fa551b0b
parent 42 35488577e233
child 48 78df25012fda
equal deleted inserted replaced
42:35488577e233 46:2fa1fa551b0b
     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:  Observer getting notifications about 
       
    15 *                command handler requests from Phone Server.
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef RPHCLTCOMMANDHANDLERNOTIFY_H
       
    20 #define RPHCLTCOMMANDHANDLERNOTIFY_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 
       
    26 //  FORWARD DECLARATIONS
       
    27 class RPhCltServer;
       
    28 
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  Observer getting notifications about command handler requests
       
    34 *  from Phone Server.
       
    35 *
       
    36 *  @lib PhoneClient.lib
       
    37 *  @since 3.2
       
    38 */
       
    39 class RPhCltCommandHandlerNotify 
       
    40 :   public RSubSessionBase
       
    41     {
       
    42     public: // Constructors and destructors.
       
    43 
       
    44         /**
       
    45          * Constructor.
       
    46          */
       
    47         RPhCltCommandHandlerNotify();
       
    48 
       
    49 
       
    50     public: // New functions
       
    51 
       
    52         /**
       
    53         * Open subsession to server.
       
    54         * 
       
    55         * @param aServer Pre-opened server session.
       
    56         * @return Symbian OS error code of the success of the opening.
       
    57         */
       
    58         TInt Open( RPhCltServer& aServer );
       
    59 
       
    60 
       
    61         /**
       
    62         * Close subsession.
       
    63         */
       
    64         void Close();
       
    65     
       
    66 
       
    67         /**
       
    68         * Notifies when a Command handler request arrives.
       
    69         *
       
    70         * @param aStatus Status to be changed when command handler request
       
    71         *                has arrived.
       
    72         * @param aCommandArgs Command argument storage place. 
       
    73         *                     That is, packaged version of class 
       
    74         *                     TPhCltComHandCommandParameters.
       
    75         */
       
    76         void NotifyComHandCommand( 
       
    77             TRequestStatus& aStatus, 
       
    78             TDes8& aCommandArgs );
       
    79 
       
    80 
       
    81         /**
       
    82         * Cancel pending command handler request notification.
       
    83         */
       
    84         void CancelNotifyComHandCommand() const;
       
    85         
       
    86 
       
    87         /**
       
    88         * Respond to client's command handler request.
       
    89         *
       
    90         * @param aResultCode Result of the response 
       
    91         *        (previous function execution).
       
    92         * @return KErrNone if respond succeeded, otherwise Symbian error code.
       
    93         */
       
    94         TInt RespondClient( const TInt aResultCode );
       
    95 
       
    96 
       
    97     private:
       
    98 
       
    99         // Prohibit copy constructor if not deriving from CBase.
       
   100         RPhCltCommandHandlerNotify( const RPhCltCommandHandlerNotify& );
       
   101 
       
   102         // Prohibit assigment operator if not deriving from CBase.
       
   103         RPhCltCommandHandlerNotify& operator=( 
       
   104             const RPhCltCommandHandlerNotify& );
       
   105 
       
   106     };
       
   107 
       
   108 #endif    // RPHCLTCOMMANDHANDLERNOTIFY_H
       
   109 
       
   110 // End of File