mmresourcemgmt/mmresctrl/inc/mmrcserverrulemanager.h
changeset 0 40261b775718
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // mmrcserverpolicaymanager.h
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef MMRCSERVERPOLICYMANAGER_H__
       
    19 #define MMRCSERVERPOLICYMANAGER_H__
       
    20 
       
    21 #include <e32std.h>
       
    22 #include <e32base.h>
       
    23 #include <a3f/a3fbase.h>
       
    24 #include "mmrcclientserver.h"
       
    25 
       
    26 class CMMRCServerSession;
       
    27 class CMMRCServerController;
       
    28 class MMMRCServerInfoState;
       
    29 
       
    30 /**
       
    31 @internalComponent
       
    32 
       
    33 This class implements the MMRC Server Rule Manager.
       
    34 The main purpose of this class is to
       
    35 */
       
    36 NONSHARABLE_CLASS( CMMRCServerRuleManager ): public CBase
       
    37 	{
       
    38 public:
       
    39 	/**
       
    40 	 * Constructs, and returns a pointer to, a new CMMRCServerRuleManager object.
       
    41 	 * Leaves on failure.
       
    42 	 * @param CMMRCServerController& A reference on the MMRC Server controller
       
    43 	 * @return CMMRCServerRuleManager* A pointer to newly created utlitly object.
       
    44 	 */
       
    45 	static CMMRCServerRuleManager* NewL(CMMRCServerController& aServerController);
       
    46 
       
    47 	/**
       
    48 	 * Constructs, leaves object on the cleanup stack, and returns a pointer
       
    49 	 * to, a new CMMRCServerRuleManager object.
       
    50 	 * Leaves on failure.
       
    51 	 * @param CMMRCServerController& A reference on the MMRC Server controller
       
    52 	 * @return CMMRCServerRuleManager* A pointer to newly created utlitly object.
       
    53 	 */
       
    54 	static CMMRCServerRuleManager* NewLC(CMMRCServerController& aServerController);
       
    55 
       
    56 	/**
       
    57 	 * Destructor.
       
    58 	 */
       
    59 	~CMMRCServerRuleManager();
       
    60 
       
    61 public:
       
    62 	/**
       
    63 	 * Deduce the rule on the message according to the previous and current state
       
    64 	 * Return KErrNotFound if no rule has been found.
       
    65 	 * Leaves on failure.
       
    66 	 * @param TAudioState aAudioStateAllocatedResource
       
    67 	 * @param TAudioState aAudioStateRequiringProcess
       
    68 	 * @return TMMRCRule rule
       
    69 	 */
       
    70 	TMMRCRule DecisionRule( TAudioState aAudioStateAllocatedResource, TAudioState aAudioStateRequiringProcess );
       
    71 
       
    72 	/**
       
    73 	 * Deduce the rule on the message according to the previous and current state
       
    74 	 * Return KErrNotFound if no rule has been found.
       
    75 	 * @param TAudioState aAudioStateAllocatedResource
       
    76 	 * @param TAudioState aAudioStateRequiringProcess
       
    77 	 * @return TMMRCRule rule
       
    78 	 */
       
    79 	TReason ActionReason( TAudioState aAudioStateLastCommited, TAudioState aAudioStateRequested );
       
    80 
       
    81 private:
       
    82 	/**
       
    83 	 * By default Symbian 2nd phase constructor is private.
       
    84 	 * @param CMMRCServerController& A reference on the MMRC Server controller
       
    85 	 */
       
    86 	CMMRCServerRuleManager(CMMRCServerController& aServerController);
       
    87 
       
    88 	/**
       
    89 	 * By default Symbian 2nd phase constructor is private.
       
    90 	 */
       
    91 	void ConstructL();
       
    92 
       
    93 private:
       
    94 	CMMRCServerController& iMMRCServerController;
       
    95 	};
       
    96 
       
    97 #endif //__MMRCSERVERPOLICYMANAGER_H__
       
    98