Documentation/Source/eric6.Helpviewer.Sync.FtpSyncHandler.html

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

eric ide

mercurial