|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: IKE send queue item |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef T_IKESENDQUEUEITEM_H |
|
20 #define T_IKESENDQUEUEITEM_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <in_sock.h> |
|
24 |
|
25 /** |
|
26 * Item in send queue |
|
27 * |
|
28 * Item contains information needed to send a UDP data. Items are stored |
|
29 * in send queue while they are waiting for sending. |
|
30 * |
|
31 * @lib ikeutils.lib |
|
32 */ |
|
33 class TIkeSendQueueItem |
|
34 { |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Constructor. |
|
39 * |
|
40 * @param aUdpData UDP data |
|
41 * @param aDestAddr Destination IP address |
|
42 * @param aLocalPort Local port |
|
43 * @param aDscp DSCP value |
|
44 */ |
|
45 IMPORT_C TIkeSendQueueItem( HBufC8* aUdpData, |
|
46 const TInetAddr& aDestAddr, |
|
47 TInt aLocalPort, |
|
48 TUint8 aDscp ); |
|
49 |
|
50 /** |
|
51 * Constructor with message identification parameter. Constructs object |
|
52 * which should be used for matching with Match() method. |
|
53 * @param aUdpData UDP data |
|
54 */ |
|
55 IMPORT_C TIkeSendQueueItem( HBufC8* aUdpData ); |
|
56 |
|
57 /** |
|
58 * Determines whether two objects match. Items match if their |
|
59 * message identification is same. |
|
60 * @param aItemOne First item |
|
61 * @param aItemTwo Second item |
|
62 * @return Match or not |
|
63 */ |
|
64 IMPORT_C static TBool Match( const TIkeSendQueueItem& aItemOne, |
|
65 const TIkeSendQueueItem& aItemTwo ); |
|
66 |
|
67 /** |
|
68 * Gets UDP data. |
|
69 * @return UDP data. |
|
70 */ |
|
71 IMPORT_C HBufC8* UdpData(); |
|
72 |
|
73 /** |
|
74 * Gets destination IP address. |
|
75 * @return Destination IP address |
|
76 */ |
|
77 IMPORT_C const TInetAddr& DestAddr(); |
|
78 |
|
79 /** |
|
80 * Gets local port. |
|
81 * @return Local port. |
|
82 */ |
|
83 IMPORT_C TInt LocalPort() const; |
|
84 |
|
85 /** |
|
86 * Gets DSCP value. |
|
87 * @return DSCP value. |
|
88 */ |
|
89 IMPORT_C TUint8 Dscp() const; |
|
90 |
|
91 private: |
|
92 |
|
93 /** |
|
94 * UDP data. |
|
95 * Own. |
|
96 */ |
|
97 HBufC8* iUdpData; |
|
98 |
|
99 /** |
|
100 * Destination IP address |
|
101 * Own. |
|
102 */ |
|
103 TInetAddr iDestAddr; |
|
104 |
|
105 /** |
|
106 * Local port. |
|
107 * Own. |
|
108 */ |
|
109 TInt iLocalPort; |
|
110 |
|
111 /** |
|
112 * DSCP value. |
|
113 * Own. |
|
114 */ |
|
115 TUint8 iDscp; |
|
116 }; |
|
117 |
|
118 |
|
119 #endif // T_IKESENDQUEUEITEM_H |