5 * WAP data and functions.
12 * WAP bookmars and settings manipulations.
15 #include <gammu-types.h>
16 #include <gammu-error.h>
17 #include <gammu-statemachine.h>
19 #include <stdlib.h> /* Needed for size_t declaration */
28 * Location where it is stored.
34 unsigned char Address
[(255 + 1) * 2];
38 unsigned char Title
[(50 + 1) * 2];
41 /* --------------------------- WAP or MMS settings ------------------------- */
44 * Connection speed configuration.
49 WAPSETTINGS_SPEED_9600
,
50 WAPSETTINGS_SPEED_14400
,
51 WAPSETTINGS_SPEED_AUTO
55 * Connection bearer configuration.
60 WAPSETTINGS_BEARER_SMS
= 1,
61 WAPSETTINGS_BEARER_DATA
,
62 WAPSETTINGS_BEARER_USSD
,
63 WAPSETTINGS_BEARER_GPRS
75 char Title
[(20 + 1) * 2];
79 char HomePage
[(100 + 1) * 2];
81 * Bearer of WAP connection.
83 WAPSettings_Bearer Bearer
;
89 * Is this connectin continuous?
91 gboolean IsContinuous
;
94 * Whether is ISDN for data bearer
98 * Whether is normal auth for data bearer
100 gboolean IsNormalAuthentication
;
103 * Server for sms bearer.
105 char Server
[(21 + 1) * 2];
108 * Service for sms or ussd bearer.
110 char Service
[(20 + 1) * 2];
112 * Whether is IP, for sms or ussd bearer.
117 * Code for ussd bearer.
119 char Code
[(10 + 1) * 2];
122 * IP address for data or gprs.
124 char IPAddress
[(20 + 1) * 2];
126 * Login for data or gprs.
128 gboolean ManualLogin
;
130 * Dial up number for data or gprs.
132 char DialUp
[(20 + 1) * 2];
134 * User name for data or gprs.
136 * \todo Is length okay?
138 char User
[(50 + 1) * 2];
140 * User password for data or gprs.
142 * \todo Is length okay?
144 char Password
[(50 + 1) * 2];
146 * Speed settings for data or gprs.
148 WAPSettings_Speed Speed
;
152 * Set of WAP settings.
162 * Number of elements in Settings.
164 unsigned char Number
;
168 GSM_WAPSettings Settings
[4];
170 * Whether this configuration is active.
174 * Whether this configuration is read only.
180 char Proxy
[(100 + 1) * 2];
186 * Second proxy server.
188 char Proxy2
[(100 + 1) * 2];
194 * Bearer of current connection.
196 WAPSettings_Bearer ActiveBearer
;
197 } GSM_MultiWAPSettings
;
200 * Encodes URL to VBKM file.
202 * \param Buffer Storage for text.
203 * \param Length Pointer to storage, will be updated.
204 * \param bookmark Bookmark to encode.
206 * \return Error code.
210 GSM_Error
GSM_EncodeURLFile(unsigned char *Buffer
, size_t * Length
,
211 GSM_WAPBookmark
* bookmark
);
214 * Reads WAP bookmark.
216 * \param s State machine pointer.
217 * \param bookmark Bookmark storage, need to contain location.
223 GSM_Error
GSM_GetWAPBookmark(GSM_StateMachine
* s
, GSM_WAPBookmark
* bookmark
);
228 * \param s State machine pointer.
229 * \param bookmark Bookmark data.
235 GSM_Error
GSM_SetWAPBookmark(GSM_StateMachine
* s
, GSM_WAPBookmark
* bookmark
);
238 * Deletes WAP bookmark.
240 * \param s State machine pointer.
241 * \param bookmark Bookmark data, need to contain location.
247 GSM_Error
GSM_DeleteWAPBookmark(GSM_StateMachine
* s
,
248 GSM_WAPBookmark
* bookmark
);
251 * Acquires WAP settings.
253 * \param s State machine pointer.
254 * \param settings Settings storage.
260 GSM_Error
GSM_GetWAPSettings(GSM_StateMachine
* s
,
261 GSM_MultiWAPSettings
* settings
);
264 * Changes WAP settings.
266 * \param s State machine pointer.
267 * \param settings Settings data.
273 GSM_Error
GSM_SetWAPSettings(GSM_StateMachine
* s
,
274 GSM_MultiWAPSettings
* settings
);
277 /* Editor configuration
278 * vim: noexpandtab sw=8 ts=8 sts=8 tw=72: