24
|
1 |
// Copyright (c) 2004-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 |
// SPUD data multiplexer
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@file
|
|
20 |
@internalComponent
|
|
21 |
*/
|
|
22 |
|
|
23 |
#ifndef MUX_H
|
|
24 |
#define MUX_H
|
|
25 |
|
|
26 |
#include "spudman.h"
|
|
27 |
#include "bindman.h"
|
|
28 |
#include <in_iface.h>
|
|
29 |
#include <es_prot.h>
|
|
30 |
|
|
31 |
/**
|
|
32 |
Data multiplexer class.
|
|
33 |
Dispatches packets from GUQoS to the appropriate PDP context.
|
|
34 |
*/
|
|
35 |
NONSHARABLE_CLASS(CSpudMux) : public CNifIfBase
|
|
36 |
{
|
|
37 |
public:
|
|
38 |
CSpudMux(CSpudMan& aNifBase);
|
|
39 |
~CSpudMux();
|
|
40 |
void Construct(CBindMan& aBindMan);
|
|
41 |
|
|
42 |
// setters
|
|
43 |
void SetProtocolBase(CProtocolBase* aProtocolBase);
|
|
44 |
|
|
45 |
// CNifIfBase
|
|
46 |
void Info(TNifIfInfo& aInfo) const;
|
|
47 |
TInt Send(RMBufChain& aPacket, TAny*);
|
|
48 |
TInt Notification(TAgentToNifEventType aEvent, void* /*aInfo*/);
|
|
49 |
void BindL(TAny* aId);
|
|
50 |
TInt State();
|
|
51 |
TInt Control(TUint aLevel, TUint aName, TDes8& aOption, TAny* aSource);
|
|
52 |
|
|
53 |
|
|
54 |
private:
|
|
55 |
TInterfaceName iIfName;
|
|
56 |
CBindMan* iBindMan;
|
|
57 |
CProtocolBase* iProtocolBase;
|
|
58 |
};
|
|
59 |
|
|
60 |
|
|
61 |
/**
|
|
62 |
Data receiver class.
|
|
63 |
Receives data from the network and sends it to the network stack.
|
|
64 |
*/
|
|
65 |
NONSHARABLE_CLASS(CSpudProtocol) : public CProtocolBase
|
|
66 |
{
|
|
67 |
public:
|
|
68 |
CSpudProtocol();
|
|
69 |
~CSpudProtocol();
|
|
70 |
void Construct(CBindMan& aBindMan);
|
|
71 |
|
|
72 |
void SetProtocolBaseL(CProtocolBase* aProtocolBase);
|
|
73 |
void DoStartSending() const;
|
|
74 |
|
|
75 |
// CProtocolBase
|
|
76 |
void Identify(TServerProtocolDesc *aDesc) const;
|
|
77 |
void StartSending(CProtocolBase* aProtocol);
|
|
78 |
void Process(RMBufChain& aChain, CProtocolBase* aSourceProtocol);
|
|
79 |
void Process(TDes8& aPDU, TSockAddr* aFrom, TSockAddr* aTo, CProtocolBase* aSourceProtocol);
|
|
80 |
void Error(TInt aError, CProtocolBase* aSourceProtocol);
|
|
81 |
|
|
82 |
private:
|
|
83 |
CBindMan* iBindMan;
|
|
84 |
CProtocolBase* iProtocolBase;
|
|
85 |
};
|
|
86 |
|
|
87 |
#endif
|