|
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 // Defines the series of requests which a ESOCK client can send to the MBuf Gobbler using |
|
15 // the publish and subscribe attribute EMBufGobbler. |
|
16 // |
|
17 // A test ESOCK client can deplete all the MBufs from the MBuf pool as follows: |
|
18 // |
|
19 // TInt result = RProperty::Set(TUid::Uid(EMBufGobbler ), EAdjustNumberOfMBufsRemainingInPool , EGobbleAllMBufs); |
|
20 // |
|
21 // Issuing this command should cause a socket read or write request to fail due to MBuf pool exhaustion. |
|
22 // |
|
23 // Subsequently a test ESOCK client can return all the MBufs it has taken from the pool as follows: |
|
24 // |
|
25 // result = RProperty::Set(TUid::Uid(EMBufGobbler), EAdjustNumberOfMBufsRemainingInPool, EReleaseAllMBufs); |
|
26 // |
|
27 // After taking all the MBufs from the pool, an ESOCK test client can also return a single MBuf back to the pool as follows: |
|
28 // |
|
29 // result = RProperty::Set(TUid::Uid(EMBufGobbler), EAdjustNumberOfMBufsRemainingInPool, EReleaseASingleMBuf); |
|
30 // |
|
31 // |
|
32 // This is a 3-plane comms layer implementation example, which has been customised to be a test layer which gobbles and releases ESOCK MBUFs. |
|
33 // The MBuf gobbling functionality can be disabled by undefining the macro SYMBIAN_COMMSFW_MBUF_GOBBLER which is specified in mbufgobblerproviders.mmp. |
|
34 // 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 |
|
35 // through to the layer above or below without altering it. This makes it useful as a starting point for implementing your own layers / providers; |
|
36 // useful documentation on how to customise your own passthrough layer can be found in ..\docs\MbufGobblerLayer.doc |
|
37 // |
|
38 |
|
39 /** |
|
40 @file |
|
41 @internalComponent |
|
42 */ |
|
43 |
|
44 #ifndef MBUFGOBBLERPUBSUB_H |
|
45 #define MBUFGOBBLERPUBSUB_H |
|
46 |
|
47 |
|
48 #ifdef SYMBIAN_COMMSFW_MBUF_GOBBLER |
|
49 |
|
50 enum |
|
51 { |
|
52 EMBufGobbler = 0x10272F97 |
|
53 }; |
|
54 |
|
55 enum |
|
56 { |
|
57 EAdjustNumberOfMBufsRemainingInPool = 1 |
|
58 }; |
|
59 |
|
60 enum |
|
61 { |
|
62 EGobbleAllMBufs, |
|
63 EReleaseAllMBufs, |
|
64 EReleaseASingleMBuf |
|
65 }; |
|
66 |
|
67 #endif |
|
68 |
|
69 #endif |
|
70 |