equal
deleted
inserted
replaced
46 class CCreatorEngine; |
46 class CCreatorEngine; |
47 class MCreatorModuleBaseParameters; |
47 class MCreatorModuleBaseParameters; |
48 class CCommandParser; |
48 class CCommandParser; |
49 |
49 |
50 _LIT(KSavingText, "Saving"); |
50 _LIT(KSavingText, "Saving"); |
|
51 _LIT(KDeletingText, "Deleting"); |
51 |
52 |
52 class MCreatorModuleBase |
53 class MCreatorModuleBase |
53 { |
54 { |
54 public: |
55 public: |
55 |
56 |
75 { |
76 { |
76 ECreatorModuleDelete = 0, |
77 ECreatorModuleDelete = 0, |
77 ECreatorModuleStart |
78 ECreatorModuleStart |
78 }; |
79 }; |
79 |
80 |
80 CCreatorModuleBase(){ } |
81 CCreatorModuleBase() |
|
82 { |
|
83 iEntriesToBeCreated = 1; |
|
84 } |
81 |
85 |
82 virtual TBool AskDataFromUserL(TInt aCommand) |
86 virtual TBool AskDataFromUserL(TInt aCommand) |
83 { |
87 { |
84 iCommand = aCommand; |
88 iCommand = aCommand; |
85 return EFalse;// will finish user interaction and engine will shutdown modules |
89 return EFalse;// will finish user interaction and engine will shutdown modules |
92 if( aPositiveAction == EFalse ) |
96 if( aPositiveAction == EFalse ) |
93 { |
97 { |
94 iEngine->ShutDownEnginesL(); |
98 iEngine->ShutDownEnginesL(); |
95 return; |
99 return; |
96 } |
100 } |
97 |
101 const TDesC* showText = &KSavingText; |
98 TBool finished(EFalse); |
102 TBool finished(EFalse); |
99 TBool retval(ETrue); |
103 TBool retval(ETrue); |
100 switch(aUserData) |
104 switch(aUserData) |
101 { |
105 { |
102 case ECreatorModuleDelete: |
106 case ECreatorModuleDelete: |
|
107 showText = &KDeletingText; |
103 iEntriesToBeCreated = 1; |
108 iEntriesToBeCreated = 1; |
104 finished = ETrue; |
109 finished = ETrue; |
105 break; |
110 break; |
106 case ECreatorModuleStart: |
111 case ECreatorModuleStart: |
107 finished = ETrue; |
112 finished = ETrue; |
118 else if( finished ) |
123 else if( finished ) |
119 { |
124 { |
120 // add this command to command array |
125 // add this command to command array |
121 iEngine->AppendToCommandArrayL(iCommand, NULL, iEntriesToBeCreated); |
126 iEngine->AppendToCommandArrayL(iCommand, NULL, iEntriesToBeCreated); |
122 // started exucuting commands |
127 // started exucuting commands |
123 iEngine->ExecuteFirstCommandL( KSavingText ); |
128 iEngine->ExecuteFirstCommandL( *showText ); |
124 } |
129 } |
125 } |
130 } |
126 |
131 |
127 protected: |
132 protected: |
128 // constructs the module, add "iEngine = aEngine" and other construction stuff to the body |
133 // constructs the module, add "iEngine = aEngine" and other construction stuff to the body |