56
|
1 |
/*
|
|
2 |
* Copyright (c) 2005 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: Class definition for COMASuplSettings
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
#ifndef C_COMASUPLSETTINGS_H
|
|
22 |
#define C_COMASUPLSETTINGS_H
|
|
23 |
|
|
24 |
|
|
25 |
#include <e32base.h>
|
|
26 |
|
|
27 |
|
|
28 |
class COMASuplParameters;
|
|
29 |
class CCommsDatabase;
|
|
30 |
class COMASuplSettingsRepository;
|
|
31 |
class COMASuplTrace;
|
|
32 |
|
|
33 |
/**
|
|
34 |
* Saves SUPL settings
|
|
35 |
*/
|
|
36 |
class COMASuplSettings : public CBase
|
|
37 |
{
|
|
38 |
|
|
39 |
public:
|
|
40 |
|
|
41 |
/**
|
|
42 |
* Factory function that instantiates a new object of COMASuplSettings
|
|
43 |
*
|
|
44 |
*/
|
|
45 |
static COMASuplSettings* NewL( COMASuplParameters* aItem,
|
|
46 |
COMASuplTrace* aTrace );
|
|
47 |
|
|
48 |
/**
|
|
49 |
* Destructor
|
|
50 |
*
|
|
51 |
*/
|
|
52 |
virtual ~COMASuplSettings();
|
|
53 |
|
|
54 |
public: // New functions
|
|
55 |
|
|
56 |
/**
|
|
57 |
* Save SUPL settings to system.
|
|
58 |
*
|
|
59 |
*/
|
|
60 |
void SaveL( COMASuplSettingsRepository* aRepository );
|
|
61 |
|
|
62 |
/**
|
|
63 |
* Returns the Setting name
|
|
64 |
*
|
|
65 |
*/
|
|
66 |
const TDesC& SummaryText();
|
|
67 |
|
|
68 |
/**
|
|
69 |
* Set new default name
|
|
70 |
*
|
|
71 |
*/
|
|
72 |
void SetDefaultNameL( const TDesC& aDefaultName );
|
|
73 |
|
|
74 |
/**
|
|
75 |
* Set reference to CommsDataBase. This is needed when saving
|
|
76 |
* SUPL settings.Must be set before calling SaveL.
|
|
77 |
*
|
|
78 |
*/
|
|
79 |
void SetCommsDataBase( CCommsDatabase& aCommsDataBase );
|
|
80 |
|
|
81 |
/**
|
|
82 |
* Returns IAP ID
|
|
83 |
*
|
|
84 |
*/
|
|
85 |
TUint32 IapIdFromWapIdL( TUint32 aWapId ) const;
|
|
86 |
|
|
87 |
private: // Constructors and destructor
|
|
88 |
|
|
89 |
/**
|
|
90 |
* C++ Constructor
|
|
91 |
*/
|
|
92 |
COMASuplSettings( COMASuplParameters* aItem, COMASuplTrace* aTrace );
|
|
93 |
|
|
94 |
/**
|
|
95 |
* Symbian 2nd phase constructor
|
|
96 |
*/
|
|
97 |
void ConstructL();
|
|
98 |
|
|
99 |
private: // Data
|
|
100 |
|
|
101 |
/**
|
|
102 |
* Handle to the Comms DB
|
|
103 |
*/
|
|
104 |
CCommsDatabase* iCommsDb;
|
|
105 |
|
|
106 |
/**
|
|
107 |
* Default name for SUPL settings.
|
|
108 |
*/
|
|
109 |
HBufC* iDefaultName;
|
|
110 |
|
|
111 |
/**
|
|
112 |
* Reference to instance of COMASuplParameters
|
|
113 |
*
|
|
114 |
*/
|
|
115 |
COMASuplParameters* iItem;
|
|
116 |
|
|
117 |
/**
|
|
118 |
* Handle to an instance of COMASuplTrace used for tracing
|
|
119 |
*/
|
|
120 |
COMASuplTrace* iTrace;
|
|
121 |
|
|
122 |
};
|
|
123 |
|
|
124 |
#endif // C_COMASUPLSETTINGS_H
|