phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvSubSessionNotifier.h
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:  Sub Session Notifier.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPHSRVSUBSESSIONNOTIFIER_H
       
    20 #define CPHSRVSUBSESSIONNOTIFIER_H
       
    21 
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <cphcltextphonedialdata.h>
       
    26 #include <CPhCltEmergencyCall.h> // for TPhCltEmergencyNumber
       
    27 #include "CPhSrvSubSessionBase.h"
       
    28 #include "MPhSrvEmergencyInitiators.h"
       
    29 #include "MPhSrvObjectInitiators.h"
       
    30 #include "MPhSrvComHandInitiators.h"
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  Call Notifier Subsession.
       
    36 *
       
    37 *  @since 1.0
       
    38 */
       
    39 class CPhSrvSubSessionNotifier :
       
    40     public CPhSrvSubSessionBase, 
       
    41     public MPhSrvComHandInitiator, 
       
    42     public MPhSrvInitiatorCall,
       
    43     public MPhSrvEmergencyCall
       
    44     {
       
    45     private:
       
    46 
       
    47 
       
    48     public:  // Constructors and destructor
       
    49 
       
    50         /**
       
    51         * Constructor
       
    52         *
       
    53         * @param aSession The session where this subsession belongs. 
       
    54         */
       
    55         CPhSrvSubSessionNotifier( CPhSrvSession& aSession );
       
    56 
       
    57         /**
       
    58         * Destructor
       
    59         */
       
    60         ~CPhSrvSubSessionNotifier();
       
    61 
       
    62         /**
       
    63         * Symbian 2nd phase constructor.
       
    64         */
       
    65         void ConstructL();
       
    66        
       
    67 
       
    68     private:  // Functions from base classes
       
    69 
       
    70         /**
       
    71         * @see MPhSrvMessageDecoder
       
    72         */
       
    73         TBool PhSrvMessageDecoderCanProcessMessage( TInt aFunction );
       
    74 
       
    75         /**
       
    76         * @see MPhSrvMessageProcessor
       
    77         */
       
    78         void PhSrvMessageProcessorHandleMessageL( const RMessage2& aMessage );
       
    79 
       
    80         /**
       
    81         * Called by the notification manager when the phone app engine should
       
    82         * be informed that it needs to make a call.
       
    83         *
       
    84         * @see MPhSrvInitiatorCall
       
    85         */		
       
    86 		void InitiatorMakeAsynchronousCallL( CPhCltExtPhoneDialData& aArgs  );
       
    87         /**								
       
    88         * Does this subsession have a pending request?
       
    89         *
       
    90         * @see MPhSrvInitiatorCall
       
    91         */
       
    92         TBool InitiatorIsReadyToMakeCall() const;
       
    93         
       
    94         /**
       
    95         * Called by the notification manager when the phone app engine should
       
    96         * be informed that it needs to make a call.
       
    97         *
       
    98         * @see MPhSrvInitiatorCall
       
    99         */
       
   100         void InitiatorMakeEmergencyCall( const RMessage2& aMessage );
       
   101         
       
   102         /**
       
   103         * Does this subsession have a pending request?
       
   104         *
       
   105         * @see MPhSrvInitiatorCall
       
   106         */
       
   107         TBool InitiatorIsReadyToMakeEmergencyCall() const;
       
   108         
       
   109         /**
       
   110         * @see MPhSrvComHandInitiator
       
   111         */
       
   112         void InitiatorMakeAsynchronousComHandRequest( 
       
   113             const TPhCltComHandCommandParameters& 
       
   114                 aParams );
       
   115         
       
   116         /**
       
   117         * @see MPhSrvComHandInitiator
       
   118         */
       
   119         TBool InitiatorIsReadyToPerformRequest() const;
       
   120 
       
   121     private: // SubSession function handlers
       
   122 
       
   123         void CmdSubSessionCloseL( const RMessage2& aMessage );
       
   124 
       
   125         void CmdSubSessionNotifyCallRequestL( const RMessage2& aMessage );
       
   126 
       
   127         void CmdSubSessionNotifyCallRequestCancelL( const RMessage2& aMessage );
       
   128 
       
   129         void CmdSubSessionReportCallResultL( const RMessage2& aMessage );
       
   130         
       
   131         void CmdSubSessionDialDataL ( const RMessage2& aMessage );
       
   132 
       
   133 		void CmdSubSessionNotifyEmergencyL ( const RMessage2& aMessage );
       
   134 
       
   135         void CmdSubSessionNotifyEmergencyCancel( const RMessage2& aMessage );
       
   136 
       
   137         void CmdSubSessionReportEmergencyCallResultL( const RMessage2& aMessage );
       
   138 
       
   139         void CmdSubSessionComHandNotifyRequestL( 
       
   140             const RMessage2& aMessage );
       
   141 
       
   142         void CmdSubSessionComHandNotifyRequestCancelL( 
       
   143             const RMessage2& aMessage );
       
   144 
       
   145         void CmdSubSessionComHandNotifyReportL( 
       
   146             const RMessage2& aMessage );
       
   147             
       
   148         /**
       
   149         * Clones call arguments to object
       
   150         *
       
   151         * @param aArgs Arguments to be cloned.
       
   152         */    
       
   153         void CmdSubSessionCloneDialDataL( CPhCltExtPhoneDialData& aArgs );
       
   154         
       
   155     private:     // Data
       
   156 
       
   157         // Indicates whether we have an pending request
       
   158         TBool                            iHavePendingDialRequestPointer;
       
   159     
       
   160         // Initialized when the phone app engine is 
       
   161         // ready to handle dial requests.
       
   162         RMessage2                        iPendingDialRequestPointer;
       
   163         
       
   164         // Indicates whether we have an pending request
       
   165         TBool                            iHavePendingEmergencyRequestPointer;
       
   166     
       
   167         // Initialized when the phone app engine is 
       
   168         // ready to handle dial requests.
       
   169         RMessage2                        iPendingEmergencyRequestPointer;
       
   170         
       
   171         //Dialdata pointer used to save dialdata arguments (for phone)
       
   172         CPhCltExtPhoneDialData*          iDialData;
       
   173         
       
   174         TPhCltEmergencyNumber            iTelNumber;
       
   175    
       
   176         TPckg< TPhCltEmergencyNumber >   iTelNumberPckg;
       
   177         
       
   178         // Indicates whether we have an pending request
       
   179         TBool                       iHavePendingComHandRequestPointer;
       
   180     
       
   181         // Initialized when the phone app engine is 
       
   182         // ready to handle command handler requests.
       
   183         RMessage2                   iPendingComHandRequestPointer;
       
   184         
       
   185 
       
   186     };
       
   187 
       
   188 #endif      // CPHSRVSUBSESSIONNOTIFIER_H
       
   189 
       
   190 
       
   191 // End of File