wlanutilities/wlansniffer/aiplugin/inc/wsfaiplugin.h
branchRCL_3
changeset 8 c2bc3f8c7777
parent 0 56b72877c1cb
child 10 dff6ebfd236f
equal deleted inserted replaced
4:107412708b22 8:c2bc3f8c7777
    18 
    18 
    19 #ifndef C_WSFAIPLUGIN_H
    19 #ifndef C_WSFAIPLUGIN_H
    20 #define C_WSFAIPLUGIN_H
    20 #define C_WSFAIPLUGIN_H
    21 
    21 
    22 //  EXTERNAL INCLUDES
    22 //  EXTERNAL INCLUDES
    23 #include <aicontentpublisher.h>
    23 #include <hscontentpublisher.h>
    24 #include <aicontentobserver.h>
       
    25 #include <aipropertyextension.h>
       
    26 #include <aieventhandlerextension.h>
       
    27 #include <e32cmn.h>
    24 #include <e32cmn.h>
    28 
    25 
    29 //  INTERNAL INCLUDES
    26 //  INTERNAL INCLUDES
    30 #include "wsfaicontroller.h"
    27 #include "wsfaicontroller.h"
    31 #include "wsfaipublishobserver.h"
    28 #include "wsfaipublishobserver.h"
    54  * The main class, containing the plugin behavior. 
    51  * The main class, containing the plugin behavior. 
    55  *
    52  *
    56  * @lib wsfaiplugin.lib
    53  * @lib wsfaiplugin.lib
    57  * @since S60 v5.0
    54  * @since S60 v5.0
    58  */
    55  */
    59 NONSHARABLE_CLASS( CWsfAiPlugin ): public CAiContentPublisher,
    56 NONSHARABLE_CLASS( CWsfAiPlugin ): public CHsContentPublisher,
    60                                    public MAiPropertyExtension,
       
    61                                    public MAiEventHandlerExtension,
       
    62                                    public MWsfAiPublishObserver
    57                                    public MWsfAiPublishObserver
    63     {
    58     {
    64     public: // Constructors and destructor
    59     public: // Constructors and destructor
    65         
    60         
    66         /**
    61         /**
   110         /**
   105         /**
   111         * Steps the refresh animation
   106         * Steps the refresh animation
   112         */                
   107         */                
   113         void CWsfAiPlugin::DoConnectingStepL();
   108         void CWsfAiPlugin::DoConnectingStepL();
   114     
   109     
   115     public:     // from CAiContentPublisher
   110     public:     // from CHSContentPublisher
   116         
   111         
   117         /**
   112         /**
   118         * This method transit the plugin to "Alive" state.
   113          * @see CHsContentPublisher
   119         * The method is called by the framework to instruct plug-in that it is
   114          */
   120         * allowed to actively publish its data to its observers. This means the plugin
   115         void Start( TStartReason aReason );
   121         * is allowed to consume memory and CPU resources, e.g plug-in is able load 
   116 
   122         * engines, run timers, perform asynchronous operations, etc. The method 
   117         /**
   123         * transits the plug-in to "Alive" state. There can be many concurrent
   118          * @see CHsContentPublisher
   124         * calls to resume, with different or the same reason code, this allows
   119          */
   125         * the plugin to properly respond to enviroment change that raise the
   120         void Stop( TStopReason aReason );
   126         * need to re-publish content (changes like date/time change etc).
   121 
   127         *
   122         /**
   128         * @param aReason reason for state change, see TAiTransitionChange.
   123          * @see CHsContentPublisher
   129         */
   124          */    
   130         void Resume( TAiTransitionReason aReason );
   125         void Resume( TResumeReason aReason );
   131         
   126 
   132         /**
   127         /**
   133         * This method transits the plug-in to "Suspendend" state.
   128          * @see CHsContentPublisher
   134         * The method is called by the framework to instruct plug-in that it is
   129          */    
   135         * not allowed to consume CPU resources, e.g plug-in MUST stop each
   130         void Suspend( TSuspendReason aReason );
   136         * timer, cancel outstanding asynchronous operations, etc. 
   131         
   137         *
   132         /**
   138         * @param aReason reason for state change, see TAiTransitionChange.
   133          * @see CHsContentPublisher
   139         */
   134          */
   140         void Suspend( TAiTransitionReason aReason );
       
   141         
       
   142         /**
       
   143         * This method transits the plug-in to "Idle" state.
       
   144         * The method is called by the framework to request the plug-in free all
       
   145         * memory and CPU resources and close all its open files, the plug-in 
       
   146         * should unload its engines during backup operation.
       
   147         *
       
   148         * @param aReason reason for state change, see TAiTransitionChange.
       
   149         */
       
   150         void Stop( TAiTransitionReason aReason );
       
   151         
       
   152         /**
       
   153         * Adds the content observer / subscriber to plug-in. The plug-in MUST
       
   154         * maintain a registry of subscribers and send notification to all them
       
   155         * whenever the plug-in changes state or new content available.
       
   156         *
       
   157         * @param aObserver content observer to register.
       
   158         */
       
   159         void SubscribeL( MAiContentObserver& aObserver );
   135         void SubscribeL( MAiContentObserver& aObserver );
   160     
   136     
   161         /**
   137         /**
   162         * Configures the plug-in.
   138          * @see CHsContentPublisher
   163         *
   139          */
   164         * @param aSettings setting items defined in the UI definition.
       
   165         *                  This plugin takes ownership of the
       
   166         *                  MAiPluginSettings objects in the array.
       
   167         *                  If this method leaves the caller will handle the cleanup.
       
   168         */
       
   169         void ConfigureL( RAiSettingsItemArray& aSettings );
   140         void ConfigureL( RAiSettingsItemArray& aSettings );
   170         
   141     
   171         /**
   142         /**
   172         * Returns interface extension. In S60 3.2 only event & property
   143          * @see CHsContentPublisher
   173         * extensions are supported. See MAiEventHandlerExtension & MAiPropertyExtension
   144          */
   174         * interfaces.
   145         TAny* GetProperty( TProperty aProperty );
   175         *
   146 
   176         * @param  aUid - UID of the extension interface to access.
   147         /**
   177         * @return the extension interface. Actual type depends on the passed aUid 
   148          * @see CHsContentPublisher
   178         *         argument.
   149          */
   179         */
       
   180         TAny* Extension( TUid aUid );
       
   181 
       
   182     
       
   183     public:     // from MAiPropertyExtension
       
   184     
       
   185         /**
       
   186         * Read property of publisher plug-in.
       
   187         *
       
   188         * @param aProperty - identification of property.
       
   189         * @return Pointer to property value.
       
   190         */
       
   191         TAny* GetPropertyL( TInt aProperty );
       
   192     
       
   193         /**
       
   194         * Write property value.
       
   195         *
       
   196         * @param aProperty - identification of property.
       
   197         * @param aValue - contains pointer to property value.
       
   198         */
       
   199         void SetPropertyL( TInt aProperty, TAny* aValue );
       
   200     
       
   201     
       
   202     public:     // from MAiEventHandlerExtension
       
   203     
       
   204         /**
       
   205         * See aieventhandlerextension.h for detailed description.
       
   206         * @since S60 5.0
       
   207         */
       
   208         void HandleEvent( TInt aEvent, const TDesC& aParam );
   150         void HandleEvent( TInt aEvent, const TDesC& aParam );
   209 
   151 
   210     
   152     
   211     public: // From MWsfAiPublishObserver
   153     public: // From MWsfAiPublishObserver
   212     
   154     
   348         /**
   290         /**
   349         * Iterator for plugin events
   291         * Iterator for plugin events
   350         * Own.
   292         * Own.
   351         */
   293         */
   352         MAiContentItemIterator* iEvents;
   294         MAiContentItemIterator* iEvents;
   353     
       
   354         /**
       
   355         * Information about the content publisher (this plug-in)
       
   356         */
       
   357         TAiPublisherInfo iInfo;
       
   358     
   295     
   359         /**
   296         /**
   360         * Pointer to CWsfModel
   297         * Pointer to CWsfModel
   361         * Own.
   298         * Own.
   362         */
   299         */