78
|
1 |
// Copyright (c) 2010 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 |
// Sub Connection Provider
|
|
15 |
// (control plane)
|
|
16 |
//
|
|
17 |
//
|
|
18 |
// This is a 3-plane comms layer implementation example, which has been customised to be a test layer which gobbles and releases ESOCK MBUFs.
|
|
19 |
// The MBuf gobbling functionality can be disabled by undefining the macro SYMBIAN_COMMSFW_MBUF_GOBBLER which is specified in mbufgobblerproviders.mmp.
|
|
20 |
// When SYMBIAN_COMMSFW_MBUF_GOBBLER is undefined, the source code specified by mbufgobblerproviders.mmp becomes a pass through layer i.e. it passes the data
|
|
21 |
// through to the layer above or below without altering it. This makes it useful as a starting point for implementing your own layers / providers;
|
|
22 |
// useful documentation on how to customise your own passthrough layer can be found in ..\docs\MbufGobblerLayer.doc
|
|
23 |
//
|
|
24 |
|
|
25 |
/**
|
|
26 |
@file
|
|
27 |
@internalComponent
|
|
28 |
*/
|
|
29 |
|
|
30 |
#ifndef MBUFGOBBLERSUBCONNPROVIDER_H
|
|
31 |
#define MBUFGOBBLERSUBCONNPROVIDER_H
|
|
32 |
|
|
33 |
// INCLUDES
|
|
34 |
#include <e32std.h>
|
|
35 |
#include <e32base.h>
|
|
36 |
#include <comms-infras/corescpr.h>
|
|
37 |
#include "mbufgobblertestflags.h"
|
|
38 |
|
|
39 |
// CLASS DECLARATION
|
|
40 |
|
|
41 |
/**
|
|
42 |
* CMbufGobblerSubconnProvider
|
|
43 |
*
|
|
44 |
*/
|
|
45 |
class ESock::CSubConnectionProviderFactoryBase;
|
|
46 |
class CMbufGobblerSubconnProvider : public CCoreSubConnectionProvider
|
|
47 |
{
|
|
48 |
public:
|
|
49 |
// Constructors and destructor
|
|
50 |
static CMbufGobblerSubconnProvider* NewL(ESock::CSubConnectionProviderFactoryBase& aFactory);
|
|
51 |
|
|
52 |
/**
|
|
53 |
* Destructor.
|
|
54 |
*/
|
|
55 |
~CMbufGobblerSubconnProvider();
|
|
56 |
|
|
57 |
|
|
58 |
protected: //from CCoreSubConnectionProvider
|
|
59 |
void ReceivedL(const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage);
|
|
60 |
|
|
61 |
private:
|
|
62 |
|
|
63 |
/**
|
|
64 |
* Constructor for performing 1st stage construction
|
|
65 |
*/
|
|
66 |
CMbufGobblerSubconnProvider(ESock::CSubConnectionProviderFactoryBase& aFactory);
|
|
67 |
|
|
68 |
/**
|
|
69 |
* EPOC default constructor for performing 2nd stage construction
|
|
70 |
*/
|
|
71 |
void ConstructL();
|
|
72 |
private:
|
|
73 |
TInt iClientCount; //holds count of clients that node is joined with
|
|
74 |
MBUFGOBBLER_TEST_DATA
|
|
75 |
};
|
|
76 |
|
|
77 |
#endif // MBUFGOBBLERSUBCONNPROVIDER_H
|