81 <td>Constructor</td> |
81 <td>Constructor</td> |
82 </tr><tr> |
82 </tr><tr> |
83 <td><a href="#FtpSyncHandler.__changeToStore">__changeToStore</a></td> |
83 <td><a href="#FtpSyncHandler.__changeToStore">__changeToStore</a></td> |
84 <td>Private slot to change to the storage directory.</td> |
84 <td>Private slot to change to the storage directory.</td> |
85 </tr><tr> |
85 </tr><tr> |
86 <td><a href="#FtpSyncHandler.__checkSyncFiles">__checkSyncFiles</a></td> |
86 <td><a href="#FtpSyncHandler.__connectAndLogin">__connectAndLogin</a></td> |
87 <td>Private slot called for each entry sent by the FTP list command.</td> |
87 <td>Private method to connect to the FTP server and log in.</td> |
88 </tr><tr> |
88 </tr><tr> |
89 <td><a href="#FtpSyncHandler.__commandFinished">__commandFinished</a></td> |
89 <td><a href="#FtpSyncHandler.__dirListCallback">__dirListCallback</a></td> |
90 <td>Private slot handling the end of a command.</td> |
90 <td>Private slot handling the receipt of directory listing lines.</td> |
|
91 </tr><tr> |
|
92 <td><a href="#FtpSyncHandler.__doFtpCommands">__doFtpCommands</a></td> |
|
93 <td>Private slot executing the sequence of FTP commands.</td> |
|
94 </tr><tr> |
|
95 <td><a href="#FtpSyncHandler.__doFtpLogin">__doFtpLogin</a></td> |
|
96 <td>Private method to do the FTP login with asking for a username and password, if the login fails with an error 530.</td> |
91 </tr><tr> |
97 </tr><tr> |
92 <td><a href="#FtpSyncHandler.__downloadFile">__downloadFile</a></td> |
98 <td><a href="#FtpSyncHandler.__downloadFile">__downloadFile</a></td> |
93 <td>Private method to downlaod the given file.</td> |
99 <td>Private method to downlaod the given file.</td> |
94 </tr><tr> |
100 </tr><tr> |
|
101 <td><a href="#FtpSyncHandler.__downloadFileCallback">__downloadFileCallback</a></td> |
|
102 <td>Private method receiving the downloaded data.</td> |
|
103 </tr><tr> |
95 <td><a href="#FtpSyncHandler.__idleTimeout">__idleTimeout</a></td> |
104 <td><a href="#FtpSyncHandler.__idleTimeout">__idleTimeout</a></td> |
96 <td>Private slot to prevent a disconnect from the server.</td> |
105 <td>Private slot to prevent a disconnect from the server.</td> |
97 </tr><tr> |
106 </tr><tr> |
98 <td><a href="#FtpSyncHandler.__initialSync">__initialSync</a></td> |
107 <td><a href="#FtpSyncHandler.__initialSync">__initialSync</a></td> |
99 <td>Private slot to do the initial synchronization.</td> |
108 <td>Private slot to do the initial synchronization.</td> |
100 </tr><tr> |
109 </tr><tr> |
101 <td><a href="#FtpSyncHandler.__initialSyncFile">__initialSyncFile</a></td> |
110 <td><a href="#FtpSyncHandler.__initialSyncFile">__initialSyncFile</a></td> |
102 <td>Private method to do the initial synchronization of the given file.</td> |
111 <td>Private method to do the initial synchronization of the given file.</td> |
103 </tr><tr> |
|
104 <td><a href="#FtpSyncHandler.__storeReached">__storeReached</a></td> |
|
105 <td>Private slot executed, when the storage directory was reached.</td> |
|
106 </tr><tr> |
112 </tr><tr> |
107 <td><a href="#FtpSyncHandler.__syncFile">__syncFile</a></td> |
113 <td><a href="#FtpSyncHandler.__syncFile">__syncFile</a></td> |
108 <td>Private method to synchronize the given file.</td> |
114 <td>Private method to synchronize the given file.</td> |
109 </tr><tr> |
115 </tr><tr> |
110 <td><a href="#FtpSyncHandler.__uploadFile">__uploadFile</a></td> |
116 <td><a href="#FtpSyncHandler.__uploadFile">__uploadFile</a></td> |
150 <h4>FtpSyncHandler.__changeToStore</h4> |
156 <h4>FtpSyncHandler.__changeToStore</h4> |
151 <b>__changeToStore</b>(<i></i>) |
157 <b>__changeToStore</b>(<i></i>) |
152 <p> |
158 <p> |
153 Private slot to change to the storage directory. |
159 Private slot to change to the storage directory. |
154 </p><p> |
160 </p><p> |
155 This action might cause the storage path to be created on the server. |
161 This action will create the storage path on the server, if it |
156 </p><a NAME="FtpSyncHandler.__checkSyncFiles" ID="FtpSyncHandler.__checkSyncFiles"></a> |
162 does not exist. Upon return, the current directory of the server |
157 <h4>FtpSyncHandler.__checkSyncFiles</h4> |
163 is the sync directory. |
158 <b>__checkSyncFiles</b>(<i>info</i>) |
164 </p><a NAME="FtpSyncHandler.__connectAndLogin" ID="FtpSyncHandler.__connectAndLogin"></a> |
159 <p> |
165 <h4>FtpSyncHandler.__connectAndLogin</h4> |
160 Private slot called for each entry sent by the FTP list command. |
166 <b>__connectAndLogin</b>(<i></i>) |
161 </p><dl> |
167 <p> |
162 <dt><i>info</i></dt> |
168 Private method to connect to the FTP server and log in. |
163 <dd> |
169 </p><dl> |
164 info about the entry (QUrlInfo) |
170 <dt>Returns:</dt> |
165 </dd> |
171 <dd> |
166 </dl><a NAME="FtpSyncHandler.__commandFinished" ID="FtpSyncHandler.__commandFinished"></a> |
172 flag indicating a successful log in (boolean) |
167 <h4>FtpSyncHandler.__commandFinished</h4> |
173 </dd> |
168 <b>__commandFinished</b>(<i>id, error</i>) |
174 </dl><a NAME="FtpSyncHandler.__dirListCallback" ID="FtpSyncHandler.__dirListCallback"></a> |
169 <p> |
175 <h4>FtpSyncHandler.__dirListCallback</h4> |
170 Private slot handling the end of a command. |
176 <b>__dirListCallback</b>(<i>line</i>) |
171 </p><dl> |
177 <p> |
172 <dt><i>id</i></dt> |
178 Private slot handling the receipt of directory listing lines. |
173 <dd> |
179 </p><dl> |
174 id of the finished command (integer) |
180 <dt><i>line</i></dt> |
175 </dd><dt><i>error</i></dt> |
181 <dd> |
176 <dd> |
182 the received line of the directory listing (string) |
177 flag indicating an error situation (boolean) |
183 </dd> |
|
184 </dl><a NAME="FtpSyncHandler.__doFtpCommands" ID="FtpSyncHandler.__doFtpCommands"></a> |
|
185 <h4>FtpSyncHandler.__doFtpCommands</h4> |
|
186 <b>__doFtpCommands</b>(<i></i>) |
|
187 <p> |
|
188 Private slot executing the sequence of FTP commands. |
|
189 </p><a NAME="FtpSyncHandler.__doFtpLogin" ID="FtpSyncHandler.__doFtpLogin"></a> |
|
190 <h4>FtpSyncHandler.__doFtpLogin</h4> |
|
191 <b>__doFtpLogin</b>(<i>username, password</i>) |
|
192 <p> |
|
193 Private method to do the FTP login with asking for a username and password, |
|
194 if the login fails with an error 530. |
|
195 </p><dl> |
|
196 <dt><i>username</i></dt> |
|
197 <dd> |
|
198 user name to use for the login (string) |
|
199 </dd><dt><i>password</i></dt> |
|
200 <dd> |
|
201 password to use for the login (string) |
|
202 </dd> |
|
203 </dl><dl> |
|
204 <dt>Returns:</dt> |
|
205 <dd> |
|
206 tuple of two flags indicating a successful login and |
|
207 if the login should be retried (boolean, boolean) |
178 </dd> |
208 </dd> |
179 </dl><a NAME="FtpSyncHandler.__downloadFile" ID="FtpSyncHandler.__downloadFile"></a> |
209 </dl><a NAME="FtpSyncHandler.__downloadFile" ID="FtpSyncHandler.__downloadFile"></a> |
180 <h4>FtpSyncHandler.__downloadFile</h4> |
210 <h4>FtpSyncHandler.__downloadFile</h4> |
181 <b>__downloadFile</b>(<i>type_, fileName, timestamp</i>) |
211 <b>__downloadFile</b>(<i>type_, fileName, timestamp</i>) |
182 <p> |
212 <p> |
190 <dd> |
220 <dd> |
191 name of the file to be downloaded (string) |
221 name of the file to be downloaded (string) |
192 </dd><dt><i>timestamp</i></dt> |
222 </dd><dt><i>timestamp</i></dt> |
193 <dd> |
223 <dd> |
194 time stamp in seconds of the file to be downloaded (int) |
224 time stamp in seconds of the file to be downloaded (int) |
|
225 </dd> |
|
226 </dl><a NAME="FtpSyncHandler.__downloadFileCallback" ID="FtpSyncHandler.__downloadFileCallback"></a> |
|
227 <h4>FtpSyncHandler.__downloadFileCallback</h4> |
|
228 <b>__downloadFileCallback</b>(<i>buffer, data</i>) |
|
229 <p> |
|
230 Private method receiving the downloaded data. |
|
231 </p><dl> |
|
232 <dt><i>buffer</i></dt> |
|
233 <dd> |
|
234 reference to the buffer (io.BytesIO) |
|
235 </dd><dt><i>data</i></dt> |
|
236 <dd> |
|
237 byte string to store in the buffer (bytes) |
|
238 </dd> |
|
239 </dl><dl> |
|
240 <dt>Returns:</dt> |
|
241 <dd> |
|
242 number of bytes written to the buffer (integer) |
195 </dd> |
243 </dd> |
196 </dl><a NAME="FtpSyncHandler.__idleTimeout" ID="FtpSyncHandler.__idleTimeout"></a> |
244 </dl><a NAME="FtpSyncHandler.__idleTimeout" ID="FtpSyncHandler.__idleTimeout"></a> |
197 <h4>FtpSyncHandler.__idleTimeout</h4> |
245 <h4>FtpSyncHandler.__idleTimeout</h4> |
198 <b>__idleTimeout</b>(<i></i>) |
246 <b>__idleTimeout</b>(<i></i>) |
199 <p> |
247 <p> |
215 of "bookmarks", "history", "passwords", "useragents" or "speeddial") |
263 of "bookmarks", "history", "passwords", "useragents" or "speeddial") |
216 </dd><dt><i>fileName</i></dt> |
264 </dd><dt><i>fileName</i></dt> |
217 <dd> |
265 <dd> |
218 name of the file to be synchronized (string) |
266 name of the file to be synchronized (string) |
219 </dd> |
267 </dd> |
220 </dl><a NAME="FtpSyncHandler.__storeReached" ID="FtpSyncHandler.__storeReached"></a> |
268 </dl><a NAME="FtpSyncHandler.__syncFile" ID="FtpSyncHandler.__syncFile"></a> |
221 <h4>FtpSyncHandler.__storeReached</h4> |
|
222 <b>__storeReached</b>(<i></i>) |
|
223 <p> |
|
224 Private slot executed, when the storage directory was reached. |
|
225 </p><a NAME="FtpSyncHandler.__syncFile" ID="FtpSyncHandler.__syncFile"></a> |
|
226 <h4>FtpSyncHandler.__syncFile</h4> |
269 <h4>FtpSyncHandler.__syncFile</h4> |
227 <b>__syncFile</b>(<i>type_, fileName</i>) |
270 <b>__syncFile</b>(<i>type_, fileName</i>) |
228 <p> |
271 <p> |
229 Private method to synchronize the given file. |
272 Private method to synchronize the given file. |
230 </p><dl> |
273 </p><dl> |