X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcore.h;h=0c6e88dc44937ab7aecdae0d66cfc52867556563;hb=eddadb820d74ad787a04c0652d15dfd1e8475082;hp=e991da30eac60ef4916d304d79a3b2cc73019de9;hpb=de1619ce11bf386490cdb38bc1be134a391eeaae;p=quassel.git diff --git a/src/core/core.h b/src/core/core.h index e991da30..0c6e88dc 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -79,6 +79,19 @@ class Core : public QObject { return instance()->storage->getUserSetting(userId, settingName, data); } + /* Identity handling */ + static inline IdentityId createIdentity(UserId user, CoreIdentity &identity) { + return instance()->storage->createIdentity(user, identity); + } + static bool updateIdentity(UserId user, const CoreIdentity &identity) { + return instance()->storage->updateIdentity(user, identity); + } + static void removeIdentity(UserId user, IdentityId identityId) { + instance()->storage->removeIdentity(user, identityId); + } + static QList identities(UserId user) { + return instance()->storage->identities(user); + } //! Create a Network in the Storage and store it's Id in the given NetworkInfo /** \note This method is thredsafe. @@ -232,13 +245,14 @@ class Core : public QObject { return instance()->storage->requestMsgs(user, bufferId, first, last, limit); } - //! Request all unread messages for all buffers - /** \param first Return messages with MsgId >= first + //! Request a certain number of messages across all buffers + /** \param first if != -1 return only messages with a MsgId >= first + * \param last if != -1 return only messages with a MsgId < last * \param limit Max amount of messages * \return The requested list of messages */ - static inline QList requestAllNewMsgs(UserId user, int first, int limit = -1) { - return instance()->storage->requestAllNewMsgs(user, first, limit); + static inline QList requestAllMsgs(UserId user, MsgId first = -1, MsgId last = -1, int limit = -1) { + return instance()->storage->requestAllMsgs(user, first, last, limit); } //! Request a list of all buffers known to a user.