src/eric7/Documentation/Source/eric7.WebBrowser.Sync.FtpSyncHandler.html

branch
eric7
changeset 9209
b99e7fd55fd3
parent 8596
d64760b2da50
child 10436
f6881d10e995
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.WebBrowser.Sync.FtpSyncHandler</title>
4 <meta charset="UTF-8">
5 <link rel="stylesheet" href="styles.css">
6 </head>
7 <body>
8 <a NAME="top" ID="top"></a>
9 <h1>eric7.WebBrowser.Sync.FtpSyncHandler</h1>
10
11 <p>
12 Module implementing a synchronization handler using FTP.
13 </p>
14 <h3>Global Attributes</h3>
15
16 <table>
17 <tr><td>None</td></tr>
18 </table>
19 <h3>Classes</h3>
20
21 <table>
22
23 <tr>
24 <td><a href="#FtpSyncHandler">FtpSyncHandler</a></td>
25 <td>Class implementing a synchronization handler using FTP.</td>
26 </tr>
27 </table>
28 <h3>Functions</h3>
29
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <hr />
34 <hr />
35 <a NAME="FtpSyncHandler" ID="FtpSyncHandler"></a>
36 <h2>FtpSyncHandler</h2>
37
38 <p>
39 Class implementing a synchronization handler using FTP.
40 </p>
41 <h3>Signals</h3>
42 <dl>
43
44 <dt>syncError(message)</dt>
45 <dd>
46 emitted for a general error with the error
47 message (string)
48 </dd>
49 <dt>syncFinished(type_, done, download)</dt>
50 <dd>
51 emitted after a
52 synchronization has finished (string one of "bookmarks", "history",
53 "passwords", "useragents" or "speeddial", boolean, boolean)
54 </dd>
55 <dt>syncMessage(message)</dt>
56 <dd>
57 emitted to send a message about
58 synchronization (string)
59 </dd>
60 <dt>syncStatus(type_, message)</dt>
61 <dd>
62 emitted to indicate the synchronization
63 status (string one of "bookmarks", "history", "passwords",
64 "useragents" or "speeddial", string)
65 </dd>
66 </dl>
67 <h3>Derived from</h3>
68 SyncHandler
69 <h3>Class Attributes</h3>
70
71 <table>
72 <tr><td>None</td></tr>
73 </table>
74 <h3>Class Methods</h3>
75
76 <table>
77 <tr><td>None</td></tr>
78 </table>
79 <h3>Methods</h3>
80
81 <table>
82
83 <tr>
84 <td><a href="#FtpSyncHandler.__init__">FtpSyncHandler</a></td>
85 <td>Constructor</td>
86 </tr>
87 <tr>
88 <td><a href="#FtpSyncHandler.__changeToStore">__changeToStore</a></td>
89 <td>Private slot to change to the storage directory.</td>
90 </tr>
91 <tr>
92 <td><a href="#FtpSyncHandler.__connectAndLogin">__connectAndLogin</a></td>
93 <td>Private method to connect to the FTP server and log in.</td>
94 </tr>
95 <tr>
96 <td><a href="#FtpSyncHandler.__dirListCallback">__dirListCallback</a></td>
97 <td>Private slot handling the receipt of directory listing lines.</td>
98 </tr>
99 <tr>
100 <td><a href="#FtpSyncHandler.__doFtpCommands">__doFtpCommands</a></td>
101 <td>Private slot executing the sequence of FTP commands.</td>
102 </tr>
103 <tr>
104 <td><a href="#FtpSyncHandler.__downloadFile">__downloadFile</a></td>
105 <td>Private method to downlaod the given file.</td>
106 </tr>
107 <tr>
108 <td><a href="#FtpSyncHandler.__downloadFileCallback">__downloadFileCallback</a></td>
109 <td>Private method receiving the downloaded data.</td>
110 </tr>
111 <tr>
112 <td><a href="#FtpSyncHandler.__idleTimeout">__idleTimeout</a></td>
113 <td>Private slot to prevent a disconnect from the server.</td>
114 </tr>
115 <tr>
116 <td><a href="#FtpSyncHandler.__initialSync">__initialSync</a></td>
117 <td>Private slot to do the initial synchronization.</td>
118 </tr>
119 <tr>
120 <td><a href="#FtpSyncHandler.__initialSyncFile">__initialSyncFile</a></td>
121 <td>Private method to do the initial synchronization of the given file.</td>
122 </tr>
123 <tr>
124 <td><a href="#FtpSyncHandler.__syncFile">__syncFile</a></td>
125 <td>Private method to synchronize the given file.</td>
126 </tr>
127 <tr>
128 <td><a href="#FtpSyncHandler.__uploadFile">__uploadFile</a></td>
129 <td>Private method to upload the given file.</td>
130 </tr>
131 <tr>
132 <td><a href="#FtpSyncHandler.initialLoadAndCheck">initialLoadAndCheck</a></td>
133 <td>Public method to do the initial check.</td>
134 </tr>
135 <tr>
136 <td><a href="#FtpSyncHandler.shutdown">shutdown</a></td>
137 <td>Public method to shut down the handler.</td>
138 </tr>
139 <tr>
140 <td><a href="#FtpSyncHandler.syncBookmarks">syncBookmarks</a></td>
141 <td>Public method to synchronize the bookmarks.</td>
142 </tr>
143 <tr>
144 <td><a href="#FtpSyncHandler.syncHistory">syncHistory</a></td>
145 <td>Public method to synchronize the history.</td>
146 </tr>
147 <tr>
148 <td><a href="#FtpSyncHandler.syncPasswords">syncPasswords</a></td>
149 <td>Public method to synchronize the passwords.</td>
150 </tr>
151 <tr>
152 <td><a href="#FtpSyncHandler.syncSpeedDial">syncSpeedDial</a></td>
153 <td>Public method to synchronize the speed dial data.</td>
154 </tr>
155 <tr>
156 <td><a href="#FtpSyncHandler.syncUserAgents">syncUserAgents</a></td>
157 <td>Public method to synchronize the user agents.</td>
158 </tr>
159 </table>
160 <h3>Static Methods</h3>
161
162 <table>
163 <tr><td>None</td></tr>
164 </table>
165
166 <a NAME="FtpSyncHandler.__init__" ID="FtpSyncHandler.__init__"></a>
167 <h4>FtpSyncHandler (Constructor)</h4>
168 <b>FtpSyncHandler</b>(<i>parent=None</i>)
169
170 <p>
171 Constructor
172 </p>
173 <dl>
174
175 <dt><i>parent</i></dt>
176 <dd>
177 reference to the parent object (QObject)
178 </dd>
179 </dl>
180 <a NAME="FtpSyncHandler.__changeToStore" ID="FtpSyncHandler.__changeToStore"></a>
181 <h4>FtpSyncHandler.__changeToStore</h4>
182 <b>__changeToStore</b>(<i></i>)
183
184 <p>
185 Private slot to change to the storage directory.
186 </p>
187 <p>
188 This action will create the storage path on the server, if it
189 does not exist. Upon return, the current directory of the server
190 is the sync directory.
191 </p>
192 <a NAME="FtpSyncHandler.__connectAndLogin" ID="FtpSyncHandler.__connectAndLogin"></a>
193 <h4>FtpSyncHandler.__connectAndLogin</h4>
194 <b>__connectAndLogin</b>(<i></i>)
195
196 <p>
197 Private method to connect to the FTP server and log in.
198 </p>
199 <dl>
200 <dt>Return:</dt>
201 <dd>
202 flag indicating a successful log in (boolean)
203 </dd>
204 </dl>
205 <a NAME="FtpSyncHandler.__dirListCallback" ID="FtpSyncHandler.__dirListCallback"></a>
206 <h4>FtpSyncHandler.__dirListCallback</h4>
207 <b>__dirListCallback</b>(<i>line</i>)
208
209 <p>
210 Private slot handling the receipt of directory listing lines.
211 </p>
212 <dl>
213
214 <dt><i>line</i></dt>
215 <dd>
216 the received line of the directory listing (string)
217 </dd>
218 </dl>
219 <a NAME="FtpSyncHandler.__doFtpCommands" ID="FtpSyncHandler.__doFtpCommands"></a>
220 <h4>FtpSyncHandler.__doFtpCommands</h4>
221 <b>__doFtpCommands</b>(<i></i>)
222
223 <p>
224 Private slot executing the sequence of FTP commands.
225 </p>
226 <a NAME="FtpSyncHandler.__downloadFile" ID="FtpSyncHandler.__downloadFile"></a>
227 <h4>FtpSyncHandler.__downloadFile</h4>
228 <b>__downloadFile</b>(<i>type_, fileName, timestamp</i>)
229
230 <p>
231 Private method to downlaod the given file.
232 </p>
233 <dl>
234
235 <dt><i>type_</i></dt>
236 <dd>
237 type of the synchronization event (string one
238 of "bookmarks", "history", "passwords", "useragents" or
239 "speeddial")
240 </dd>
241 <dt><i>fileName</i></dt>
242 <dd>
243 name of the file to be downloaded (string)
244 </dd>
245 <dt><i>timestamp</i></dt>
246 <dd>
247 time stamp in seconds of the file to be downloaded
248 (integer)
249 </dd>
250 </dl>
251 <a NAME="FtpSyncHandler.__downloadFileCallback" ID="FtpSyncHandler.__downloadFileCallback"></a>
252 <h4>FtpSyncHandler.__downloadFileCallback</h4>
253 <b>__downloadFileCallback</b>(<i>buffer, data</i>)
254
255 <p>
256 Private method receiving the downloaded data.
257 </p>
258 <dl>
259
260 <dt><i>buffer</i></dt>
261 <dd>
262 reference to the buffer (io.BytesIO)
263 </dd>
264 <dt><i>data</i></dt>
265 <dd>
266 byte string to store in the buffer (bytes)
267 </dd>
268 </dl>
269 <dl>
270 <dt>Return:</dt>
271 <dd>
272 number of bytes written to the buffer (integer)
273 </dd>
274 </dl>
275 <a NAME="FtpSyncHandler.__idleTimeout" ID="FtpSyncHandler.__idleTimeout"></a>
276 <h4>FtpSyncHandler.__idleTimeout</h4>
277 <b>__idleTimeout</b>(<i></i>)
278
279 <p>
280 Private slot to prevent a disconnect from the server.
281 </p>
282 <a NAME="FtpSyncHandler.__initialSync" ID="FtpSyncHandler.__initialSync"></a>
283 <h4>FtpSyncHandler.__initialSync</h4>
284 <b>__initialSync</b>(<i></i>)
285
286 <p>
287 Private slot to do the initial synchronization.
288 </p>
289 <a NAME="FtpSyncHandler.__initialSyncFile" ID="FtpSyncHandler.__initialSyncFile"></a>
290 <h4>FtpSyncHandler.__initialSyncFile</h4>
291 <b>__initialSyncFile</b>(<i>type_, fileName</i>)
292
293 <p>
294 Private method to do the initial synchronization of the given file.
295 </p>
296 <dl>
297
298 <dt><i>type_</i></dt>
299 <dd>
300 type of the synchronization event (string one
301 of "bookmarks", "history", "passwords", "useragents" or
302 "speeddial")
303 </dd>
304 <dt><i>fileName</i></dt>
305 <dd>
306 name of the file to be synchronized (string)
307 </dd>
308 </dl>
309 <a NAME="FtpSyncHandler.__syncFile" ID="FtpSyncHandler.__syncFile"></a>
310 <h4>FtpSyncHandler.__syncFile</h4>
311 <b>__syncFile</b>(<i>type_, fileName</i>)
312
313 <p>
314 Private method to synchronize the given file.
315 </p>
316 <dl>
317
318 <dt><i>type_</i></dt>
319 <dd>
320 type of the synchronization event (string one
321 of "bookmarks", "history", "passwords", "useragents" or
322 "speeddial")
323 </dd>
324 <dt><i>fileName</i></dt>
325 <dd>
326 name of the file to be synchronized (string)
327 </dd>
328 </dl>
329 <a NAME="FtpSyncHandler.__uploadFile" ID="FtpSyncHandler.__uploadFile"></a>
330 <h4>FtpSyncHandler.__uploadFile</h4>
331 <b>__uploadFile</b>(<i>type_, fileName</i>)
332
333 <p>
334 Private method to upload the given file.
335 </p>
336 <dl>
337
338 <dt><i>type_</i></dt>
339 <dd>
340 type of the synchronization event (string one
341 of "bookmarks", "history", "passwords", "useragents" or
342 "speeddial")
343 </dd>
344 <dt><i>fileName</i></dt>
345 <dd>
346 name of the file to be uploaded (string)
347 </dd>
348 </dl>
349 <dl>
350 <dt>Return:</dt>
351 <dd>
352 flag indicating success (boolean)
353 </dd>
354 </dl>
355 <a NAME="FtpSyncHandler.initialLoadAndCheck" ID="FtpSyncHandler.initialLoadAndCheck"></a>
356 <h4>FtpSyncHandler.initialLoadAndCheck</h4>
357 <b>initialLoadAndCheck</b>(<i>forceUpload</i>)
358
359 <p>
360 Public method to do the initial check.
361 </p>
362 <dl>
363
364 <dt><i>forceUpload</i></dt>
365 <dd>
366 flag indicating a forced upload of the files
367 (boolean)
368 </dd>
369 </dl>
370 <a NAME="FtpSyncHandler.shutdown" ID="FtpSyncHandler.shutdown"></a>
371 <h4>FtpSyncHandler.shutdown</h4>
372 <b>shutdown</b>(<i></i>)
373
374 <p>
375 Public method to shut down the handler.
376 </p>
377 <a NAME="FtpSyncHandler.syncBookmarks" ID="FtpSyncHandler.syncBookmarks"></a>
378 <h4>FtpSyncHandler.syncBookmarks</h4>
379 <b>syncBookmarks</b>(<i></i>)
380
381 <p>
382 Public method to synchronize the bookmarks.
383 </p>
384 <a NAME="FtpSyncHandler.syncHistory" ID="FtpSyncHandler.syncHistory"></a>
385 <h4>FtpSyncHandler.syncHistory</h4>
386 <b>syncHistory</b>(<i></i>)
387
388 <p>
389 Public method to synchronize the history.
390 </p>
391 <a NAME="FtpSyncHandler.syncPasswords" ID="FtpSyncHandler.syncPasswords"></a>
392 <h4>FtpSyncHandler.syncPasswords</h4>
393 <b>syncPasswords</b>(<i></i>)
394
395 <p>
396 Public method to synchronize the passwords.
397 </p>
398 <a NAME="FtpSyncHandler.syncSpeedDial" ID="FtpSyncHandler.syncSpeedDial"></a>
399 <h4>FtpSyncHandler.syncSpeedDial</h4>
400 <b>syncSpeedDial</b>(<i></i>)
401
402 <p>
403 Public method to synchronize the speed dial data.
404 </p>
405 <a NAME="FtpSyncHandler.syncUserAgents" ID="FtpSyncHandler.syncUserAgents"></a>
406 <h4>FtpSyncHandler.syncUserAgents</h4>
407 <b>syncUserAgents</b>(<i></i>)
408
409 <p>
410 Public method to synchronize the user agents.
411 </p>
412 <div align="right"><a href="#top">Up</a></div>
413 <hr />
414 </body></html>

eric ide

mercurial