equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2008 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: ICMP error sender |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef C_CNCMICMPSENDER_H |
|
22 #define C_CNCMICMPSENDER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <in_sock.h> |
|
27 |
|
28 /** |
|
29 * ICMP error sender |
|
30 * |
|
31 * @lib connectionmux.lib |
|
32 * @since S60 v3.2 |
|
33 */ |
|
34 NONSHARABLE_CLASS( CNcmIcmpSender ) : public CActive |
|
35 { |
|
36 |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Two-phased constructor |
|
41 * |
|
42 * @param aSocket Reference to socket |
|
43 */ |
|
44 static CNcmIcmpSender* NewL( RSocket& aSocket ); |
|
45 |
|
46 /** |
|
47 * Destructor |
|
48 */ |
|
49 virtual ~CNcmIcmpSender(); |
|
50 |
|
51 /** |
|
52 * Send action |
|
53 * |
|
54 * @since S60 v3.2 |
|
55 * @param aMessage Message to be send. |
|
56 * @param aDestinationAddr Destination address |
|
57 */ |
|
58 void Send( const TDesC8& aMessage, const TInetAddr& aDestinationAddr ); |
|
59 |
|
60 protected: |
|
61 |
|
62 CNcmIcmpSender( RSocket& aSocket ); |
|
63 |
|
64 // from base class CActive |
|
65 |
|
66 void RunL(); |
|
67 |
|
68 void DoCancel(); |
|
69 |
|
70 protected: // data |
|
71 |
|
72 /** |
|
73 * ICMP socket |
|
74 */ |
|
75 RSocket& iIcmpSocket; |
|
76 |
|
77 /** |
|
78 * Data for sending |
|
79 * Own. |
|
80 */ |
|
81 HBufC8* iData; |
|
82 |
|
83 /** |
|
84 * Destiantion address. |
|
85 */ |
|
86 TInetAddr iDestination; |
|
87 |
|
88 }; |
|
89 |
|
90 |
|
91 #endif // C_CNCMICMPSENDER_H |