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