36 class CCreatorEngine; |
36 class CCreatorEngine; |
37 class CFilesParameters; |
37 class CFilesParameters; |
38 class CDRMPermission; |
38 class CDRMPermission; |
39 class CDRMConstraint; |
39 class CDRMConstraint; |
40 |
40 |
41 class CCreatorFiles : public CBase, public MCreatorModuleBase |
41 class CCreatorFiles : public CCreatorModuleBase |
42 { |
42 { |
|
43 enum TCreatorFilesState{ |
|
44 ECreatorFilesDelete, |
|
45 ECreatorFilesStart, |
|
46 ECreatorFilesGetDirectory, |
|
47 ECreatorFilesAskDRMData, |
|
48 ECreatorFilesAskDRM_CD_Counts, |
|
49 ECreatorFilesAskDRM_CD_Minutes |
|
50 }; |
43 public: |
51 public: |
44 static CCreatorFiles* NewL(CCreatorEngine* aEngine); |
52 static CCreatorFiles* NewL(CCreatorEngine* aEngine); |
45 static CCreatorFiles* NewLC(CCreatorEngine* aEngine); |
53 static CCreatorFiles* NewLC(CCreatorEngine* aEngine); |
46 ~CCreatorFiles(); |
54 ~CCreatorFiles(); |
47 |
55 |
48 private: |
56 private: |
49 CCreatorFiles(); |
57 CCreatorFiles(); |
50 void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase |
58 void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase |
51 |
59 |
52 public: |
60 public: |
53 TBool AskDataFromUserL(TInt aCommand, TInt& aNumberOfEntries); // from MCreatorModuleBase |
61 TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase |
|
62 void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData); //from MUIObserver |
54 TInt CreateFileEntryL(CFilesParameters *aParameters, TInt aCommand); |
63 TInt CreateFileEntryL(CFilesParameters *aParameters, TInt aCommand); |
55 void DeleteAllL(); |
64 void DeleteAllL(); |
56 void DeleteAllCreatedByCreatorL(); |
65 void DeleteAllCreatedByCreatorL(); |
57 |
66 |
58 private: |
67 private: |
59 |
68 |
60 void EncryptFileL( const TDesC& aFileName, const TDesC& aOutFileName, CFilesParameters *aParameters ); |
69 void EncryptFileL( const TDesC& aFileName, const TDesC& aOutFileName, CFilesParameters *aParameters ); |
61 void SetPermissionsL( CMetaDataArray* aMetaData, const TDesC& aOutFileName, CFilesParameters *aParameters ); |
70 void SetPermissionsL( CMetaDataArray* aMetaData, const TDesC& aOutFileName, CFilesParameters *aParameters ); |
62 void SetMimeTypeL( const TDesC& aFileName, TDes8& aMime, CFilesParameters *aParameters ); |
71 void SetMimeTypeL( const TDesC& aFileName, TDes8& aMime, CFilesParameters *aParameters ); |
63 TBool AskDRMDataFromUserL(); |
72 TBool AskDRMDataFromUserL(); |
64 TBool AskDRMCDDataFromUserL(); |
|
65 void StorePathsForDeleteL( CDesCArray& aPaths ); |
73 void StorePathsForDeleteL( CDesCArray& aPaths ); |
66 void GenerateFileNameL( TFileName& aRootName ); |
74 void GenerateFileNameL( TFileName& aRootName ); |
67 |
75 |
68 private: |
76 private: |
69 CFilesParameters* iParameters; |
77 CFilesParameters* iParameters; |
70 CFilesParameters* iUserParameters; |
78 CFilesParameters* iUserParameters; |
71 HBufC* iDirectoryQueriedFromUser; |
79 TFileName iDirectoryQueriedFromUser; |
72 RFs& iFs; |
80 RFs& iFs; |
73 RApaLsSession iApaLs; |
81 RApaLsSession iApaLs; |
74 CDesCArray* iFilePaths; |
82 CDesCArray* iFilePaths; |
75 TInt iFileId; |
83 TInt iFileId; |
76 |
84 |