|
1 /* |
|
2 * Copyright (c) 2005-2006 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: Class to hold messages read from message file. |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "epos_comasuplmessageinfo.h" |
|
19 #include "epos_comasuplPosPayload.h" |
|
20 |
|
21 // --------------------------------------------------------------------------- |
|
22 // Named constructor |
|
23 // --------------------------------------------------------------------------- |
|
24 // |
|
25 COMASuplMessageInfo* COMASuplMessageInfo::NewL(TOMASuplOperationType aOpType |
|
26 , COMASuplPosPayload& aPayload) |
|
27 { |
|
28 COMASuplMessageInfo* self = new(ELeave)COMASuplMessageInfo(aOpType); |
|
29 CleanupStack::PushL(self); |
|
30 self->ConstructL(aPayload); |
|
31 CleanupStack::Pop(self); |
|
32 return self; |
|
33 } |
|
34 |
|
35 // --------------------------------------------------------------------------- |
|
36 // Destructor |
|
37 // --------------------------------------------------------------------------- |
|
38 // |
|
39 COMASuplMessageInfo::~COMASuplMessageInfo() |
|
40 { |
|
41 delete iPayload; |
|
42 } |
|
43 |
|
44 COMASuplMessageInfo::COMASuplMessageInfo(TOMASuplOperationType aOpType) |
|
45 |
|
46 { |
|
47 iOpType = aOpType; |
|
48 } |
|
49 |
|
50 // --------------------------------------------------------------------------- |
|
51 // Second phase constructor |
|
52 // --------------------------------------------------------------------------- |
|
53 // |
|
54 void COMASuplMessageInfo::ConstructL(COMASuplPosPayload& aPayload) |
|
55 { |
|
56 iPayload = static_cast<COMASuplPosPayload*>(aPayload.CloneL()); |
|
57 } |
|
58 |