23 #include "chatlogarchive.h" 25 #include "irc/chatlogs.h" 26 #include "irc/entities/ircnetworkentity.h" 31 DClass<ChatLogArchive>
41 ChatLogArchive::~ChatLogArchive()
45 QString ChatLogArchive::archiveDirPath(
const IRCNetworkEntity &network,
const QString &recipient)
48 return QString(
"%1/backup/%2").arg(logs.networkDirPath(network), logs.logFileName(recipient));
51 QStringList ChatLogArchive::listArchivedLogsSortedByTime(
const IRCNetworkEntity &network,
const QString &recipient)
53 return QDir(archiveDirPath(network, recipient)).entryList(QDir::Files, QDir::Time);
56 QString ChatLogArchive::mkArchiveFilePath(
const IRCNetworkEntity &network,
const QString &recipient)
58 QDateTime time = QDateTime::currentDateTime();
59 return QString(
"%1/%2.txt").arg(
60 archiveDirPath(network, recipient), time.toString(
"yyyy-MM-dd_hh-mm-ss"));
Data structure that describes and defines a connection to an IRC network or server.