|
1 /* |
|
2 * Copyright (c) 2005 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 |
|
20 |
|
21 |
|
22 #include "mcecsreceiveitem.h" |
|
23 |
|
24 // ----------------------------------------------------------------------------- |
|
25 // TMceCSReceiveItem::TMceCSReceiveItem |
|
26 // ----------------------------------------------------------------------------- |
|
27 // |
|
28 TMceCSReceiveItem::TMceCSReceiveItem (const TMceIds& aIds, |
|
29 HBufC8* aContext, |
|
30 HBufC8* aContent, |
|
31 TInt aError) |
|
32 : iIds (aIds), |
|
33 iContext (aContext), |
|
34 iContent (aContent), |
|
35 iError (aError) |
|
36 { |
|
37 } |
|
38 |
|
39 // ----------------------------------------------------------------------------- |
|
40 // TMceCSReceiveItem::TMceCSReceiveItem |
|
41 // ----------------------------------------------------------------------------- |
|
42 // |
|
43 TMceCSReceiveItem::TMceCSReceiveItem (const TMceIds& aIds, TInt aError) |
|
44 : iIds (aIds), |
|
45 iContext (0), |
|
46 iContent (0), |
|
47 iError (aError) |
|
48 { |
|
49 } |
|
50 |
|
51 // ----------------------------------------------------------------------------- |
|
52 // TMceCSReceiveItem::Content |
|
53 // ----------------------------------------------------------------------------- |
|
54 // |
|
55 HBufC8* TMceCSReceiveItem::Context () |
|
56 { |
|
57 return iContext; |
|
58 } |
|
59 |
|
60 // ----------------------------------------------------------------------------- |
|
61 // TMceCSReceiveItem::Content |
|
62 // ----------------------------------------------------------------------------- |
|
63 // |
|
64 HBufC8* TMceCSReceiveItem::Content () |
|
65 { |
|
66 return iContent; |
|
67 } |
|
68 |
|
69 // ----------------------------------------------------------------------------- |
|
70 // TMceCSReceiveItem::Ids |
|
71 // ----------------------------------------------------------------------------- |
|
72 // |
|
73 const TMceIds& TMceCSReceiveItem::Ids () const |
|
74 { |
|
75 return iIds; |
|
76 } |
|
77 |
|
78 // ----------------------------------------------------------------------------- |
|
79 // TMceCSReceiveItem::Error |
|
80 // ----------------------------------------------------------------------------- |
|
81 // |
|
82 TInt TMceCSReceiveItem::Error () const |
|
83 { |
|
84 return iError; |
|
85 } |
|
86 |
|
87 // ----------------------------------------------------------------------------- |
|
88 // TMceCSReceiveItem::BufSizes |
|
89 // ----------------------------------------------------------------------------- |
|
90 // |
|
91 TMceMessageBufSizes TMceCSReceiveItem::BufSizes () const |
|
92 { |
|
93 TMceMessageBufSizes sizes; |
|
94 if (iContext) |
|
95 { |
|
96 sizes.iContextBufSize = iContext->Length(); |
|
97 } |
|
98 if (iContent) |
|
99 { |
|
100 sizes.iContentBufSize = iContent->Length(); |
|
101 } |
|
102 return sizes; |
|
103 } |