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 |
// This file defines the base class for the protocol interface classes.
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@file
|
|
20 |
*/
|
|
21 |
|
|
22 |
#ifndef PROTOCOLIFBASE_H__
|
|
23 |
#define PROTOCOLIFBASE_H__
|
|
24 |
|
|
25 |
#include <comms-infras/nifif.h>
|
|
26 |
#include <es_mbuf.h>
|
|
27 |
|
|
28 |
#include "Constants.h"
|
|
29 |
|
|
30 |
class CRawIPNifMain;
|
|
31 |
class CBttLogger;
|
|
32 |
|
|
33 |
class CProtocolIfBase : public CNifIfBase
|
|
34 |
{
|
|
35 |
public:
|
|
36 |
CProtocolIfBase(CRawIPNifMain& aNifMain, CBttLogger* aTheLogger);
|
|
37 |
virtual ~CProtocolIfBase();
|
|
38 |
|
|
39 |
public:
|
|
40 |
virtual void BindL(TAny *aId);
|
|
41 |
virtual TInt State();
|
|
42 |
virtual TInt Control(TUint aLevel,TUint aName,TDes8& aOption, TAny* aSource);
|
|
43 |
virtual TInt Send(RMBufChain& aPdu, TAny* aSource);
|
|
44 |
virtual void Info(TNifIfInfo& aInfo) const;
|
|
45 |
virtual TInt Notification(TAgentToNifEventType aEvent, void * aInfo);
|
|
46 |
virtual void StartSending(CProtocolBase* aProtocol);
|
|
47 |
|
|
48 |
public:
|
|
49 |
virtual void UpdateContextConfigL(const RPacketContext::TContextConfigGPRS&
|
|
50 |
aConfig);
|
|
51 |
virtual void UpdateConnectionSpeed(TUint aConnectionSpeed);
|
|
52 |
|
|
53 |
virtual TBool WantsProtocol(TUint16 aProtocolCode)=0;
|
|
54 |
virtual void Process(RMBufChain& aPdu) = 0;
|
|
55 |
|
|
56 |
public:
|
|
57 |
inline CRawIPNifMain& GetNifMain();
|
|
58 |
|
|
59 |
protected:
|
|
60 |
CProtocolBase* iProtocol;
|
|
61 |
CRawIPNifMain& iNifMain;
|
|
62 |
|
|
63 |
private:
|
|
64 |
CBttLogger* iTheLogger;
|
|
65 |
};
|
|
66 |
|
|
67 |
CRawIPNifMain& CProtocolIfBase::GetNifMain()
|
|
68 |
/**
|
|
69 |
* Returns to reference to RawIPNifMain
|
|
70 |
*
|
|
71 |
* @return reference to CRawIPNifMain class
|
|
72 |
*/
|
|
73 |
{
|
|
74 |
return iNifMain;
|
|
75 |
}
|
|
76 |
|
|
77 |
#endif
|