|
1 /* |
|
2 * Copyright (c) 2004 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: See class definition below. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __MTCBEAREROBSERVER_H__ |
|
19 #define __MTCBEAREROBSERVER_H__ |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32std.h> |
|
23 |
|
24 // CLASS DEFINITION |
|
25 /** |
|
26 * MTcBearerObserver defines an interface for receiving bearer related |
|
27 * events such as transfer completion notifications. |
|
28 * Users of MTcBearerManager should implement this interface. |
|
29 */ |
|
30 class MTcBearerObserver |
|
31 { |
|
32 public: // Enumerations |
|
33 |
|
34 /// Identifies completed operations |
|
35 enum TOperation |
|
36 { |
|
37 /// Unknown operation |
|
38 EUnknown, |
|
39 /// The connection reached listening state |
|
40 EListen, |
|
41 // |
|
42 EConnecting, |
|
43 /// The connection reached connected state |
|
44 EConnect, |
|
45 /// The connection finished a send operation |
|
46 ESend, |
|
47 /// The connection finished a receive operation |
|
48 EReceive |
|
49 }; |
|
50 |
|
51 protected: // Constructors and destructor |
|
52 |
|
53 /// Virtual destructor. Prohibit deletion through this interface. |
|
54 virtual ~MTcBearerObserver() {} |
|
55 |
|
56 public: // Abstract methods |
|
57 |
|
58 /** |
|
59 * Called by an observer connection object after a state transition. |
|
60 * |
|
61 * @param aOp Operation that completed |
|
62 * @param aStatus System-wide error code or KErrNone |
|
63 */ |
|
64 virtual void BearerCompletion( MTcBearerObserver::TOperation aOp, |
|
65 TInt aStatus ) = 0; |
|
66 |
|
67 }; |
|
68 |
|
69 #endif // __MTCBEAREROBSERVER_H__ |