|
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: Data structure for holding the profile data temporarily |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef T_SIP_SETTINGS_DATA_H |
|
20 #define T_SIP_SETTINGS_DATA_H |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 #include "gssipsettingsplugin.hrh" |
|
25 #include "tgssipserverdata.h" |
|
26 #include <sipprofiletypeinfo.h> |
|
27 |
|
28 // CONSTANTS |
|
29 |
|
30 const TInt KMaxSIPProviderNameLength = 100; |
|
31 const TInt KMaxUsernameLength = 256; |
|
32 const TInt KMaxSIPAddressLength = 256; |
|
33 const TInt KMaxServiceTypeName = 20; |
|
34 const TInt KAORIndex = 0; |
|
35 |
|
36 const TInt KDefaultIAP = 0; |
|
37 const TInt KDefaultSNAP = 0; |
|
38 const TInt KDefaultCompression = EGSComprNo; |
|
39 const TInt KDefaultRegistration = EGSWhenNeeded; |
|
40 const TInt KDefaultSecurity = EGSSecurityOff; |
|
41 |
|
42 const TInt KDefaultLooseRouting = EGSLooseRoutingOn; |
|
43 const TInt KDefaultPortNumber = -1; |
|
44 const TInt KDefaultTranspProtocol = EGSTranspProtocolAuto; |
|
45 |
|
46 const TInt KUnknownProfileIndex = -1; |
|
47 |
|
48 // For SIP URI parsing. |
|
49 _LIT( KSegmentSeparator, ";" ); |
|
50 _LIT( KSIPColonSeparator, ":" ); |
|
51 _LIT( KSIPProtocolHeader, "sip" ); |
|
52 _LIT( KSIPSProtocolHeader, "sips" ); |
|
53 _LIT( KLooseRoutingParam, "lr" ); |
|
54 _LIT( KTransportParamPrefix, "transport=" ); |
|
55 _LIT( KTCP, "TCP" ); |
|
56 _LIT( KUDP, "UDP"); |
|
57 |
|
58 const TInt KSIPProtocolHeaderLength = 3; |
|
59 const TInt KSIPSProtocolHeaderLength = 4; |
|
60 const TInt KMaxLengthForPort = 10; |
|
61 const TInt KMaxSegmentLength = 64; |
|
62 const TInt KMaxLengthForPath = 256; |
|
63 |
|
64 // FORWARD DECLARATIONS |
|
65 |
|
66 class TGSSIPServerData; |
|
67 |
|
68 // CLASS DECLARATION |
|
69 |
|
70 /** |
|
71 * TSIPSettingsData class |
|
72 * @since 3.1 |
|
73 * Data structure to hold the profile data until placed to actual |
|
74 * profile instance. Class does not contain any methods, only data. |
|
75 */ |
|
76 class TSIPSettingsData |
|
77 { |
|
78 public: // Data |
|
79 |
|
80 // Provider name |
|
81 TBuf<KMaxSIPProviderNameLength> iProviderName; |
|
82 // Service profile |
|
83 TSIPProfileTypeInfo iServiceProfile; |
|
84 TInt iServiceProfileIndex; |
|
85 |
|
86 // AP index |
|
87 TInt iAPIndex; |
|
88 // SNAP index |
|
89 TInt iSNAPIndex; |
|
90 // Public username |
|
91 TBuf<KMaxUsernameLength> iUsername; |
|
92 // Use compression |
|
93 TInt iCompression; |
|
94 // Registration mode |
|
95 TInt iRegistrationMode; |
|
96 // Security negotiation |
|
97 TInt iSecurity; |
|
98 // Proxy server settings |
|
99 TGSSIPServerData iProxy; |
|
100 // Registrar server settings |
|
101 TGSSIPServerData iRegistrar; |
|
102 |
|
103 // Profile ID, -1 if a new profile and not yet saved to permanent |
|
104 // storage |
|
105 TInt iID; |
|
106 }; |
|
107 |
|
108 #endif // T_SIP_SETTINGS_DATA_H |
|
109 |
|
110 // End of File |