phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvCallRequest.h
changeset 46 2fa1fa551b0b
parent 42 35488577e233
child 48 78df25012fda
equal deleted inserted replaced
42:35488577e233 46:2fa1fa551b0b
     1 /*
       
     2 * Copyright (c) 2002-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:  Call Request.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPHSRVCALLREQUEST_H
       
    20 #define CPHSRVCALLREQUEST_H
       
    21 
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <phclttypes.h> 
       
    26 
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 // Default emergency number
       
    31 _LIT( KPhSrvUsedEmergencyCallNumber , "112" );
       
    32 
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 class CPhSrvSubSessionBase;
       
    36 
       
    37 
       
    38 // CLASS DECLARATION
       
    39 
       
    40 /**
       
    41 *  Call request class.
       
    42 *
       
    43 *  @since 1.0
       
    44 */
       
    45 class CPhSrvCallRequest : public CBase
       
    46     {
       
    47     public:  // Constructors and destructor
       
    48 
       
    49         /**
       
    50         * Tell the external client (who requested that a number was called) the
       
    51         * result of their actions. This information has come via the notifier
       
    52         * (i.e. the phone app engine).
       
    53         *
       
    54         * @param aMessage The outstanding client request which will be completed
       
    55         *                 when the call initiation outcome is known.
       
    56         * @param aArguments The call arguments, such as phone number, contact 
       
    57         *                   id, client window group etc.
       
    58         * @param aSubSessionHandle The subsession handle.
       
    59         * @return Pointer to created CPhSrvCallRequest instance.
       
    60         */
       
    61         static CPhSrvCallRequest* NewLC(
       
    62             const RMessage2& aMessage, 
       
    63             const TPhCltCallArgs& aArguments, 
       
    64             TInt aSubSessionHandle );
       
    65 
       
    66         /**
       
    67         * Constructor for Emergency call object only.
       
    68         */
       
    69         static CPhSrvCallRequest* NewL();
       
    70 
       
    71 
       
    72     public: // New functions
       
    73 
       
    74         /**
       
    75         * Tell the external client (who requested that a number was called) the
       
    76         * result of their actions. This information has come via the notifier
       
    77         * (i.e. the phone app engine).
       
    78         *
       
    79         * @param aResultOfAttemptingCall 
       
    80         *        The result of initiating an earlier call.
       
    81         */
       
    82         void InformOfCallAttemptResult( 
       
    83             TPhCltPhoneResults aResultOfAttemptingCall );
       
    84 
       
    85         /**
       
    86         * Cancel the asynchronous dial process. Completes client request with
       
    87         * KErrCancel
       
    88         */
       
    89         void Cancel();
       
    90 
       
    91         /**
       
    92         * The sub-session handle.
       
    93         *
       
    94         * @return The unique handle associated with the subsession which 
       
    95         *         initiated a call request.
       
    96         */
       
    97         TInt SubSessionHandle() const;
       
    98 
       
    99         /**
       
   100         * The arguments for the call.
       
   101         *
       
   102         * @return The call arguments.
       
   103         */
       
   104         const TPhCltCallArgs& CallArguments() const;
       
   105 
       
   106         /**
       
   107         * Update Emergency call status
       
   108         * @param aMessage The outstanding client request which will be completed
       
   109         *                 when the call initiation outcome is known.
       
   110         * @param aArguments The call arguments, such as phone number, 
       
   111         *                   contact id, client window group etc.
       
   112         * @param aSubSessionHandle Subsession handle to emergency call.
       
   113         */
       
   114         void UpdateEmercgencyCall( 
       
   115             const RMessage2& aMessage, 
       
   116             const TPhCltCallArgs& aArguments, 
       
   117             TInt aSubSessionHandle );
       
   118 
       
   119         /**
       
   120         * Clear the Emergency call object data.
       
   121         */
       
   122         void ClearEmergencyCall();
       
   123 
       
   124 
       
   125     private:
       
   126 
       
   127         /**
       
   128         * C++ constructor
       
   129         */
       
   130         CPhSrvCallRequest( 
       
   131             const RMessage2& aMessage, 
       
   132             const TPhCltCallArgs& aArguments, 
       
   133             TInt aSubSessionHandle );
       
   134 
       
   135         /**
       
   136         * C++ constructor
       
   137         */
       
   138         CPhSrvCallRequest();
       
   139 
       
   140 
       
   141     private:  // Data
       
   142 
       
   143         // A list of requests made by the external call interface that the phone
       
   144         // app should dial. It completes them sequentially after its finished 
       
   145         // the previous call.
       
   146         RMessage2       iPendingRequestPointer;
       
   147 
       
   148         // The object responsible for processing external client call requests. 
       
   149         // This is essentially an interface to the phone app engine.
       
   150         TPhCltCallArgs  iCallArguments;
       
   151 
       
   152         // A handle to the subsession that initiated this request.
       
   153         TInt            iSubSessionHandle;
       
   154     };
       
   155 
       
   156 
       
   157 #endif // CPHSRVCALLREQUEST_H
       
   158 
       
   159 
       
   160 // End of File