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 |
// Helper macros that wrap the ones from ESock.
|
|
15 |
//
|
|
16 |
//
|
|
17 |
// This is a 3-plane comms layer implementation example, which has been customised to be a test layer which gobbles and releases ESOCK MBUFs.
|
|
18 |
// The MBuf gobbling functionality can be disabled by undefining the macro SYMBIAN_COMMSFW_MBUF_GOBBLER which is specified in mbufgobblerproviders.mmp.
|
|
19 |
// 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
|
|
20 |
// through to the layer above or below without altering it. This makes it useful as a starting point for implementing your own layers / providers;
|
|
21 |
// useful documentation on how to customise your own passthrough layer can be found in ..\docs\MbufGobblerLayer.doc
|
|
22 |
//
|
|
23 |
|
|
24 |
/**
|
|
25 |
@file
|
|
26 |
@internalComponent
|
|
27 |
*/
|
|
28 |
|
|
29 |
#ifndef MBUFGOBBLERLOG_H_
|
|
30 |
#define MBUFGOBBLERLOG_H_
|
|
31 |
|
|
32 |
#include <e32def.h>
|
|
33 |
#include <comms-infras/ss_logext.h> //defines LOG_NODE_CREATE and LOG_NODE_DESTROY
|
|
34 |
|
|
35 |
#include <cflog.h> //defines __CFLOG_* macros
|
|
36 |
|
|
37 |
#include "mbufgobblerhelper.h"
|
|
38 |
|
|
39 |
/*
|
|
40 |
* The component tag
|
|
41 |
*
|
|
42 |
* In commsdbg.ini add line LOG MbufGobblerLayer * to enbale these logs
|
|
43 |
*/
|
|
44 |
_LIT8(KMbufGobblerComponentTag, "MbufGobblerLayer");
|
|
45 |
|
|
46 |
#define KMbufGobblerMcprTag KESockMetaConnectionTag
|
|
47 |
_LIT8(KMbufGobblerMcprSubTag, "MbufGobblerMCpr");
|
|
48 |
|
|
49 |
#define KMbufGobblerMCprFactoryTag KESockMetaConnectionTag
|
|
50 |
_LIT8(KMbufGobblerMCprFactorySubTag, "MbufGobblerMCprFactory");
|
|
51 |
|
|
52 |
#define KMbufGobblerCprFactoryTag KESockConnectionTag
|
|
53 |
_LIT8(KMbufGobblerCprFactorySubTag, "MbufGobblerCprFactory");
|
|
54 |
|
|
55 |
#define KMbufGobblerCprTag KESockConnectionTag
|
|
56 |
_LIT8(KMbufGobblerCprSubTag, "MbufGobblerCpr");
|
|
57 |
|
|
58 |
#define KMbufGobblerScprFactoryTag KESockSubConnectionTag
|
|
59 |
_LIT8(KMbufGobblerScprFactorySubTag, "MbufGobblerSCprFactory");
|
|
60 |
|
|
61 |
#define KMbufGobblerScprTag KESockSubConnectionTag
|
|
62 |
_LIT8(KMbufGobblerScprSubTag, "MbufGobblerSCpr");
|
|
63 |
|
|
64 |
#define KMbufGobblerFlowTag KESockFlowTag
|
|
65 |
_LIT8(KMbufGobblerFlowSubTag,"MbufGobblerFlow");
|
|
66 |
|
|
67 |
#define KMbufGobblerTierTag KESockTierTag
|
|
68 |
_LIT8(KMbufGobblerTierSubTag,"MbufGobblerTierM");
|
|
69 |
|
|
70 |
#define KMbufGobblerTierFactoryTag KESockTierTag
|
|
71 |
_LIT8(KMbufGobblerTierFactorySubTag,"MbufGobblerTierMFactory");
|
|
72 |
|
|
73 |
/*
|
|
74 |
* LOG_NODE_CREATE - this logs out to utrace and is needed for SVG viewer
|
|
75 |
* __CFLOG_VAR - this logs to standard comms dbg utils. Must include cflog.mmh in mmp file
|
|
76 |
*/
|
|
77 |
|
|
78 |
#define MBUFGOBBLER_LOG_NODE_CREATE(subTag, type, nodename, nodeptr) \
|
|
79 |
LOG_NODE_CREATE(subTag, type); \
|
|
80 |
MbufGobblerHelper::LogCreateDestroy(subTag, nodename, nodeptr, 1);
|
|
81 |
|
|
82 |
#define MBUFGOBBLER_LOG_NODE_DESTROY(subTag, type, nodename, nodeptr) \
|
|
83 |
LOG_NODE_DESTROY(subTag, type); \
|
|
84 |
MbufGobblerHelper::LogCreateDestroy(subTag, nodename, nodeptr, 0);
|
|
85 |
|
|
86 |
#define LOGMESSAGE(subtag, nodeclass, nodeptr, sender, recipient, msg) MbufGobblerHelper::LogMessage(subtag, nodeclass, nodeptr, sender, recipient, msg)
|
|
87 |
|
|
88 |
#define LOG_NODE_INFO(subtag, nodename, node, clientcount) MbufGobblerHelper::PrintClientNodes(subtag, nodename, node, clientcount);
|
|
89 |
|
|
90 |
#define LOG(subTag, ARGS...) __CFLOG_VAR((KMbufGobblerComponentTag, subTag, ##ARGS));
|
|
91 |
|
|
92 |
#endif /* MBUFGOBBLERLOG_H_ */
|