idlefw/plugins/devicestatus/inc/aibtsappublisher.h
changeset 0 79c6a41cd166
child 9 d0529222e3f0
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     1 /*
       
     2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Listens Bluetooth SIM Access Profile (BT SAP) and publishes
       
    15 *					text when BT SAP is activated.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef C_AIBTSAPPUBLISHER_H
       
    21 #define C_AIBTSAPPUBLISHER_H
       
    22 
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <coemain.h>
       
    26 #include <RSSSettings.h>
       
    27 #include <MSSSettingsObserver.h>
       
    28 #include <MProfileChangeObserver.h>
       
    29 #include "aidevicestatuspublisher.h"
       
    30 #include "aidevicestatuscontentmodel.h"
       
    31 
       
    32 class MAiDeviceStatusContentObserver;
       
    33 class MAiPropertyExtension;
       
    34 
       
    35 /**
       
    36  *  @ingroup group_devicestatusplugin
       
    37  *
       
    38  *  Listens Bluetooth SIM Access Profile (BT SAP) and publishes text from
       
    39  *  resource file with EAiDeviceStatusContentBTSAP content id when
       
    40  *  BT SAP is activated.
       
    41  *
       
    42  *  @since S60 3.2
       
    43  */
       
    44 class CAiBTSAPPublisher : public CActive, public MAiDeviceStatusPublisher
       
    45     {
       
    46 public:
       
    47 
       
    48     static CAiBTSAPPublisher* NewL();
       
    49 
       
    50     virtual ~CAiBTSAPPublisher();
       
    51 
       
    52 // from base class MAiDeviceStatusPublisher
       
    53 
       
    54     void ResumeL();
       
    55     void Subscribe( MAiContentObserver& aObserver, 
       
    56                     MAiPropertyExtension& aExtension,
       
    57                     MAiPublishPrioritizer& aPrioritizer,
       
    58                     MAiPublisherBroadcaster& aBroadcaster );
       
    59     void RefreshL( TBool aClean );
       
    60     TBool RefreshL( TInt aContentId, TBool aClean );
       
    61     TBool RefreshContentWithPriorityL( TInt aContentId, TInt aPriority );
       
    62     
       
    63 protected:
       
    64 
       
    65 // from base class CActive
       
    66 
       
    67     void RunL();
       
    68     void DoCancel();
       
    69     TInt RunError( TInt aError );
       
    70 
       
    71 private:
       
    72 
       
    73     CAiBTSAPPublisher();
       
    74 
       
    75     void ConstructL();
       
    76 
       
    77     void FreeEngine();
       
    78 
       
    79 private: // data
       
    80 
       
    81     /**
       
    82      * Property extension.
       
    83      * Not own.
       
    84      */
       
    85     MAiPropertyExtension* iExtension;
       
    86     
       
    87 	/**
       
    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;
       
   103 
       
   104     /**
       
   105      * Variable which tells if publisher has published previously or not.
       
   106      */
       
   107     TBool iFirstPublish;
       
   108 
       
   109     /**
       
   110      * True if publish was successful.
       
   111      */
       
   112     TBool iSuccess;
       
   113     };
       
   114 
       
   115 
       
   116 #endif // C_AIBTSAPPUBLISHER_H