Ejemplo n.º 1
0
void TpLoggerPlugin::clearAccountLogs(const Tp::AccountPtr &account)
{
    Tpl::LogManagerPtr manager = Tpl::LogManager::instance();
    Tpl::PendingOperation *op = manager->clearAccountHistory(account);
    connect(op, SIGNAL(finished(Tpl::PendingOperation*)),
            this, SLOT(genericOperationFinished(Tpl::PendingOperation*)));
}
Ejemplo n.º 2
0
void TpLoggerPlugin::clearContactLogs(const Tp::AccountPtr &account,
                                      const KTp::LogEntity &entity)
{
    Tpl::LogManagerPtr manager = Tpl::LogManager::instance();
    Tpl::PendingOperation *op = manager->clearEntityHistory(account, Utils::toTplEntity(entity));
    connect(op, SIGNAL(finished(Tpl::PendingOperation*)),
            this, SLOT(genericOperationFinished(Tpl::PendingOperation*)));
}
PendingTpLoggerEntities::PendingTpLoggerEntities(const Tp::AccountPtr &account,
                                                 QObject *parent):
    PendingLoggerEntities(account, parent)
{
    Tpl::LogManagerPtr logManager = Tpl::LogManager::instance();
    Tpl::PendingEntities *op = logManager->queryEntities(account);
    connect(op, SIGNAL(finished(Tpl::PendingOperation*)),
            this, SLOT(entitiesRetrieved(Tpl::PendingOperation*)));
}
Ejemplo n.º 4
0
void EntityModel::setAccountManager(const Tp::AccountManagerPtr &accountManager)
{
    Tpl::LogManagerPtr logManager = Tpl::LogManager::instance();
    Q_FOREACH(const Tp::AccountPtr &account, accountManager->allAccounts()) {
        connect(logManager->queryEntities(account),
                SIGNAL(finished(Tpl::PendingOperation*)),
                SLOT(onEntitiesSearchFinished(Tpl::PendingOperation*)));
    }
}
PendingTpLoggerLogs::PendingTpLoggerLogs(const Tp::AccountPtr &account,
                                         const KTp::LogEntity &entity,
                                         const QDate &date,
                                         QObject *parent):
    PendingLoggerLogs(account, entity, date, parent)
{
    Tpl::LogManagerPtr manager = Tpl::LogManager::instance();
    Tpl::PendingEvents *events = manager->queryEvents(account, Utils::toTplEntity(entity),
                                                      Tpl::EventTypeMaskText, date);
    connect(events, SIGNAL(finished(Tpl::PendingOperation*)),
            this, SLOT(logsRetrieved(Tpl::PendingOperation*)));
}
Ejemplo n.º 6
0
bool TpLoggerPlugin::logsExist(const Tp::AccountPtr &account, const KTp::LogEntity &contact)
{
    Tpl::LogManagerPtr manager = Tpl::LogManager::instance();
    return manager->exists(account, Utils::toTplEntity(contact), Tpl::EventTypeMaskText);
}
Ejemplo n.º 7
0
void LogViewer::onAccountManagerReady()
{
    Tpl::LogManagerPtr logManager = Tpl::LogManager::instance();
    logManager->setAccountManagerPtr(m_accountManager);
    m_entityModel->setAccountManager(m_accountManager);
}