libqapt
#include <transaction.h>

Public Slots | |
| void | cancel () |
| void | provideMedium (const QString &medium) |
| void | replyUntrustedPrompt (bool approved) |
| void | resolveConfigFileConflict (const QString ¤tPath, bool replace) |
| void | run () |
| void | setDebconfPipe (const QString &pipe) |
| void | setFrontendCaps (QApt::FrontendCaps frontendCaps) |
| void | setLocale (const QString &locale) |
| void | setProxy (const QString &proxy) |
Signals | |
| void | cancellableChanged (bool cancellable) |
| void | configFileConflict (QString currentPath, QString newPath) |
| void | downloadETAChanged (quint64 ETA) |
| void | downloadProgressChanged (QApt::DownloadProgress progress) |
| void | downloadSpeedChanged (quint64 downloadSpeed) |
| void | errorOccurred (QApt::ErrorCode error) |
| void | finished (QApt::ExitStatus exitStatus) |
| void | mediumRequired (QString label, QString mountPoint) |
| void | paused () |
| void | progressChanged (int progress) |
| void | promptUntrusted (QStringList untrustedPackages) |
| void | resumed () |
| void | statusChanged (QApt::TransactionStatus status) |
| void | statusDetailsChanged (const QString &statusDetails) |
Public Member Functions | |
| Transaction (const QString &tid) | |
| ~Transaction () | |
| QString | debconfPipe () const |
| quint64 | downloadETA () const |
| QApt::DownloadProgress | downloadProgress () const |
| quint64 | downloadSpeed () const |
| QApt::ErrorCode | error () const |
| QString | errorDetails () const |
| QString | errorString () const |
| QApt::ExitStatus | exitStatus () const |
| QString | filePath () const |
| QApt::FrontendCaps | frontendCaps () const |
| bool | isCancellable () const |
| bool | isCancelled () const |
| bool | isPaused () const |
| QString | locale () const |
| bool | operator== (const Transaction *rhs) const |
| QVariantMap | packages () const |
| int | progress () const |
| QString | proxy () const |
| QApt::TransactionRole | role () const |
| QApt::TransactionStatus | status () const |
| QString | statusDetails () const |
| QString | transactionId () const |
| QStringList | untrustedPackages () const |
| int | userId () const |
Public Member Functions inherited from QObject | |
| QObject (QObject *parent) | |
| QObject (QObject *parent, const char *name) | |
| virtual | ~QObject () |
| bool | blockSignals (bool block) |
| QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
| const QObjectList & | children () const |
| const char * | className () const |
| bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
| void | deleteLater () |
| void | destroyed (QObject *obj) |
| bool | disconnect (const QObject *receiver, const char *method) |
| bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
| void | dumpObjectInfo () |
| void | dumpObjectTree () |
| QList< QByteArray > | dynamicPropertyNames () const |
| virtual bool | event (QEvent *e) |
| virtual bool | eventFilter (QObject *watched, QEvent *event) |
| T | findChild (const QString &name) const |
| QList< T > | findChildren (const QRegExp ®Exp) const |
| QList< T > | findChildren (const QString &name) const |
| bool | inherits (const char *className) const |
| void | insertChild (QObject *object) |
| void | installEventFilter (QObject *filterObj) |
| bool | isA (const char *className) const |
| bool | isWidgetType () const |
| void | killTimer (int id) |
| virtual const QMetaObject * | metaObject () const |
| void | moveToThread (QThread *targetThread) |
| const char * | name () const |
| const char * | name (const char *defaultName) const |
| QString | objectName () const |
| QObject * | parent () const |
| QVariant | property (const char *name) const |
| void | removeChild (QObject *object) |
| void | removeEventFilter (QObject *obj) |
| void | setName (const char *name) |
| void | setObjectName (const QString &name) |
| void | setParent (QObject *parent) |
| bool | setProperty (const char *name, const QVariant &value) |
| bool | signalsBlocked () const |
| int | startTimer (int interval) |
| QThread * | thread () const |
Properties | |
| QString | debconfPipe |
| quint64 | downloadETA |
| DownloadProgress | downloadProgress |
| quint64 | downloadSpeed |
| ErrorCode | error |
| QString | errorDetails |
| ExitStatus | exitStatus |
| QString | filePath |
| FrontendCaps | frontendCaps |
| bool | isCancellable |
| bool | isCancelled |
| bool | isPaused |
| QString | locale |
| QVariantMap | packages |
| int | progress |
| QString | proxy |
| TransactionRole | role |
| TransactionStatus | status |
| QString | statusDetails |
| QString | transactionId |
| QStringList | untrustedPackages |
| int | userId |
Properties inherited from QObject | |
| objectName | |
Additional Inherited Members | |
Static Public Member Functions inherited from QObject | |
| bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
| bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
| bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
| bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
| QString | tr (const char *sourceText, const char *disambiguation, int n) |
| QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Protected Member Functions inherited from QObject | |
| bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
| virtual void | childEvent (QChildEvent *event) |
| virtual void | connectNotify (const char *signal) |
| virtual void | customEvent (QEvent *event) |
| virtual void | disconnectNotify (const char *signal) |
| int | receivers (const char *signal) const |
| QObject * | sender () const |
| int | senderSignalIndex () const |
| virtual void | timerEvent (QTimerEvent *event) |
Static Protected Member Functions inherited from QObject | |
| QByteArray | normalizeSignalSlot (const char *signalSlot) |
Detailed Description
The Transaction class is an interface for a Transaction in the QApt Worker.
Transactions represent asynchronous tasks being performed by the QApt Worker, such as committing packages, or checking for updates. This class provides information about transactions, as well as means to interact with them on the client side.
- Since
- 2.0
Definition at line 54 of file transaction.h.
Constructor & Destructor Documentation
|
explicit |
Constructor.
- Parameters
-
tid The D-Bus path (transaction id) of the transaction
Definition at line 88 of file transaction.cpp.
| Transaction::~Transaction | ( | ) |
Destructor.
Definition at line 112 of file transaction.cpp.
Member Function Documentation
|
slot |
Attempts to cancel the transaction.
The transaction will only be cancelled if the isCancellable property is true.
- See also
- isCancellable
Definition at line 498 of file transaction.cpp.
|
signal |
This signal is emitted when the transaction enters a state where it can or cannot be cancelled, depending on the parameter given.
Slots connected to this signal should disable or re-enable cancel buttons in their interface as appropriate.
- Parameters
-
cancellable Whether or not the transaction is cancellable
This signal is emitted when a new version of a package being installed contains an updated version of a configuration file, and the user has made custom changes to the existing version of the configuration file.
The QApt Worker will pause the transaction until a response is given by the resolveConfigFileConflict() method
Slots connected to this signal should prompt the user to determine if the worker should keep the current configuration, or install the new configuration file. The currentPath argument indicates the location of the existing configuration file, and the newPath argument is the location of a copy of the new configuration file, which can be used to display the difference between the two files, if desired.
- Parameters
-
currentPath The path of the config file to be replaced newPath The path to a copy of the new config file
- See also
- resolveConfigFileConflict
| QString QApt::Transaction::debconfPipe | ( | ) | const |
Returns the Debconf socket used by the transaction to handle debconf communication.
Use this socket to set up your Debconf frontend on the client side. Defaults to an empty string.
- See also
- setDebconfPipe
| quint64 QApt::Transaction::downloadETA | ( | ) | const |
Returns the estimated time until the completion of a transaction's download state, in seconds.
- See also
- downloadETAChanged
|
signal |
This signal is emitted when the time estimate for a transaction's download changes.
- Parameters
-
ETA The estimated time until download completion in seconds
- See also
- downloadETA
| QApt::DownloadProgress QApt::Transaction::downloadProgress | ( | ) | const |
Returns a QApt::DownloadProgress object which describes the most recent download progress information received from the worker.
- See also
- downloadProgressChanged
|
signal |
This signal is emitted when new download progress information becomes available.
- Parameters
-
progress The latest download progress info
| quint64 QApt::Transaction::downloadSpeed | ( | ) | const |
Returns the rate at which data is being downloaded by the transaction in bytes.
- See also
- downloadSpeedChanged
|
signal |
This signal is emitted when the current download rate changes.
- Parameters
-
downloadSpeed The current download rate in bytes per second
- See also
- downloadSpeed
| QApt::ErrorCode QApt::Transaction::error | ( | ) | const |
Returns the error code set by the QApt Worker in the event the transaction ended in error.
Returns QApt::Success if no error has occurred at the time the method is called.
| QString QApt::Transaction::errorDetails | ( | ) | const |
Returns a string containing the details describing a transaction error.
If no errors have occurred, this will return an empty string.
|
signal |
This signal is emitted when the transaction encounters a fatal error that prevents the transaction from successfully finishing.
Slots connected to this signal should notify the user that an error has occurred.
- See also
- errorDetails
| QString Transaction::errorString | ( | ) | const |
Returns the error string for the error code that may or may not be set.
Returns QString::null if no error
Definition at line 167 of file transaction.cpp.
| QApt::ExitStatus QApt::Transaction::exitStatus | ( | ) | const |
Returns the exit status of the transaction.
If the transaction has not yet finished, it will return QApt::ExitUnfinished
| QString QApt::Transaction::filePath | ( | ) | const |
Returns the path of the file currently being installed for transactions with a TransactionRole of InstallFileRole.
- See also
- setFilePath
|
signal |
This signal is emitted when the transaction reaches the Finished state.
Slots connected to this signal should perform post-transaction cleanup and delete the transaction object once they are done retreiving data from it.
- Parameters
-
exitStatus The exit status of the transaction
| QApt::FrontendCaps QApt::Transaction::frontendCaps | ( | ) | const |
Returns the frontend capabilities of the frontend displaying the transaction.
| bool QApt::Transaction::isCancellable | ( | ) | const |
Returns true if the transaction can be cancelled; otherwise, false.
| bool QApt::Transaction::isCancelled | ( | ) | const |
Returns true if the transaction has been cancelled; otherwise, false.
| bool QApt::Transaction::isPaused | ( | ) | const |
| QString QApt::Transaction::locale | ( | ) | const |
Returns the locale code the transaction is using to perform translations and encoding.
Defaults to an empty string.
- See also
- setLocale
This signal is emitted when during the course of downloading packages, the QApt Worker encounters packages that need to be downloaded from a CD-ROM or DVD-ROM disc not currently mounted.
The worker will pause this transaction until a response is given by the provideMedium() method.
Slots connected to this signal should notify the user about this requirement, prompting to insert the CD in the drive at the given mount point.
- Parameters
-
label The label of the required optical media mountPoint The mount point of the optical medium drive to place the media
- See also
- provideMedium
| bool Transaction::operator== | ( | const Transaction * | rhs | ) | const |
Equality operator.
This will compare the transaction IDs of the two Transaction objects to determine whether or not the two transactions are "the same". They will usually not point to the same address, but they still represent the same transaction on D-Bus
- Parameters
-
rhs The transaction to be compared to
Definition at line 117 of file transaction.cpp.
| QVariantMap QApt::Transaction::packages | ( | ) | const |
Returns a list of the packages that this transaction will act upon.
|
signal |
This signal is emitted whenever the QApt worker pauses the transaction.
| int QApt::Transaction::progress | ( | ) | const |
Returns the current overall progress of the transaction as a percentage.
If a number over 100 is returned, no progress can be determined, and progress bars displaying this progress should be placed in "busy" or "indeterminate" mode.
- See also
- progressChanged
|
signal |
This signal is emitted when the global progress of the transaction changes.
- Parameters
-
progress The new current progress, as a percentage.
|
signal |
This signal is emitted when the QApt Worker detects that packages will need to be downloaded from an untrusted source to complete the transaction.
The worker will pause the transaction until a response is given by the replyUntrustedPrompt method.
- Parameters
-
untrustedPackages The list of untrusted packages
- See also
- replyUntrustedPrompt
|
slot |
Responds to the QApt Worker's request for an installation medium.
The mount point of the medium the worker requested must be provided as a sanity check.
- Parameters
-
medium The mount point of the medium the user has provided
Definition at line 507 of file transaction.cpp.
| QString QApt::Transaction::proxy | ( | ) | const |
Returns the HTTP proxy used by the transaction to perform actions that require fetching data over HTTP.
Defaults to an empty string.
- See also
- setProxy
|
slot |
Responds to the QApt Worker's query of whether or not the user wishes to continue with the transaction, despite the need to download untrusted packages.
- Parameters
-
approved Whether or not the user wishes to continue
Definition at line 516 of file transaction.cpp.
|
slot |
Responds to the QApt Worker's prompt of a configuration file conflict.
The path of the configuration file being replaced must be provided as a sanity check.
- Parameters
-
currentPath The configuration file being replaced replace Whether or not the user wants the file to be replaced by a newer version
Definition at line 525 of file transaction.cpp.
|
signal |
This signal is emitted whenever the QApt worker resumes the transaction.
| QApt::TransactionRole QApt::Transaction::role | ( | ) | const |
Returns the role of the transaction, describing what action the transaction will perform.
|
slot |
Queues the transaction to be processed by the QApt Worker.
Definition at line 489 of file transaction.cpp.
|
slot |
Sets the Debconf socket used by the transaction to handle debconf communication.
Use this socket to set up your Debconf frontend on the client side.
This property can only be changed before the transaction is run.
- Parameters
-
pipe The debconf socket to be used by the worker
- See also
- debconfPipe
Definition at line 479 of file transaction.cpp.
|
slot |
Sets the frontend capabilities for the frontend handling this transaction.
E.g. advertise support for debconf, etc.
Definition at line 454 of file transaction.cpp.
|
slot |
Sets the locale code to be used by the transaction for translation and encoding purposes.
This property can only be changed before the transaction is run.
- Parameters
-
locale The locale code to be used
- See also
- locale
Definition at line 444 of file transaction.cpp.
|
slot |
Sets the HTTP proxy to be used by the transaction during actions that require fetching data over HTTP.
This property can only be changed before the transaction is run.
- Parameters
-
proxy The HTTP proxy for the transaction to use
- See also
- proxy
Definition at line 469 of file transaction.cpp.
| QApt::TransactionStatus QApt::Transaction::status | ( | ) | const |
Returns the current status of the transaction.
|
signal |
This signal is emitted when the status of the transaction changes.
Slots connected to this signal should use this to react to these state changes, updating their interfaces and reloading the backend as needed.
| QString QApt::Transaction::statusDetails | ( | ) | const |
Returns a human-readable status message providing further information about the current transaction status.
For example, during the QApt::CommittingStatus, status messages from APT will be returned.
If no details about the current status are available, an empty string will be returned.
- See also
- statusDetailsChanged status
|
signal |
This signal is emitted when the status details of the transaction change.
- Parameters
-
statusDetails The latest status details
- See also
- statusDetails
| QString QApt::Transaction::transactionId | ( | ) | const |
Returns a unique identifier for the transaction.
This is useful for interacting with certain QApt::Backend API, which refers to transactions by their transaction ID when notifying of worker queue changes.
| QStringList QApt::Transaction::untrustedPackages | ( | ) | const |
Returns the list of untrusted packages that the transaction will potentially act upon.
The QApt Worker will set this list if the transaction will act upon untrusted packages.
- See also
- promptUntrusted
- replyUntrustedPrompt
| int QApt::Transaction::userId | ( | ) | const |
Returns the user ID of the user that initiated the transaction.
Property Documentation
|
readwrite |
Definition at line 74 of file transaction.h.
|
readwrite |
Definition at line 85 of file transaction.h.
|
readwrite |
Definition at line 82 of file transaction.h.
|
readwrite |
Definition at line 84 of file transaction.h.
|
read |
Definition at line 71 of file transaction.h.
|
readwrite |
Definition at line 87 of file transaction.h.
|
readwrite |
Definition at line 78 of file transaction.h.
|
readwrite |
Definition at line 86 of file transaction.h.
|
readwrite |
Definition at line 88 of file transaction.h.
|
readwrite |
Definition at line 76 of file transaction.h.
|
readwrite |
Definition at line 77 of file transaction.h.
|
readwrite |
Definition at line 79 of file transaction.h.
|
readwrite |
Definition at line 72 of file transaction.h.
|
readwrite |
Definition at line 75 of file transaction.h.
|
readwrite |
Definition at line 81 of file transaction.h.
|
readwrite |
Definition at line 73 of file transaction.h.
|
readwrite |
Definition at line 69 of file transaction.h.
|
readwrite |
Definition at line 70 of file transaction.h.
|
readwrite |
Definition at line 80 of file transaction.h.
|
readwrite |
Definition at line 67 of file transaction.h.
|
readwrite |
Definition at line 83 of file transaction.h.
|
readwrite |
Definition at line 68 of file transaction.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2018 The KDE developers.
Generated on Fri Jan 12 2018 03:21:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.
KDE API Reference
Public Member Functions inherited from