equal
deleted
inserted
replaced
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "cpprofilemonitor_p.h" |
|
19 #include "cpprofilemonitor.h" |
|
20 |
|
21 #include <CProfileChangeNotifyHandler.h> |
|
22 |
|
23 /* |
|
24 * Construtor |
|
25 */ |
|
26 CpProfileMonitorPrivate::CpProfileMonitorPrivate(): |
|
27 mProfileNotifier(0) |
|
28 { |
|
29 |
|
30 } |
|
31 |
|
32 /* |
|
33 * Desconstructor |
|
34 */ |
|
35 CpProfileMonitorPrivate::~CpProfileMonitorPrivate() |
|
36 { |
|
37 delete mProfileNotifier; |
|
38 } |
|
39 |
|
40 /* |
|
41 * Initializing for the monitoring profile event |
|
42 */ |
|
43 void CpProfileMonitorPrivate::initialize(CpProfileMonitor *parent) |
|
44 { |
|
45 q_ptr = parent; |
|
46 TRAP_IGNORE(mProfileNotifier = CProfileChangeNotifyHandler::NewL(this)); |
|
47 } |
|
48 |
|
49 /* |
|
50 * From MProfileChangeObserver, monitor the profile event |
|
51 */ |
|
52 void CpProfileMonitorPrivate::HandleActiveProfileEventL(TProfileEvent aProfileEvent, TInt aProfileId) |
|
53 { |
|
54 switch (aProfileEvent) { |
|
55 case EProfileNewActiveProfile: |
|
56 { |
|
57 q_ptr->profileActivated(aProfileId); |
|
58 break; |
|
59 } |
|
60 case EProfileActiveProfileModified: |
|
61 { |
|
62 q_ptr->activeProfileModified(aProfileId); |
|
63 break; |
|
64 } |
|
65 default: |
|
66 break; |
|
67 } |
|
68 } |
|