|
1 /* |
|
2 * Copyright (c) 2010 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 "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 #ifndef CREATORFILEELEMENT_H_ |
|
22 #define CREATORFILEELEMENT_H_ |
|
23 |
|
24 #include "creator_scriptelement.h" |
|
25 |
|
26 namespace creatorfile |
|
27 { |
|
28 _LIT(KFile, "file"); |
|
29 _LIT(KType, "type"); |
|
30 _LIT(KDirectory, "directory"); |
|
31 _LIT(KDefaultDir, "c:\\data"); |
|
32 _LIT(KEncryption, "encryption"); |
|
33 _LIT(KDRMRight, "right"); |
|
34 _LIT(KDRMFL, "DRM-FL"); |
|
35 _LIT(KDRMCD, "DRM-CD"); |
|
36 _LIT(KDRMPlayRight, "play"); |
|
37 _LIT(KDRMDisplayRight, "display"); |
|
38 _LIT(KDRMPrintRight, "print"); |
|
39 _LIT(KDRMExecuteRight, "execute"); |
|
40 _LIT(KDRMCount, "count"); |
|
41 _LIT(KDRMInterval, "interval"); |
|
42 _LIT(KDRMStartTime, "starttime"); |
|
43 _LIT(KDRMEndTime, "endtime"); |
|
44 _LIT(KDRMAccumulated, "accumulated"); |
|
45 } |
|
46 |
|
47 class CDRMConstraint; |
|
48 class CFilesParameters; |
|
49 |
|
50 class CCreatorFileElement : public CCreatorScriptElement |
|
51 { |
|
52 public: |
|
53 static CCreatorFileElement* NewL(CCreatorEngine* aEngine, const TDesC& aName, const TDesC& aContext = KNullDesC); |
|
54 void ExecuteCommandL(); |
|
55 |
|
56 protected: |
|
57 CCreatorFileElement(CCreatorEngine* aEngine); |
|
58 TInt GetFileCommandL( const TDesC& aFileIdStr, TBool aRandom ) const; |
|
59 private: |
|
60 void ParseDRMElementsL( CCreatorScriptElement* aField, CFilesParameters* aParam ); |
|
61 void ParseDRMConstraintsL( CCreatorScriptElement* aRight, CDRMConstraint* aConstraint ); |
|
62 TTimeIntervalSeconds ParseTimeInterval( TDesC& aTimeString ); |
|
63 private: // Data |
|
64 TInt64 iTimeZone; |
|
65 }; |
|
66 |
|
67 #endif // CREATORFILEELEMENT_H_ |