1 /* |
|
2 * Copyright (c) 2010 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: VPN Agile provision service |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef AGILEPROVISIONWS_H |
|
19 #define AGILEPROVISIONWS_H |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <base64.h> |
|
23 #include <MSenServiceConsumer.h> |
|
24 #include <SenServiceConnection.h> |
|
25 #include <SenSoapFault.h> |
|
26 |
|
27 |
|
28 NONSHARABLE_CLASS(MAgileProvisionServiceConsumer) : public MSenServiceConsumer |
|
29 { |
|
30 |
|
31 public: |
|
32 |
|
33 // ----- To be implemented by consumer (from MSenServiceConsumer): ----- |
|
34 virtual void HandleErrorL(const TInt aErrorCode, const TDesC8& aMessage) = 0; |
|
35 virtual void SetStatus(const TInt aStatus) = 0; |
|
36 |
|
37 /* Implementation of this callback is optional. |
|
38 * If you are not interested in SOAP Fault details, |
|
39 * the default implementation will fall back to HandleErrorL |
|
40 * with the error code KErrSenSoapFault. |
|
41 */ |
|
42 virtual void HandleSoapFaultL(const CSenSoapFault& /*aFault*/) |
|
43 { HandleErrorL(KErrSenSoapFault, _L8("Soap fault received") ); } |
|
44 |
|
45 |
|
46 }; |
|
47 |
|
48 |
|
49 NONSHARABLE_CLASS(CAgileProvisionServiceService) : public CBase |
|
50 { |
|
51 CSenServiceConnection *iConnection; |
|
52 TBool iOwnsConnection; |
|
53 |
|
54 CAgileProvisionServiceService(CSenServiceConnection* aConnection, TBool aOwnsConnection); |
|
55 |
|
56 public: |
|
57 |
|
58 ~CAgileProvisionServiceService(); |
|
59 |
|
60 |
|
61 static CAgileProvisionServiceService* NewL(MSenServiceConsumer& aObserver, MSenServiceDescription& aDescription); |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 public: // remote methods |
|
67 |
|
68 |
|
69 |
|
70 /************************************************************************** |
|
71 * Asynchronous operations that handle result in callback methods. * |
|
72 * Methods can leave. * |
|
73 **************************************************************************/ |
|
74 |
|
75 void GetConfAsyncL(); |
|
76 void GetCertificateAsyncL(HBufC8* aCertReq); |
|
77 |
|
78 void CancelTransaction(); |
|
79 void ResetTransactionId(); |
|
80 |
|
81 HBufC8* iCertreq; |
|
82 TUint iIapId; |
|
83 private: // data |
|
84 /** |
|
85 * Transaction id. |
|
86 * Own. |
|
87 */ |
|
88 TInt iTransactionId; |
|
89 |
|
90 |
|
91 }; |
|
92 |
|
93 #endif |
|