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 CMessageAddress interface. |
|
15 * Encapsulates the ECom plugged sending service data. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include "SendingServiceInfoImpl.h" |
|
24 |
|
25 // ============================ MEMBER FUNCTIONS =============================== |
|
26 |
|
27 // ----------------------------------------------------------------------------- |
|
28 // CSendingServiceInfoImpl::CSendingServiceInfoImpl |
|
29 // C++ default constructor can NOT contain any code, that |
|
30 // might leave. |
|
31 // ----------------------------------------------------------------------------- |
|
32 // |
|
33 CSendingServiceInfoImpl::CSendingServiceInfoImpl() |
|
34 { |
|
35 } |
|
36 |
|
37 // ----------------------------------------------------------------------------- |
|
38 // CSendingServiceInfoImpl::NewL |
|
39 // Two-phased constructor. |
|
40 // ----------------------------------------------------------------------------- |
|
41 // |
|
42 CSendingServiceInfoImpl* CSendingServiceInfoImpl::NewL() |
|
43 { |
|
44 CSendingServiceInfoImpl* self = CSendingServiceInfoImpl::NewLC(); |
|
45 |
|
46 CleanupStack::Pop( self ); |
|
47 |
|
48 return self; |
|
49 } |
|
50 |
|
51 // --------------------------------------------------------- |
|
52 // CSendingServiceInfoImpl::NewLC |
|
53 // Two-phased constructor. |
|
54 // --------------------------------------------------------- |
|
55 // |
|
56 CSendingServiceInfoImpl* CSendingServiceInfoImpl::NewLC() |
|
57 { |
|
58 CSendingServiceInfoImpl* self = new (ELeave) CSendingServiceInfoImpl; |
|
59 CleanupStack::PushL( self ); |
|
60 return self; |
|
61 } |
|
62 |
|
63 |
|
64 // Destructor |
|
65 CSendingServiceInfoImpl::~CSendingServiceInfoImpl() |
|
66 { |
|
67 delete iServiceName; |
|
68 delete iServiceMenuName; |
|
69 delete iServiceAddress; |
|
70 } |
|
71 |
|
72 // ----------------------------------------------------------------------------- |
|
73 // CSendingServiceInfoImpl::CopyL |
|
74 // Creates a copy of CSendingServiceInfoImpl object. |
|
75 // (other items were commented in a header). |
|
76 // ----------------------------------------------------------------------------- |
|
77 // |
|
78 CSendingServiceInfoImpl* CSendingServiceInfoImpl::CopyL() const |
|
79 { |
|
80 CSendingServiceInfoImpl* serviceInfoImpl = CSendingServiceInfoImpl::NewL(); |
|
81 CleanupStack::PushL( serviceInfoImpl ); |
|
82 |
|
83 if ( iServiceName ) |
|
84 { |
|
85 serviceInfoImpl->SetServiceNameL( *iServiceName ); |
|
86 } |
|
87 |
|
88 if ( iServiceMenuName ) |
|
89 { |
|
90 serviceInfoImpl->SetServiceMenuNameL( *iServiceMenuName ); |
|
91 } |
|
92 |
|
93 if ( iServiceAddress ) |
|
94 { |
|
95 serviceInfoImpl->SetServiceAddressL( *iServiceAddress ); |
|
96 } |
|
97 |
|
98 serviceInfoImpl->iServiceId = iServiceId; |
|
99 serviceInfoImpl->iServiceProviderId = iServiceProviderId; |
|
100 serviceInfoImpl->iServiceCapabilities = iServiceCapabilities; |
|
101 serviceInfoImpl->iTechnologyTypeId = iTechnologyTypeId; |
|
102 serviceInfoImpl->iServiceFeatures = iServiceFeatures; |
|
103 |
|
104 CleanupStack::Pop( serviceInfoImpl ); |
|
105 |
|
106 return serviceInfoImpl; |
|
107 } |
|
108 |
|
109 // ----------------------------------------------------------------------------- |
|
110 // CSendingServiceInfoImpl::SetServiceNameL |
|
111 // Sets service human readable name. |
|
112 // (other items were commented in a header). |
|
113 // ----------------------------------------------------------------------------- |
|
114 // |
|
115 void CSendingServiceInfoImpl::SetServiceNameL( |
|
116 const TDesC& aServiceName ) |
|
117 { |
|
118 delete iServiceName; |
|
119 iServiceName = NULL; |
|
120 iServiceName = aServiceName.AllocL(); |
|
121 } |
|
122 |
|
123 // ----------------------------------------------------------------------------- |
|
124 // CSendingServiceInfoImpl::SetServiceMenuNameL |
|
125 // Sets service human readable name for the "Send"-menu. |
|
126 // (other items were commented in a header). |
|
127 // ----------------------------------------------------------------------------- |
|
128 // |
|
129 void CSendingServiceInfoImpl::SetServiceMenuNameL( |
|
130 const TDesC& aServiceMenuName ) |
|
131 { |
|
132 delete iServiceMenuName; |
|
133 iServiceMenuName = NULL; |
|
134 iServiceMenuName = aServiceMenuName.AllocL(); |
|
135 } |
|
136 |
|
137 // ----------------------------------------------------------------------------- |
|
138 // CSendingServiceInfoImpl::SetServiceAddressL |
|
139 // Sets service address. |
|
140 // (other items were commented in a header). |
|
141 // ----------------------------------------------------------------------------- |
|
142 // |
|
143 void CSendingServiceInfoImpl::SetServiceAddressL( |
|
144 const TDesC& aServiceAddress ) |
|
145 { |
|
146 delete iServiceAddress; |
|
147 iServiceAddress = NULL; |
|
148 iServiceAddress = aServiceAddress.AllocL(); |
|
149 } |
|
150 |
|
151 |
|
152 // End of File |
|