|
1 // Copyright (c) 2006-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 // Forward declarations |
|
22 class CSocket; |
|
23 class CSocketController; |
|
24 |
|
25 /** |
|
26 The MSocketControllerFactory API provides support to create socket controller |
|
27 objects that encapsulate a connected socket. Also provides an API to place |
|
28 socket controllers in a store. |
|
29 |
|
30 @internalTechnology |
|
31 @prototype |
|
32 */ |
|
33 class MSocketControllerFactory |
|
34 { |
|
35 public: |
|
36 /** |
|
37 Creates a socket controller object to encapsulate the connected socket. |
|
38 Ownership of the connected socket is transferred to the socket controller. |
|
39 The pointer to the created object is left on the cleanup stack. |
|
40 @param aConnectedSocket The connected socket. |
|
41 @return A pointer to the created socket controller object, which has |
|
42 also been left on the cleanup stack. |
|
43 @panic EInvariantFalse The connected socket pointer was NULL |
|
44 */ |
|
45 virtual CSocketController* CreateSocketControllerLC(CSocket* aConnectedSocket) =0; |
|
46 /** |
|
47 Requests that the socket controller be added to the socket controller store. |
|
48 Ownership of the socket controller is transferred on calling this function. |
|
49 @param aSocketController The socket controller object to be placed in the socket controller store. |
|
50 */ |
|
51 virtual void AddToStoreL(CSocketController* aSocketController) =0; |
|
52 }; |
|
53 |
|
54 #endif // __MSOCKETCONTROLLERFACTORY_H__ |