|
1 /* |
|
2 * Copyright (c) 2003 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: Structure to hold MMS encapsulation 1.2 version |
|
15 * result array for M-MBox delete confirmation |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include "mmsdeleteresultarray.h" |
|
24 |
|
25 // EXTERNAL DATA STRUCTURES |
|
26 |
|
27 // EXTERNAL FUNCTION PROTOTYPES |
|
28 |
|
29 // CONSTANTS |
|
30 |
|
31 // MACROS |
|
32 |
|
33 // LOCAL CONSTANTS AND MACROS |
|
34 |
|
35 // MODULE DATA STRUCTURES |
|
36 |
|
37 // LOCAL FUNCTION PROTOTYPES |
|
38 |
|
39 // FORWARD DECLARATIONS |
|
40 |
|
41 // ============================= LOCAL FUNCTIONS =============================== |
|
42 |
|
43 // ============================ MEMBER FUNCTIONS =============================== |
|
44 |
|
45 // ----------------------------------------------------------------------------- |
|
46 // CMmsDeleteResultArray::CMmsDeleteResultArray |
|
47 // C++ default constructor can NOT contain any code, that |
|
48 // might leave. |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 CMmsDeleteResultArray::CMmsDeleteResultArray() |
|
52 { |
|
53 // everything is initailized to 0 by CBase |
|
54 } |
|
55 |
|
56 |
|
57 // Destructor |
|
58 CMmsDeleteResultArray::~CMmsDeleteResultArray() |
|
59 { |
|
60 delete iContentLocation; |
|
61 delete iResponseText; |
|
62 } |
|
63 |
|
64 |
|
65 // ----------------------------------------------------------------------------- |
|
66 // CMmsDeleteResultArray::Compare |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 TInt CMmsDeleteResultArray::Compare( |
|
70 const CMmsDeleteResultArray& aFirst, |
|
71 const CMmsDeleteResultArray& aSecond ) |
|
72 { |
|
73 if ( aFirst.iOrder == aSecond.iOrder ) |
|
74 { |
|
75 return 0; |
|
76 } |
|
77 if ( aFirst.iOrder > aSecond.iOrder ) |
|
78 { |
|
79 return 1; |
|
80 } |
|
81 else |
|
82 { |
|
83 return -1; |
|
84 } |
|
85 } |
|
86 |
|
87 // ----------------------------------------------------------------------------- |
|
88 // CMmsDeleteResultArray::ResponseText |
|
89 // ----------------------------------------------------------------------------- |
|
90 // |
|
91 EXPORT_C TPtrC CMmsDeleteResultArray::ResponseText() const |
|
92 { |
|
93 return iResponseText ? TPtrC( *iResponseText ) : TPtrC(); |
|
94 } |
|
95 |
|
96 // ----------------------------------------------------------------------------- |
|
97 // CMmsDeleteResultArray::SetResponseStatusL |
|
98 // ----------------------------------------------------------------------------- |
|
99 // |
|
100 |
|
101 EXPORT_C void CMmsDeleteResultArray::SetResponseTextL( const TDesC& aResponseText ) |
|
102 { |
|
103 HBufC* newAttrib = aResponseText.AllocL(); |
|
104 delete iResponseText; |
|
105 iResponseText = newAttrib; |
|
106 } |
|
107 |
|
108 // ----------------------------------------------------------------------------- |
|
109 // CMmsDeleteResultArray::ContentLocation |
|
110 // ----------------------------------------------------------------------------- |
|
111 // |
|
112 EXPORT_C TPtrC8 CMmsDeleteResultArray::ContentLocation() const |
|
113 { |
|
114 return iContentLocation ? TPtrC8( *iContentLocation ) : TPtrC8(); |
|
115 } |
|
116 |
|
117 // ----------------------------------------------------------------------------- |
|
118 // CMmsDeleteResultArray::SetContentLocationL |
|
119 // ----------------------------------------------------------------------------- |
|
120 // |
|
121 |
|
122 EXPORT_C void CMmsDeleteResultArray::SetContentLocationL( const TDesC8& aContentLocation ) |
|
123 { |
|
124 HBufC8* newAttrib = aContentLocation.AllocL(); |
|
125 delete iContentLocation; |
|
126 iContentLocation = newAttrib; |
|
127 } |
|
128 |
|
129 |
|
130 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
131 |
|
132 // End of File |