sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2004-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 __F32AGENTCONTENT_H__
|
sl@0
|
26 |
#define __F32AGENTCONTENT_H__
|
sl@0
|
27 |
|
sl@0
|
28 |
#include <f32file.h>
|
sl@0
|
29 |
#include <caf/agentinterface.h>
|
sl@0
|
30 |
|
sl@0
|
31 |
namespace ContentAccess
|
sl@0
|
32 |
{
|
sl@0
|
33 |
class TVirtualPathPtr;
|
sl@0
|
34 |
class CF32AgentUi;
|
sl@0
|
35 |
|
sl@0
|
36 |
/**
|
sl@0
|
37 |
F32 agent implementation of the CAgentContent class used to browse
|
sl@0
|
38 |
plaintext files. The browsing will not return any embedded objects since
|
sl@0
|
39 |
the F32 agent only enables access to the entire file
|
sl@0
|
40 |
|
sl@0
|
41 |
@internalComponent
|
sl@0
|
42 |
@released
|
sl@0
|
43 |
*/
|
sl@0
|
44 |
class CF32AgentContent : public CAgentContent
|
sl@0
|
45 |
{
|
sl@0
|
46 |
public:
|
sl@0
|
47 |
// Two phase constructor used when the file is opened
|
sl@0
|
48 |
// using a file name
|
sl@0
|
49 |
static CF32AgentContent* NewL(const TDesC& aURI, TContentShareMode aShareMode);
|
sl@0
|
50 |
|
sl@0
|
51 |
// Two phase constructor used when the file is opened with
|
sl@0
|
52 |
// a file handle
|
sl@0
|
53 |
static CF32AgentContent* NewL(RFile& aFile);
|
sl@0
|
54 |
|
sl@0
|
55 |
#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
|
sl@0
|
56 |
static CF32AgentContent* NewL(const TDesC8& aHeaderData);
|
sl@0
|
57 |
#endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
|
sl@0
|
58 |
|
sl@0
|
59 |
virtual ~CF32AgentContent();
|
sl@0
|
60 |
|
sl@0
|
61 |
public:
|
sl@0
|
62 |
// From CAgentContent
|
sl@0
|
63 |
virtual TInt OpenContainer(const TDesC& aUniqueId);
|
sl@0
|
64 |
virtual TInt CloseContainer();
|
sl@0
|
65 |
virtual void GetEmbeddedObjectsL(RStreamablePtrArray<CEmbeddedObject>& aArray);
|
sl@0
|
66 |
virtual void GetEmbeddedObjectsL(RStreamablePtrArray<CEmbeddedObject>& aArray, TEmbeddedType aType);
|
sl@0
|
67 |
virtual TInt Search(RStreamablePtrArray<CEmbeddedObject>& aArray, const TDesC8& aMimeType, TBool aRecursive);
|
sl@0
|
68 |
virtual TInt GetAttribute(TInt aAttribute, TInt& aValue, const TDesC& aUniqueId);
|
sl@0
|
69 |
virtual TInt GetAttributeSet(RAttributeSet& aAttributeSet, const TDesC& aUniqueId);
|
sl@0
|
70 |
virtual TInt GetStringAttribute(TInt aAttribute, TDes& aValue, const TDesC& aUniqueId);
|
sl@0
|
71 |
virtual TInt GetStringAttributeSet(RStringAttributeSet& aStringAttributeSet, const TDesC& aUniqueId);
|
sl@0
|
72 |
virtual TInt AgentSpecificCommand(TInt aCommand, const TDesC8& aInputBuffer, TDes8& aOutputBuffer);
|
sl@0
|
73 |
virtual void AgentSpecificCommand(TInt aCommand, const TDesC8& aInputBuffer, TDes8& aOutputBuffer, TRequestStatus& aStatus);
|
sl@0
|
74 |
virtual void NotifyStatusChange(TEventMask aMask, TRequestStatus& aStatus, const TDesC& aUniqueId);
|
sl@0
|
75 |
virtual TInt CancelNotifyStatusChange(TRequestStatus& aStatus, const TDesC& aUniqueId);
|
sl@0
|
76 |
virtual void RequestRights(TRequestStatus& aStatus, const TDesC& aUniqueId);
|
sl@0
|
77 |
virtual TInt CancelRequestRights(TRequestStatus& aStatus, const TDesC& aUniqueId);
|
sl@0
|
78 |
virtual void DisplayInfoL(TDisplayInfo aInfo, const TDesC& aUniqueId);
|
sl@0
|
79 |
virtual TInt SetProperty(TAgentProperty aProperty, TInt aValue);
|
sl@0
|
80 |
|
sl@0
|
81 |
private:
|
sl@0
|
82 |
CF32AgentContent();
|
sl@0
|
83 |
void ConstructL(const TDesC& aURI, TContentShareMode aShareMode);
|
sl@0
|
84 |
void ConstructL(RFile& aFile);
|
sl@0
|
85 |
#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
|
sl@0
|
86 |
void ConstructL(const TDesC8& aHeaderData);
|
sl@0
|
87 |
#endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
|
sl@0
|
88 |
|
sl@0
|
89 |
CF32AgentUi& AgentUiL();
|
sl@0
|
90 |
void SearchL(RStreamablePtrArray<CEmbeddedObject>& aArray, const TDesC8& aMimeType, TBool aRecursive);
|
sl@0
|
91 |
|
sl@0
|
92 |
private:
|
sl@0
|
93 |
HBufC* iURI;
|
sl@0
|
94 |
TContentShareMode iShareMode;
|
sl@0
|
95 |
RFs iFs;
|
sl@0
|
96 |
#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
|
sl@0
|
97 |
RFile64 iFile;
|
sl@0
|
98 |
#else
|
sl@0
|
99 |
RFile iFile;
|
sl@0
|
100 |
#endif //SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
|
sl@0
|
101 |
CF32AgentUi* iAgentUi;
|
sl@0
|
102 |
#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
|
sl@0
|
103 |
HBufC8* iHeaderData;
|
sl@0
|
104 |
#endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
|
sl@0
|
105 |
};
|
sl@0
|
106 |
} // namespace ContentAccess
|
sl@0
|
107 |
#endif // __F32AgentContent_H__
|