|
1 /* |
|
2 * Copyright (c) 2005-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: |
|
15 * Name : CSocketContainer.h |
|
16 * Part of : ConnectionMgr |
|
17 * See class definition below. |
|
18 * Version : SIP/5.0 |
|
19 * |
|
20 */ |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 /** |
|
26 @internalComponent |
|
27 */ |
|
28 |
|
29 #ifndef CSOCKETCONTAINER_H |
|
30 #define CSOCKETCONTAINER_H |
|
31 |
|
32 // INCLUDES |
|
33 #include <e32base.h> |
|
34 #include <in_sock.h> |
|
35 |
|
36 // FORWARD DECLARATIONS |
|
37 class CSecureSocket; |
|
38 |
|
39 // CLASS DEFINITION |
|
40 // |
|
41 class CSocketContainer : public CBase |
|
42 { |
|
43 public: // Constructor and destructor |
|
44 |
|
45 static CSocketContainer* NewL( RSocket& aSocket ); |
|
46 |
|
47 static CSocketContainer* NewLC( RSocket& aSocket ); |
|
48 |
|
49 ~CSocketContainer(); |
|
50 |
|
51 public: // Function wrappers for socket |
|
52 |
|
53 virtual void Send( const TDesC8& aDesc, |
|
54 TUint aFlags, |
|
55 TRequestStatus& aStatus ); |
|
56 |
|
57 virtual void SendTo( const TDesC8& aDesc, |
|
58 TSockAddr& aAddr, |
|
59 TUint aFlags, |
|
60 TRequestStatus& aStatus ); |
|
61 |
|
62 virtual void CancelSend(); |
|
63 |
|
64 virtual void RecvOneOrMore( TDes8& aDes, |
|
65 TUint aFlags, |
|
66 TRequestStatus& aStatus, |
|
67 TSockXfrLength& aLen ); |
|
68 |
|
69 virtual void CancelRecv(); |
|
70 |
|
71 virtual void Connect( TSockAddr& aAddr, TRequestStatus& aStatus ); |
|
72 |
|
73 virtual void CancelConnect(); |
|
74 |
|
75 virtual void RemoteName( TSockAddr& aAddr ); |
|
76 |
|
77 virtual TInt SetOpt( TUint aOptionName, |
|
78 TUint aOptionLevel, |
|
79 const TDesC8& aOption ); |
|
80 |
|
81 virtual TInt SetOpt( TUint aOptionName, |
|
82 TUint aOptionLevel, |
|
83 TInt aOption ); |
|
84 |
|
85 virtual TBool HasSecureSocket() const; |
|
86 |
|
87 virtual CSecureSocket* SecureSocket(); |
|
88 |
|
89 RSocket& Socket(); |
|
90 |
|
91 protected: |
|
92 |
|
93 CSocketContainer( RSocket& aSocket ); |
|
94 |
|
95 protected: // Data |
|
96 |
|
97 RSocket& iSocket; |
|
98 |
|
99 }; |
|
100 |
|
101 #endif // CSOCKETCONTAINER_H |