|
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 // System includes |
|
24 #include <e32base.h> |
|
25 #include <coemain.h> |
|
26 #include <aidevicestatuscontentmodel.h> |
|
27 #include <RSSSettings.h> |
|
28 #include <MSSSettingsObserver.h> |
|
29 #include <MProfileChangeObserver.h> |
|
30 |
|
31 // User includes |
|
32 #include "aidevicestatuspublisher.h" |
|
33 |
|
34 // Forward declarations |
|
35 class MAiDeviceStatusContentObserver; |
|
36 class CHsContentPublisher; |
|
37 |
|
38 /** |
|
39 * @ingroup group_devicestatusplugin |
|
40 * |
|
41 * Listens Bluetooth SIM Access Profile (BT SAP) and publishes text from |
|
42 * resource file with EAiDeviceStatusContentBTSAP content id when |
|
43 * BT SAP is activated. |
|
44 * |
|
45 * @since S60 3.2 |
|
46 */ |
|
47 NONSHARABLE_CLASS( CAiBTSAPPublisher ) : public CActive, |
|
48 public MAiDeviceStatusPublisher |
|
49 { |
|
50 public: |
|
51 |
|
52 static CAiBTSAPPublisher* NewL(); |
|
53 |
|
54 virtual ~CAiBTSAPPublisher(); |
|
55 |
|
56 // from base class MAiDeviceStatusPublisher |
|
57 |
|
58 void ResumeL(); |
|
59 void Subscribe( MAiContentObserver& aObserver, |
|
60 CHsContentPublisher& aExtension, |
|
61 MAiPublishPrioritizer& aPrioritizer, |
|
62 MAiPublisherBroadcaster& aBroadcaster ); |
|
63 void RefreshL( TBool aClean ); |
|
64 TBool RefreshL( TInt aContentId, TBool aClean ); |
|
65 TBool SuspendL( TInt aContentId, TBool aClean ); |
|
66 TBool RefreshContentWithPriorityL( TInt aContentId, TInt aPriority ); |
|
67 |
|
68 protected: |
|
69 |
|
70 // from base class CActive |
|
71 |
|
72 void RunL(); |
|
73 void DoCancel(); |
|
74 TInt RunError( TInt aError ); |
|
75 |
|
76 private: |
|
77 |
|
78 CAiBTSAPPublisher(); |
|
79 |
|
80 void ConstructL(); |
|
81 |
|
82 void FreeEngine(); |
|
83 |
|
84 private: // data |
|
85 |
|
86 /** Property extension, not owned */ |
|
87 CHsContentPublisher* iExtension; |
|
88 /** Content prioritizer, not owned */ |
|
89 MAiPublishPrioritizer* iPrioritizer; |
|
90 /** Publish broadcaster, not owned */ |
|
91 MAiPublisherBroadcaster* iBroadcaster; |
|
92 /** Publish-subscribe client used to observer BT SAP activation */ |
|
93 RProperty iPubSub; |
|
94 /** Variable which tells if publisher has published previously or not */ |
|
95 TBool iFirstPublish; |
|
96 /** True if publish was successful */ |
|
97 TBool iSuccess; |
|
98 /** True if publisher content is suspended */ |
|
99 TBool iSuspended; |
|
100 }; |
|
101 |
|
102 #endif // C_AIBTSAPPUBLISHER_H |
|
103 |
|
104 // End of file |