idlefw/plugins/devicestatus/inc/aibtsappublisher.h
branchRCL_3
changeset 9 d0529222e3f0
parent 0 79c6a41cd166
child 64 b276298d5729
equal deleted inserted replaced
4:1a2a00e78665 9:d0529222e3f0
    18 
    18 
    19 
    19 
    20 #ifndef C_AIBTSAPPUBLISHER_H
    20 #ifndef C_AIBTSAPPUBLISHER_H
    21 #define C_AIBTSAPPUBLISHER_H
    21 #define C_AIBTSAPPUBLISHER_H
    22 
    22 
    23 
    23 // System includes
    24 #include <e32base.h>
    24 #include <e32base.h>
    25 #include <coemain.h>
    25 #include <coemain.h>
    26 #include <RSSSettings.h>
    26 #include <RSSSettings.h>
    27 #include <MSSSettingsObserver.h>
    27 #include <MSSSettingsObserver.h>
    28 #include <MProfileChangeObserver.h>
    28 #include <MProfileChangeObserver.h>
       
    29 
       
    30 // User includes
    29 #include "aidevicestatuspublisher.h"
    31 #include "aidevicestatuspublisher.h"
    30 #include "aidevicestatuscontentmodel.h"
    32 #include "aidevicestatuscontentmodel.h"
    31 
    33 
       
    34 // Forward declarations
    32 class MAiDeviceStatusContentObserver;
    35 class MAiDeviceStatusContentObserver;
    33 class MAiPropertyExtension;
    36 class CHsContentPublisher;
    34 
    37 
    35 /**
    38 /**
    36  *  @ingroup group_devicestatusplugin
    39  *  @ingroup group_devicestatusplugin
    37  *
    40  *
    38  *  Listens Bluetooth SIM Access Profile (BT SAP) and publishes text from
    41  *  Listens Bluetooth SIM Access Profile (BT SAP) and publishes text from
    39  *  resource file with EAiDeviceStatusContentBTSAP content id when
    42  *  resource file with EAiDeviceStatusContentBTSAP content id when
    40  *  BT SAP is activated.
    43  *  BT SAP is activated.
    41  *
    44  *
    42  *  @since S60 3.2
    45  *  @since S60 3.2
    43  */
    46  */
    44 class CAiBTSAPPublisher : public CActive, public MAiDeviceStatusPublisher
    47 NONSHARABLE_CLASS( CAiBTSAPPublisher ) : public CActive, 
       
    48     public MAiDeviceStatusPublisher
    45     {
    49     {
    46 public:
    50 public:
    47 
    51 
    48     static CAiBTSAPPublisher* NewL();
    52     static CAiBTSAPPublisher* NewL();
    49 
    53 
    51 
    55 
    52 // from base class MAiDeviceStatusPublisher
    56 // from base class MAiDeviceStatusPublisher
    53 
    57 
    54     void ResumeL();
    58     void ResumeL();
    55     void Subscribe( MAiContentObserver& aObserver, 
    59     void Subscribe( MAiContentObserver& aObserver, 
    56                     MAiPropertyExtension& aExtension,
    60                     CHsContentPublisher& aExtension,
    57                     MAiPublishPrioritizer& aPrioritizer,
    61                     MAiPublishPrioritizer& aPrioritizer,
    58                     MAiPublisherBroadcaster& aBroadcaster );
    62                     MAiPublisherBroadcaster& aBroadcaster );
    59     void RefreshL( TBool aClean );
    63     void RefreshL( TBool aClean );
    60     TBool RefreshL( TInt aContentId, TBool aClean );
    64     TBool RefreshL( TInt aContentId, TBool aClean );
       
    65     TBool SuspendL( TInt aContentId, TBool aClean );
    61     TBool RefreshContentWithPriorityL( TInt aContentId, TInt aPriority );
    66     TBool RefreshContentWithPriorityL( TInt aContentId, TInt aPriority );
    62     
    67     
    63 protected:
    68 protected:
    64 
    69 
    65 // from base class CActive
    70 // from base class CActive
    76 
    81 
    77     void FreeEngine();
    82     void FreeEngine();
    78 
    83 
    79 private: // data
    84 private: // data
    80 
    85 
    81     /**
    86     /** Property extension, not owned */
    82      * Property extension.
    87     CHsContentPublisher* iExtension;    
    83      * Not own.
    88 	/** Content prioritizer, not owned */
    84      */
    89 	MAiPublishPrioritizer* iPrioritizer;    
    85     MAiPropertyExtension* iExtension;
    90 	/**  Publish broadcaster, not owned */
    86     
    91 	MAiPublisherBroadcaster* iBroadcaster;	
    87 	/**
    92     /** Publish-subscribe client used to observer BT SAP activation */
    88 	 * Content prioritizer.
       
    89 	 * Not own.
       
    90 	 */
       
    91 	MAiPublishPrioritizer* iPrioritizer;
       
    92     
       
    93 	/**
       
    94 	 * Publish broadcaster.
       
    95 	 * Not own.
       
    96 	 */
       
    97 	MAiPublisherBroadcaster* iBroadcaster;
       
    98 	
       
    99     /**
       
   100      * Publish-subscribe client used to observer BT SAP activation.
       
   101      */
       
   102     RProperty iPubSub;
    93     RProperty iPubSub;
   103 
    94     /** Variable which tells if publisher has published previously or not */
   104     /**
       
   105      * Variable which tells if publisher has published previously or not.
       
   106      */
       
   107     TBool iFirstPublish;
    95     TBool iFirstPublish;
   108 
    96     /**  True if publish was successful */
   109     /**
    97     TBool iSuccess;    
   110      * True if publish was successful.
    98     /** True if publisher content is suspended */
   111      */
    99     TBool iSuspended;
   112     TBool iSuccess;
       
   113     };
   100     };
   114 
   101 
       
   102 #endif // C_AIBTSAPPUBLISHER_H
   115 
   103 
   116 #endif // C_AIBTSAPPUBLISHER_H
   104 // End of file