|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef TESTIMAGEIAGENTDATA_H |
|
17 #define TESTIMAGEIAGENTDATA_H |
|
18 |
|
19 #include <caf/caf.h> |
|
20 #include <caf/agentinterface.h> |
|
21 #include <caf/bitset.h> |
|
22 |
|
23 using namespace ContentAccess; |
|
24 |
|
25 class CTestIMAGEIAgentData : public CAgentData |
|
26 { |
|
27 public: |
|
28 static CTestIMAGEIAgentData* NewL(const TDesC& aURI, TContentShareMode aMode); |
|
29 static CTestIMAGEIAgentData* NewLC(const TDesC& aURI, TContentShareMode aMode); |
|
30 ~CTestIMAGEIAgentData(); |
|
31 |
|
32 // From CAgentData |
|
33 virtual void GetAttributeL(const CBitset &aQuerySet, |
|
34 CBitset &aResponseSet); |
|
35 virtual void DataSizeL(TInt &aSize); |
|
36 virtual TInt EvaluateIntent(TIntent aIntent); |
|
37 virtual TInt ExecuteIntent(TIntent aIntent); |
|
38 virtual TInt Read(TDes8& aDes); |
|
39 virtual TInt Read(TDes8& aDes, TInt aLength); |
|
40 virtual void Read(TDes8& aDes, TRequestStatus& aStatus); |
|
41 virtual void Read(TDes8& aDes, |
|
42 TInt aLength, |
|
43 TRequestStatus& aStatus); |
|
44 virtual TInt Seek(TSeek aMode, TInt& aPos); |
|
45 virtual TInt SetProperty(TAgentProperty aProperty, TInt aValue); |
|
46 virtual TInt GetAttribute(TInt aAttribute, TInt& aValue); |
|
47 virtual TInt GetAttributeSet(RAttributeSet& aAttributeSet); |
|
48 virtual TInt GetStringAttribute(TInt aAttribute, TDes& aValue); |
|
49 virtual TInt GetStringAttributeSet(RStringAttributeSet& aStringAttributeSet); |
|
50 private: |
|
51 CTestIMAGEIAgentData(); |
|
52 void ConstructL(const TDesC& aURI, TContentShareMode aMode); |
|
53 void InvertDes(TDes8& aDes); |
|
54 |
|
55 private: |
|
56 /* Handle to the filesystem */ |
|
57 RFs iFs; |
|
58 |
|
59 /* RFile object */ |
|
60 RFile iFile; |
|
61 }; |
|
62 |
|
63 #endif // TESTIMAGEIAGENTDATA_H |