|
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: Telephony Multimedia Service |
|
15 * |
|
16 */ |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include "tarsettings.h" |
|
20 #include "tmsclientserver.h" |
|
21 #include "tmsutility.h" |
|
22 |
|
23 using namespace TMS; |
|
24 |
|
25 // CONSTANTS |
|
26 _LIT_SECURITY_POLICY_PASS(KTMSServerReadPolicy); |
|
27 _LIT_SECURITY_POLICY_C1(KTMSServerWritePolicy, ECapabilityWriteUserData); |
|
28 |
|
29 // ----------------------------------------------------------------------------- |
|
30 // TarSettings::TarSettings |
|
31 // C++ default constructor can NOT contain any code, that |
|
32 // might leave. |
|
33 // ----------------------------------------------------------------------------- |
|
34 // |
|
35 TarSettings::TarSettings() |
|
36 { |
|
37 } |
|
38 |
|
39 // ----------------------------------------------------------------------------- |
|
40 // TarSettings::ConstructL |
|
41 // Symbian 2nd phase constructor can leave. |
|
42 // ----------------------------------------------------------------------------- |
|
43 // |
|
44 void TarSettings::ConstructL() |
|
45 { |
|
46 TRACE_PRN_FN_ENT; |
|
47 TInt err = RProperty::Define(ERoutingPs, RProperty::EByteArray, |
|
48 KTMSServerReadPolicy, KTMSServerWritePolicy); |
|
49 TRACE_PRN_N1(_L("TarSetting::ConstructL err:%d"),err); |
|
50 |
|
51 if (err != KErrAlreadyExists) |
|
52 { |
|
53 User::LeaveIfError(err); |
|
54 } |
|
55 TRACE_PRN_FN_EXT; |
|
56 } |
|
57 |
|
58 // ----------------------------------------------------------------------------- |
|
59 // TarSettings::NewL |
|
60 // Two-phased constructor. |
|
61 // ----------------------------------------------------------------------------- |
|
62 // |
|
63 TarSettings* TarSettings::NewL() |
|
64 { |
|
65 TarSettings* self = new (ELeave) TarSettings(); |
|
66 CleanupStack::PushL(self); |
|
67 self->ConstructL(); |
|
68 CleanupStack::Pop(self); |
|
69 return self; |
|
70 } |
|
71 |
|
72 // Destructor |
|
73 TarSettings::~TarSettings() |
|
74 { |
|
75 TRACE_PRN_FN_ENT; |
|
76 TInt err = RProperty::Delete(KTMSPropertyCategory, ERoutingPs); |
|
77 TRACE_PRN_N1(_L("TarSetting::~TarSettings err:%d"),err); |
|
78 TRACE_PRN_FN_ENT; |
|
79 } |
|
80 |
|
81 // ----------------------------------------------------------------------------- |
|
82 // TarSettings::SetVolume |
|
83 // ----------------------------------------------------------------------------- |
|
84 // |
|
85 void TarSettings::SetTar(TRoutingMsgBufPckg rountingpckg, TBool aPublish) |
|
86 { |
|
87 TRACE_PRN_FN_ENT; |
|
88 // TInt err(KErrNone); |
|
89 if (aPublish) |
|
90 { |
|
91 /*err =*/RProperty::Set(KTMSPropertyCategory, ERoutingPs, rountingpckg); |
|
92 } |
|
93 |
|
94 //TRACE_PRN_N1(_L("TarSetting::SetTar err:%d"),err); |
|
95 TRACE_PRN_FN_EXT; |
|
96 } |
|
97 |
|
98 // End of File |