sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // mmrcserverpolicaymanager.h sl@0: // sl@0: // sl@0: sl@0: #ifndef MMRCSERVERPOLICYMANAGER_H__ sl@0: #define MMRCSERVERPOLICYMANAGER_H__ sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include "mmrcclientserver.h" sl@0: sl@0: class CMMRCServerSession; sl@0: class CMMRCServerController; sl@0: class MMMRCServerInfoState; sl@0: sl@0: /** sl@0: @internalComponent sl@0: sl@0: This class implements the MMRC Server Rule Manager. sl@0: The main purpose of this class is to sl@0: */ sl@0: NONSHARABLE_CLASS( CMMRCServerRuleManager ): public CBase sl@0: { sl@0: public: sl@0: /** sl@0: * Constructs, and returns a pointer to, a new CMMRCServerRuleManager object. sl@0: * Leaves on failure. sl@0: * @param CMMRCServerController& A reference on the MMRC Server controller sl@0: * @return CMMRCServerRuleManager* A pointer to newly created utlitly object. sl@0: */ sl@0: static CMMRCServerRuleManager* NewL(CMMRCServerController& aServerController); sl@0: sl@0: /** sl@0: * Constructs, leaves object on the cleanup stack, and returns a pointer sl@0: * to, a new CMMRCServerRuleManager object. sl@0: * Leaves on failure. sl@0: * @param CMMRCServerController& A reference on the MMRC Server controller sl@0: * @return CMMRCServerRuleManager* A pointer to newly created utlitly object. sl@0: */ sl@0: static CMMRCServerRuleManager* NewLC(CMMRCServerController& aServerController); sl@0: sl@0: /** sl@0: * Destructor. sl@0: */ sl@0: ~CMMRCServerRuleManager(); sl@0: sl@0: public: sl@0: /** sl@0: * Deduce the rule on the message according to the previous and current state sl@0: * Return KErrNotFound if no rule has been found. sl@0: * Leaves on failure. sl@0: * @param TAudioState aAudioStateAllocatedResource sl@0: * @param TAudioState aAudioStateRequiringProcess sl@0: * @return TMMRCRule rule sl@0: */ sl@0: TMMRCRule DecisionRule( TAudioState aAudioStateAllocatedResource, TAudioState aAudioStateRequiringProcess ); sl@0: sl@0: /** sl@0: * Deduce the rule on the message according to the previous and current state sl@0: * Return KErrNotFound if no rule has been found. sl@0: * @param TAudioState aAudioStateAllocatedResource sl@0: * @param TAudioState aAudioStateRequiringProcess sl@0: * @return TMMRCRule rule sl@0: */ sl@0: TReason ActionReason( TAudioState aAudioStateLastCommited, TAudioState aAudioStateRequested ); sl@0: sl@0: private: sl@0: /** sl@0: * By default Symbian 2nd phase constructor is private. sl@0: * @param CMMRCServerController& A reference on the MMRC Server controller sl@0: */ sl@0: CMMRCServerRuleManager(CMMRCServerController& aServerController); sl@0: sl@0: /** sl@0: * By default Symbian 2nd phase constructor is private. sl@0: */ sl@0: void ConstructL(); sl@0: sl@0: private: sl@0: CMMRCServerController& iMMRCServerController; sl@0: }; sl@0: sl@0: #endif //__MMRCSERVERPOLICYMANAGER_H__ sl@0: