|
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 __MSOCKETCONNECTOR_H__ |
|
17 #define __MSOCKETCONNECTOR_H__ |
|
18 |
|
19 #include <e32std.h> |
|
20 |
|
21 /** |
|
22 The MSocketConnector class provides an API to control a socket connection |
|
23 request. The socket connection would have been requested via the |
|
24 MSocketFactory API. An observer is required for the socket connection - a |
|
25 MSocketConnectObserver object. |
|
26 |
|
27 The MSocketConnector can stop the connection only if the socket connect |
|
28 observer has not notified of either a successful connection or that an error |
|
29 has occurred. |
|
30 |
|
31 If the connection is stopped then the observer will receive no notification |
|
32 and the MSocketConnector object is no longer valid. |
|
33 |
|
34 @see MSocketFactory |
|
35 @see MSocketConnectObserver |
|
36 @internalTechnology |
|
37 @prototype |
|
38 */ |
|
39 class MSocketConnector |
|
40 { |
|
41 public: |
|
42 /** |
|
43 Stops the connect service. The connect service can only be stopped if the |
|
44 connection has not been established - i.e. before the appropriate |
|
45 MSocketConnectObserver object has been called ConnectionMadeL() API. The |
|
46 connect observer will be notified on the MSocketConnectObserver::HandleConnectError() |
|
47 API with an error code of KErrCancel when the connect service has actually |
|
48 stopped. |
|
49 @pre The socket connect observer has not been notified. |
|
50 @post The socket connector is no longer valid. |
|
51 */ |
|
52 virtual void StopConnect() =0; |
|
53 }; |
|
54 |
|
55 #endif // __MSOCKETCONNECTOR_H__ |