17 |
17 |
18 |
18 |
19 #ifndef AIDEVICESTATUSPLUGINENGINE_H |
19 #ifndef AIDEVICESTATUSPLUGINENGINE_H |
20 #define AIDEVICESTATUSPLUGINENGINE_H |
20 #define AIDEVICESTATUSPLUGINENGINE_H |
21 |
21 |
|
22 // System includes |
22 #include <e32base.h> |
23 #include <e32base.h> |
|
24 |
|
25 // User includes |
23 #include <aisystemuids.hrh> |
26 #include <aisystemuids.hrh> |
24 |
|
25 #include "aipublisherbroadcaster.h" |
27 #include "aipublisherbroadcaster.h" |
26 #include "aidevicestatuspublisher.h" |
28 #include "aidevicestatuspublisher.h" |
27 |
29 |
|
30 // Forward declarations |
|
31 class CHsContentPublisher; |
|
32 class MAiContentObserver; |
|
33 class MAiPublishPrioritizer; |
|
34 |
|
35 // Constants |
28 //device status plugin UI |
36 //device status plugin UI |
29 const TInt KImplUidDevStaPlugin = AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_DEVSTAPLUGIN; |
37 const TInt KImplUidDevStaPlugin = AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_DEVSTAPLUGIN; |
30 |
|
31 class MAiContentObserver; |
|
32 class MAiPropertyExtension; |
|
33 class MAiPublishPrioritizer; |
|
34 |
38 |
35 |
39 |
36 /** |
40 /** |
37 * @ingroup group_devicestatusplugin |
41 * @ingroup group_devicestatusplugin |
38 * |
42 * |
42 * It owns the publishers and communicates between them and |
46 * It owns the publishers and communicates between them and |
43 * the subscribers. |
47 * the subscribers. |
44 * |
48 * |
45 * @since S60 v3.2 |
49 * @since S60 v3.2 |
46 */ |
50 */ |
47 class CAiDeviceStatusPluginEngine : public CBase, public MAiPublisherBroadcaster |
51 NONSHARABLE_CLASS( CAiDeviceStatusPluginEngine ) : public CBase, |
|
52 public MAiPublisherBroadcaster |
48 { |
53 { |
|
54 public: |
|
55 // constructor and destructor |
|
56 |
|
57 static CAiDeviceStatusPluginEngine* NewL( MAiContentObserver& aObserver, |
|
58 CHsContentPublisher& aExtension, MAiPublishPrioritizer& aPrioritizer ); |
|
59 |
|
60 virtual ~CAiDeviceStatusPluginEngine(); |
49 |
61 |
50 public: |
62 public: |
51 |
63 // new functions |
52 static CAiDeviceStatusPluginEngine* NewL( MAiContentObserver& aObserver, |
64 |
53 MAiPropertyExtension& aExtension, |
|
54 MAiPublishPrioritizer& aPrioritizer); |
|
55 |
|
56 virtual ~CAiDeviceStatusPluginEngine(); |
|
57 |
|
58 /** |
65 /** |
59 * Resumes all publishers. |
66 * Resumes all publishers. |
60 */ |
67 */ |
61 void ResumePublishersL(); |
68 void ResumePublishersL(); |
62 |
69 |
75 * re-publish. |
82 * re-publish. |
76 * @return ETrue if publisher informed that publish was successful. |
83 * @return ETrue if publisher informed that publish was successful. |
77 */ |
84 */ |
78 TBool RefreshPublishersL( TInt aContentId, TBool aClean ); |
85 TBool RefreshPublishersL( TInt aContentId, TBool aClean ); |
79 |
86 |
|
87 /** |
|
88 * Suspends specific publishers. |
|
89 * @param aContentId Indicates which publishers should suspend their |
|
90 * content. |
|
91 * @param aClean Indicates if publishers should clean their content before |
|
92 * suspend. |
|
93 * @return ETrue if publisher informed that publish was successful. |
|
94 */ |
|
95 TBool SuspendPublishersL( TInt aContentId, TBool aClean ); |
|
96 |
80 |
97 |
81 public: // from MAiPublisherBroadcaster |
98 public: |
|
99 // from MAiPublisherBroadcaster |
82 |
100 |
83 TBool RefreshPriorizedPublishersL( TInt aContentId, TInt aPriority ); |
101 TBool RefreshPriorizedPublishersL( TInt aContentId, TInt aPriority ); |
84 |
102 |
85 |
103 |
86 private: |
104 private: |
|
105 // constructors |
87 |
106 |
88 CAiDeviceStatusPluginEngine( MAiContentObserver& aObserver, |
107 CAiDeviceStatusPluginEngine( MAiContentObserver& aObserver, |
89 MAiPropertyExtension& aExtension, |
108 CHsContentPublisher& aExtension, MAiPublishPrioritizer& aPrioritizer ); |
90 MAiPublishPrioritizer& aPrioritizer); |
109 |
91 |
|
92 void ConstructL(); |
110 void ConstructL(); |
93 |
111 |
|
112 private: |
|
113 // new functions |
|
114 |
94 /** |
115 /** |
95 * Add Device Status publisher. |
116 * Add Device Status publisher. |
96 */ |
117 */ |
97 void AddPublisherL( MAiDeviceStatusPublisher* aPublisher ); |
118 void AddPublisherL( MAiDeviceStatusPublisher* aPublisher ); |
98 |
119 |
99 |
120 private: |
100 private: // data |
121 // data |
101 |
122 |
102 /** |
123 /** |
103 * Array of publishers. |
124 * Array of publishers. |
104 * Own. |
125 * Own. |
105 */ |
126 */ |