<commit_before>/*
 * This file is part of the QPackageKit project
 * Copyright (C) 2008 <NAME> <<EMAIL>>
 * Copyright (C) 2010-2016 <NAME> <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB. If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

#ifndef PACKAGEKIT_TRANSACTION_H
#define PACKAGEKIT_TRANSACTION_H

#include <QtCore/QObject>
#include <QtCore/QDateTime>
#include <QtDBus/QDBusObjectPath>
#include <QtDBus/QDBusPendingReply>

#include <packagekitqt_global.h>

#include "bitfield.h"

namespace PackageKit {

class Details;

/**
* \class Transaction transaction.h Transaction
* \author <NAME> \e <<EMAIL>>
* \author <NAME> \e <<EMAIL>>
*
* \brief A transaction represents an occurring action in PackageKit
*
* A Transaction is created whenever you do an asynchronous action (for example a Search, Install...).
* This class allows you to monitor and control the flow of the action.
*
* You should delete the transaction after finished() is emitted
*
* \sa Daemon
*/
class TransactionPrivate;
class PACKAGEKITQT_LIBRARY Transaction : public QObject
{
    Q_OBJECT
    Q_FLAGS(TransactionFlag TransactionFlags)
    Q_FLAGS(Filter Filters)
    Q_PROPERTY(QDBusObjectPath tid READ tid)
    Q_PROPERTY(bool allowCancel READ allowCancel NOTIFY allowCancelChanged)
    Q_PROPERTY(bool isCallerActive READ isCallerActive NOTIFY isCallerActiveChanged)
    Q_PROPERTY(QString lastPackage READ lastPackage NOTIFY lastPackageChanged)
    Q_PROPERTY(uint percentage READ percentage NOTIFY percentageChanged)
    Q_PROPERTY(uint elapsedTime READ elapsedTime NOTIFY elapsedTimeChanged)<commit_msg>Make Transaction deletion match better what is really happening<commit_after>/*
 * This file is part of the QPackageKit project
 * Copyright (C) 2008 <NAME> <<EMAIL>>
 * Copyright (C) 2010-2016 <NAME> <<EMAIL>>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB. If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

#ifndef PACKAGEKIT_TRANSACTION_H
#define PACKAGEKIT_TRANSACTION_H

#include <QtCore/QObject>
#include <QtCore/QDateTime>
#include <QtDBus/QDBusObjectPath>
#include <QtDBus/QDBusPendingReply>

#include <packagekitqt_global.h>

#include "bitfield.h"

namespace PackageKit {

class Details;

/**
* \class Transaction transaction.h Transaction
* \author <NAME> \e <<EMAIL>>
* \author <NAME> \e <<EMAIL>>
*
* \brief A transaction represents an occurring action in PackageKit
*
* A Transaction is created whenever you do an asynchronous action (for example a Search, Install...).
* This class allows you to monitor and control the flow of the action.
*
* Transaction will be automatically deleted after finished() is emitted
*
* \sa Daemon
*/
class TransactionPrivate;
class PACKAGEKITQT_LIBRARY Transaction : public QObject
{
    Q_OBJECT
    Q_FLAGS(TransactionFlag TransactionFlags)
    Q_FLAGS(Filter Filters)
    Q_PROPERTY(QDBusObjectPath tid READ tid)
    Q_PROPERTY(bool allowCancel READ allowCancel NOTIFY allowCancelChanged)
    Q_PROPERTY(bool isCallerActive READ isCallerActive NOTIFY isCallerActiveChanged)
    Q_PROPERTY(QString lastPackage READ lastPackage NOTIFY lastPackageChanged)
    Q_PROPERTY(uint percentage READ percentage NOTIFY percentageChanged)
    Q_PROPERTY(uint elapsedTime READ elapsedTime NOTIFY elapsedTimeChanged)
{'fraction_non_alphanumeric': 0.06953498478922207, 'fraction_numerical': 0.010430247718383311, 'mean_word_length': 4.760951188986232, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7084670', 'n_tokens_mistral': 1302, 'n_tokens_neox': 1255, 'n_words': 537}