idlefw/plugins/devicestatus/inc/aicontentobserveroptimizer.h
branchRCL_3
changeset 9 d0529222e3f0
parent 0 79c6a41cd166
child 18 bd874ee5e5e2
equal deleted inserted replaced
4:1a2a00e78665 9:d0529222e3f0
    17 
    17 
    18 
    18 
    19 #ifndef C_AIMULTICONTENTOBSERVEROPTIMIZER_H
    19 #ifndef C_AIMULTICONTENTOBSERVEROPTIMIZER_H
    20 #define C_AIMULTICONTENTOBSERVEROPTIMIZER_H
    20 #define C_AIMULTICONTENTOBSERVEROPTIMIZER_H
    21 
    21 
       
    22 // System includes
       
    23 #include <e32base.h>
    22 
    24 
    23 #include <e32base.h>
    25 // User includes
    24 #include "aicontentobserver.h"
    26 #include "aicontentobserver.h"
       
    27 
       
    28 // Forward declarations
       
    29 class CHsContentPublisher;
    25 
    30 
    26 /**
    31 /**
    27  *  @ingroup group_devicestatusplugin
    32  *  @ingroup group_devicestatusplugin
    28  *
    33  *
    29  * Active Idle Content Observer optimizer. 
    34  * Active Idle Content Observer optimizer. 
    32  * case nothing is published nothing is committed.
    37  * case nothing is published nothing is committed.
    33  *
    38  *
    34  * @see MAiContentObserver
    39  * @see MAiContentObserver
    35  * @since S60 3.2
    40  * @since S60 3.2
    36  */
    41  */
    37 class CAiContentObserverOptimizer : public CBase      
    42 NONSHARABLE_CLASS( CAiContentObserverOptimizer ) : public CBase      
    38     {
    43     {
    39 
       
    40 private:
    44 private:
    41     struct TAiPublishBlackList
    45     struct TAiPublishBlackList
    42         {
    46         {
    43         TInt iContentId;
    47         TInt iContentId;
    44         
    48         
    78     TInt CancelTransaction( TInt aTxId );
    82     TInt CancelTransaction( TInt aTxId );
    79     
    83     
    80     /*
    84     /*
    81      * @see MAiContentObserver
    85      * @see MAiContentObserver
    82      */
    86      */
    83     TBool CanPublish( MAiPropertyExtension& aPlugin, TInt aContent, TInt aIndex );
    87     TBool CanPublish( CHsContentPublisher& aPlugin, TInt aContent, TInt aIndex );
    84     
    88     
    85     /**
    89     /**
    86      * @see MAiContentObserver
    90      * @see MAiContentObserver
    87      */
    91      */
    88     TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent,
    92     TInt Publish( CHsContentPublisher& aPlugin, TInt aContent,
    89                   TInt aResource, TInt aIndex );
    93                   TInt aResource, TInt aIndex );
    90 
    94 
    91     /**
    95     /**
    92      * @see MAiContentObserver
    96      * @see MAiContentObserver
    93      */
    97      */
    94     TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent,
    98     TInt Publish( CHsContentPublisher& aPlugin, TInt aContent,
    95                   const TDesC16& aText, TInt aIndex );
    99                   const TDesC16& aText, TInt aIndex );
    96     /**
   100     /**
    97      * @see MAiContentObserver
   101      * @see MAiContentObserver
    98      */
   102      */
    99     TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent,
   103     TInt Publish( CHsContentPublisher& aPlugin, TInt aContent,
   100                   const TDesC8& aBuf, TInt aIndex );
   104                   const TDesC8& aBuf, TInt aIndex );
   101 
   105 
   102     /**
   106     /**
   103      * @see MAiContentObserver
   107      * @see MAiContentObserver
   104      */
   108      */
   105     TInt Publish( MAiPropertyExtension& aPlugin, TInt aContent,
   109     TInt Publish( CHsContentPublisher& aPlugin, TInt aContent,
   106                   RFile& aFile, TInt aIndex );
   110                   RFile& aFile, TInt aIndex );
   107     /**
   111     /**
   108      * @see MAiContentObserver
   112      * @see MAiContentObserver
   109      */
   113      */
   110     TInt Clean( MAiPropertyExtension& aPlugin, TInt aContent, TInt aIndex );
   114     TInt Clean( CHsContentPublisher& aPlugin, TInt aContent, TInt aIndex );
   111 
   115 
   112     /**
   116     /**
   113      * Returns the actual content observer.
   117      * Returns the actual content observer.
   114      */
   118      */
   115     MAiContentObserver& Observer() const;
   119     MAiContentObserver& Observer() const;