#include <QString>
#include <QVariant>
-#include "corecoreinfo.h"
+#include "coreinfo.h"
#include "corealiasmanager.h"
#include "corehighlightrulemanager.h"
#include "coreignorelistmanager.h"
Q_OBJECT
public:
- CoreSession(UserId, bool restoreState, QObject *parent = 0);
+ CoreSession(UserId, bool restoreState, bool strictIdentEnabled, QObject *parent = 0);
~CoreSession();
QList<BufferInfo> buffers() const;
inline UserId user() const { return _user; }
CoreNetwork *network(NetworkId) const;
CoreIdentity *identity(IdentityId) const;
- const QString strictSysident();
+
+ /**
+ * Returns the optionally strict-compliant ident for the given user identity
+ *
+ * If strict mode is enabled, this will return the user's Quassel username for any identity,
+ * otherwise this will return the given identity's ident, whatever it may be.
+ *
+ * @return The user's ident, compliant with strict mode (when enabled)
+ */
+ const QString strictCompliantIdent(const CoreIdentity *identity);
+
inline CoreNetworkConfig *networkConfig() const { return _networkConfig; }
NetworkConnection *networkConnection(NetworkId) const;
QHash<QString, QString> persistentChannels(NetworkId) const;
+ QHash<QString, QByteArray> bufferCiphers(NetworkId id) const;
+ void setBufferCipher(NetworkId id, const QString &bufferName, const QByteArray &cipher) const;
+
/**
* Marks us away (or unaway) on all networks
*
UserId _user;
+ /// Whether or not strict ident mode is enabled, locking users' idents to Quassel username
+ bool _strictIdentEnabled;
+
SignalProxy *_signalProxy;
CoreAliasManager _aliasManager;
// QHash<NetworkId, NetworkConnection *> _connections;
CoreDccConfig *_dccConfig;
CoreIrcListHelper *_ircListHelper;
CoreNetworkConfig *_networkConfig;
- CoreCoreInfo _coreInfo;
+ CoreInfo *_coreInfo;
CoreTransferManager *_transferManager;
EventManager *_eventManager;
* @param bufferInfo The BufferInfo object of the buffer
*/
QString senderPrefixes(const QString &sender, const BufferInfo &bufferInfo) const;
+
+ /**
+ * This method obtains the realname of the message's sender.
+ * @param sender The hostmask of the sender
+ * @param networkId The network the user is on
+ */
+ QString realName(const QString &sender, NetworkId networkId) const;
+
+ /**
+ * This method obtains the avatar of the message's sender.
+ * @param sender The hostmask of the sender
+ * @param networkId The network the user is on
+ */
+ QString avatarUrl(const QString &sender, NetworkId networkId) const;
QList<RawMessage> _messageQueue;
bool _processMessages;
CoreIgnoreListManager _ignoreListManager;