Find users for a specific shared notebook
| 450 | |
| 451 | //Find users for a specific shared notebook |
| 452 | qint32 SharedNotebookTable::getShareUsers(QStringList &users, qint32 lid) { |
| 453 | qint32 retval = 0; |
| 454 | users.clear(); |
| 455 | |
| 456 | NSqlQuery query(db); |
| 457 | db->lockForRead(); |
| 458 | query.prepare("Select data from DataStore where lid=:lid and key=:key"); |
| 459 | query.bindValue(":lid", lid); |
| 460 | query.bindValue(":key", SHAREDNOTEBOOK_USERNAME); |
| 461 | query.exec(); |
| 462 | while (query.next()) { |
| 463 | retval++; |
| 464 | users.append(query.value(0).toString()); |
| 465 | } |
| 466 | query.finish(); |
| 467 | db->unlock(); |
| 468 | return retval; |
| 469 | } |
| 470 | |
| 471 | |
| 472 | // Remove a shared notebook |
no test coverage detected