os/security/contentmgmt/contentaccessfwfordrm/source/f32agent/f32defaultattributes.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/contentmgmt/contentaccessfwfordrm/source/f32agent/f32defaultattributes.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,70 @@
1.4 +/*
1.5 +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +/**
1.23 + @file
1.24 + @internalComponent
1.25 + @released
1.26 +*/
1.27 +
1.28 +
1.29 +#ifndef __F32DEFAULTATTRIBUTES_H__
1.30 +#define __F32DEFAULTATTRIBUTES_H__
1.31 +
1.32 +namespace ContentAccess
1.33 + {
1.34 + class TVirtualPathPtr;
1.35 + class RAttributeSet;
1.36 + class RStringAttributeSet;
1.37 +
1.38 + /**
1.39 + All attribute values are common between the CAgentData, CAgentContent and
1.40 + CAgentManager. The F32 attributes are mostly fixed anyway so this class
1.41 + implements helper functions for all of the attribute functions
1.42 +
1.43 + @internalComponent
1.44 + @released
1.45 + */
1.46 + class TF32DefaultAttributes
1.47 + {
1.48 + public:
1.49 + static TInt GetAttribute(TInt aAttribute, TInt& aValue, const TDesC& aUri);
1.50 + static TInt GetAttributeSet(RAttributeSet& aAttributeSet, const TDesC& aUri);
1.51 + static TInt GetStringAttribute(TInt aAttribute, TDes& aValue, const TDesC& aUri);
1.52 + static TInt GetStringAttributeSet(RStringAttributeSet& aStringAttributeSet, const TDesC& aUri);
1.53 + static void GetMimeTypeL(const TDesC& aUri, TDes8& aMimeType);
1.54 +
1.55 + static TInt GetAttribute(TInt aAttribute, TInt& aValue, RFile& aFile);
1.56 + static TInt GetAttributeSet(RAttributeSet& aAttributeSet, RFile& aFile);
1.57 + static TInt GetStringAttribute(TInt aAttribute, TDes& aValue, RFile& aFile);
1.58 + static TInt GetStringAttributeSet(RStringAttributeSet& aStringAttributeSet, RFile& aFile);
1.59 + static void GetMimeTypeL(RFile& aFile, TDes8& aMimeType);
1.60 +
1.61 +#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
1.62 + static TInt GetAttribute(const TDesC8& aHeaderData, TInt aAttribute, TInt& aValue);
1.63 + static TInt GetAttributeSet(const TDesC8& aHeaderData, RAttributeSet& aAttributeSet);
1.64 + static TInt GetStringAttribute(const TDesC8& aHeaderData, TInt aAttribute, TDes& aValue);
1.65 + static TInt GetStringAttributeSet(const TDesC8& aHeaderData, RStringAttributeSet& aStringAttributeSet);
1.66 +#endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
1.67 +
1.68 + static TInt CheckUniqueId(const TDesC& aUniqueId);
1.69 + static TInt CheckVirtualPath(const TVirtualPathPtr& aVirtualPath);
1.70 + static TUint GetFileMode(TContentShareMode aMode);
1.71 + };
1.72 +} // namespace ContentAccess
1.73 +#endif // __F32DEFAULTATTRIBUTES_H__