|
1 |
|
2 /* |
|
3 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 * All rights reserved. |
|
5 * This component and the accompanying materials are made available |
|
6 * under the terms of "Eclipse Public License v1.0" |
|
7 * which accompanies this distribution, and is available |
|
8 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 * |
|
10 * Initial Contributors: |
|
11 * Nokia Corporation - initial contribution. |
|
12 * |
|
13 * Contributors: |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CSIPLINEAPPUI_H |
|
22 #define CSIPLINEAPPUI_H |
|
23 |
|
24 // INCLUDES |
|
25 |
|
26 #include "SIPExGameObserver.h" |
|
27 #include "SIPExGameConstants.h" |
|
28 #include "SIPExGameEngine.h" |
|
29 #include <eikappui.h> |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CSIPExGameContainer; |
|
33 class CSIPExEngine; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 /** |
|
37 * Application user interface class. |
|
38 * User interface part of the CKON application framework |
|
39 * for the SIPEx game. |
|
40 */ |
|
41 class CSIPExAppUi |
|
42 : public CEikAppUi, |
|
43 public MSIPExGameObserver |
|
44 { |
|
45 public: // Constructors and destructor |
|
46 |
|
47 /** |
|
48 * C++ default constructor. This needs to be public due to the way |
|
49 * the framework constructs the AppUi. |
|
50 */ |
|
51 CSIPExAppUi(); |
|
52 |
|
53 /** |
|
54 * 2nd phase constructor. This needs to be public due to the way |
|
55 * the framework constructs the AppUi |
|
56 */ |
|
57 void ConstructL(); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 virtual ~CSIPExAppUi(); |
|
63 |
|
64 public: // Functions from base classes |
|
65 |
|
66 /** |
|
67 * From CEikAppUi handles the user interaction. |
|
68 * @param aCommand Id of the initiated command |
|
69 */ |
|
70 void HandleCommandL( TInt aCommand ); |
|
71 |
|
72 // From MSIPExGameObserver |
|
73 void GameStateChanged( CSIPExEngine::TEngineState aState ); |
|
74 TBool AcceptInvitationL( const TDesC& aFrom ); |
|
75 void IMReceivedL( const TDesC8& aFrom, const TDesC8& aMsg ); |
|
76 |
|
77 private: // New functions |
|
78 |
|
79 /** |
|
80 * Handles the toolbar items states (dim/undim). |
|
81 */ |
|
82 void HandleToolbar(); |
|
83 |
|
84 private: // Data |
|
85 // Owned: Pointer to the game view container |
|
86 CSIPExGameContainer* iGameContainer; |
|
87 // Not owned: pointer to the application engine. |
|
88 CSIPExEngine* iEngine; |
|
89 // The address field. The app remembers the last address. |
|
90 TBuf< KMaxSIPAddressLength > iAddress; |
|
91 // The state of the game. |
|
92 CSIPExEngine::TEngineState iState; |
|
93 }; |
|
94 |
|
95 #endif // CSIPLINEAPPUI_H |
|
96 |
|
97 // End of File |