os/mm/mmresourcemgmt/mmresctrl/inc/mmrcserverrulemanager.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mmresourcemgmt/mmresctrl/inc/mmrcserverrulemanager.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,98 @@
     1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// mmrcserverpolicaymanager.h
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#ifndef MMRCSERVERPOLICYMANAGER_H__
    1.22 +#define MMRCSERVERPOLICYMANAGER_H__
    1.23 +
    1.24 +#include <e32std.h>
    1.25 +#include <e32base.h>
    1.26 +#include <a3f/a3fbase.h>
    1.27 +#include "mmrcclientserver.h"
    1.28 +
    1.29 +class CMMRCServerSession;
    1.30 +class CMMRCServerController;
    1.31 +class MMMRCServerInfoState;
    1.32 +
    1.33 +/**
    1.34 +@internalComponent
    1.35 +
    1.36 +This class implements the MMRC Server Rule Manager.
    1.37 +The main purpose of this class is to
    1.38 +*/
    1.39 +NONSHARABLE_CLASS( CMMRCServerRuleManager ): public CBase
    1.40 +	{
    1.41 +public:
    1.42 +	/**
    1.43 +	 * Constructs, and returns a pointer to, a new CMMRCServerRuleManager object.
    1.44 +	 * Leaves on failure.
    1.45 +	 * @param CMMRCServerController& A reference on the MMRC Server controller
    1.46 +	 * @return CMMRCServerRuleManager* A pointer to newly created utlitly object.
    1.47 +	 */
    1.48 +	static CMMRCServerRuleManager* NewL(CMMRCServerController& aServerController);
    1.49 +
    1.50 +	/**
    1.51 +	 * Constructs, leaves object on the cleanup stack, and returns a pointer
    1.52 +	 * to, a new CMMRCServerRuleManager object.
    1.53 +	 * Leaves on failure.
    1.54 +	 * @param CMMRCServerController& A reference on the MMRC Server controller
    1.55 +	 * @return CMMRCServerRuleManager* A pointer to newly created utlitly object.
    1.56 +	 */
    1.57 +	static CMMRCServerRuleManager* NewLC(CMMRCServerController& aServerController);
    1.58 +
    1.59 +	/**
    1.60 +	 * Destructor.
    1.61 +	 */
    1.62 +	~CMMRCServerRuleManager();
    1.63 +
    1.64 +public:
    1.65 +	/**
    1.66 +	 * Deduce the rule on the message according to the previous and current state
    1.67 +	 * Return KErrNotFound if no rule has been found.
    1.68 +	 * Leaves on failure.
    1.69 +	 * @param TAudioState aAudioStateAllocatedResource
    1.70 +	 * @param TAudioState aAudioStateRequiringProcess
    1.71 +	 * @return TMMRCRule rule
    1.72 +	 */
    1.73 +	TMMRCRule DecisionRule( TAudioState aAudioStateAllocatedResource, TAudioState aAudioStateRequiringProcess );
    1.74 +
    1.75 +	/**
    1.76 +	 * Deduce the rule on the message according to the previous and current state
    1.77 +	 * Return KErrNotFound if no rule has been found.
    1.78 +	 * @param TAudioState aAudioStateAllocatedResource
    1.79 +	 * @param TAudioState aAudioStateRequiringProcess
    1.80 +	 * @return TMMRCRule rule
    1.81 +	 */
    1.82 +	TReason ActionReason( TAudioState aAudioStateLastCommited, TAudioState aAudioStateRequested );
    1.83 +
    1.84 +private:
    1.85 +	/**
    1.86 +	 * By default Symbian 2nd phase constructor is private.
    1.87 +	 * @param CMMRCServerController& A reference on the MMRC Server controller
    1.88 +	 */
    1.89 +	CMMRCServerRuleManager(CMMRCServerController& aServerController);
    1.90 +
    1.91 +	/**
    1.92 +	 * By default Symbian 2nd phase constructor is private.
    1.93 +	 */
    1.94 +	void ConstructL();
    1.95 +
    1.96 +private:
    1.97 +	CMMRCServerController& iMMRCServerController;
    1.98 +	};
    1.99 +
   1.100 +#endif //__MMRCSERVERPOLICYMANAGER_H__
   1.101 +