Commit | Line | Data |
---|---|---|
27da23d5 JH |
1 | /* Copyright (c) 2004-2005 Nokia. All rights reserved. */ |
2 | ||
3 | /* The PerlApp application is licensed under the same terms as Perl itself. */ | |
4 | ||
5 | #ifndef __PerlApp_h__ | |
6 | #define __PerlApp_h__ | |
7 | ||
d0d72822 | 8 | #include "PerlUi.h" |
27da23d5 | 9 | |
f26f4a2f | 10 | /* The source code can be compiled into "PerlApp" which is the simple |
c7a4d1c0 JH |
11 | * launchpad application/demonstrator, or into "PerlAppMinimal", which |
12 | * is the minimal Perl launchpad application. Define the cpp symbols | |
13 | * CreatePerlAppMinimal (a boolean), PerlAppMinimalUid (the Symbian | |
14 | * application uid in the 0x... format), and PerlAppMinimalName (a C | |
15 | * wide string, with the L prefix) to compile as "PerlAppMinimal". */ | |
16 | ||
17 | // #define CreatePerlAppMinimal | |
18 | ||
19 | #ifdef CreatePerlAppMinimal | |
20 | # define PerlAppMinimal | |
21 | # ifndef PerlAppMinimalUid // PerlApp is ...F6, PerlRecog is ...F7 | |
22 | # define PerlAppMinimalUid 0x102015F8 | |
23 | # endif | |
24 | # ifndef PerlAppMinimalName | |
25 | # define PerlAppMinimalName L"PerlAppMinimal" | |
26 | # endif | |
f26f4a2f JH |
27 | #endif |
28 | ||
c7a4d1c0 JH |
29 | #ifdef PerlAppMinimal |
30 | # ifndef PerlAppMinimalUid | |
31 | # error PerlAppMinimal defined but PerlAppMinimalUid undefined | |
f26f4a2f | 32 | # endif |
c7a4d1c0 JH |
33 | # ifndef PerlAppMinimalName |
34 | # error PerlAppMinimal defined but PerlAppMinimalName undefined | |
f26f4a2f JH |
35 | # endif |
36 | #endif | |
37 | ||
d0d72822 | 38 | class CPerlAppDocument : public CgPerlUiDocument |
27da23d5 JH |
39 | { |
40 | public: | |
d0d72822 | 41 | CPerlAppDocument(CEikApplication& aApp) : CgPerlUiDocument(aApp) {;} |
c7a4d1c0 | 42 | #ifndef PerlAppMinimal |
27da23d5 | 43 | CFileStore* OpenFileL(TBool aDoOpen, const TDesC& aFilename, RFs& aFs); |
c7a4d1c0 | 44 | #endif // #ifndef PerlAppMinimal |
27da23d5 JH |
45 | private: // from CEikDocument |
46 | CEikAppUi* CreateAppUiL(); | |
47 | }; | |
48 | ||
d0d72822 | 49 | class CPerlAppApplication : public CPerlUiApplication |
27da23d5 JH |
50 | { |
51 | private: | |
52 | CApaDocument* CreateDocumentL(); | |
53 | TUid AppDllUid() const; | |
54 | }; | |
55 | ||
d0d72822 | 56 | class CPerlAppAppView; |
27da23d5 | 57 | |
d0d72822 | 58 | class CPerlAppAppUi : public CPerlUiAppUi |
27da23d5 JH |
59 | { |
60 | public: | |
f26f4a2f | 61 | TBool ProcessCommandParametersL(TApaCommand aCommand, TFileName& aDocumentName, const TDesC8& aTail); |
d0d72822 | 62 | void DoHandleCommandL(TInt aCommand); |
c7a4d1c0 | 63 | #ifndef PerlAppMinimal |
27da23d5 | 64 | void OpenFileL(const TDesC& aFileName); |
27da23d5 JH |
65 | void InstallOrRunL(const TFileName& aFileName); |
66 | void SetFs(const RFs& aFs); | |
c7a4d1c0 | 67 | #endif // #ifndef PerlAppMinimal |
d0d72822 | 68 | ~CPerlAppAppUi(); |
ed76c0e4 | 69 | private: |
27da23d5 | 70 | RFs* iFs; |
27da23d5 JH |
71 | }; |
72 | ||
d0d72822 | 73 | class CPerlAppAppView : public CPerlUiAppView |
27da23d5 JH |
74 | { |
75 | public: | |
53d44271 | 76 | #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) |
ed76c0e4 | 77 | void HandleCommandL(TInt aCommand); |
53d44271 | 78 | #endif /* #if defined(__SERIES80__) || defined(__SERIES90__) || defined(__UIQ__) */ |
27da23d5 JH |
79 | }; |
80 | ||
81 | #endif // __PerlApp_h__ |