equal
deleted
inserted
replaced
1 /* |
|
2 * Copyright (c) 2009 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: ECOM plugin to communicate over IP port |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CHTISOCKETS_H |
|
20 #define CHTISOCKETS_H |
|
21 |
|
22 |
|
23 // INCLUDES |
|
24 #include <HtiCommPluginInterface.h> // defined in HtiFramework project |
|
25 |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 class MHtiSocketObserver |
|
32 { |
|
33 public: |
|
34 enum TRequestType |
|
35 { |
|
36 EReadSocket, |
|
37 EWriteSocket |
|
38 }; |
|
39 |
|
40 virtual void ReportComplete( MHtiSocketObserver::TRequestType aType, TInt aError ) = 0; |
|
41 }; |
|
42 |
|
43 |
|
44 class CHtiSocketMonitor : public CActive |
|
45 { |
|
46 public: |
|
47 static CHtiSocketMonitor* NewL( MHtiSocketObserver::TRequestType aType, MHtiSocketObserver* aObserver ); |
|
48 void Activate(); |
|
49 ~CHtiSocketMonitor(); |
|
50 |
|
51 private: |
|
52 CHtiSocketMonitor( MHtiSocketObserver::TRequestType aType, MHtiSocketObserver* aObserver ); |
|
53 void ConstructL(); |
|
54 |
|
55 public: // CActive interface |
|
56 void RunL(); |
|
57 void DoCancel(); |
|
58 TInt RunError(TInt aError); |
|
59 |
|
60 private: |
|
61 MHtiSocketObserver::TRequestType iType; |
|
62 MHtiSocketObserver* iObserver; |
|
63 }; |
|
64 |
|
65 |
|
66 #endif |
|