|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: This is the header file for the CClkDateTimeViewPluginInterface class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __CLK_DATETIMEVIEW_PLUGIN_INTERFACE_H__ |
|
21 #define __CLK_DATETIMEVIEW_PLUGIN_INTERFACE_H__ |
|
22 |
|
23 // System includes |
|
24 #include <gsplugininterface.h> |
|
25 |
|
26 // User includes |
|
27 |
|
28 // Forward declarations |
|
29 class CClkDateTimeViewInher; |
|
30 |
|
31 // Class declaration |
|
32 /** |
|
33 * @class CClkDateTimeViewPluginInterface |
|
34 * @brief clkdatetimeview ecom plugin. |
|
35 * @dll clkdatetimeviewplugin.dll |
|
36 */ |
|
37 class CClkDateTimeViewPluginInterface : public CGSPluginInterface |
|
38 { |
|
39 public: // Constructor & destructor |
|
40 |
|
41 /** |
|
42 * @breif A two-phased constructor. Creates an instance of datetimeview plugin. |
|
43 * Returns error code KErrNoteFound if implementation is not found. |
|
44 * @return CGSPluginInterface* Pointer to the constructed plugin object. |
|
45 */ |
|
46 static CGSPluginInterface* NewL(); |
|
47 |
|
48 /** |
|
49 * @brief Destructor. |
|
50 */ |
|
51 ~CClkDateTimeViewPluginInterface(); |
|
52 |
|
53 public: // Functions from base classes |
|
54 |
|
55 /** |
|
56 * @brief From CAknView. Returns the id of the view. |
|
57 * @return TUid The view id. |
|
58 */ |
|
59 TUid Id() const; |
|
60 |
|
61 /** |
|
62 * @brief From CGSPluginInterface. Returns the caption(text) to be displayed in the GS view. |
|
63 * @param aCaption A reference argument, gets filled with the caption(text). |
|
64 */ |
|
65 void GetCaptionL( TDes& aCaption ) const; |
|
66 |
|
67 /** |
|
68 * @brief From CGSPluginInteface. Returns the icon to be displayed in the GS view. |
|
69 * @param aIconType The type of icon. |
|
70 * @param CGulIcon* Pointer to the icon created. |
|
71 */ |
|
72 CGulIcon* CreateIconL( const TUid aIconType ); |
|
73 |
|
74 /** |
|
75 * @brief From CAknView. Handles various commands. |
|
76 * @param aCommandId The id of the command to be handled. |
|
77 */ |
|
78 void HandleCommandL( TInt aCommandId ); |
|
79 |
|
80 /** |
|
81 * @brief From MEikMenuObserver. Changes the menu item dynamically. |
|
82 * @param aResourceId The id of the menu pane resource. |
|
83 * @param aMenuPane Pointer to the menu pane in context. |
|
84 */ |
|
85 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
86 |
|
87 /** |
|
88 * @brief Handles the foreground events. |
|
89 * @param aForeground ETrue if app is gaining the focus EFalse if loosing focus. |
|
90 */ |
|
91 void HandleForegroundEventL( TBool aForeground ); |
|
92 |
|
93 protected: // Functions from base classes |
|
94 |
|
95 /** |
|
96 * @brief From CAknView. Activates this view. |
|
97 * @see CAknView. |
|
98 */ |
|
99 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
100 TUid aCustomMessageId, |
|
101 const TDesC8& aCustomMessage ); |
|
102 |
|
103 /** |
|
104 * @brief From CAknView. Deactivates this view. |
|
105 * @see CAknView. |
|
106 */ |
|
107 void DoDeactivate(); |
|
108 |
|
109 private: // New functions |
|
110 |
|
111 /** |
|
112 * @brief Performs the 2nd phase of the two-phase construction. |
|
113 * @param aId Id of a view which is using the settings view. It is ignored when aClockUse is ETrue. |
|
114 * @param aClockUse ETrue if clock is using the plugin, EFalse otherwise. |
|
115 */ |
|
116 void ConstructL( TUid aId, TBool aClockInUse ); |
|
117 |
|
118 /** |
|
119 * @brief C++ default constructor. |
|
120 */ |
|
121 CClkDateTimeViewPluginInterface(); |
|
122 |
|
123 private: // Data |
|
124 |
|
125 /** |
|
126 * @var iView |
|
127 * @brief Pointer to the datetimeview object. |
|
128 */ |
|
129 CClkDateTimeViewInher* iView; |
|
130 |
|
131 /** |
|
132 * @var iOffset |
|
133 * @brief Offset of the resource file in the control environment. |
|
134 */ |
|
135 TUint iOffset; |
|
136 }; |
|
137 |
|
138 #endif // __CLK_DATETIMEVIEW_PLUGIN_INTERFACE_H__ |
|
139 |
|
140 // End of file |