|
1 /* |
|
2 * Copyright (c) 2003-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 |
|
21 /** |
|
22 @file |
|
23 @internalComponent |
|
24 @released |
|
25 */ |
|
26 |
|
27 #ifndef __F32AGENTMANAGER_H__ |
|
28 #define __F32AGENTMANAGER_H__ |
|
29 |
|
30 #include <caf/agentinterface.h> |
|
31 |
|
32 namespace ContentAccess |
|
33 { |
|
34 class CF32AgentUi; |
|
35 |
|
36 /** |
|
37 * CF32AgentManager is an Ecom implementation of interface CAgentManager, |
|
38 * and provides a fall-back agent for content which is not restricted |
|
39 * (i.e. backward compatibility for clients switching to |
|
40 * Content-Access-Framework APIs). |
|
41 * |
|
42 * Essentially, if the CA framework does not identify a piece of |
|
43 * content as restricted (or rights managed) then this agent |
|
44 * implementation is created to handle access to the content. As such the |
|
45 * content will be treated as a plaintext file. |
|
46 * |
|
47 * @internalComponent |
|
48 * @released |
|
49 */ |
|
50 class CF32AgentManager : public CAgentManager |
|
51 { |
|
52 public: |
|
53 /** |
|
54 * Standard C-Class NewL() constructor |
|
55 */ |
|
56 static CF32AgentManager* NewL(); |
|
57 |
|
58 ~CF32AgentManager(void); |
|
59 |
|
60 |
|
61 public: |
|
62 virtual TInt DeleteFile(const TDesC &aFileName); |
|
63 virtual TInt CopyFile(const TDesC& aSource, const TDesC& aDestination); |
|
64 virtual TInt CopyFile(RFile& aSource, const TDesC& aDestination); |
|
65 virtual TInt RenameFile(const TDesC& aSource, const TDesC& aDestination); |
|
66 virtual TInt MkDir(const TDesC& aPath); |
|
67 virtual TInt MkDirAll(const TDesC& aPath); |
|
68 virtual TInt RmDir(const TDesC& aPath); |
|
69 virtual TInt GetDir(const TDesC& aName,TUint aEntryAttMask,TUint aEntrySortKey, CDir*& aEntryList) const; |
|
70 virtual TInt GetDir(const TDesC& aName,TUint aEntryAttMask,TUint aEntrySortKey, CDir*& aEntryList,CDir*& aDirList) const; |
|
71 virtual TInt GetDir(const TDesC& aName,const TUidType& aEntryUid,TUint aEntrySortKey, CDir*& aFileList) const; |
|
72 virtual TInt GetAttribute(TInt aAttribute, TInt& aValue, const TVirtualPathPtr& aVirtualPath); |
|
73 virtual TInt GetAttributeSet(RAttributeSet& aAttributeSet, const TVirtualPathPtr& aVirtualPath); |
|
74 virtual TInt GetStringAttributeSet(RStringAttributeSet& aAttributeSet, const TVirtualPathPtr& aVirtualPath); |
|
75 virtual TInt GetStringAttribute(TInt aAttribute, TDes& aValue, const TVirtualPathPtr& aVirtualPath); |
|
76 virtual void NotifyStatusChange(const TDesC& aURI, TEventMask aMask, TRequestStatus& aStatus); |
|
77 virtual TInt CancelNotifyStatusChange(const TDesC& aURI, TRequestStatus& aStatus); |
|
78 virtual TInt SetProperty(TAgentProperty aProperty, TInt aValue); |
|
79 virtual void DisplayInfoL(TDisplayInfo aInfo, const TVirtualPathPtr& aVirtualPath); |
|
80 virtual TBool IsRecognizedL(const TDesC& aURI, TContentShareMode aShareMode) const; |
|
81 virtual TBool IsRecognizedL(RFile& aFile) const; |
|
82 virtual TBool RecognizeFileL(const TDesC& aFileName, const TDesC8& aBuffer, TDes8& aFileMimeType, TDes8& aContentMimeType) const; |
|
83 virtual TInt AgentSpecificCommand(TInt aCommand, const TDesC8& aInputBuffer, TDes8& aOutputBuffer); |
|
84 virtual void AgentSpecificCommand(TInt aCommand, const TDesC8& aInputBuffer, TDes8& aOutputBuffer, TRequestStatus& aStatus); |
|
85 virtual void DisplayManagementInfoL(); |
|
86 virtual void PrepareHTTPRequestHeaders(RStringPool& aStringPool, RHTTPHeaders& aRequestHeaders) const; |
|
87 virtual TInt RenameDir(const TDesC& aOldName, const TDesC& aNewName); |
|
88 |
|
89 protected: |
|
90 CF32AgentManager(); |
|
91 |
|
92 private: |
|
93 /** |
|
94 * Second stage in two-phase create. Parameters may also be |
|
95 * passed to a new Agent implementation. |
|
96 * |
|
97 * @param aParams A parameter structure containing |
|
98 * any necessary agent parameters. |
|
99 */ |
|
100 void ConstructL(); |
|
101 |
|
102 CF32AgentUi& AgentUiL(); |
|
103 |
|
104 private: |
|
105 RFs iFs; |
|
106 CFileMan *iFileMan; |
|
107 CF32AgentUi *iAgentUi; |
|
108 }; |
|
109 } // namespace ContentAccess |
|
110 #endif // __F32AGENTMANAGER_H__ |