os/mm/devsoundextensions/telephonyaudiorouting/Session/inc/TelephonyAudioRoutingPolicyRequest.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 2006 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:   Active object for each asynchronous request in RTelephonyAudioRoutingSession.
    15 *				 Notifies MTelephonyAudioRoutingPolicyObserver upon request completion.
    16 *
    17 */
    18 
    19 
    20 
    21 
    22 #ifndef TELEPHONYAUDIOROUTINGPOLICYREQUEST_H
    23 #define TELEPHONYAUDIOROUTINGPOLICYREQUEST_H
    24 
    25 #include <e32base.h>
    26 #include "TelephonyAudioRoutingManagerSession.h"
    27 #include "TelephonyAudioRoutingClientServer.h"
    28 #include "TelephonyAudioRoutingManager.h"
    29 
    30 // CLASS DECLARATION
    31 
    32 /**
    33 *  Implements active object for outstanding asynchronous request.
    34 *
    35 *  @lib TelephonyAudioRoutingSession.lib
    36 *  @since Series 60 3.1
    37 */
    38 class CTelephonyAudioRoutingPolicyRequest : public CActive
    39     {
    40     
    41     public:  // Constructors and destructor
    42 
    43         /**
    44         * Two-phased constructor.
    45         */
    46        
    47         static CTelephonyAudioRoutingPolicyRequest* NewL( RTelephonyAudioRoutingManagerSession& aSession, MTelephonyAudioRoutingPolicyObserver& aObserver, CTelephonyAudioRoutingManager& aAudioRouting, TTelAudRtngServRqst aRequest );
    48 
    49 
    50         /**
    51         * Destructor.
    52         */
    53         virtual ~CTelephonyAudioRoutingPolicyRequest();
    54 
    55     public: // New functions
    56 
    57         /**
    58         * Completes the outstanding request.
    59         * @since Series 60 3.1
    60         * @param aRequest Request being completed
    61         * @param aError A standard system error code
    62         * @return void
    63         */
    64         void CompleteRequest( TTelAudRtngServRqst aRequest, TInt aError );
    65 
    66     private:  // Functions from base classes
    67 
    68         /**
    69         * From CActive
    70         * Cancel outstanding request
    71         * @param none
    72         * @return void
    73         
    74         */
    75 		void DoCancel(); 
    76 
    77         /**
    78         * From CActive
    79 		* Implementation of CActive::RunL. Called when server request has completed.
    80         * @param none
    81         * @return void
    82 		
    83 		**/
    84 		void RunL();
    85 
    86     private:
    87 
    88         /**
    89         * C++ default constructor.
    90         */
    91         CTelephonyAudioRoutingPolicyRequest( RTelephonyAudioRoutingManagerSession& aSession, MTelephonyAudioRoutingPolicyObserver& aObserver, CTelephonyAudioRoutingManager& aAudioRouting, TTelAudRtngServRqst aRequest );
    92 
    93 
    94         /**
    95         * By default Symbian 2nd phase constructor is private.
    96         */
    97         void ConstructL();
    98 
    99     private:    // Data
   100 
   101 		
   102 		RTelephonyAudioRoutingManagerSession& iManagerSession;
   103     	MTelephonyAudioRoutingPolicyObserver& iPolicyObserver;
   104     	CTelephonyAudioRoutingManager& iAudioRoutingManager;
   105     	TTelAudRtngServRqst iRequest;
   106 
   107 	private:    // Friend classes
   108         friend class RTelephonyAudioRoutingManagerSession;
   109 
   110     };
   111 
   112 #endif      // TELEPHONYAUDIOROUTINGPOLICYREQUEST_H
   113 
   114 // End of File