contentmgmt/referencedrmagent/TestAgent/testagentrightsmanager.h
changeset 15 da2ae96f639b
equal deleted inserted replaced
10:afc583cfa176 15:da2ae96f639b
       
     1 /*
       
     2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __TESTAGENTRIGHTSMANAGER_H__
       
    20 #define __TESTAGENTRIGHTSMANAGER_H__
       
    21 
       
    22 #include <caf/caf.h>
       
    23 #include "agentinterface.h"
       
    24 
       
    25 /** A simple agent implementing a small part of OMA DRM v1.0
       
    26 
       
    27 Several of the functions such as Copy, Rename and GetDir are not supported
       
    28 by this agent.
       
    29 
       
    30  */
       
    31 class CTestAgentRightsManager : public ContentAccess::CAgentRightsManager
       
    32 		{
       
    33 	public:
       
    34 		static CTestAgentRightsManager* NewL();
       
    35 		static CTestAgentRightsManager* NewLC();
       
    36 
       
    37 		~CTestAgentRightsManager();
       
    38 
       
    39 	public:
       
    40 		// From CAgentRightsManager
       
    41 		virtual void  ListAllRightsL (ContentAccess::RStreamablePtrArray< ContentAccess::CRightsInfo > &aArray) const; 
       
    42 		virtual void  ListRightsL (ContentAccess::RStreamablePtrArray< ContentAccess::CRightsInfo > &aArray, const TDesC &aUri) const;  
       
    43 		virtual void  ListRightsL (ContentAccess::RStreamablePtrArray< ContentAccess::CRightsInfo > &aArray, ContentAccess::TVirtualPathPtr &aVirtualPath) const;
       
    44 		virtual void  ListContentL (ContentAccess::RStreamablePtrArray< ContentAccess::CVirtualPath > &aArray, ContentAccess::CRightsInfo &aRightsInfo) const;
       
    45 		virtual ContentAccess::MAgentRightsBase *  GetRightsDataL (const ContentAccess::CRightsInfo &aRightsInfo) const;
       
    46 		virtual TInt  DeleteRightsObject (const ContentAccess::CRightsInfo &aRightsInfo);
       
    47 		virtual TInt  DeleteAllRightsObjects (const ContentAccess::TVirtualPathPtr &aVirtualPath);
       
    48 		virtual TInt SetProperty(ContentAccess::TAgentProperty aProperty, TInt aValue);
       
    49 	private:
       
    50 		CTestAgentRightsManager();
       
    51 		};
       
    52 
       
    53 #endif // __TESTAGENTMANAGER_H__