45 Base class for synchronization handlers. |
45 Base class for synchronization handlers. |
46 </p><h3>Signals</h3> |
46 </p><h3>Signals</h3> |
47 <dl> |
47 <dl> |
48 <dt>syncError(message)</dt> |
48 <dt>syncError(message)</dt> |
49 <dd> |
49 <dd> |
50 emitted for a general error with the error message (string) |
50 emitted for a general error with the error |
|
51 message (string) |
51 </dd><dt>syncFinished(type_, done, download)</dt> |
52 </dd><dt>syncFinished(type_, done, download)</dt> |
52 <dd> |
53 <dd> |
53 emitted after a synchronization has |
54 emitted after a |
54 finished (string one of "bookmarks", "history", "passwords", "useragents" or |
55 synchronization has finished (string one of "bookmarks", "history", |
55 "speeddial", boolean, boolean) |
56 "passwords", "useragents" or "speeddial", boolean, boolean) |
56 </dd><dt>syncMessage(message)</dt> |
57 </dd><dt>syncMessage(message)</dt> |
57 <dd> |
58 <dd> |
58 emitted to send a message about synchronization (string) |
59 emitted to send a message about |
|
60 synchronization (string) |
59 </dd><dt>syncStatus(type_, message)</dt> |
61 </dd><dt>syncStatus(type_, message)</dt> |
60 <dd> |
62 <dd> |
61 emitted to indicate the synchronization |
63 emitted to indicate the synchronization |
62 status (string one of "bookmarks", "history", "passwords", "useragents" or |
64 status (string one of "bookmarks", "history", "passwords", |
63 "speeddial", string) |
65 "useragents" or "speeddial", string) |
64 </dd> |
66 </dd> |
65 </dl> |
67 </dl> |
66 <h3>Derived from</h3> |
68 <h3>Derived from</h3> |
67 QObject |
69 QObject |
68 <h3>Class Attributes</h3> |
70 <h3>Class Attributes</h3> |
127 <p> |
129 <p> |
128 Public method to do the initial check. |
130 Public method to do the initial check. |
129 </p><dl> |
131 </p><dl> |
130 <dt><i>forceUpload=</i></dt> |
132 <dt><i>forceUpload=</i></dt> |
131 <dd> |
133 <dd> |
132 flag indicating a forced upload of the files (boolean) |
134 flag indicating a forced upload of the files |
|
135 (boolean) |
133 </dd> |
136 </dd> |
134 </dl><dl> |
137 </dl><dl> |
135 <dt>Raises <b>NotImplementedError</b>:</dt> |
138 <dt>Raises <b>NotImplementedError</b>:</dt> |
136 <dd> |
139 <dd> |
137 raised to indicate that this method |
140 raised to indicate that this method |
141 <h4>SyncHandler.readFile</h4> |
144 <h4>SyncHandler.readFile</h4> |
142 <b>readFile</b>(<i>fileName, type_</i>) |
145 <b>readFile</b>(<i>fileName, type_</i>) |
143 <p> |
146 <p> |
144 Public method to read a file. |
147 Public method to read a file. |
145 </p><p> |
148 </p><p> |
146 If encrypted synchronization is enabled, the data will be encrypted using |
149 If encrypted synchronization is enabled, the data will be encrypted |
147 the relevant encryption key. |
150 using the relevant encryption key. |
148 </p><dl> |
151 </p><dl> |
149 <dt><i>fileName</i></dt> |
152 <dt><i>fileName</i></dt> |
150 <dd> |
153 <dd> |
151 name of the file to be read (string) |
154 name of the file to be read (string) |
152 </dd><dt><i>type_</i></dt> |
155 </dd><dt><i>type_</i></dt> |
153 <dd> |
156 <dd> |
154 type of the synchronization event (string one |
157 type of the synchronization event (string one |
155 of "bookmarks", "history", "passwords", "useragents" or "speeddial") |
158 of "bookmarks", "history", "passwords", "useragents" or |
|
159 "speeddial") |
156 </dd> |
160 </dd> |
157 </dl><dl> |
161 </dl><dl> |
158 <dt>Returns:</dt> |
162 <dt>Returns:</dt> |
159 <dd> |
163 <dd> |
160 data of the file, optionally encrypted (QByteArray) |
164 data of the file, optionally encrypted (QByteArray) |
229 <h4>SyncHandler.writeFile</h4> |
233 <h4>SyncHandler.writeFile</h4> |
230 <b>writeFile</b>(<i>data, fileName, type_, timestamp=0</i>) |
234 <b>writeFile</b>(<i>data, fileName, type_, timestamp=0</i>) |
231 <p> |
235 <p> |
232 Public method to write the data to a file. |
236 Public method to write the data to a file. |
233 </p><p> |
237 </p><p> |
234 If encrypted synchronization is enabled, the data will be decrypted using |
238 If encrypted synchronization is enabled, the data will be decrypted |
235 the relevant encryption key. |
239 using the relevant encryption key. |
236 </p><dl> |
240 </p><dl> |
237 <dt><i>data</i></dt> |
241 <dt><i>data</i></dt> |
238 <dd> |
242 <dd> |
239 data to be written and optionally decrypted (QByteArray) |
243 data to be written and optionally decrypted (QByteArray) |
240 </dd><dt><i>fileName</i></dt> |
244 </dd><dt><i>fileName</i></dt> |
241 <dd> |
245 <dd> |
242 name of the file the data is to be written to (string) |
246 name of the file the data is to be written to (string) |
243 </dd><dt><i>type_</i></dt> |
247 </dd><dt><i>type_</i></dt> |
244 <dd> |
248 <dd> |
245 type of the synchronization event (string one |
249 type of the synchronization event (string one |
246 of "bookmarks", "history", "passwords", "useragents" or "speeddial") |
250 of "bookmarks", "history", "passwords", "useragents" or |
|
251 "speeddial") |
247 </dd><dt><i>timestamp</i></dt> |
252 </dd><dt><i>timestamp</i></dt> |
248 <dd> |
253 <dd> |
249 timestamp to be given to the file (int) |
254 timestamp to be given to the file (int) |
250 </dd> |
255 </dd> |
251 </dl><dl> |
256 </dl><dl> |
252 <dt>Returns:</dt> |
257 <dt>Returns:</dt> |
253 <dd> |
258 <dd> |
254 tuple giving a success flag and an error string (boolean, string) |
259 tuple giving a success flag and an error string (boolean, |
|
260 string) |
255 </dd> |
261 </dd> |
256 </dl> |
262 </dl> |
257 <div align="right"><a href="#top">Up</a></div> |
263 <div align="right"><a href="#top">Up</a></div> |
258 <hr /> |
264 <hr /> |
259 </body></html> |
265 </body></html> |