|
1 /* |
|
2 * Copyright (c) 2000 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: Implementation of applicationmanagement components |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __AMSMLHELPER_H__ |
|
19 #define __AMSMLHELPER_H__ |
|
20 |
|
21 #include <SyncMLDef.h> |
|
22 #include <SyncMLTransportProperties.h> |
|
23 #include <SyncMLClient.h> |
|
24 #include <SyncMLClientDM.h> |
|
25 |
|
26 namespace NApplicationManagement |
|
27 { |
|
28 |
|
29 /** |
|
30 * Utility class that wraps access to DM client functionality |
|
31 */ |
|
32 class SmlHelper |
|
33 { |
|
34 public: |
|
35 |
|
36 // NOTE: this enum must match with property array described in |
|
37 // SyncML_Sync_Agent_Client_API_Specification.doc. |
|
38 enum TNSmlSyncTransportProperties |
|
39 { |
|
40 EPropertyIntenetAccessPoint = 0, |
|
41 EPropertyHttpUsed = 5, |
|
42 EPropertyHttpUserName = 6, |
|
43 EPropertyHttpPassword = 7 |
|
44 }; |
|
45 |
|
46 /** |
|
47 * GetCurrentProfileIdL Finds out the current syncml DM session profile id. |
|
48 * @param aProfile Will contain the current profile id if call is successfull |
|
49 * @return Success status (KErrNone if successful) |
|
50 */ |
|
51 static TInt GetCurrentProfileIdL(TSmlProfileId &aProfile); |
|
52 /** |
|
53 * LaunchSessionL Launches SyncML DM session using given profile id. |
|
54 * @param aProfile The id of profile which is to be used to start DM session |
|
55 * @return Success status (KErrNone if successful) |
|
56 */ |
|
57 static TInt LaunchSessionL(TSmlProfileId &aProfile); |
|
58 |
|
59 /** |
|
60 * Fetch the default IAP used by the currently active DM profile |
|
61 * @param aDefaultIAP on successfull return contains the default IAP number |
|
62 */ |
|
63 |
|
64 static void GetDefaultIAPFromDMProfileL(TInt& aDefaultIAP); |
|
65 |
|
66 static void GetConnectionPropertyNameL(RSyncMLSession& aSyncSession, |
|
67 TDes8& aText, TInt aPropertyPos); |
|
68 |
|
69 static TInt StrToInt(const TDesC& aText, TInt& aNum); |
|
70 |
|
71 static HBufC8* GetCurrentServerIDL(); |
|
72 |
|
73 }; |
|
74 |
|
75 } |
|
76 |
|
77 |
|
78 #endif |
|
79 |
|
80 // End of File |