satui/satplugin/aisatplugininc/caisatplugin.h
branchRCL_3
changeset 3 a4a774cb6ea7
parent 0 ff3b6d0fd310
equal deleted inserted replaced
0:ff3b6d0fd310 3:a4a774cb6ea7
    17 
    17 
    18 
    18 
    19 #ifndef CAISATPLUGIN_H
    19 #ifndef CAISATPLUGIN_H
    20 #define CAISATPLUGIN_H
    20 #define CAISATPLUGIN_H
    21 
    21 
    22 #include <aicontentpublisher.h>
    22 #include <hscontentpublisher.h>
    23 #include <aipropertyextension.h>
       
    24 #include <aicontentmodel.h>
    23 #include <aicontentmodel.h>
    25 
    24 
    26 #include "mpluginapi.h"
    25 #include "mpluginapi.h"
    27 #include "caisatengine.h"
    26 #include "caisatengine.h"
    28 
    27 
    32 /**
    31 /**
    33  *  Plug-in main class
    32  *  Plug-in main class
    34  *
    33  *
    35  *  @since S60 v3.2
    34  *  @since S60 v3.2
    36  */
    35  */
    37 class CAiSatPlugin : public CAiContentPublisher,
    36 class CAiSatPlugin : public CHsContentPublisher,                     
    38                      public MAiPropertyExtension,
       
    39                      public MPluginAPI
    37                      public MPluginAPI
    40     {
    38     {
    41 
    39 
    42 public:
    40 public:
    43 
    41 
    54     /**
    52     /**
    55      * Publishes SAT Set Up Idle Mode Text
    53      * Publishes SAT Set Up Idle Mode Text
    56      */
    54      */
    57     void PublishSatL();
    55     void PublishSatL();
    58 
    56 
    59 // from base class CAiContentPublisher
    57 // from base class CHsContentPublisher
    60   
    58   
    61     /**
    59     /**
    62      * From CAiContentPublisher
    60      * @see CHsContentPublisher
    63      * The method is called by the framework to request the plug-in free all
    61      */
    64      * memory and CPU resources and close all its open files, e.g. the plug-in 
    62     void Start( TStartReason aReason );
    65      * should unload its engines due backup operation. The method transits the 
    63 
    66      * plug-in to "Idle" state.
    64     /**
    67      *
    65      * @see CHsContentPublisher
    68      * @param aReason Reason for state change, see TAiTransitionChange.
    66      */    
    69      */
    67     void Stop( TStopReason aReason );
    70     void Stop( TAiTransitionReason aReason );
    68     
    71 
    69     /**
    72     /**
    70      * @see CHsContentPublisher
    73      * From CAiContentPublisher
    71      */    
    74      * The method is called by the framework to instruct plug-in that it is
    72     void Resume( TResumeReason aReason );
    75      * allowed to consume CPU resources, e.g plug-in is able to run timers,
    73     
    76      * perform asynchronous operations, etc. The method transits the plug-in
    74     /**
    77      * to "Alive" state.
    75      * @see CHsContentPublisher
    78      *
    76      */    
    79      * @param aReason Reason for state change, see TAiTransitionChange.
    77     void Suspend( TSuspendReason aReason );
    80      */
    78     
    81     void Resume( TAiTransitionReason aReason );
    79     /**
    82 
    80      * @see CHsContentPublisher
    83     /**
    81      */    
    84      * From CAiContentPublisher
       
    85      * The method is called by the framework to instruct plug-in that it is
       
    86      * not allowed to consume CPU resources, e.g plug-in MUST stop each
       
    87      * timers, cancel outstanding asynchronous operations, etc. The method
       
    88      * transits the plug-in to "Suspendend" state.
       
    89      *
       
    90      * @param aReason Reason for state change, see TAiTransitionChange.
       
    91      */
       
    92     void Suspend( TAiTransitionReason aReason );
       
    93 
       
    94     /**
       
    95      * From CAiContentPublisher
       
    96      * Adds the content observer / subscriber to plug-in. The plug-in MUST
       
    97      * maintain a registry of subscribers and send notification to all them
       
    98      * whenever the plug-in changes state or new content available.
       
    99      *
       
   100      * @param aObserver Content observer to register.
       
   101      */
       
   102     void SubscribeL( MAiContentObserver& aObserver );
    82     void SubscribeL( MAiContentObserver& aObserver );
   103     
    83     
   104     /**
    84     /**
   105      * From CAiContentPublisher
    85      * @see CHsContentPublisher
   106      * Configures the plug-in.
    86      */    
   107      * Plug-ins take ownership of the settings array, so it must either
       
   108      * store it in a member or free it. Framework has put the array in cleanup
       
   109      * stack so the plugin shouldn't do that.
       
   110      * If this leaves, the plug-in will be destroyed by AI FW.
       
   111      * Plug-in must support LaunchByValue-event even if normal shortcuts don't
       
   112      * work. The only allowed serious enough leave is KErrNotFound from CenRep.
       
   113      *
       
   114      * @param aSettings Setting items defined in the UI definition.
       
   115      */
       
   116     void ConfigureL( RAiSettingsItemArray& aSettings );
    87     void ConfigureL( RAiSettingsItemArray& aSettings );
   117 
    88     
   118     /**
    89     /**
   119      * From CAiContentPublisher
    90      * @see CHsContentPublisher
   120      * Returns interface extension. In Series 60 3.1 only event & property
    91      */    
   121      * extensions are supported. See MAiEventExtension & MAiPropertyExtension
    92     TAny* GetProperty( TProperty aProperty );
   122      * interfaces.
    93          
   123      *
       
   124      * @param  aUid UID of the extension interface to access.
       
   125      * @return The extension interface. Actual type depends on the passed aUid 
       
   126      *         argument.
       
   127      */
       
   128     TAny* Extension( TUid aUid );  
       
   129 
       
   130 // from base class MAiPropertyExtension
       
   131 
       
   132     /**
       
   133      * From MAiPropertyExtension.
       
   134      * Read property of publisher plug-in.
       
   135      *
       
   136      * @param aProperty Identification of property.
       
   137      * @return Pointer to property value.
       
   138      */
       
   139     TAny* GetPropertyL( TInt aProperty );
       
   140 
       
   141     /**
       
   142      * From MAiPropertyExtension.
       
   143      * Write property value.
       
   144      *
       
   145      * @param aProperty Identification of property.
       
   146      * @param aValue Contains pointer to property value.
       
   147      */
       
   148     void SetPropertyL( TInt aProperty, TAny* aValue );
       
   149      
       
   150     /**
    94     /**
   151      * Receives a notification of the content update event
    95      * Receives a notification of the content update event
   152      */
    96      */
   153     void NotifyContentUpdate();
    97     void NotifyContentUpdate();
   154 
    98 
   233 
   177 
   234     /**
   178     /**
   235      * Array of content observers
   179      * Array of content observers
   236      */    
   180      */    
   237     RPointerArray<MAiContentObserver> iObservers;
   181     RPointerArray<MAiContentObserver> iObservers;
   238 
       
   239     /**
       
   240      * Information about the content publisher (this plug-in)
       
   241      */    
       
   242     TAiPublisherInfo iInfo;
       
   243     
   182     
   244     /**
   183     /**
   245      * Whether the icon is the same with previous one.
   184      * Whether the icon is the same with previous one.
   246      */      
   185      */      
   247     TBool iDupIcon;
   186     TBool iDupIcon;
   248     
   187     
   249     /**
   188     /**
   250      * Whether the text is the same with previous one.
   189      * Whether the text is the same with previous one.
   251      */      
   190      */      
   252     TBool iDupText;
   191     TBool iDupText;
       
   192     
       
   193     /**
       
   194      * ETrue, if data should be published in Resume()
       
   195      */
       
   196     TBool iPublishRequired;
   253     };
   197     };
   254 
   198 
   255 #endif // CAISATPLUGIN_H
   199 #endif // CAISATPLUGIN_H
   256 
   200 
   257 
   201