os/mm/devsoundextensions/telephonyaudiorouting/Session/inc/TelephonyAudioRoutingPolicyRequest.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/devsoundextensions/telephonyaudiorouting/Session/inc/TelephonyAudioRoutingPolicyRequest.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,114 @@
1.4 +/*
1.5 +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: Active object for each asynchronous request in RTelephonyAudioRoutingSession.
1.18 +* Notifies MTelephonyAudioRoutingPolicyObserver upon request completion.
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +
1.24 +
1.25 +#ifndef TELEPHONYAUDIOROUTINGPOLICYREQUEST_H
1.26 +#define TELEPHONYAUDIOROUTINGPOLICYREQUEST_H
1.27 +
1.28 +#include <e32base.h>
1.29 +#include "TelephonyAudioRoutingManagerSession.h"
1.30 +#include "TelephonyAudioRoutingClientServer.h"
1.31 +#include "TelephonyAudioRoutingManager.h"
1.32 +
1.33 +// CLASS DECLARATION
1.34 +
1.35 +/**
1.36 +* Implements active object for outstanding asynchronous request.
1.37 +*
1.38 +* @lib TelephonyAudioRoutingSession.lib
1.39 +* @since Series 60 3.1
1.40 +*/
1.41 +class CTelephonyAudioRoutingPolicyRequest : public CActive
1.42 + {
1.43 +
1.44 + public: // Constructors and destructor
1.45 +
1.46 + /**
1.47 + * Two-phased constructor.
1.48 + */
1.49 +
1.50 + static CTelephonyAudioRoutingPolicyRequest* NewL( RTelephonyAudioRoutingManagerSession& aSession, MTelephonyAudioRoutingPolicyObserver& aObserver, CTelephonyAudioRoutingManager& aAudioRouting, TTelAudRtngServRqst aRequest );
1.51 +
1.52 +
1.53 + /**
1.54 + * Destructor.
1.55 + */
1.56 + virtual ~CTelephonyAudioRoutingPolicyRequest();
1.57 +
1.58 + public: // New functions
1.59 +
1.60 + /**
1.61 + * Completes the outstanding request.
1.62 + * @since Series 60 3.1
1.63 + * @param aRequest Request being completed
1.64 + * @param aError A standard system error code
1.65 + * @return void
1.66 + */
1.67 + void CompleteRequest( TTelAudRtngServRqst aRequest, TInt aError );
1.68 +
1.69 + private: // Functions from base classes
1.70 +
1.71 + /**
1.72 + * From CActive
1.73 + * Cancel outstanding request
1.74 + * @param none
1.75 + * @return void
1.76 +
1.77 + */
1.78 + void DoCancel();
1.79 +
1.80 + /**
1.81 + * From CActive
1.82 + * Implementation of CActive::RunL. Called when server request has completed.
1.83 + * @param none
1.84 + * @return void
1.85 +
1.86 + **/
1.87 + void RunL();
1.88 +
1.89 + private:
1.90 +
1.91 + /**
1.92 + * C++ default constructor.
1.93 + */
1.94 + CTelephonyAudioRoutingPolicyRequest( RTelephonyAudioRoutingManagerSession& aSession, MTelephonyAudioRoutingPolicyObserver& aObserver, CTelephonyAudioRoutingManager& aAudioRouting, TTelAudRtngServRqst aRequest );
1.95 +
1.96 +
1.97 + /**
1.98 + * By default Symbian 2nd phase constructor is private.
1.99 + */
1.100 + void ConstructL();
1.101 +
1.102 + private: // Data
1.103 +
1.104 +
1.105 + RTelephonyAudioRoutingManagerSession& iManagerSession;
1.106 + MTelephonyAudioRoutingPolicyObserver& iPolicyObserver;
1.107 + CTelephonyAudioRoutingManager& iAudioRoutingManager;
1.108 + TTelAudRtngServRqst iRequest;
1.109 +
1.110 + private: // Friend classes
1.111 + friend class RTelephonyAudioRoutingManagerSession;
1.112 +
1.113 + };
1.114 +
1.115 +#endif // TELEPHONYAUDIOROUTINGPOLICYREQUEST_H
1.116 +
1.117 +// End of File