|
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: The header file for the CClockTimeSourceInterface class. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __CLOCK_TIMESOURCE_INTERFACE_H__ |
|
19 #define __CLOCK_TIMESOURCE_INTERFACE_H__ |
|
20 |
|
21 // System includes |
|
22 #include <e32std.h> |
|
23 #include <e32base.h> |
|
24 |
|
25 // User includes |
|
26 #include "clocktimesourceinterface.hrh" |
|
27 |
|
28 // Forward declarations |
|
29 class MClockPluginObserver; |
|
30 |
|
31 /** |
|
32 * @brief This is an interface class that needs to be implemented by |
|
33 * every ECOM based plugin which updates the device time. |
|
34 * @dll clocktimesourceinterface.dll |
|
35 */ |
|
36 class CClockTimeSourceInterface : public CBase |
|
37 { |
|
38 public: // Constructor and Destructor |
|
39 |
|
40 /** |
|
41 * @brief Two phases constructor, to construct the object of the |
|
42 * ECOM implementation referred to by the aImpId. |
|
43 * @param aImpId Implementation id of the ECOM implementation to be loaded. |
|
44 * @return CClockTimeSourceInterface* Pointer to an instance of aImpId. |
|
45 */ |
|
46 IMPORT_C static CClockTimeSourceInterface* NewL( const TUid& aPluginId, |
|
47 MClockPluginObserver* aObserver ); |
|
48 |
|
49 /** |
|
50 * @brief Destroy the object and release all memory objects |
|
51 */ |
|
52 IMPORT_C ~CClockTimeSourceInterface(); |
|
53 |
|
54 public: // New functions |
|
55 |
|
56 |
|
57 /** |
|
58 * @brief Gets the UTC Time, pure virtual, to be implemented by the plugin. |
|
59 * @param aInterfaceAttribute anyone of enum TInterfaceAttribute defined in clocktimesourceinterface.hrh |
|
60 * @param aTimeAttributes The type of data requested |
|
61 */ |
|
62 IMPORT_C virtual void GetTimeInformationL( TInterfaceAttribute aInterfaceAttribute, |
|
63 STimeAttributes* aTimeAttributes ) = 0; |
|
64 |
|
65 /** |
|
66 * @brief Gets the UTC Time, pure virtual, to be implemented by the plugin. |
|
67 * @param aInterfaceAttribute anyone of enum TInterfaceAttribute defined in clocktimesourceinterface.hrh |
|
68 * @param aPtr TAny* to the type of data requested |
|
69 */ |
|
70 IMPORT_C virtual void NotifyOnTimeChange( TInterfaceAttribute aInterfaceAttribute ) = 0; |
|
71 |
|
72 /** |
|
73 * @brief Returns the plugin implementation id. Unique for each plugin. |
|
74 * @return TInt The Uid of the plugin. |
|
75 */ |
|
76 IMPORT_C virtual TInt GetPluginUid() = 0; |
|
77 |
|
78 private: // New functions |
|
79 |
|
80 /** |
|
81 * @brief Symbiam OS 2nd Phase construct, performs the 2nd phase construction. |
|
82 * @param aPluginId The UID of the plugin that needs to be constructed |
|
83 * @param aObserver An observer of type MClockPluginObserver |
|
84 */ |
|
85 void ConstructL( MClockPluginObserver* aObserver ); |
|
86 |
|
87 protected: // Data |
|
88 |
|
89 /** |
|
90 * @var iObserver |
|
91 * @brief This is essentially the ClockServer which is waiting for notification from the implementations. |
|
92 */ |
|
93 MClockPluginObserver* iObserver; |
|
94 |
|
95 /** |
|
96 * @var iPluginId |
|
97 * @brief The plugin UID. |
|
98 */ |
|
99 TUid iPluginId; |
|
100 |
|
101 private: // Data |
|
102 |
|
103 /** |
|
104 * @var iDtor_ID_key |
|
105 * @brief Implementation UID of the Time updater implementation. |
|
106 */ |
|
107 TUid iDtor_ID_key; |
|
108 }; |
|
109 |
|
110 #endif // __CLOCK_TIMESOURCE_INTERFACE_H__ |
|
111 |
|
112 // End of file |