28
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 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 |
* implementation for NTB build base class
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
|
|
20 |
/**
|
|
21 |
@file
|
|
22 |
@internalComponent
|
|
23 |
*/
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
#include "ncmntbbuilder.h"
|
|
28 |
#include "ncmdatasender.h"
|
|
29 |
#include "ncmpktdrvcommon.h"
|
|
30 |
#include "ncmntbbuildpolicy.h"
|
|
31 |
|
|
32 |
|
|
33 |
// ======== MEMBER FUNCTIONS ========
|
|
34 |
//
|
|
35 |
|
|
36 |
|
|
37 |
CNcmNtbBuilder::CNcmNtbBuilder(MNcmNtbBuildObserver& aObserver)
|
|
38 |
: iObserver(aObserver)
|
|
39 |
{
|
|
40 |
iSequence = 0xFFFF;
|
|
41 |
}
|
|
42 |
|
|
43 |
CNcmNtbBuilder::~CNcmNtbBuilder()
|
|
44 |
{
|
|
45 |
}
|
|
46 |
|
|
47 |
void CNcmNtbBuilder::SendNtbPayload()
|
|
48 |
{
|
|
49 |
iObserver.SendNtbPayload(iBuffer);
|
|
50 |
}
|
|
51 |
|
|
52 |
void CNcmNtbBuilder::StartNewNtb(const TNcmBuffer& aBuffer)
|
|
53 |
{
|
|
54 |
iSequence++;
|
|
55 |
iBuffer = aBuffer;
|
|
56 |
iNtbStarted = ETrue;
|
|
57 |
}
|
|
58 |
|
|
59 |
void CNcmNtbBuilder::GetNtbParam(TNcmNtbInParam& aParam)
|
|
60 |
{
|
|
61 |
aParam.iNtbInMaxSize = iNtbInMaxSize;
|
|
62 |
aParam.iNdpInDivisor = iNdpInDivisor;
|
|
63 |
aParam.iNdpInPayloadRemainder = iNdpInPayloadRemainder;
|
|
64 |
aParam.iNdpInAlignment = iNdpInAlignment;
|
|
65 |
}
|
|
66 |
|
|
67 |
void CNcmNtbBuilder::Reset()
|
|
68 |
{
|
|
69 |
iNtbStarted = EFalse;
|
|
70 |
iSequence = 0xFFFF;
|
|
71 |
}
|
|
72 |
|
|
73 |
void CNcmNtbBuilder::CompleteNtbBuild()
|
|
74 |
{
|
|
75 |
iNtbStarted = EFalse;
|
|
76 |
iBuildPolicy->CompleteNtbBuild();
|
|
77 |
}
|
|
78 |
|