diff -r 1a2a00e78665 -r d0529222e3f0 idlefw/plugins/devicestatus/inc/aidevicestatusplugin.h --- a/idlefw/plugins/devicestatus/inc/aidevicestatusplugin.h Tue Feb 02 00:23:10 2010 +0200 +++ b/idlefw/plugins/devicestatus/inc/aidevicestatusplugin.h Fri Feb 19 23:07:29 2010 +0200 @@ -19,11 +19,13 @@ #ifndef C_AIDEVICESTATUSPLUGIN_H #define C_AIDEVICESTATUSPLUGIN_H +// System includes -#include -#include +// User includes +#include #include +// Forward declarations class MAiDeviceStatusPublisher; class CAiContentItemArrayIterator; class CAiDeviceStatusPluginEngine; @@ -40,100 +42,110 @@ * * @since S60 3.2 */ -class CAiDeviceStatusPlugin : public CAiContentPublisher, - public MAiPropertyExtension, - public MAiContentRequest +NONSHARABLE_CLASS( CAiDeviceStatusPlugin ) : public CHsContentPublisher, + public MAiContentRequest { public: - + // constructors and destructor static CAiDeviceStatusPlugin* NewL(); static CAiDeviceStatusPlugin* NewLC(); virtual ~CAiDeviceStatusPlugin(); protected: - -// from base class CAiContentPublisher - void Resume( TAiTransitionReason aReason ); - void Suspend( TAiTransitionReason aReason ); - void Stop( TAiTransitionReason aReason ); - void SubscribeL(MAiContentObserver& aObserver); - TAny* Extension(TUid aUid); - void ConfigureL(RAiSettingsItemArray& aSettings); + // from CHsContentPublisher + + /** + * @see CHsContentPublisher + */ + void Start( CHsContentPublisher::TStartReason aReason ); -protected: - -// from base class MAiPropertyExtension - TAny* GetPropertyL(TInt aProperty); - void SetPropertyL(TInt aProperty, TAny* aValue); - -// from base class MAiContentRequest - TBool RefreshContent( TInt aContentId ); - - -private: + /** + * @see CHsContentPublisher + */ + void Stop( CHsContentPublisher::TStopReason aReason ); + + /** + * @see CHsContentPublisher + */ + void Resume( CHsContentPublisher::TResumeReason aReason ); + + /** + * @see CHsContentPublisher + */ + void Suspend( CHsContentPublisher::TSuspendReason aReason ); - CAiDeviceStatusPlugin(); - void ConstructL(); - - void AllocateResourcesL(); - void FreeResources(); - void DoResumeL( TAiTransitionReason aReason ); - TBool IgnoreReason( TAiTransitionReason aReason ); - - /** - * Add device status publisher. + /** + * @see CHsContentPublisher + */ + void SubscribeL( MAiContentObserver& aObserver ); + + /** + * @see CHsContentPublisher + */ + void ConfigureL( RAiSettingsItemArray& aSettings ); + + /** + * @see CHsContentPublisher + */ + TAny* GetProperty( CHsContentPublisher::TProperty aProperty ); + +protected: + // from MAiContentRequest + + /** + * @see MAiContentRequest */ - void AddPublisherL( MAiDeviceStatusPublisher* aPublisher ); - -private: // data - - /** - * Device Status Plug-in Engine. - * Own. - */ - CAiDeviceStatusPluginEngine* iEngine; + TBool RefreshContent( TInt aContentId ); /** - * Content observers. - * Own. - */ - CAiMultiContentObserver* iContentObservers; - - /** - * Device Status Plug-in content prioritizer. - * Own. - */ - CAiPublishPrioritizer* iPrioritizer; - + * @see MAiContentRequest + */ + TBool SuspendContent( TInt aContentId ); + +private: + // constructors + /** - * Content item array iterator. - * Own. + * C++ default constructor */ - MAiContentItemIterator* iContent; - - /** - * Content item array iterator for resources. - * Own. - */ - MAiContentItemIterator* iResources; - - /** - * Publisher info. - */ - TAiPublisherInfo iInfo; - - /** - * Offset of the loaded resource file. - */ - TInt iResourceOffset; + CAiDeviceStatusPlugin(); /** - * Network info listener. - * Own. + * 2nd phase constructor */ + void ConstructL(); + +private: + // new functions + + void AllocateResourcesL(); + void FreeResources(); + void DoResumeL(); + + void AddPublisherL( MAiDeviceStatusPublisher* aPublisher ); + +private: + // data + + /** Device Status Plug-in Engine, owned */ + CAiDeviceStatusPluginEngine* iEngine; + /** Content observers, owned */ + CAiMultiContentObserver* iContentObservers; + /** Device Status Plug-in content prioritizer, owned */ + CAiPublishPrioritizer* iPrioritizer; + /** Content item array iterator, owned */ + MAiContentItemIterator* iContent; + /** Content item array iterator for resources, owned */ + MAiContentItemIterator* iResources; + /** Offset of the loaded resource file */ + TInt iResourceOffset; + /** Network info listener, owned */ CAiNetworkInfoListener* iListener; + /** Flag to indicate republish need */ + TBool iRequirePublish; }; +#endif // C_AIDEVICESTATUSPLUGIN_H -#endif // C_AIDEVICESTATUSPLUGIN_H +// End of file