eric6/Documentation/Source/eric6.WebBrowser.Sync.SyncHandler.html

changeset 7273
391d6b7b1eff
parent 6942
2602857055c5
child 7900
72b88fb20261
equal deleted inserted replaced
7272:1779dc278077 7273:391d6b7b1eff
16 16
17 a { color: #BA6D36; } 17 a { color: #BA6D36; }
18 18
19 </style> 19 </style>
20 </head> 20 </head>
21 <body><a NAME="top" ID="top"></a> 21 <body>
22 <a NAME="top" ID="top"></a>
22 <h1>eric6.WebBrowser.Sync.SyncHandler</h1> 23 <h1>eric6.WebBrowser.Sync.SyncHandler</h1>
24
23 <p> 25 <p>
24 Module containing a base class for synchronization handlers. 26 Module containing a base class for synchronization handlers.
25 </p> 27 </p>
26 <h3>Global Attributes</h3> 28 <h3>Global Attributes</h3>
29
27 <table> 30 <table>
28 <tr><td>None</td></tr> 31 <tr><td>None</td></tr>
29 </table> 32 </table>
30 <h3>Classes</h3> 33 <h3>Classes</h3>
31 <table> 34
35 <table>
36
32 <tr> 37 <tr>
33 <td><a href="#SyncHandler">SyncHandler</a></td> 38 <td><a href="#SyncHandler">SyncHandler</a></td>
34 <td>Base class for synchronization handlers.</td> 39 <td>Base class for synchronization handlers.</td>
35 </tr> 40 </tr>
36 </table> 41 </table>
37 <h3>Functions</h3> 42 <h3>Functions</h3>
38 <table> 43
39 <tr><td>None</td></tr> 44 <table>
40 </table> 45 <tr><td>None</td></tr>
41 <hr /><hr /> 46 </table>
47 <hr />
48 <hr />
42 <a NAME="SyncHandler" ID="SyncHandler"></a> 49 <a NAME="SyncHandler" ID="SyncHandler"></a>
43 <h2>SyncHandler</h2> 50 <h2>SyncHandler</h2>
51
44 <p> 52 <p>
45 Base class for synchronization handlers. 53 Base class for synchronization handlers.
46 </p><h3>Signals</h3> 54 </p>
47 <dl> 55 <h3>Signals</h3>
56 <dl>
57
48 <dt>syncError(message)</dt> 58 <dt>syncError(message)</dt>
49 <dd> 59 <dd>
50 emitted for a general error with the error 60 emitted for a general error with the error
51 message (string) 61 message (string)
52 </dd><dt>syncFinished(type_, done, download)</dt> 62 </dd>
63 <dt>syncFinished(type_, done, download)</dt>
53 <dd> 64 <dd>
54 emitted after a 65 emitted after a
55 synchronization has finished (string one of "bookmarks", "history", 66 synchronization has finished (string one of "bookmarks", "history",
56 "passwords", "useragents" or "speeddial", boolean, boolean) 67 "passwords", "useragents" or "speeddial", boolean, boolean)
57 </dd><dt>syncMessage(message)</dt> 68 </dd>
69 <dt>syncMessage(message)</dt>
58 <dd> 70 <dd>
59 emitted to send a message about 71 emitted to send a message about
60 synchronization (string) 72 synchronization (string)
61 </dd><dt>syncStatus(type_, message)</dt> 73 </dd>
74 <dt>syncStatus(type_, message)</dt>
62 <dd> 75 <dd>
63 emitted to indicate the synchronization 76 emitted to indicate the synchronization
64 status (string one of "bookmarks", "history", "passwords", 77 status (string one of "bookmarks", "history", "passwords",
65 "useragents" or "speeddial", string) 78 "useragents" or "speeddial", string)
66 </dd> 79 </dd>
67 </dl> 80 </dl>
68 <h3>Derived from</h3> 81 <h3>Derived from</h3>
69 QObject 82 QObject
70 <h3>Class Attributes</h3> 83 <h3>Class Attributes</h3>
84
71 <table> 85 <table>
72 <tr><td>None</td></tr> 86 <tr><td>None</td></tr>
73 </table> 87 </table>
74 <h3>Class Methods</h3> 88 <h3>Class Methods</h3>
89
75 <table> 90 <table>
76 <tr><td>None</td></tr> 91 <tr><td>None</td></tr>
77 </table> 92 </table>
78 <h3>Methods</h3> 93 <h3>Methods</h3>
79 <table> 94
95 <table>
96
80 <tr> 97 <tr>
81 <td><a href="#SyncHandler.__init__">SyncHandler</a></td> 98 <td><a href="#SyncHandler.__init__">SyncHandler</a></td>
82 <td>Constructor</td> 99 <td>Constructor</td>
83 </tr><tr> 100 </tr>
101 <tr>
84 <td><a href="#SyncHandler.initialLoadAndCheck">initialLoadAndCheck</a></td> 102 <td><a href="#SyncHandler.initialLoadAndCheck">initialLoadAndCheck</a></td>
85 <td>Public method to do the initial check.</td> 103 <td>Public method to do the initial check.</td>
86 </tr><tr> 104 </tr>
105 <tr>
87 <td><a href="#SyncHandler.readFile">readFile</a></td> 106 <td><a href="#SyncHandler.readFile">readFile</a></td>
88 <td>Public method to read a file.</td> 107 <td>Public method to read a file.</td>
89 </tr><tr> 108 </tr>
109 <tr>
90 <td><a href="#SyncHandler.shutdown">shutdown</a></td> 110 <td><a href="#SyncHandler.shutdown">shutdown</a></td>
91 <td>Public method to shut down the handler.</td> 111 <td>Public method to shut down the handler.</td>
92 </tr><tr> 112 </tr>
113 <tr>
93 <td><a href="#SyncHandler.syncBookmarks">syncBookmarks</a></td> 114 <td><a href="#SyncHandler.syncBookmarks">syncBookmarks</a></td>
94 <td>Public method to synchronize the bookmarks.</td> 115 <td>Public method to synchronize the bookmarks.</td>
95 </tr><tr> 116 </tr>
117 <tr>
96 <td><a href="#SyncHandler.syncHistory">syncHistory</a></td> 118 <td><a href="#SyncHandler.syncHistory">syncHistory</a></td>
97 <td>Public method to synchronize the history.</td> 119 <td>Public method to synchronize the history.</td>
98 </tr><tr> 120 </tr>
121 <tr>
99 <td><a href="#SyncHandler.syncPasswords">syncPasswords</a></td> 122 <td><a href="#SyncHandler.syncPasswords">syncPasswords</a></td>
100 <td>Public method to synchronize the passwords.</td> 123 <td>Public method to synchronize the passwords.</td>
101 </tr><tr> 124 </tr>
125 <tr>
102 <td><a href="#SyncHandler.syncSpeedDial">syncSpeedDial</a></td> 126 <td><a href="#SyncHandler.syncSpeedDial">syncSpeedDial</a></td>
103 <td>Public method to synchronize the speed dial data.</td> 127 <td>Public method to synchronize the speed dial data.</td>
104 </tr><tr> 128 </tr>
129 <tr>
105 <td><a href="#SyncHandler.syncUserAgents">syncUserAgents</a></td> 130 <td><a href="#SyncHandler.syncUserAgents">syncUserAgents</a></td>
106 <td>Public method to synchronize the user agents.</td> 131 <td>Public method to synchronize the user agents.</td>
107 </tr><tr> 132 </tr>
133 <tr>
108 <td><a href="#SyncHandler.writeFile">writeFile</a></td> 134 <td><a href="#SyncHandler.writeFile">writeFile</a></td>
109 <td>Public method to write the data to a file.</td> 135 <td>Public method to write the data to a file.</td>
110 </tr> 136 </tr>
111 </table> 137 </table>
112 <h3>Static Methods</h3> 138 <h3>Static Methods</h3>
113 <table> 139
114 <tr><td>None</td></tr> 140 <table>
115 </table> 141 <tr><td>None</td></tr>
142 </table>
143
116 <a NAME="SyncHandler.__init__" ID="SyncHandler.__init__"></a> 144 <a NAME="SyncHandler.__init__" ID="SyncHandler.__init__"></a>
117 <h4>SyncHandler (Constructor)</h4> 145 <h4>SyncHandler (Constructor)</h4>
118 <b>SyncHandler</b>(<i>parent=None</i>) 146 <b>SyncHandler</b>(<i>parent=None</i>)
147
119 <p> 148 <p>
120 Constructor 149 Constructor
121 </p><dl> 150 </p>
151 <dl>
152
122 <dt><i>parent</i></dt> 153 <dt><i>parent</i></dt>
123 <dd> 154 <dd>
124 reference to the parent object (QObject) 155 reference to the parent object (QObject)
125 </dd> 156 </dd>
126 </dl><a NAME="SyncHandler.initialLoadAndCheck" ID="SyncHandler.initialLoadAndCheck"></a> 157 </dl>
158 <a NAME="SyncHandler.initialLoadAndCheck" ID="SyncHandler.initialLoadAndCheck"></a>
127 <h4>SyncHandler.initialLoadAndCheck</h4> 159 <h4>SyncHandler.initialLoadAndCheck</h4>
128 <b>initialLoadAndCheck</b>(<i>forceUpload</i>) 160 <b>initialLoadAndCheck</b>(<i>forceUpload</i>)
161
129 <p> 162 <p>
130 Public method to do the initial check. 163 Public method to do the initial check.
131 </p><dl> 164 </p>
165 <dl>
166
132 <dt><i>forceUpload=</i></dt> 167 <dt><i>forceUpload=</i></dt>
133 <dd> 168 <dd>
134 flag indicating a forced upload of the files 169 flag indicating a forced upload of the files
135 (boolean) 170 (boolean)
136 </dd> 171 </dd>
137 </dl><dl> 172 </dl>
138 <dt>Raises <b>NotImplementedError</b>:</dt> 173 <dl>
139 <dd> 174
140 raised to indicate that this method 175 <dt>Raises <b>NotImplementedError</b>:</dt>
141 must be implemented by subclasses 176 <dd>
142 </dd> 177 raised to indicate that this method
143 </dl><a NAME="SyncHandler.readFile" ID="SyncHandler.readFile"></a> 178 must be implemented by subclasses
179 </dd>
180 </dl>
181 <a NAME="SyncHandler.readFile" ID="SyncHandler.readFile"></a>
144 <h4>SyncHandler.readFile</h4> 182 <h4>SyncHandler.readFile</h4>
145 <b>readFile</b>(<i>fileName, type_</i>) 183 <b>readFile</b>(<i>fileName, type_</i>)
184
146 <p> 185 <p>
147 Public method to read a file. 186 Public method to read a file.
148 </p><p> 187 </p>
188 <p>
149 If encrypted synchronization is enabled, the data will be encrypted 189 If encrypted synchronization is enabled, the data will be encrypted
150 using the relevant encryption key. 190 using the relevant encryption key.
151 </p><dl> 191 </p>
192 <dl>
193
152 <dt><i>fileName</i></dt> 194 <dt><i>fileName</i></dt>
153 <dd> 195 <dd>
154 name of the file to be read (string) 196 name of the file to be read (string)
155 </dd><dt><i>type_</i></dt> 197 </dd>
198 <dt><i>type_</i></dt>
156 <dd> 199 <dd>
157 type of the synchronization event (string one 200 type of the synchronization event (string one
158 of "bookmarks", "history", "passwords", "useragents" or 201 of "bookmarks", "history", "passwords", "useragents" or
159 "speeddial") 202 "speeddial")
160 </dd> 203 </dd>
161 </dl><dl> 204 </dl>
205 <dl>
162 <dt>Returns:</dt> 206 <dt>Returns:</dt>
163 <dd> 207 <dd>
164 data of the file, optionally encrypted (QByteArray) 208 data of the file, optionally encrypted (QByteArray)
165 </dd> 209 </dd>
166 </dl><a NAME="SyncHandler.shutdown" ID="SyncHandler.shutdown"></a> 210 </dl>
211 <a NAME="SyncHandler.shutdown" ID="SyncHandler.shutdown"></a>
167 <h4>SyncHandler.shutdown</h4> 212 <h4>SyncHandler.shutdown</h4>
168 <b>shutdown</b>(<i></i>) 213 <b>shutdown</b>(<i></i>)
214
169 <p> 215 <p>
170 Public method to shut down the handler. 216 Public method to shut down the handler.
171 </p><dl> 217 </p>
172 <dt>Raises <b>NotImplementedError</b>:</dt> 218 <dl>
173 <dd> 219
174 raised to indicate that this method 220 <dt>Raises <b>NotImplementedError</b>:</dt>
175 must be implemented by subclasses 221 <dd>
176 </dd> 222 raised to indicate that this method
177 </dl><a NAME="SyncHandler.syncBookmarks" ID="SyncHandler.syncBookmarks"></a> 223 must be implemented by subclasses
224 </dd>
225 </dl>
226 <a NAME="SyncHandler.syncBookmarks" ID="SyncHandler.syncBookmarks"></a>
178 <h4>SyncHandler.syncBookmarks</h4> 227 <h4>SyncHandler.syncBookmarks</h4>
179 <b>syncBookmarks</b>(<i></i>) 228 <b>syncBookmarks</b>(<i></i>)
229
180 <p> 230 <p>
181 Public method to synchronize the bookmarks. 231 Public method to synchronize the bookmarks.
182 </p><dl> 232 </p>
183 <dt>Raises <b>NotImplementedError</b>:</dt> 233 <dl>
184 <dd> 234
185 raised to indicate that this method 235 <dt>Raises <b>NotImplementedError</b>:</dt>
186 must be implemented by subclasses 236 <dd>
187 </dd> 237 raised to indicate that this method
188 </dl><a NAME="SyncHandler.syncHistory" ID="SyncHandler.syncHistory"></a> 238 must be implemented by subclasses
239 </dd>
240 </dl>
241 <a NAME="SyncHandler.syncHistory" ID="SyncHandler.syncHistory"></a>
189 <h4>SyncHandler.syncHistory</h4> 242 <h4>SyncHandler.syncHistory</h4>
190 <b>syncHistory</b>(<i></i>) 243 <b>syncHistory</b>(<i></i>)
244
191 <p> 245 <p>
192 Public method to synchronize the history. 246 Public method to synchronize the history.
193 </p><dl> 247 </p>
194 <dt>Raises <b>NotImplementedError</b>:</dt> 248 <dl>
195 <dd> 249
196 raised to indicate that this method 250 <dt>Raises <b>NotImplementedError</b>:</dt>
197 must be implemented by subclasses 251 <dd>
198 </dd> 252 raised to indicate that this method
199 </dl><a NAME="SyncHandler.syncPasswords" ID="SyncHandler.syncPasswords"></a> 253 must be implemented by subclasses
254 </dd>
255 </dl>
256 <a NAME="SyncHandler.syncPasswords" ID="SyncHandler.syncPasswords"></a>
200 <h4>SyncHandler.syncPasswords</h4> 257 <h4>SyncHandler.syncPasswords</h4>
201 <b>syncPasswords</b>(<i></i>) 258 <b>syncPasswords</b>(<i></i>)
259
202 <p> 260 <p>
203 Public method to synchronize the passwords. 261 Public method to synchronize the passwords.
204 </p><dl> 262 </p>
205 <dt>Raises <b>NotImplementedError</b>:</dt> 263 <dl>
206 <dd> 264
207 raised to indicate that this method 265 <dt>Raises <b>NotImplementedError</b>:</dt>
208 must be implemented by subclasses 266 <dd>
209 </dd> 267 raised to indicate that this method
210 </dl><a NAME="SyncHandler.syncSpeedDial" ID="SyncHandler.syncSpeedDial"></a> 268 must be implemented by subclasses
269 </dd>
270 </dl>
271 <a NAME="SyncHandler.syncSpeedDial" ID="SyncHandler.syncSpeedDial"></a>
211 <h4>SyncHandler.syncSpeedDial</h4> 272 <h4>SyncHandler.syncSpeedDial</h4>
212 <b>syncSpeedDial</b>(<i></i>) 273 <b>syncSpeedDial</b>(<i></i>)
274
213 <p> 275 <p>
214 Public method to synchronize the speed dial data. 276 Public method to synchronize the speed dial data.
215 </p><dl> 277 </p>
216 <dt>Raises <b>NotImplementedError</b>:</dt> 278 <dl>
217 <dd> 279
218 raised to indicate that this method 280 <dt>Raises <b>NotImplementedError</b>:</dt>
219 must be implemented by subclasses 281 <dd>
220 </dd> 282 raised to indicate that this method
221 </dl><a NAME="SyncHandler.syncUserAgents" ID="SyncHandler.syncUserAgents"></a> 283 must be implemented by subclasses
284 </dd>
285 </dl>
286 <a NAME="SyncHandler.syncUserAgents" ID="SyncHandler.syncUserAgents"></a>
222 <h4>SyncHandler.syncUserAgents</h4> 287 <h4>SyncHandler.syncUserAgents</h4>
223 <b>syncUserAgents</b>(<i></i>) 288 <b>syncUserAgents</b>(<i></i>)
289
224 <p> 290 <p>
225 Public method to synchronize the user agents. 291 Public method to synchronize the user agents.
226 </p><dl> 292 </p>
227 <dt>Raises <b>NotImplementedError</b>:</dt> 293 <dl>
228 <dd> 294
229 raised to indicate that this method 295 <dt>Raises <b>NotImplementedError</b>:</dt>
230 must be implemented by subclasses 296 <dd>
231 </dd> 297 raised to indicate that this method
232 </dl><a NAME="SyncHandler.writeFile" ID="SyncHandler.writeFile"></a> 298 must be implemented by subclasses
299 </dd>
300 </dl>
301 <a NAME="SyncHandler.writeFile" ID="SyncHandler.writeFile"></a>
233 <h4>SyncHandler.writeFile</h4> 302 <h4>SyncHandler.writeFile</h4>
234 <b>writeFile</b>(<i>data, fileName, type_, timestamp=0</i>) 303 <b>writeFile</b>(<i>data, fileName, type_, timestamp=0</i>)
304
235 <p> 305 <p>
236 Public method to write the data to a file. 306 Public method to write the data to a file.
237 </p><p> 307 </p>
308 <p>
238 If encrypted synchronization is enabled, the data will be decrypted 309 If encrypted synchronization is enabled, the data will be decrypted
239 using the relevant encryption key. 310 using the relevant encryption key.
240 </p><dl> 311 </p>
312 <dl>
313
241 <dt><i>data</i></dt> 314 <dt><i>data</i></dt>
242 <dd> 315 <dd>
243 data to be written and optionally decrypted (QByteArray) 316 data to be written and optionally decrypted (QByteArray)
244 </dd><dt><i>fileName</i></dt> 317 </dd>
318 <dt><i>fileName</i></dt>
245 <dd> 319 <dd>
246 name of the file the data is to be written to (string) 320 name of the file the data is to be written to (string)
247 </dd><dt><i>type_</i></dt> 321 </dd>
322 <dt><i>type_</i></dt>
248 <dd> 323 <dd>
249 type of the synchronization event (string one 324 type of the synchronization event (string one
250 of "bookmarks", "history", "passwords", "useragents" or 325 of "bookmarks", "history", "passwords", "useragents" or
251 "speeddial") 326 "speeddial")
252 </dd><dt><i>timestamp</i></dt> 327 </dd>
328 <dt><i>timestamp</i></dt>
253 <dd> 329 <dd>
254 timestamp to be given to the file (int) 330 timestamp to be given to the file (int)
255 </dd> 331 </dd>
256 </dl><dl> 332 </dl>
333 <dl>
257 <dt>Returns:</dt> 334 <dt>Returns:</dt>
258 <dd> 335 <dd>
259 tuple giving a success flag and an error string (boolean, 336 tuple giving a success flag and an error string (boolean,
260 string) 337 string)
261 </dd> 338 </dd>

eric ide

mercurial