24
|
1 |
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// CSatPtrHolder implementation
|
|
15 |
// CSatPtrHolder - class owned by SAT Rxxx objects to contain the TPtr8's and other member
|
|
16 |
// data required by asynchronous functions so that any additional functions will not require
|
|
17 |
// breaking BC.
|
|
18 |
//
|
|
19 |
//
|
|
20 |
|
|
21 |
/**
|
|
22 |
@file
|
|
23 |
*/
|
|
24 |
|
|
25 |
#include "etelext.h"
|
|
26 |
|
|
27 |
// Sat header files
|
|
28 |
#include "Etelsat.h"
|
|
29 |
#include "Satptr.h"
|
|
30 |
|
|
31 |
//
|
|
32 |
// CSatPtrHolder - class owned by SAT Rxxx objects to contain the TPtr8's and other member
|
|
33 |
// data required by asynchronous functions so that any additional functions will not require
|
|
34 |
// breaking BC.
|
|
35 |
//
|
|
36 |
|
|
37 |
CSatPtrHolder* CSatPtrHolder::NewL(TInt aSizeOfPtrArray,TInt aSizeOfPtrCArray)
|
|
38 |
/**
|
|
39 |
* Two phase constructor.
|
|
40 |
*
|
|
41 |
* @param aSizeOfPtrArray Size of the array containing the pointers.
|
|
42 |
*/ {
|
|
43 |
CSatPtrHolder* p = new (ELeave) CSatPtrHolder();
|
|
44 |
CleanupStack::PushL(p);
|
|
45 |
p->ConstructL(aSizeOfPtrArray,aSizeOfPtrCArray);
|
|
46 |
CleanupStack::Pop();
|
|
47 |
return p;
|
|
48 |
}
|
|
49 |
|
|
50 |
CSatPtrHolder::CSatPtrHolder()
|
|
51 |
{}
|
|
52 |
|
|
53 |
CSatPtrHolder::~CSatPtrHolder()
|
|
54 |
{
|
|
55 |
iPtrArray.Close();
|
|
56 |
iPtrCArray.Close();
|
|
57 |
}
|
|
58 |
|
|
59 |
void CSatPtrHolder::ConstructL(TInt aSizeOfPtrArray,TInt aSizeOfPtrCArray)
|
|
60 |
/**
|
|
61 |
* This method constructs the two arrays: one to hold TPtr8's and the other TPtrC8's
|
|
62 |
*/
|
|
63 |
{
|
|
64 |
TPtr8 ptr(reinterpret_cast<TUint8 *>(NULL),0);
|
|
65 |
TInt i;
|
|
66 |
for (i=0;i<aSizeOfPtrArray;i++)
|
|
67 |
User::LeaveIfError(iPtrArray.Append(ptr));
|
|
68 |
TPtrC8 ptrC(NULL,0);
|
|
69 |
for (i=0;i<aSizeOfPtrCArray;i++)
|
|
70 |
User::LeaveIfError(iPtrCArray.Append(ptrC));
|
|
71 |
}
|
|
72 |
|
|
73 |
|
|
74 |
|