|
1 /* |
|
2 * Copyright (c) 2007-2008 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: Constructs a send buffer. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #include "cnsmcwsenditem.h" |
|
22 |
|
23 const TInt CNsmcwSendItem::iOffset = _FOFF( CNsmcwSendItem, iLink ); |
|
24 |
|
25 // --------------------------------------------------------------------------- |
|
26 // CNsmcwSendItem::CNsmcwSendItem() |
|
27 // --------------------------------------------------------------------------- |
|
28 // |
|
29 CNsmcwSendItem::CNsmcwSendItem() |
|
30 { |
|
31 } |
|
32 |
|
33 |
|
34 // --------------------------------------------------------------------------- |
|
35 // CNsmcwSendItem::ConstructL() |
|
36 // --------------------------------------------------------------------------- |
|
37 // |
|
38 void CNsmcwSendItem::ConstructL( const TDesC8& aPacket ) |
|
39 { |
|
40 iPacket = aPacket.AllocL(); |
|
41 } |
|
42 |
|
43 |
|
44 // --------------------------------------------------------------------------- |
|
45 // CNsmcwSendItem::NewL() |
|
46 // --------------------------------------------------------------------------- |
|
47 // |
|
48 CNsmcwSendItem* CNsmcwSendItem::NewL( const TDesC8& aPacket ) |
|
49 { |
|
50 CNsmcwSendItem* self = CNsmcwSendItem::NewLC( aPacket ); |
|
51 CleanupStack::Pop( self ); |
|
52 return self; |
|
53 } |
|
54 |
|
55 |
|
56 // --------------------------------------------------------------------------- |
|
57 // CNsmcwSendItem::NewLC() |
|
58 // --------------------------------------------------------------------------- |
|
59 // |
|
60 CNsmcwSendItem* CNsmcwSendItem::NewLC( const TDesC8& aPacket ) |
|
61 { |
|
62 CNsmcwSendItem* self = new ( ELeave ) CNsmcwSendItem(); |
|
63 CleanupStack::PushL( self ); |
|
64 self->ConstructL( aPacket ); |
|
65 return self; |
|
66 } |
|
67 |
|
68 |
|
69 // --------------------------------------------------------------------------- |
|
70 // CNsmcwSendItem::~CNsmcwSendItem() |
|
71 // --------------------------------------------------------------------------- |
|
72 // |
|
73 CNsmcwSendItem::~CNsmcwSendItem() |
|
74 { |
|
75 delete iPacket; |
|
76 } |
|
77 |
|
78 |
|
79 // --------------------------------------------------------------------------- |
|
80 // CNsmcwSendItem::GetData() |
|
81 // --------------------------------------------------------------------------- |
|
82 // |
|
83 const TDesC8& CNsmcwSendItem::GetData() const |
|
84 { |
|
85 return *iPacket; |
|
86 } |