|
1 // Copyright (c) 2002-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 #if !defined(__DIALOGPROCESSOR_H__) |
|
17 #define __DIALOGPROCESSOR_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <comms-infras/connectionsettings.h> |
|
21 #include <agentdialog.h> |
|
22 |
|
23 class MDialogProcessorObserver |
|
24 { |
|
25 public: |
|
26 virtual void MDPOSelectComplete(TInt aError, const TConnectionSettings& aSettings); |
|
27 virtual void MDPOSelectModemAndLocationComplete(TInt aError, const TConnectionSettings& aSettings); |
|
28 virtual void MDPOWarnComplete(TInt aError, TBool aResponse); |
|
29 virtual void MDPOLoginComplete(TInt aError); |
|
30 virtual void MDPOAuthenticateComplete(TInt aError); |
|
31 virtual void MDPOReconnectComplete(TInt aError); |
|
32 virtual void MDPOReadPctComplete(TInt aError); |
|
33 virtual void MDPODestroyPctComplete(TInt aError); |
|
34 virtual void MDPOQoSWarningComplete(TInt aError, TBool aResponse); |
|
35 }; |
|
36 |
|
37 class CCommsDbAccess; |
|
38 class CDialogProcessor : public CBase |
|
39 { |
|
40 public: |
|
41 ~CDialogProcessor(); |
|
42 static CDialogProcessor* NewL(TInt aPriority = 0); |
|
43 |
|
44 void SelectConnection(MDialogProcessorObserver& aObserver, const TConnectionPrefs& aPrefs); |
|
45 void SelectConnection(MDialogProcessorObserver& aObserver, const TConnectionPrefs& aPrefs, TInt aLastError); |
|
46 void SelectModemAndLocation(MDialogProcessorObserver& aObserver); |
|
47 void Reconnect(MDialogProcessorObserver& aObserver); |
|
48 void WarnNewConnection(MDialogProcessorObserver& aObserver, const TConnectionPrefs& aPrefs, const TDesC* aNewIapName, const TIspConnectionNames* aNewConnectionNames, TInt aLastError); |
|
49 |
|
50 private: |
|
51 CDialogProcessor(); |
|
52 void ConstructL(); |
|
53 |
|
54 static TInt DialogCb(TAny* aThisPtr); |
|
55 void DialogComplete(); |
|
56 |
|
57 private: |
|
58 enum TDialogAction |
|
59 { |
|
60 ESelectModemAndLocation, |
|
61 ESelectConnection, |
|
62 EWarnNewConnection, |
|
63 EReconnect |
|
64 }; |
|
65 |
|
66 private: |
|
67 CAsyncCallBack* iDialogCb; |
|
68 MDialogProcessorObserver* iObserver; |
|
69 TDialogAction iAction; |
|
70 TConnectionSettings iSettings; |
|
71 }; |
|
72 |
|
73 #endif // __DIALOGPROCESSOR_H__ |
|
74 |