Changeset View
Changeset View
Standalone View
Standalone View
src/api/KWallet/kwallet.h
Show First 20 Lines • Show All 321 Lines • ▼ Show 20 Line(s) | 77 | public: | |||
---|---|---|---|---|---|
322 | * @param key The key of the entry to read. | 322 | * @param key The key of the entry to read. | ||
323 | * @param value A password buffer to fill with the value. | 323 | * @param value A password buffer to fill with the value. | ||
324 | * @return Returns 0 on success, non-zero on error. Will | 324 | * @return Returns 0 on success, non-zero on error. Will | ||
325 | * return an error if the key was not originally | 325 | * return an error if the key was not originally | ||
326 | * written as a password. | 326 | * written as a password. | ||
327 | */ | 327 | */ | ||
328 | virtual int readPassword(const QString &key, QString &value); | 328 | virtual int readPassword(const QString &key, QString &value); | ||
329 | 329 | | |||
330 | #if KWALLET_ENABLE_DEPRECATED_SINCE(5, 70) | ||||
330 | /** | 331 | /** | ||
331 | * Read the entries matching @p key from the current folder. | 332 | * Read the entries matching @p key from the current folder. | ||
332 | * The entry format is unknown except that it is either a | 333 | * The entry format is unknown except that it is either a | ||
333 | * QByteArray or a QDataStream, which effectively means that | 334 | * QByteArray or a QDataStream, which effectively means that | ||
334 | * it is anything. | 335 | * it is anything. | ||
335 | * @param key The key of the entry to read. Wildcards | 336 | * @param key The key of the entry to read. Wildcards | ||
336 | * are supported. | 337 | * are supported. | ||
337 | * @param value A buffer to fill with the value. The key in | 338 | * @param value A buffer to fill with the value. The key in | ||
338 | * the map is the entry key. | 339 | * the map is the entry key. | ||
339 | * @return Returns 0 on success, non-zero on error. | 340 | * @return Returns 0 on success, non-zero on error. | ||
341 | * | ||||
342 | * @deprecated Since 5.70, use entriesList() | ||||
340 | */ | 343 | */ | ||
341 | int readEntryList(const QString &key, QMap<QString, QByteArray> &value); | 344 | int readEntryList(const QString &key, QMap<QString, QByteArray> &value); | ||
342 | 345 | | |||
343 | /** | 346 | /** | ||
344 | * Read the map entry @p key from the current folder. | 347 | * Read the map entry @p key from the current folder. | ||
345 | * @param key The key of the entry to read. Wildcards | 348 | * @param key The key of the entry to read. Wildcards | ||
346 | * are supported. | 349 | * are supported. | ||
347 | * @param value A buffer to fill with the value. The key in | 350 | * @param value A buffer to fill with the value. The key in | ||
348 | * the map is the entry key. | 351 | * the map is the entry key. | ||
349 | * @return Returns 0 on success, non-zero on error. Will | 352 | * @return Returns 0 on success, non-zero on error. Will | ||
350 | * return an error if the key was not originally | 353 | * return an error if the key was not originally | ||
351 | * written as a map. | 354 | * written as a map. | ||
355 | * | ||||
356 | * @deprecated Since 5.70, use mapList() | ||||
352 | */ | 357 | */ | ||
353 | int readMapList(const QString &key, QMap<QString, QMap<QString, QString> > &value); | 358 | int readMapList(const QString &key, QMap<QString, QMap<QString, QString> > &value); | ||
354 | 359 | | |||
355 | /** | 360 | /** | ||
356 | * Read the password entry @p key from the current folder. | 361 | * Read the password entry @p key from the current folder. | ||
357 | * @param key The key of the entry to read. Wildcards | 362 | * @param key The key of the entry to read. Wildcards | ||
358 | * are supported. | 363 | * are supported. | ||
359 | * @param value A buffer to fill with the value. The key in | 364 | * @param value A buffer to fill with the value. The key in | ||
360 | * the map is the entry key. | 365 | * the map is the entry key. | ||
361 | * @return Returns 0 on success, non-zero on error. Will | 366 | * @return Returns 0 on success, non-zero on error. Will | ||
362 | * return an error if the key was not originally | 367 | * return an error if the key was not originally | ||
363 | * written as a password. | 368 | * written as a password. | ||
369 | * | ||||
370 | * @deprecated Since 5.70, use passwordList() | ||||
364 | */ | 371 | */ | ||
365 | int readPasswordList(const QString &key, QMap<QString, QString> &value); | 372 | int readPasswordList(const QString &key, QMap<QString, QString> &value); | ||
373 | #endif | ||||
374 | | ||||
375 | /** | ||||
376 | * Get a list of all the entries in the current folder. The entry | ||||
377 | * format is unknown except that it is either a QByteArray or a | ||||
378 | * QDataStream, which effectively means that it could be anything. | ||||
379 | * | ||||
380 | * @param value A buffer to fill with the value. The key in the map | ||||
381 | * is the entry key. | ||||
382 | * @return Returns 0 on success, non-zero on error. | ||||
dfaure: Are there documented error codes somewhere? Otherwise a bool would do be more readable, no? | |||||
383 | * | ||||
384 | * @since 5.70 | ||||
385 | */ | ||||
386 | int entriesList(QMap<QString, QByteArray> &value); | ||||
387 | | ||||
388 | /** | ||||
389 | * Get a list of all the maps in the current folder. | ||||
390 | * @param value A buffer to fill with the value. The key in the | ||||
391 | * map is the entry key. | ||||
392 | * @return Returns 0 on success, non-zero on error. Will return an | ||||
393 | * error if any of the keys was not originally written as | ||||
394 | * a map. | ||||
395 | * | ||||
396 | * @since 5.70 | ||||
397 | */ | ||||
398 | int mapList(QMap<QString, QMap<QString, QString> > &value); | ||||
399 | | ||||
400 | /** | ||||
401 | * Get a list of all the passwords in the current folder, which can | ||||
402 | * be used to populate a list view in a password manager. | ||||
403 | * @param value A buffer to fill with the value. The key in the | ||||
404 | * map is the entry key. | ||||
405 | * @return Returns 0 on success, non-zero on error. Will return an | ||||
406 | * error if any of the keys was not originally written as a | ||||
407 | * password. | ||||
408 | * | ||||
409 | * @since 5.70 | ||||
410 | */ | ||||
411 | int passwordList(QMap<QString, QString> &value); | ||||
366 | 412 | | |||
367 | /** | 413 | /** | ||
368 | * Write @p key = @p value as a binary entry to the current | 414 | * Write @p key = @p value as a binary entry to the current | ||
369 | * folder. Be careful with this, it could cause inconsistency | 415 | * folder. Be careful with this, it could cause inconsistency | ||
370 | * in the future since you can put an arbitrary entry type in | 416 | * in the future since you can put an arbitrary entry type in | ||
371 | * place. | 417 | * place. | ||
372 | * @param key The key of the new entry. | 418 | * @param key The key of the new entry. | ||
373 | * @param value The value of the entry. | 419 | * @param value The value of the entry. | ||
▲ Show 20 Lines • Show All 186 Lines • Show Last 20 Lines |
Are there documented error codes somewhere? Otherwise a bool would do be more readable, no?
But then if we don't have error codes, wouldn't
be better?