os/security/contentmgmt/contentaccessfwfordrm/source/f32agent/f32agentmanager.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of the License "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description: 
sl@0
    15
*
sl@0
    16
*/
sl@0
    17
sl@0
    18
sl@0
    19
/**
sl@0
    20
 @file
sl@0
    21
 @internalComponent
sl@0
    22
 @released
sl@0
    23
*/
sl@0
    24
sl@0
    25
#ifndef __F32AGENTMANAGER_H__
sl@0
    26
#define __F32AGENTMANAGER_H__
sl@0
    27
sl@0
    28
#include <caf/agentinterface.h>
sl@0
    29
sl@0
    30
namespace ContentAccess
sl@0
    31
	{
sl@0
    32
	class CF32AgentUi;
sl@0
    33
sl@0
    34
	/** 	
sl@0
    35
	* CF32AgentManager is an Ecom implementation of interface CAgentManager, 
sl@0
    36
	* and provides  a fall-back agent for content which is not restricted 
sl@0
    37
	* (i.e. backward compatibility for clients switching to 
sl@0
    38
	* Content-Access-Framework APIs).
sl@0
    39
	* 
sl@0
    40
	* Essentially, if the CA framework does not identify a piece of
sl@0
    41
	* content as restricted (or rights managed) then this agent
sl@0
    42
	* implementation is created to handle access to the content. As such the
sl@0
    43
	* content will be treated as a plaintext file.
sl@0
    44
	*
sl@0
    45
	* @internalComponent 
sl@0
    46
	* @released 
sl@0
    47
	*/
sl@0
    48
	class CF32AgentManager : public CAgentManager
sl@0
    49
		{
sl@0
    50
	public:
sl@0
    51
		/** 
sl@0
    52
		* 	Standard C-Class NewL() constructor 
sl@0
    53
		*/
sl@0
    54
		static CF32AgentManager* NewL();
sl@0
    55
		
sl@0
    56
		~CF32AgentManager(void);
sl@0
    57
sl@0
    58
sl@0
    59
	public:
sl@0
    60
		virtual TInt DeleteFile(const TDesC &aFileName);
sl@0
    61
		virtual TInt CopyFile(const TDesC& aSource, const TDesC& aDestination);
sl@0
    62
		virtual TInt CopyFile(RFile& aSource, const TDesC& aDestination);
sl@0
    63
		virtual TInt RenameFile(const TDesC& aSource, const TDesC& aDestination);
sl@0
    64
		virtual TInt MkDir(const TDesC& aPath);
sl@0
    65
		virtual TInt MkDirAll(const TDesC& aPath);
sl@0
    66
		virtual TInt RmDir(const TDesC& aPath);
sl@0
    67
		virtual TInt GetDir(const TDesC& aName,TUint aEntryAttMask,TUint aEntrySortKey, CDir*& aEntryList) const;
sl@0
    68
		virtual TInt GetDir(const TDesC& aName,TUint aEntryAttMask,TUint aEntrySortKey, CDir*& aEntryList,CDir*& aDirList) const;
sl@0
    69
		virtual TInt GetDir(const TDesC& aName,const TUidType& aEntryUid,TUint aEntrySortKey, CDir*& aFileList) const;
sl@0
    70
		virtual TInt GetAttribute(TInt aAttribute, TInt& aValue, const TVirtualPathPtr& aVirtualPath);
sl@0
    71
		virtual TInt GetAttributeSet(RAttributeSet& aAttributeSet, const TVirtualPathPtr& aVirtualPath);
sl@0
    72
		virtual TInt GetStringAttributeSet(RStringAttributeSet& aAttributeSet, const TVirtualPathPtr& aVirtualPath);
sl@0
    73
		virtual TInt GetStringAttribute(TInt aAttribute, TDes& aValue, const TVirtualPathPtr& aVirtualPath);
sl@0
    74
		virtual TInt GetAttribute(TInt aAttribute, TInt& aValue, RFile& aFile, const TDesC& aUniqueId);
sl@0
    75
		virtual TInt GetAttributeSet(RAttributeSet& aAttributeSet, RFile& aFile, const TDesC& aUniqueId);	
sl@0
    76
		virtual TInt GetStringAttributeSet(RStringAttributeSet& aStringAttributeSet, RFile& aFile, const TDesC& aUniqueId);
sl@0
    77
		virtual TInt GetStringAttribute(TInt aAttribute, TDes& aValue, RFile& aFile, const TDesC& aUniqueId);
sl@0
    78
		virtual void NotifyStatusChange(const TDesC& aURI, TEventMask aMask, TRequestStatus& aStatus);
sl@0
    79
		virtual TInt CancelNotifyStatusChange(const TDesC& aURI, TRequestStatus& aStatus);
sl@0
    80
		virtual TInt SetProperty(TAgentProperty aProperty, TInt aValue);	
sl@0
    81
		virtual void DisplayInfoL(TDisplayInfo aInfo, const TVirtualPathPtr& aVirtualPath);
sl@0
    82
		virtual void DisplayInfoL(TDisplayInfo aInfo, RFile& aFile, const TDesC& aUniqueId);
sl@0
    83
		virtual TBool IsRecognizedL(const TDesC& aURI, TContentShareMode aShareMode) const;
sl@0
    84
		virtual TBool IsRecognizedL(RFile& aFile) const;
sl@0
    85
		virtual TBool RecognizeFileL(const TDesC& aFileName, const TDesC8& aBuffer, TDes8& aFileMimeType, TDes8& aContentMimeType) const;
sl@0
    86
		virtual TInt AgentSpecificCommand(TInt aCommand, const TDesC8& aInputBuffer, TDes8& aOutputBuffer);
sl@0
    87
		virtual void AgentSpecificCommand(TInt aCommand, const TDesC8& aInputBuffer, TDes8& aOutputBuffer, TRequestStatus& aStatus);
sl@0
    88
		virtual void DisplayManagementInfoL();
sl@0
    89
		virtual void PrepareHTTPRequestHeaders(RStringPool& aStringPool, RHTTPHeaders& aRequestHeaders) const;
sl@0
    90
		virtual TInt RenameDir(const TDesC& aOldName, const TDesC& aNewName);
sl@0
    91
sl@0
    92
#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
sl@0
    93
		virtual TBool IsRecognizedL(const TDesC8& aHeaderData) const;
sl@0
    94
		virtual TBool RecognizeContentL(const TDesC8& aHeaderData, TDes8& aFileMimeType, TDes8& aContentMimeType) const;
sl@0
    95
		virtual TInt GetAttribute(const TDesC8& aHeaderData, TInt aAttribute, TInt& aValue);
sl@0
    96
		virtual TInt GetAttributeSet(const TDesC8& aHeaderData, RAttributeSet& aAttributeSet);
sl@0
    97
		virtual TInt GetStringAttributeSet(const TDesC8& aHeaderData, RStringAttributeSet& aAttributeSet);
sl@0
    98
		virtual TInt GetStringAttribute(const TDesC8& aHeaderData, TInt aAttribute, TDes& aValue);
sl@0
    99
#endif // SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
sl@0
   100
sl@0
   101
	protected:
sl@0
   102
		CF32AgentManager();
sl@0
   103
sl@0
   104
	private:
sl@0
   105
		/** 
sl@0
   106
		* 	Second stage in two-phase create. Parameters may also be
sl@0
   107
		* 	passed to a new Agent implementation.
sl@0
   108
		*
sl@0
   109
		*  	@param aParams	A parameter structure containing
sl@0
   110
		* 					any necessary agent parameters.
sl@0
   111
		*/
sl@0
   112
		void ConstructL();
sl@0
   113
		
sl@0
   114
		CF32AgentUi& AgentUiL();
sl@0
   115
sl@0
   116
	private:
sl@0
   117
		RFs iFs;
sl@0
   118
		CFileMan *iFileMan;
sl@0
   119
		CF32AgentUi *iAgentUi;
sl@0
   120
		};
sl@0
   121
} // namespace ContentAccess
sl@0
   122
#endif // __F32AGENTMANAGER_H__