messagingfw/msgtest/testutils/caf2/test/TestAgent/testagentrightsmanager.h
changeset 0 8e480a14352b
child 22 d2c4c66342f3
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     1 // Copyright (c) 2003-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 //
       
    15 
       
    16 #ifndef __TESTAGENTRIGHTSMANAGER_H__
       
    17 #define __TESTAGENTRIGHTSMANAGER_H__
       
    18 
       
    19 #include <caf/caf.h>
       
    20 #include <caf\agentinterface.h>
       
    21 
       
    22 using namespace ContentAccess;
       
    23 
       
    24 /** A simple agent implementing a small part of OMA DRM v1.0
       
    25 
       
    26 Several of the functions such as Copy, Rename and GetDir are not supported
       
    27 by this agent.
       
    28 
       
    29  */
       
    30 class CTestAgentRightsManager : public ContentAccess::CAgentRightsManager
       
    31 		{
       
    32 	public:
       
    33 		static CTestAgentRightsManager* NewL();
       
    34 		static CTestAgentRightsManager* NewLC();
       
    35 
       
    36 		~CTestAgentRightsManager();
       
    37 
       
    38 	public:
       
    39 		// From CAgentRightsManager
       
    40 		virtual void  ListAllRightsL (RStreamablePtrArray< CRightsInfo > &aArray) const; 
       
    41 		virtual void  ListRightsL (RStreamablePtrArray< CRightsInfo > &aArray, const TDesC &aUri) const;  
       
    42 		virtual void  ListRightsL (RStreamablePtrArray< CRightsInfo > &aArray, TVirtualPathPtr &aVirtualPath) const;
       
    43 		virtual void  ListContentL (RStreamablePtrArray< CVirtualPath > &aArray, CRightsInfo &aRightsInfo) const;
       
    44 		virtual MAgentRightsBase *  GetRightsDataL (const CRightsInfo &aRightsInfo) const;
       
    45 		virtual TInt  DeleteRightsObject (const CRightsInfo &aRightsInfo);
       
    46 		virtual TInt  DeleteAllRightsObjects (const TVirtualPathPtr &aVirtualPath);
       
    47 		virtual TInt SetProperty(TAgentProperty aProperty, TInt aValue);
       
    48 	private:
       
    49 		CTestAgentRightsManager();
       
    50 		void ConstructL();
       
    51 		};
       
    52 
       
    53 #endif // __TESTAGENTMANAGER_H__