|
1 /* |
|
2 * Copyright (c) 2003-2006 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: Task handler for listening to the real interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // @file realiapconnobserver.h |
|
21 |
|
22 #ifndef __REAL_IAP_CONN_OBSERVER_H__ |
|
23 #define __REAL_IAP_CONN_OBSERVER_H__ |
|
24 |
|
25 #include "sit.h" |
|
26 #include "taskhandler.h" |
|
27 #include "eventdefssit.h" |
|
28 |
|
29 // Task handler states |
|
30 const TInt KStateStartObserving = 1; |
|
31 const TInt KStateFinishObserving = 2; |
|
32 |
|
33 /** |
|
34 * Real IAP connection observer task handler |
|
35 */ |
|
36 NONSHARABLE_CLASS(CRealIapConnObserver) : public CTaskHandler |
|
37 { |
|
38 public: |
|
39 static CRealIapConnObserver* NewL(MTaskHandlerManager* aManager, |
|
40 const TTaskArrivedEventData& aTaskInfo); |
|
41 ~CRealIapConnObserver(); |
|
42 |
|
43 public: // From MEventObserver |
|
44 void EventOccured(TInt aStatus, TEventType aType, TDesC8* aData); |
|
45 |
|
46 private: // From CTaskHandler |
|
47 void StartTaskHandling(); |
|
48 void ChangeStateL(); |
|
49 void CancelOngoingOperation(); |
|
50 void ReportResult(TInt aStatus); |
|
51 |
|
52 private: |
|
53 CRealIapConnObserver(MTaskHandlerManager* aManager, |
|
54 const TTaskArrivedEventData& aTaskInfo); |
|
55 void ConstructL(); |
|
56 |
|
57 void StateStartObservingL(); |
|
58 void StateFinishObserving(); |
|
59 |
|
60 private: |
|
61 TPckgBuf<TObserveRealIapConnEventSpec> iEventSpecDes; |
|
62 }; |
|
63 |
|
64 #endif // __REAL_IAP_CONN_OBSERVER_H__ |