|
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 // exain.h - inbound plugin example protocol module (dummy) |
|
15 // |
|
16 |
|
17 #ifndef __EXAIN_H |
|
18 #define __EXAIN_H |
|
19 /** |
|
20 * @file exain.h |
|
21 * Inbound plugin example protocol module (dummy). |
|
22 * @internalComponent |
|
23 */ |
|
24 |
|
25 #include <posthook.h> |
|
26 |
|
27 /** |
|
28 * @name The exain identification |
|
29 * |
|
30 * The protocol is identified by (address family, protocol number). This |
|
31 * should be unique among all protocols known to the socket server. |
|
32 * |
|
33 * Unfortunately there are no rules or registration for these values, and |
|
34 * the protocol writer just has to pick a combination that is supposed to |
|
35 * be unique. |
|
36 * |
|
37 * In this example, neither of these values have any significance to the |
|
38 * implementation. Any values will work. |
|
39 * @{ |
|
40 */ |
|
41 /** The address family constant. Use the UID value of this protocol module. */ |
|
42 const TUint KAfExain = 0x10000943; |
|
43 /** The protocol number. Because the family is unique, 1000 should not confuse anyone. */ |
|
44 const TUint KProtocolExain = 1000; |
|
45 /** @} */ |
|
46 |
|
47 |
|
48 class CProtocolExain : public CProtocolPosthook |
|
49 /** |
|
50 * A protocol plugin for inbound packets. |
|
51 * |
|
52 * This is a minimal definition for a protocol plugin class |
|
53 * (hook), which attaches to the inbound packet path to examine |
|
54 * packets for a specific protocol or just before they |
|
55 * are passed to the upper layer (choice depends on the nature |
|
56 * of the BindL which is done in the NetworkAttachedL function). |
|
57 */ |
|
58 { |
|
59 public: |
|
60 CProtocolExain(); |
|
61 virtual ~CProtocolExain(); |
|
62 |
|
63 // CProtocolBase |
|
64 virtual void Identify(TServerProtocolDesc *aDesc) const; |
|
65 |
|
66 // CProtocolPosthook |
|
67 virtual void NetworkAttachedL(); |
|
68 |
|
69 // CIp6Hook::MIp6Hook |
|
70 virtual TInt ApplyL(RMBufHookPacket &aPacket, RMBufRecvInfo &aInfo); |
|
71 |
|
72 // ProtocolModule glue |
|
73 static void Describe(TServerProtocolDesc& anEntry); |
|
74 |
|
75 }; |
|
76 #endif |