creator/engine/inc/creator_scriptentry.h
changeset 19 4b22a598b890
parent 17 4f2773374eff
child 23 c9bf25a20c9f
equal deleted inserted replaced
17:4f2773374eff 19:4b22a598b890
    21 
    21 
    22 #ifndef __FILEUTILS_H__
    22 #ifndef __FILEUTILS_H__
    23 #define __FILEUTILS_H__
    23 #define __FILEUTILS_H__
    24 
    24 
    25 
    25 
    26 #include "engine.h"
       
    27 
       
    28 #include <e32base.h>
    26 #include <e32base.h>
    29 #include <f32file.h>
    27 #include <f32file.h>
    30 #include <badesca.h>
    28 #include <badesca.h>
    31 #include <aknglobalnote.h>
    29 #include <AknGlobalNote.h>
    32 #include <akniconarray.h> 
    30 #include <AknIconArray.h> 
    33 #include <aknmemorycardui.mbg>
    31 #include <aknmemorycardui.mbg>
    34 #include <msvapi.h>
    32 #include <msvapi.h>
    35 
    33 
    36 
    34 
    37 class CCreatorEngine;
    35 class CCreatorEngine;
    41 public:
    39 public:
    42     static TInt FindFiles(CDesCArrayFlat* aFileArray, const TDesC& aFileName, const TDesC& aPath);
    40     static TInt FindFiles(CDesCArrayFlat* aFileArray, const TDesC& aFileName, const TDesC& aPath);
    43     static TInt FindFilesRecursiveL(CDesCArrayFlat* aFileArray, const TDesC& aFileName, const TDesC& aPath);
    41     static TInt FindFilesRecursiveL(CDesCArrayFlat* aFileArray, const TDesC& aFileName, const TDesC& aPath);
    44 };
    42 };
    45 
    43 
    46 class CCommandParser : public CBase, public MMsvSessionObserver
    44 class CCommandParser : public CBase, public MMsvSessionObserver, MUIObserver
    47     {
    45     {
       
    46 enum TCommandParserStatus{
       
    47     EGetingScript,
       
    48     EGetingRandomDataFile
       
    49 };
       
    50 
    48 public:
    51 public:
    49     static CCommandParser* NewL(CCreatorEngine* aEngine);
    52     static CCommandParser* NewL(CCreatorEngine* aEngine);
    50     static CCommandParser* NewLC(CCreatorEngine* aEngine);
    53     static CCommandParser* NewLC(CCreatorEngine* aEngine);
    51     ~CCommandParser();
    54     ~CCommandParser();
    52     
    55     
    63     //void ParseCommandFromDescriptorL();
    66     //void ParseCommandFromDescriptorL();
    64 
    67 
    65     void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); // from MMsvSessionObserver
    68     void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); // from MMsvSessionObserver
    66 
    69 
    67 public:
    70 public:
       
    71     /**
       
    72      * Called when some dialog in UI is closed
       
    73      *
       
    74      * @since S60 10.1
       
    75      * @param aPositiveAction ETrue if "Ok", "Yes" or other "positive" button was pressed
       
    76      * @param aUserData number that was passed to UI before dialog was opened
       
    77      * @return None.
       
    78      */
       
    79     virtual void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData);
       
    80     
       
    81 public:
    68     void OpenScriptL();
    82     void OpenScriptL();
    69     TBool OpenScriptL(RFile& aScriptFile);
    83     TBool OpenScriptL(MCommandParserObserver* aObserver);
    70     TBool GetRandomDataFilenameL(TDes& aFilename);
    84     TBool GetRandomDataFilenameL(TDes& aFilename);
    71 
    85 
    72 private:
    86 private:
    73     CCreatorEngine* iEngine;
    87     CCreatorEngine* iEngine;
    74     CDesCArrayFlat* iSearchArray;
    88     CDesCArrayFlat* iSearchArray;
    75 
    89     TInt iSelectedItem;
       
    90     
    76     TInt iParserPosition;
    91     TInt iParserPosition;
    77     TInt iParserOldPosition;
    92     TInt iParserOldPosition;
    78 
    93 
    79     HBufC8* iReadBuf;
    94     HBufC8* iReadBuf;
    80 
    95 
       
    96     MCommandParserObserver* iObserver;
    81     };
    97     };
    82 
    98 
    83 
    99 
    84 
   100 
    85 #endif // __FILEUTILS_H__
   101 #endif // __FILEUTILS_H__