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