equal
deleted
inserted
replaced
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of the License "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 // |
7 // |
8 // Initial Contributors: |
8 // Initial Contributors: |
9 // Nokia Corporation - initial contribution. |
9 // Nokia Corporation - initial contribution. |
30 /** Allocates and constructs an application list change notifier. |
30 /** Allocates and constructs an application list change notifier. |
31 |
31 |
32 It creates a session with the application architecture server (RApaLsSession), |
32 It creates a session with the application architecture server (RApaLsSession), |
33 issues the notification request to the server and adds itself to the active scheduler. |
33 issues the notification request to the server and adds itself to the active scheduler. |
34 |
34 |
35 @param aObserver Observer whose HandleAppListEvent() function is called when an |
35 @param aObserver Observer whose HandleAppListEvent() function is called when application list is changed. |
36 application is added or deleted. |
|
37 @param aPriority The active object priority. |
36 @param aPriority The active object priority. |
38 @return The application list change notifier. */ |
37 @return The application list change notifier. */ |
39 { |
38 { |
40 __ASSERT_DEBUG(aObserver!=NULL,Panic(EDPanicInvalidObserver)); |
39 __ASSERT_DEBUG(aObserver!=NULL,Panic(EDPanicInvalidObserver)); |
41 CApaAppListNotifier* self=new(ELeave) CApaAppListNotifier(*aObserver, aPriority); |
40 CApaAppListNotifier* self=new(ELeave) CApaAppListNotifier(*aObserver, aPriority); |
65 } |
64 } |
66 |
65 |
67 void CApaAppListNotifier::RunL() |
66 void CApaAppListNotifier::RunL() |
68 { |
67 { |
69 TInt status=iStatus.Int(); |
68 TInt status=iStatus.Int(); |
70 User::LeaveIfError(status); |
|
71 iLsSession.SetNotify(EFalse, iStatus); // requeue before handling in case the handling changes things |
69 iLsSession.SetNotify(EFalse, iStatus); // requeue before handling in case the handling changes things |
72 SetActive(); |
70 SetActive(); |
73 iObserver.HandleAppListEvent(status); |
71 User::LeaveIfError(status); |
|
72 // On Leave, its not necessary to inform observers as nothing is updated |
|
73 iObserver.HandleAppListEvent(status); |
74 } |
74 } |
|
75 |
|
76 //This function is implemented to avoid panic the clients (with E32USER-CBase 47) when RunL leaves |
|
77 TInt CApaAppListNotifier::RunError(TInt /*aError*/) |
|
78 { |
|
79 return KErrNone; |
|
80 } |
75 |
81 |
76 // |
82 // |
77 // MApaAppListServObserver |
83 // MApaAppListServObserver |
78 // |
84 // |
79 /** Constructor for MApaAppListServObserver */ |
85 /** Constructor for MApaAppListServObserver */ |