|
1 /* |
|
2 * Copyright (c) 2007 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: GSPDataAccessPointPlugin model. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef GSPDATAACCESSPOINTMODEL_H |
|
19 #define GSPDATAACCESSPOINTMODEL_H |
|
20 |
|
21 // INCLUDES |
|
22 // INCLUDES |
|
23 #include <cdblen.h> |
|
24 #include <centralrepository.h> |
|
25 #include <e32property.h> |
|
26 #include <etel.h> |
|
27 #include <etelpckt.h> |
|
28 #include <mmtsy_names.h> |
|
29 |
|
30 // CONSTANTS |
|
31 |
|
32 const TInt KAttachSettingWhenNeeded = 0; |
|
33 const TInt KAttachSettingWhenAvailable = 1; |
|
34 const TInt KGSMaxDAPName = KCommsDbSvrMaxFieldLength; |
|
35 |
|
36 // CLASS DEFINITIONS |
|
37 |
|
38 class CRfsHandler; |
|
39 class CCommsDatabase; |
|
40 class CCommsDbTableView; |
|
41 |
|
42 /** |
|
43 * CGSPDataAccessPointModel is the model class of GS app. |
|
44 * It provides functions to get and set setting values. |
|
45 */ |
|
46 class CGSPDataAccessPointModel : public CBase |
|
47 { |
|
48 public: // Constructor and destructor |
|
49 /** |
|
50 * Two-phased constructor |
|
51 */ |
|
52 static CGSPDataAccessPointModel* NewL(); |
|
53 |
|
54 /** |
|
55 * Destructor |
|
56 */ |
|
57 ~CGSPDataAccessPointModel(); |
|
58 |
|
59 public: //new |
|
60 /** |
|
61 * Gets dialup access point name from commdb. |
|
62 * @param aName Descriptor which will contain the dialup access point name. |
|
63 * Max length is KGSMaxDAPName. |
|
64 * @return Error code. |
|
65 */ |
|
66 TInt GetDialupAPNameL( TDes& aName ); |
|
67 |
|
68 /** |
|
69 * Stores dialup access point name to commdb. |
|
70 * @param aName Descriptor which contains the dialup access point name. |
|
71 * Max length is KGSMaxDAPName. |
|
72 */ |
|
73 void SetDialupAPNameL( const TDesC& aName ); |
|
74 |
|
75 private: // Private constructors |
|
76 /** |
|
77 * Default C++ contructor |
|
78 */ |
|
79 CGSPDataAccessPointModel(); |
|
80 |
|
81 /** |
|
82 * Symbian OS default constructor |
|
83 * @return void |
|
84 */ |
|
85 void ConstructL(); |
|
86 |
|
87 private: // Data |
|
88 |
|
89 // Handle to Comms database. |
|
90 CCommsDatabase* iCommsDb; |
|
91 |
|
92 // Handle to packet service. |
|
93 RPacketService iPktService; |
|
94 |
|
95 // Handle to phone. |
|
96 RPhone iPhone; |
|
97 |
|
98 // Handle to tel server. |
|
99 RTelServer iTelServer; |
|
100 |
|
101 // Networking repository |
|
102 CRepository* iNetworkRepository; |
|
103 |
|
104 }; |
|
105 |
|
106 |
|
107 #endif // GSPDATAACCESSPOINTMODEL_H |
|
108 // End of File |