|
1 /* |
|
2 * Copyright (c) 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: a message class implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "cimcachebufferarray.h" |
|
20 //logs |
|
21 #include "imcachedebugtrace.h" |
|
22 |
|
23 |
|
24 //----------------------------------------------------------------------------- |
|
25 // CIMCacheBufferArray::NewL |
|
26 // ( Other items commented in header ) |
|
27 //----------------------------------------------------------------------------- |
|
28 CIMCacheBufferArray* CIMCacheBufferArray::NewL(const TDesC8& aPacketBuffer , TIMCacheOperationsCode aOperationCode ) |
|
29 { |
|
30 TRACE( T_LIT( "CIMCacheBufferArray::NewL begin") ); |
|
31 CIMCacheBufferArray* self = new ( ELeave ) CIMCacheBufferArray( aOperationCode ); |
|
32 CleanupStack::PushL( self ); |
|
33 self->ConstructL( aPacketBuffer ); |
|
34 CleanupStack::Pop( self ); |
|
35 TRACE( T_LIT( "CIMCacheBufferArray::NewL end") ); |
|
36 return self; |
|
37 } |
|
38 //----------------------------------------------------------------------------- |
|
39 // CIMCacheBufferArray::CIMCacheBufferArray |
|
40 // ( Other items commented in header ) |
|
41 //----------------------------------------------------------------------------- |
|
42 CIMCacheBufferArray::CIMCacheBufferArray( TIMCacheOperationsCode aOperationCode ) |
|
43 :iOperationCode ( aOperationCode ) |
|
44 { |
|
45 TRACE( T_LIT( "CIMCacheBufferArray::CIMCacheBufferArray") ); |
|
46 } |
|
47 |
|
48 |
|
49 //----------------------------------------------------------------------------- |
|
50 // CIMCacheBufferArray::ConstructL |
|
51 // ( Other items commented in header ) |
|
52 //----------------------------------------------------------------------------- |
|
53 void CIMCacheBufferArray::ConstructL( const TDesC8& aPacketBuffer ) |
|
54 { |
|
55 TRACE( T_LIT( "CIMCacheBufferArray::NewL start") ); |
|
56 iPacketBuffer = aPacketBuffer.AllocL(); |
|
57 TRACE( T_LIT( "CIMCacheBufferArray::NewL end") ); |
|
58 } |
|
59 |
|
60 //----------------------------------------------------------------------------- |
|
61 // CIMCacheBufferArray::OperationCode |
|
62 // ( Other items commented in header ) |
|
63 //----------------------------------------------------------------------------- |
|
64 TIMCacheOperationsCode CIMCacheBufferArray::OperationCode() |
|
65 { |
|
66 TRACE( T_LIT( "CIMCacheBufferArray::OperationCode") ); |
|
67 return iOperationCode; |
|
68 } |
|
69 |
|
70 //----------------------------------------------------------------------------- |
|
71 // CIMCacheBufferArray::PacketData |
|
72 // ( Other items commented in header ) |
|
73 //----------------------------------------------------------------------------- |
|
74 const TDesC8& CIMCacheBufferArray::PacketData() |
|
75 { |
|
76 TRACE( T_LIT( "CIMCacheBufferArray::PacketData") ); |
|
77 return *iPacketBuffer; |
|
78 } |
|
79 //----------------------------------------------------------------------------- |
|
80 // CIMCacheBufferArray::~CIMCacheBufferArray |
|
81 // ( Other items commented in header ) |
|
82 //----------------------------------------------------------------------------- |
|
83 CIMCacheBufferArray::~CIMCacheBufferArray() |
|
84 { |
|
85 TRACE( T_LIT( "CIMCacheBufferArray::~CIMCacheBufferArray start") ); |
|
86 delete iPacketBuffer; |
|
87 TRACE( T_LIT( "CIMCacheBufferArray::~CIMCacheBufferArray end") ); |
|
88 } |
|
89 |
|
90 |
|
91 // end of file |