sl@0: /* sl@0: * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @internalComponent sl@0: @released sl@0: */ sl@0: sl@0: sl@0: #ifndef __F32DEFAULTATTRIBUTES_H__ sl@0: #define __F32DEFAULTATTRIBUTES_H__ sl@0: sl@0: namespace ContentAccess sl@0: { sl@0: class TVirtualPathPtr; sl@0: class RAttributeSet; sl@0: class RStringAttributeSet; sl@0: sl@0: /** sl@0: All attribute values are common between the CAgentData, CAgentContent and sl@0: CAgentManager. The F32 attributes are mostly fixed anyway so this class sl@0: implements helper functions for all of the attribute functions sl@0: sl@0: @internalComponent sl@0: @released sl@0: */ sl@0: class TF32DefaultAttributes sl@0: { sl@0: public: sl@0: static TInt GetAttribute(TInt aAttribute, TInt& aValue, const TDesC& aUri); sl@0: static TInt GetAttributeSet(RAttributeSet& aAttributeSet, const TDesC& aUri); sl@0: static TInt GetStringAttribute(TInt aAttribute, TDes& aValue, const TDesC& aUri); sl@0: static TInt GetStringAttributeSet(RStringAttributeSet& aStringAttributeSet, const TDesC& aUri); sl@0: static void GetMimeTypeL(const TDesC& aUri, TDes8& aMimeType); sl@0: sl@0: static TInt GetAttribute(TInt aAttribute, TInt& aValue, RFile& aFile); sl@0: static TInt GetAttributeSet(RAttributeSet& aAttributeSet, RFile& aFile); sl@0: static TInt GetStringAttribute(TInt aAttribute, TDes& aValue, RFile& aFile); sl@0: static TInt GetStringAttributeSet(RStringAttributeSet& aStringAttributeSet, RFile& aFile); sl@0: static void GetMimeTypeL(RFile& aFile, TDes8& aMimeType); sl@0: sl@0: #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT sl@0: static TInt GetAttribute(const TDesC8& aHeaderData, TInt aAttribute, TInt& aValue); sl@0: static TInt GetAttributeSet(const TDesC8& aHeaderData, RAttributeSet& aAttributeSet); sl@0: static TInt GetStringAttribute(const TDesC8& aHeaderData, TInt aAttribute, TDes& aValue); sl@0: static TInt GetStringAttributeSet(const TDesC8& aHeaderData, RStringAttributeSet& aStringAttributeSet); sl@0: #endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT sl@0: sl@0: static TInt CheckUniqueId(const TDesC& aUniqueId); sl@0: static TInt CheckVirtualPath(const TVirtualPathPtr& aVirtualPath); sl@0: static TUint GetFileMode(TContentShareMode aMode); sl@0: }; sl@0: } // namespace ContentAccess sl@0: #endif // __F32DEFAULTATTRIBUTES_H__