|
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: Closed user group (CUG) publisher. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_AICUGPUBLISHER_H |
|
20 #define C_AICUGPUBLISHER_H |
|
21 |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <RSSSettings.h> |
|
25 #include <MSSSettingsObserver.h> |
|
26 #include "aidevicestatuspublisher.h" |
|
27 #include "aidevicestatuscontentmodel.h" |
|
28 |
|
29 class MAiDeviceStatusContentObserver; |
|
30 class MAiPropertyExtension; |
|
31 |
|
32 /** |
|
33 * @ingroup group_devicestatusplugin |
|
34 * |
|
35 * Closed user group (CUG) publisher. |
|
36 * |
|
37 * @since S60 3.2 |
|
38 */ |
|
39 class CAiCUGPublisher : public CBase, public MAiDeviceStatusPublisher, |
|
40 public MSSSettingsObserver |
|
41 { |
|
42 public: |
|
43 |
|
44 static CAiCUGPublisher* NewL(); |
|
45 |
|
46 virtual ~CAiCUGPublisher(); |
|
47 |
|
48 |
|
49 protected: |
|
50 |
|
51 // from base class MAiDeviceStatusPublisher |
|
52 |
|
53 void ResumeL(); |
|
54 void Subscribe( MAiContentObserver& aObserver, |
|
55 MAiPropertyExtension& aExtension, |
|
56 MAiPublishPrioritizer& aPrioritizer, |
|
57 MAiPublisherBroadcaster& aBroadcaster ); |
|
58 void RefreshL( TBool aClean ); |
|
59 TBool RefreshL( TInt aContentId, TBool aClean ); |
|
60 |
|
61 // from base class MSSSettingsObserver |
|
62 |
|
63 void PhoneSettingChanged( TSSSettingsSetting aSetting, TInt aNewValue ); |
|
64 |
|
65 |
|
66 private: |
|
67 |
|
68 CAiCUGPublisher(); |
|
69 |
|
70 void ConstructL(); |
|
71 |
|
72 /** |
|
73 * Updates CUG indicator if needed. |
|
74 */ |
|
75 void UpdateCUGIndicatorL( TInt aValue ); |
|
76 |
|
77 |
|
78 private: // data |
|
79 |
|
80 /** |
|
81 * Content observer. |
|
82 * Not own. |
|
83 */ |
|
84 MAiContentObserver* iContentObserver; |
|
85 |
|
86 /** |
|
87 * Property extension. |
|
88 * Not own. |
|
89 */ |
|
90 MAiPropertyExtension* iExtension; |
|
91 |
|
92 /** |
|
93 * SS Settings client. Used to observer CUG changes. |
|
94 */ |
|
95 RSSSettings iSSSettings; |
|
96 |
|
97 /** |
|
98 * Published CUG text. Owned. |
|
99 */ |
|
100 HBufC* iCugText; |
|
101 |
|
102 /** |
|
103 * Previous CUG value |
|
104 */ |
|
105 TInt iCugValue; |
|
106 }; |
|
107 |
|
108 |
|
109 #endif // C_AICUGPUBLISHER_H |