omadrm/drmengine/agentv2/inc/Oma2AgentAttributes.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 17 Dec 2009 08:52:27 +0200
changeset 0 95b198f216e5
child 18 8a03a285ab14
permissions -rw-r--r--
Revision: 200949 Kit: 200951

/*
* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  Declaration of the Oma2AgentAttributes class
*
*/



#ifndef __Oma2AGENTATTRIBUTES_H__
#define __Oma2AGENTATTRIBUTES_H__

#include <caf/caftypes.h>
#include <caf/virtualpathptr.h>
#include <caf/AttributeSet.h>
#include <caf/StringAttributeSet.h>
#include "Oma2Agent.h"
#include "Oma2Dcf.h"

using namespace ContentAccess;

class RDRMRightsClient;

/**
All attribute values are common between the CAgentData, CAgentContent and
CAgentManager. The OMA DCF attributes are mostly fixed anyway so this class
implements helper functions for all of the attribute functions
*/

class TOma2AgentAttributes
	{
public:
	static TInt GetAttribute(
	    CDcfCommon& aDcfFile,
	    TInt aAttribute, 
	    const TVirtualPathPtr& aVirtualPath,
	    RDRMRightsClient* aRightsClient = NULL);
	    
	static TInt GetAttributeSet(
	    CDcfCommon& aDcfFile,
	    RAttributeSet& aAttributeSet,
	    const TVirtualPathPtr& aVirtualPath,
	    RDRMRightsClient* aRightsClient = NULL);
	    
	static TInt GetStringAttribute(
	    CDcfCommon& aDcfFile,
	    TInt aAttribute,
	    TDes& aValue,
	    const TVirtualPathPtr& aVirtualPath,
	    RDRMRightsClient* aRightsClient = NULL);
	    
	static TInt GetStringAttributeSet(
	    CDcfCommon& aDcfFile,
	    RStringAttributeSet& aStringAttributeSet,
	    const TVirtualPathPtr& aVirtualPath,
	    RDRMRightsClient* aRightsClient = NULL);
	};

#endif // __Oma2AGENTATTRIBUTES_H__