|
1 /* |
|
2 * Copyright (c) 2002-2004 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: Implementation of CProEngCenRepObserverBase. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "CProEngCenRepObserverBase.h" |
|
22 #include <centralrepository.h> |
|
23 #include "ProfileEnginePrivatePSKeys.h" |
|
24 #include "ProfileEngineSDKCRKeys.h" |
|
25 |
|
26 // ============================ MEMBER FUNCTIONS =============================== |
|
27 |
|
28 // ----------------------------------------------------------------------------- |
|
29 // CProEngCenRepObserverBase::CProEngCenRepObserverBase |
|
30 // ----------------------------------------------------------------------------- |
|
31 // |
|
32 CProEngCenRepObserverBase::CProEngCenRepObserverBase( TUint32 aPartialCenRepKey, |
|
33 TUint32 aKeyMask ) |
|
34 : CProEngObserverBase( aPartialCenRepKey ), iKeyMask( aKeyMask ) |
|
35 { |
|
36 } |
|
37 |
|
38 // Destructor |
|
39 CProEngCenRepObserverBase::~CProEngCenRepObserverBase() |
|
40 { |
|
41 Cancel(); |
|
42 delete iRepository; |
|
43 } |
|
44 |
|
45 // ----------------------------------------------------------------------------- |
|
46 // CProEngCenRepObserverBase::ConstructL |
|
47 // ----------------------------------------------------------------------------- |
|
48 // |
|
49 void CProEngCenRepObserverBase::ConstructL() |
|
50 { |
|
51 iRepository = CRepository::NewL( KCRUidProfileEngine ); |
|
52 } |
|
53 |
|
54 // ----------------------------------------------------------------------------- |
|
55 // CProEngCenRepObserverBase::RequestNotification |
|
56 // ----------------------------------------------------------------------------- |
|
57 // |
|
58 TInt CProEngCenRepObserverBase::RequestNotification() |
|
59 { |
|
60 TInt result( iRepository->NotifyRequest( iKey, iKeyMask, iStatus ) ); |
|
61 if( result == KErrNone ) |
|
62 { |
|
63 SetActive(); |
|
64 } |
|
65 |
|
66 return result; |
|
67 } |
|
68 |
|
69 // ----------------------------------------------------------------------------- |
|
70 // CProEngCenRepObserverBase::DoCancel |
|
71 // ----------------------------------------------------------------------------- |
|
72 // |
|
73 void CProEngCenRepObserverBase::DoCancel() |
|
74 { |
|
75 iRepository->NotifyCancel( iKey, iKeyMask ); |
|
76 } |
|
77 |
|
78 // End of File |
|
79 |