os/security/contentmgmt/contentaccessfwfordrm/source/f32agent/f32defaultattributes.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2004-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 /**
    20  @file
    21  @internalComponent
    22  @released
    23 */
    24 
    25 
    26 #ifndef __F32DEFAULTATTRIBUTES_H__
    27 #define __F32DEFAULTATTRIBUTES_H__
    28 
    29 namespace ContentAccess
    30 	{
    31 	class TVirtualPathPtr;
    32 	class RAttributeSet;
    33 	class RStringAttributeSet;
    34 
    35 	/**
    36 	All attribute values are common between the CAgentData, CAgentContent and
    37 	CAgentManager. The F32 attributes are mostly fixed anyway so this class
    38 	implements helper functions for all of the attribute functions
    39 		 
    40 	 @internalComponent
    41 	 @released
    42 	 */
    43 	class TF32DefaultAttributes
    44 		{
    45 	public:
    46 		static TInt GetAttribute(TInt aAttribute, TInt& aValue, const TDesC& aUri);
    47 		static TInt GetAttributeSet(RAttributeSet& aAttributeSet, const TDesC& aUri);
    48 		static TInt GetStringAttribute(TInt aAttribute, TDes& aValue, const TDesC& aUri);
    49 		static TInt GetStringAttributeSet(RStringAttributeSet& aStringAttributeSet, const TDesC& aUri);
    50 		static void GetMimeTypeL(const TDesC& aUri, TDes8& aMimeType);
    51 		
    52 		static TInt GetAttribute(TInt aAttribute, TInt& aValue, RFile& aFile);
    53 		static TInt GetAttributeSet(RAttributeSet& aAttributeSet, RFile& aFile);
    54 		static TInt GetStringAttribute(TInt aAttribute, TDes& aValue, RFile& aFile);
    55 		static TInt GetStringAttributeSet(RStringAttributeSet& aStringAttributeSet, RFile& aFile);
    56 		static void GetMimeTypeL(RFile& aFile, TDes8& aMimeType);
    57 		
    58 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT		
    59 		static TInt GetAttribute(const TDesC8& aHeaderData, TInt aAttribute, TInt& aValue);
    60 		static TInt GetAttributeSet(const TDesC8& aHeaderData, RAttributeSet& aAttributeSet);
    61 		static TInt GetStringAttribute(const TDesC8& aHeaderData, TInt aAttribute, TDes& aValue);
    62 		static TInt GetStringAttributeSet(const TDesC8& aHeaderData, RStringAttributeSet& aStringAttributeSet);
    63 #endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
    64 
    65 		static TInt CheckUniqueId(const TDesC& aUniqueId);
    66 		static TInt CheckVirtualPath(const TVirtualPathPtr& aVirtualPath);	
    67 		static TUint GetFileMode(TContentShareMode aMode);
    68 		};
    69 } // namespace ContentAccess
    70 #endif // __F32DEFAULTATTRIBUTES_H__