|
1 // Copyright (c) 2003-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 // |
|
15 |
|
16 #ifndef __MSOCKETCONTROLLERFACTORY_H__ |
|
17 #define __MSOCKETCONTROLLERFACTORY_H__ |
|
18 |
|
19 #include <e32std.h> |
|
20 |
|
21 class CSocket; |
|
22 class CSocketController; |
|
23 class TInetAddr; |
|
24 |
|
25 class MSocketControllerFactory |
|
26 /** |
|
27 The MSocketControllerFactory API provides support to create socket controller |
|
28 objects that encapsulate a connected socket. Also provides an API to place |
|
29 socket controllers in a store. |
|
30 @internalComponent |
|
31 */ |
|
32 { |
|
33 public: // methods |
|
34 |
|
35 /** |
|
36 Creates a socket controller object to encapsulate the connected socket. |
|
37 Ownership of the connected socket is transferred to the socket controller. |
|
38 The pointer to the created object is left on the cleanup stack. |
|
39 @param aConnectedSocket The connected socket. |
|
40 @return A pointer to the created socket controller object, which has |
|
41 also been left on the cleanup stack. |
|
42 @panic EInvariantFalse The connected socket pointer was NULL |
|
43 */ |
|
44 virtual CSocketController* CreateSocketControllerLC(CSocket* aConnectedSocket) =0; |
|
45 |
|
46 virtual CSocketController* CreateSocketControllerLC(CSocket* aConnectedSocket, const TDesC& aRemoteHost, TUint16 aRemotePort, const TInetAddr& aRemoteAddr) =0; |
|
47 /** |
|
48 Requests that the socket controller be added to the socket controller store. |
|
49 Ownership of the socket controller is transferred on calling this function. |
|
50 @param aSocketController The socket controller object to be placed |
|
51 in the socket controller store. |
|
52 @panic EInvariantFalse The socket controller pointer was NULL |
|
53 */ |
|
54 virtual void AddToStoreL(CSocketController* aSocketController) =0; |
|
55 |
|
56 }; |
|
57 |
|
58 #endif // __MSOCKETCONTROLLERFACTORY_H__ |