equal
deleted
inserted
replaced
39 } |
39 } |
40 |
40 |
41 |
41 |
42 void CAiNwsPublisher::ConstructL() |
42 void CAiNwsPublisher::ConstructL() |
43 { |
43 { |
|
44 __PRINTS( "XAI: CAiNwsPublisher > ConstructL" ); |
44 iListener = CAiNetworkInfoListener::InstanceL(); |
45 iListener = CAiNetworkInfoListener::InstanceL(); |
45 iProfileApi = CRepository::NewL( KCRUidProfileEngine ); |
46 iProfileApi = CRepository::NewL( KCRUidProfileEngine ); |
46 } |
47 } |
47 |
48 |
48 CAiNwsPublisher* CAiNwsPublisher::NewL() |
49 CAiNwsPublisher* CAiNwsPublisher::NewL() |
55 } |
56 } |
56 |
57 |
57 |
58 |
58 CAiNwsPublisher::~CAiNwsPublisher() |
59 CAiNwsPublisher::~CAiNwsPublisher() |
59 { |
60 { |
|
61 __PRINTS( "XAI: CAiNwsPublisher > ~CAiNwsPublisher" ); |
60 if( iListener ) |
62 if( iListener ) |
61 { |
63 { |
62 iListener->RemoveObserver( *this ); |
64 iListener->RemoveObserver( *this ); |
63 iListener->Release(); |
65 iListener->Release(); |
64 } |
66 } |
66 } |
68 } |
67 |
69 |
68 |
70 |
69 void CAiNwsPublisher::ResumeL() |
71 void CAiNwsPublisher::ResumeL() |
70 { |
72 { |
|
73 __PRINTS( "XAI: CAiNwsPublisher > ResumeL" ); |
71 iListener->AddObserverL( *this ); |
74 iListener->AddObserverL( *this ); |
72 } |
75 } |
73 |
76 |
74 |
77 |
75 void CAiNwsPublisher::Subscribe( MAiContentObserver& aObserver, |
78 void CAiNwsPublisher::Subscribe( MAiContentObserver& aObserver, |
76 CHsContentPublisher& aExtension, |
79 CHsContentPublisher& aExtension, |
77 MAiPublishPrioritizer& /*aPrioritizer*/, |
80 MAiPublishPrioritizer& /*aPrioritizer*/, |
78 MAiPublisherBroadcaster& /*aBroadcaster*/ ) |
81 MAiPublisherBroadcaster& /*aBroadcaster*/ ) |
79 { |
82 { |
|
83 __PRINTS( "XAI: CAiNwsPublisher > Subscribe" ); |
80 iContentObserver = &aObserver; |
84 iContentObserver = &aObserver; |
81 iExtension = &aExtension; |
85 iExtension = &aExtension; |
82 } |
86 } |
83 |
87 |
84 |
88 |
87 HandleStateChange( iListener->NetworkInfo() ); |
91 HandleStateChange( iListener->NetworkInfo() ); |
88 } |
92 } |
89 |
93 |
90 TBool CAiNwsPublisher::RefreshL( TInt aContentId, TBool aClean ) |
94 TBool CAiNwsPublisher::RefreshL( TInt aContentId, TBool aClean ) |
91 { |
95 { |
|
96 __PRINTS( "XAI: CAiNwsPublisher::RefreshL" ); |
92 if( aContentId == EAiDeviceStatusContentNWStatus ) |
97 if( aContentId == EAiDeviceStatusContentNWStatus ) |
93 { |
98 { |
|
99 __PRINTS( "XAI: content EAiDeviceStatusContentNWStatus" ); |
94 RefreshL( aClean ); |
100 RefreshL( aClean ); |
95 return ETrue; |
101 return ETrue; |
96 } |
102 } |
97 |
103 |
98 return EFalse; |
104 return EFalse; |
99 } |
105 } |
100 |
106 |
101 |
|
102 |
|
103 void CAiNwsPublisher::HandleNetworkInfoChange( |
107 void CAiNwsPublisher::HandleNetworkInfoChange( |
104 const MNWMessageObserver::TNWMessages& /*aMessage*/, |
108 const MNWMessageObserver::TNWMessages& /*aMessage*/, |
105 const TNWInfo& aInfo, |
109 const TNWInfo& aInfo, |
106 const TBool /*aShowOpInd*/ ) |
110 const TBool /*aShowOpInd*/ ) |
107 { |
111 { |
|
112 __PRINTS( "XAI: CAiNwsPublisher::HandleNetworkInfoChange" ); |
108 HandleStateChange( aInfo ); |
113 HandleStateChange( aInfo ); |
109 } |
114 } |
110 |
115 |
111 void CAiNwsPublisher::HandleStateChange( const TNWInfo& aInfo ) |
116 void CAiNwsPublisher::HandleStateChange( const TNWInfo& aInfo ) |
112 { |
117 { |
137 } |
142 } |
138 } |
143 } |
139 |
144 |
140 void CAiNwsPublisher::HandleNetworkFound() |
145 void CAiNwsPublisher::HandleNetworkFound() |
141 { |
146 { |
142 __PRINTS( "XAI: Network found, clean state" ); |
147 __PRINTS( "XAI: Network found" ); |
143 iRegistered = ETrue; |
148 iRegistered = ETrue; |
144 if ( iContentObserver && iExtension ) |
149 if ( iContentObserver && iExtension ) |
145 { |
150 { |
|
151 __PRINTS( "XAI: Network found, clean state" ); |
146 iContentObserver->Clean( *iExtension, EAiDeviceStatusContentNWStatus, 0 ); |
152 iContentObserver->Clean( *iExtension, EAiDeviceStatusContentNWStatus, 0 ); |
147 } |
153 } |
148 } |
154 } |
149 |
155 |
150 void CAiNwsPublisher::HandleNetworkLost( const TNWNetworkSelectionSetting &aSelectionSetting ) |
156 void CAiNwsPublisher::HandleNetworkLost( const TNWNetworkSelectionSetting &aSelectionSetting ) |
151 { |
157 { |
|
158 __PRINTS( "XAI: Network lost" ); |
152 if( aSelectionSetting == ENWNetworkSelectionManual ) |
159 if( aSelectionSetting == ENWNetworkSelectionManual ) |
153 { |
160 { |
154 // See if we were registered before |
161 // See if we were registered before |
155 if( iRegistered ) |
162 if( iRegistered ) |
156 { |
163 { |