|
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 |
|
19 #include <PsetContainer.h> |
|
20 #include "psetwrapper.h" |
|
21 #include "psetcliwrapper.h" |
|
22 #include "psetcallwaitingwrapper.h" |
|
23 #include "psetcalldivertingwrapper.h" |
|
24 #include "psetnetworkwrapper.h" |
|
25 #include "logging.h" |
|
26 |
|
27 /*! |
|
28 PSetWrapper::PSetWrapper |
|
29 */ |
|
30 PSetWrapper::PSetWrapper(QObject *parent) : |
|
31 QObject(parent), |
|
32 m_psetContainer(NULL), |
|
33 m_wrapperCli(NULL), |
|
34 m_callWaitingWrapper(NULL), |
|
35 m_callDivertingWrapper(NULL), |
|
36 m_networkWrapper(NULL) |
|
37 { |
|
38 DPRINT << ": IN "; |
|
39 |
|
40 QT_TRAP_THROWING(m_psetContainer = CPsetContainer::NewL()); |
|
41 |
|
42 DPRINT << ": OUT "; |
|
43 } |
|
44 |
|
45 /*! |
|
46 PSetWrapper::~PSetWrapper |
|
47 */ |
|
48 PSetWrapper::~PSetWrapper() |
|
49 { |
|
50 DPRINT << ": IN "; |
|
51 |
|
52 delete m_wrapperCli; |
|
53 delete m_callWaitingWrapper; |
|
54 delete m_callDivertingWrapper; |
|
55 delete m_networkWrapper; |
|
56 delete m_psetContainer; |
|
57 |
|
58 DPRINT << ": OUT "; |
|
59 } |
|
60 |
|
61 /*! |
|
62 PSetWrapper::cliWrapper |
|
63 */ |
|
64 PSetCliWrapper& PSetWrapper::cliWrapper() |
|
65 { |
|
66 DPRINT; |
|
67 |
|
68 if (!m_wrapperCli) { |
|
69 m_wrapperCli = new PSetCliWrapper(*m_psetContainer, this); |
|
70 Q_CHECK_PTR(m_wrapperCli); |
|
71 } |
|
72 |
|
73 return *m_wrapperCli; |
|
74 } |
|
75 |
|
76 /*! |
|
77 PSetWrapper::callWaitingWrapper |
|
78 */ |
|
79 PSetCallWaitingWrapper& PSetWrapper::callWaitingWrapper() |
|
80 { |
|
81 DPRINT; |
|
82 |
|
83 if (!m_callWaitingWrapper) { |
|
84 m_callWaitingWrapper = |
|
85 new PSetCallWaitingWrapper(*m_psetContainer, this); |
|
86 Q_CHECK_PTR(m_callWaitingWrapper); |
|
87 } |
|
88 |
|
89 return *m_callWaitingWrapper; |
|
90 } |
|
91 |
|
92 /*! |
|
93 PSetWrapper::callDivertingWrapper |
|
94 */ |
|
95 PSetCallDivertingWrapper& PSetWrapper::callDivertingWrapper() |
|
96 { |
|
97 DPRINT; |
|
98 |
|
99 if (!m_callDivertingWrapper) { |
|
100 m_callDivertingWrapper = |
|
101 new PSetCallDivertingWrapper(*m_psetContainer, this); |
|
102 Q_CHECK_PTR(m_callDivertingWrapper); |
|
103 } |
|
104 |
|
105 return *m_callDivertingWrapper; |
|
106 } |
|
107 |
|
108 /*! |
|
109 PSetWrapper::networkWrapper |
|
110 */ |
|
111 PSetNetworkWrapper& PSetWrapper::networkWrapper() |
|
112 { |
|
113 DPRINT; |
|
114 |
|
115 if (!m_networkWrapper) { |
|
116 m_networkWrapper = new PSetNetworkWrapper(*m_psetContainer, this); |
|
117 Q_CHECK_PTR(m_networkWrapper); |
|
118 } |
|
119 |
|
120 return *m_networkWrapper; |
|
121 } |
|
122 |
|
123 // End of File. |