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