projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
core: Remove slots from storage APIs
[quassel.git]
/
src
/
core
/
storage.h
diff --git
a/src/core/storage.h
b/src/core/storage.h
index
c14ba20
..
d5ece50
100644
(file)
--- a/
src/core/storage.h
+++ b/
src/core/storage.h
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-20
19
by the Quassel Project *
+ * Copyright (C) 2005-20
20
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-20,7
+20,8
@@
#pragma once
#pragma once
-#include <QList>
+#include <vector>
+
#include <QMap>
#include <QObject>
#include <QProcessEnvironment>
#include <QMap>
#include <QObject>
#include <QProcessEnvironment>
@@
-55,7
+56,6
@@
public:
};
};
-public slots:
/* General */
//! Check if the storage type is available.
/* General */
//! Check if the storage type is available.
@@
-199,7
+199,7
@@
public slots:
virtual IdentityId createIdentity(UserId user, CoreIdentity& identity) = 0;
virtual bool updateIdentity(UserId user, const CoreIdentity& identity) = 0;
virtual void removeIdentity(UserId user, IdentityId identityId) = 0;
virtual IdentityId createIdentity(UserId user, CoreIdentity& identity) = 0;
virtual bool updateIdentity(UserId user, const CoreIdentity& identity) = 0;
virtual void removeIdentity(UserId user, IdentityId identityId) = 0;
- virtual
QList
<CoreIdentity> identities(UserId user) = 0;
+ virtual
std::vector
<CoreIdentity> identities(UserId user) = 0;
/* Network handling */
/* Network handling */
@@
-233,7
+233,7
@@
public slots:
* \param user The core user
* \return QList<NetworkInfo>.
*/
* \param user The core user
* \return QList<NetworkInfo>.
*/
- virtual
QList
<NetworkInfo> networks(UserId user) = 0;
+ virtual
std::vector
<NetworkInfo> networks(UserId user) = 0;
//! Get a list of Networks to restore
/** Return a list of networks the user was connected at the time of core shutdown
//! Get a list of Networks to restore
/** Return a list of networks the user was connected at the time of core shutdown
@@
-241,7
+241,7
@@
public slots:
*
* \param user The User Id in question
*/
*
* \param user The User Id in question
*/
- virtual
QList
<NetworkId> connectedNetworks(UserId user) = 0;
+ virtual
std::vector
<NetworkId> connectedNetworks(UserId user) = 0;
//! Update the connected state of a network
/** \note This method is threadsafe
//! Update the connected state of a network
/** \note This method is threadsafe
@@
-340,7
+340,7
@@
public slots:
* \param user The user whose buffers we request
* \return A list of the BufferInfos for all buffers as requested
*/
* \param user The user whose buffers we request
* \return A list of the BufferInfos for all buffers as requested
*/
- virtual
QList
<BufferInfo> requestBuffers(UserId user) = 0;
+ virtual
std::vector
<BufferInfo> requestBuffers(UserId user) = 0;
//! Request a list of BufferIds for a given NetworkId
/** \note This method is threadsafe.
//! Request a list of BufferIds for a given NetworkId
/** \note This method is threadsafe.
@@
-349,7
+349,7
@@
public slots:
* \param networkId The NetworkId of the network in question
* \return List of BufferIds belonging to the Network
*/
* \param networkId The NetworkId of the network in question
* \return List of BufferIds belonging to the Network
*/
- virtual
QList
<BufferId> requestBufferIdsForNetwork(UserId user, NetworkId networkId) = 0;
+ virtual
std::vector
<BufferId> requestBufferIdsForNetwork(UserId user, NetworkId networkId) = 0;
//! Remove permanently a buffer and it's content from the storage backend
/** This call cannot be reverted!
//! Remove permanently a buffer and it's content from the storage backend
/** This call cannot be reverted!
@@
-385,6
+385,12
@@
public slots:
*/
virtual void setBufferLastSeenMsg(UserId user, const BufferId& bufferId, const MsgId& msgId) = 0;
*/
virtual void setBufferLastSeenMsg(UserId user, const BufferId& bufferId, const MsgId& msgId) = 0;
+ //! Get a Hash of all last message ids
+ /** This Method is called when the Quassel Core is started to restore the lastMsgIds
+ * \param user The Owner of the buffers
+ */
+ virtual QHash<BufferId, MsgId> bufferLastMsgIds(UserId user) = 0;
+
//! Get a Hash of all last seen message ids
/** This Method is called when the Quassel Core is started to restore the lastSeenMsgIds
* \param user The Owner of the buffers
//! Get a Hash of all last seen message ids
/** This Method is called when the Quassel Core is started to restore the lastSeenMsgIds
* \param user The Owner of the buffers
@@
-503,7
+509,7
@@
public slots:
* \param limit if != -1 limit the returned list to a max of \limit entries
* \return The requested list of messages
*/
* \param limit if != -1 limit the returned list to a max of \limit entries
* \return The requested list of messages
*/
- virtual
QList
<Message> requestMsgs(UserId user, BufferId bufferId, MsgId first = -1, MsgId last = -1, int limit = -1) = 0;
+ virtual
std::vector
<Message> requestMsgs(UserId user, BufferId bufferId, MsgId first = -1, MsgId last = -1, int limit = -1) = 0;
//! Request a certain number messages stored in a given buffer, matching certain filters
/** \param buffer The buffer we request messages from
//! Request a certain number messages stored in a given buffer, matching certain filters
/** \param buffer The buffer we request messages from
@@
-513,14
+519,13
@@
public slots:
* \param type The Message::Types that should be returned
* \return The requested list of messages
*/
* \param type The Message::Types that should be returned
* \return The requested list of messages
*/
- virtual QList<Message> requestMsgsFiltered(UserId user,
- BufferId bufferId,
- MsgId first = -1,
- MsgId last = -1,
- int limit = -1,
- Message::Types type = Message::Types{-1},
- Message::Flags flags = Message::Flags{-1})
- = 0;
+ virtual std::vector<Message> requestMsgsFiltered(UserId user,
+ BufferId bufferId,
+ MsgId first = -1,
+ MsgId last = -1,
+ int limit = -1,
+ Message::Types type = Message::Types{-1},
+ Message::Flags flags = Message::Flags{-1}) = 0;
//! Request a certain number of messages across all buffers
/** \param first if != -1 return only messages with a MsgId >= first
//! Request a certain number of messages across all buffers
/** \param first if != -1 return only messages with a MsgId >= first
@@
-528,7
+533,7
@@
public slots:
* \param limit Max amount of messages
* \return The requested list of messages
*/
* \param limit Max amount of messages
* \return The requested list of messages
*/
- virtual
QList
<Message> requestAllMsgs(UserId user, MsgId first = -1, MsgId last = -1, int limit = -1) = 0;
+ virtual
std::vector
<Message> requestAllMsgs(UserId user, MsgId first = -1, MsgId last = -1, int limit = -1) = 0;
//! Request a certain number of messages across all buffers, matching certain filters
/** \param first if != -1 return only messages with a MsgId >= first
//! Request a certain number of messages across all buffers, matching certain filters
/** \param first if != -1 return only messages with a MsgId >= first
@@
-537,13
+542,12
@@
public slots:
* \param type The Message::Types that should be returned
* \return The requested list of messages
*/
* \param type The Message::Types that should be returned
* \return The requested list of messages
*/
- virtual QList<Message> requestAllMsgsFiltered(UserId user,
- MsgId first = -1,
- MsgId last = -1,
- int limit = -1,
- Message::Types type = Message::Types{-1},
- Message::Flags flags = Message::Flags{-1})
- = 0;
+ virtual std::vector<Message> requestAllMsgsFiltered(UserId user,
+ MsgId first = -1,
+ MsgId last = -1,
+ int limit = -1,
+ Message::Types type = Message::Types{-1},
+ Message::Flags flags = Message::Flags{-1}) = 0;
//! Fetch all authusernames
/** \return Map of all current UserIds to permitted idents
//! Fetch all authusernames
/** \return Map of all current UserIds to permitted idents