[neon/backports-jammy/packagekit-qt/Neon/unstable] /: Imported Upstream version 0.8.6

Matthias Klumpp null at kde.org
Wed Mar 15 04:29:31 GMT 2023


Git commit 9710c6f47d284bfbbb27cc80260eb8c52846fd75 by Matthias Klumpp.
Committed on 27/11/2012 at 12:58.
Pushed by carlosdem into branch 'Neon/unstable'.

Imported Upstream version 0.8.6

A  +3    -0    AUTHORS
A  +65   -0    CMakeLists.txt
A  +165  -0    COPYING
A  +8    -0    MAINTAINERS
A  +22   -0    NEWS
A  +49   -0    RELEASE
A  +3    -0    TODO
A  +34   -0    config.h.in
A  +77   -0    src/CMakeLists.txt
A  +1    -0    src/Daemon
A  +1251 -0    src/Doxyfile
A  +1    -0    src/Transaction
A  +70   -0    src/bitfield.cpp  *
A  +33   -0    src/bitfield.h  *
A  +35   -0    src/common.h     [License: LGPL (v2+)]
A  +254  -0    src/daemon.cpp     [License: LGPL (v2+)]
A  +405  -0    src/daemon.h     [License: LGPL (v2+)]
A  +59   -0    src/daemonprivate.cpp     [License: LGPL (v2+)]
A  +56   -0    src/daemonprivate.h     [License: LGPL (v2+)]
A  +15   -0    src/modules/CMakeLists.txt
A  +12   -0    src/modules/packagekit-qt2-config-version.cmake.in
A  +11   -0    src/modules/packagekit-qt2-config.cmake.in
A  +11   -0    src/packagekit-qt2.pc.in
A  +682  -0    src/transaction.cpp     [License: LGPL (v2+)]
A  +1256 -0    src/transaction.h     [License: LGPL (v2+)]
A  +193  -0    src/transactionprivate.cpp     [License: LGPL (v2+)]
A  +83   -0    src/transactionprivate.h     [License: LGPL (v2+)]

The files marked with a * at the end have a non valid license. Please read: https://community.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page.


https://invent.kde.org/neon/backports-jammy/packagekit-qt/commit/9710c6f47d284bfbbb27cc80260eb8c52846fd75

diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..c9f4004
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,3 @@
+Daniel Nicoletti <dantti12 at gmail.com>
+
+Matthias Klumpp <matthias at tenstral.net>
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..9a17e89
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,65 @@
+# CMakeLists for PackageKit-Qt
+project(packagekit-qt)
+
+cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
+find_package(PkgConfig REQUIRED)
+
+set(CMAKE_BUILD_TYPE "Debug")
+
+set(QPACKAGEKIT_VERSION_MAJOR  "0")
+set(QPACKAGEKIT_VERSION_MINOR  "8")
+set(QPACKAGEKIT_VERSION_PATCH  "6")
+set(QPACKAGEKIT_VERSION_SUFFIX "${VERSION_SUFFIX}")
+set(QPACKAGEKIT_VERSION "${QPACKAGEKIT_VERSION_MAJOR}.${QPACKAGEKIT_VERSION_MINOR}.${QPACKAGEKIT_VERSION_PATCH}")
+
+set(QPACKAGEKIT_API_LEVEL "5")
+
+# Forbid in-tree building
+if(${CMAKE_SOURCE_DIR} MATCHES ${CMAKE_BINARY_DIR})
+      message(STATUS "Please do an out-of-tree build:")
+      message(STATUS "rm -f CMakeCache.txt && mkdir build && cd build; cmake .. && make")
+      message(FATAL_ERROR "In-tree-build detected!")
+endif(${CMAKE_SOURCE_DIR} MATCHES ${CMAKE_BINARY_DIR})
+
+#
+# Options
+#
+
+# NONE
+
+if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+  set(CMAKE_INSTALL_PREFIX
+    "/usr" CACHE PATH "QPK default install prefix" FORCE)
+endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+
+#
+# Configure files
+#
+set (PREFIXDIR "${CMAKE_INSTALL_PREFIX}")
+set (DATADIR "${CMAKE_INSTALL_PREFIX}/share")
+set (PKGDATADIR "${DATA_INSTALL_DIR}")
+set (LIBDIR "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
+set (PKGLIBDIR "${LIBDIR}/packagekit")
+set (GETTEXT_PACKAGE "packagekit")
+set (LOCALE_DIR "${DATADIR}/locale")
+set (VERSION "${QPACKAGEKIT_VERSION}")
+set (BUILDDIR "${CMAKE_BINARY_DIR}")
+set (LOCALSTATEDIR "/var")
+
+add_definitions("-DLOCALSTATEDIR=\"${LOCALSTATEDIR}\"")
+
+set(CMAKE_INSTALL_LIBDIR "lib/${CMAKE_LIBRARY_ARCHITECTURE}" CACHE PATH "Output directory for libraries")
+
+configure_file(config.h.in ${CMAKE_BINARY_DIR}/config.h)
+
+#
+# Custom C flags
+#
+set (MAINTAINER_CFLAGS "-Werror -Wall -Wcast-align -Wno-uninitialized -Wempty-body -Wformat-security -Winit-self")
+option (DISABLE_MAINTAINER_CFLAGS "Disable maintainer CFlags" ON)
+if (DISABLE_MAINTAINER_CFLAGS)
+	set (MAINTAINER_CFLAGS "")
+endif (DISABLE_MAINTAINER_CFLAGS)
+add_definitions(${MAINTAINER_CFLAGS})
+
+add_subdirectory(src)
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..65c5ca8
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,165 @@
+                   GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+  This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+  0. Additional Definitions.
+
+  As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+  "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+  An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+  A "Combined Work" is a work produced by combining or linking an
+Application with the Library.  The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+  The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+  The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+  1. Exception to Section 3 of the GNU GPL.
+
+  You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+  2. Conveying Modified Versions.
+
+  If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+   a) under this License, provided that you make a good faith effort to
+   ensure that, in the event an Application does not supply the
+   function or data, the facility still operates, and performs
+   whatever part of its purpose remains meaningful, or
+
+   b) under the GNU GPL, with none of the additional permissions of
+   this License applicable to that copy.
+
+  3. Object Code Incorporating Material from Library Header Files.
+
+  The object code form of an Application may incorporate material from
+a header file that is part of the Library.  You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+   a) Give prominent notice with each copy of the object code that the
+   Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the object code with a copy of the GNU GPL and this license
+   document.
+
+  4. Combined Works.
+
+  You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+   a) Give prominent notice with each copy of the Combined Work that
+   the Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the Combined Work with a copy of the GNU GPL and this license
+   document.
+
+   c) For a Combined Work that displays copyright notices during
+   execution, include the copyright notice for the Library among
+   these notices, as well as a reference directing the user to the
+   copies of the GNU GPL and this license document.
+
+   d) Do one of the following:
+
+       0) Convey the Minimal Corresponding Source under the terms of this
+       License, and the Corresponding Application Code in a form
+       suitable for, and under terms that permit, the user to
+       recombine or relink the Application with a modified version of
+       the Linked Version to produce a modified Combined Work, in the
+       manner specified by section 6 of the GNU GPL for conveying
+       Corresponding Source.
+
+       1) Use a suitable shared library mechanism for linking with the
+       Library.  A suitable mechanism is one that (a) uses at run time
+       a copy of the Library already present on the user's computer
+       system, and (b) will operate properly with a modified version
+       of the Library that is interface-compatible with the Linked
+       Version.
+
+   e) Provide Installation Information, but only if you would otherwise
+   be required to provide such information under section 6 of the
+   GNU GPL, and only to the extent that such information is
+   necessary to install and execute a modified version of the
+   Combined Work produced by recombining or relinking the
+   Application with a modified version of the Linked Version. (If
+   you use option 4d0, the Installation Information must accompany
+   the Minimal Corresponding Source and Corresponding Application
+   Code. If you use option 4d1, you must provide the Installation
+   Information in the manner specified by section 6 of the GNU GPL
+   for conveying Corresponding Source.)
+
+  5. Combined Libraries.
+
+  You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+   a) Accompany the combined library with a copy of the same work based
+   on the Library, uncombined with any other library facilities,
+   conveyed under the terms of this License.
+
+   b) Give prominent notice with the combined library that part of it
+   is a work based on the Library, and explaining where to find the
+   accompanying uncombined form of the same work.
+
+  6. Revised Versions of the GNU Lesser General Public License.
+
+  The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+  Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+  If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
diff --git a/MAINTAINERS b/MAINTAINERS
new file mode 100644
index 0000000..e0913b9
--- /dev/null
+++ b/MAINTAINERS
@@ -0,0 +1,8 @@
+Daniel Nicoletti
+E-mail: dantti12 at gmail.com
+
+Matthias Klumpp
+E-mail: matthias at tenstral.net
+
+Richard Hughes
+E-mail: richard at hughsie.com
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..a245534
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,22 @@
+Version 0.8.6
+~~~~~~~~~~~~~
+Released: 2012-11-26
+
+Notes:
+ - This is the first release of Packagekit-Qt which has been split out
+   of the main PackageKit project.
+ - This project is decoupled from the main PackageKit project from this
+   point onwards and does not subscribe to the same API and ABI promises
+   of PackageKit. That said, it's no co-incidence that this tarball
+   release happened on the same day as the PackageKit release :)
+
+New Features:
+ - Add packagekit-qt library from the PackageKit project (Daniel Nicoletti)
+ - Added release instructions and simple release-script (Matthias Klumpp)
+ - Added versioning, Qt4 support and installed basic files (Matthias Klumpp)
+ - Created basic project and CMake skeleton (Matthias Klumpp)
+
+Bugfixes:
+ - Add bitfield.h to the files to install (Daniel Nicoletti)
+ - Always make sure DBus interface specs are present (Matthias Klumpp)
+ - Fix QPK API level (Matthias Klumpp)
diff --git a/RELEASE b/RELEASE
new file mode 100644
index 0000000..92588fa
--- /dev/null
+++ b/RELEASE
@@ -0,0 +1,49 @@
+PackageKit-Qt Release Notes
+
+1. Write NEWS entries for PackageKit-Qt in the same format as usual.
+
+git shortlog PACKAGEKIT_0_8_5.. | grep -i -v trivial | grep -v Merge > NEWS.new
+
+--------------------------------------------------------------------------------
+Version 0.8.6
+~~~~~~~~~~~~~
+Released: 2012-xx-xx
+
+Notes:
+
+New Features:
+
+Bugfixes:
+--------------------------------------------------------------------------------
+
+2. Update library version if new ABI or API in CMakeLists.txt
+
+3. Commit changes in PackageKit-Qt git:
+
+git commit -a -m "Release version 0.8.6"
+git tag -s -f -m "Release 0.8.6" QPACKAGEKIT_0_8_6
+<gpg password>
+git push --tags
+git push
+
+4. run './release.sh --version=0.8.6 --git-tag=QPACKAGEKIT_0_8_6 --sign'
+
+5. Upload tarball to:
+
+scp *.tar.* packagekit.org:/srv/www/html/releases/
+
+6. Do post release version bump in CMakeLists.txt
+
+7. Commit trivial changes:
+
+git commit -a -m "trivial: post release version bump"
+git push
+
+8. Send an email to packagekit at lists.freedesktop.org
+
+=================================================
+PackageKit-Qt 0.8.6 released!
+
+Tarballs available here: http://www.packagekit.org/releases/
+
+=================================================
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..48d6069
--- /dev/null
+++ b/TODO
@@ -0,0 +1,3 @@
+*** Timeframe: Everytime ***
+
+* Fix all bugs, implement new features :-)
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..782abcb
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,34 @@
+#ifndef CONFIG_H
+#define CONFIG_H
+
+/* always defined to indicate that i18n is enabled */
+#define ENABLE_NLS 1
+
+/* Gettext Package */
+#define GETTEXT_PACKAGE "@GETTEXT_PACKAGE@"
+
+/* Paths */
+#define LOCALEDIR "@LOCALE_DIR@"
+#define PKGDATADIR "@PKGDATADIR@"
+#define PKGLIBDIR "@PKGLIBDIR@"
+#define PREFIXDIR "@PREFIXDIR@"
+#define DATADIR "@DATADIR@"
+#define LIBDIR "@LIBDIR@"
+#define BUILDDIR "@BUILDDIR@"
+
+/* Name of package */
+#define PACKAGE_NAME "packagekit-qt"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "http://www.packagekit.org/pk-bugs.html"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL "http://packagekit.org"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "@VERSION@"
+
+/* Version number of package */
+#define VERSION "@VERSION@"
+
+#endif /*CONFIG_H*/
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..68f60d1
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,77 @@
+# CMakeLists for PackageKit-Qt library
+
+find_package(Qt4 REQUIRED)
+
+# Set up Qt4
+set(QT_USE_QTDBUS TRUE)
+set(QT_USE_QTSQL TRUE)
+set(QT_DONT_USE_QTGUI TRUE)
+include(${QT_USE_FILE})
+
+include_directories(${CMAKE_BINARY_DIR}
+		    ${CMAKE_CURRENT_BINARY_DIR}
+		    ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+set(packagekitqt_HEADERS
+    Daemon
+    Transaction
+    common.h
+    daemon.h
+    transaction.h
+    bitfield.h
+)
+
+set(packagekitqt_HEADERS_PRIVATE
+                daemonprivate.h
+		transactionprivate.h
+)
+
+set(packagekitqt_SRC
+		bitfield.cpp
+		daemon.cpp
+                daemonprivate.cpp
+		transaction.cpp
+		transactionprivate.cpp
+)
+
+find_file(PK_INTERFACE_XML org.freedesktop.PackageKit.xml
+	PATHS ${CMAKE_INSTALL_PREFIX}/share/dbus-1/interfaces/
+)
+find_file(PK_TRANSACTION_INTERFACE_XML org.freedesktop.PackageKit.Transaction.xml
+	PATHS ${CMAKE_INSTALL_PREFIX}/share/dbus-1/interfaces/
+)
+if (PK_INTERFACE_XML STREQUAL "PK_INTERFACE_XML-NOTFOUND" OR PK_TRANSACTION_INTERFACE_XML STREQUAL "PK_TRANSACTION_INTERFACE_XML-NOTFOUND")
+	message (FATAL_ERROR "Unable to find PackageKit DBus specifications! Please install PackageKit to continue!")
+endif ()
+
+set_source_files_properties(${PK_INTERFACE_XML} PROPERTIES CLASSNAME DaemonProxy)
+qt4_add_dbus_interface(packagekitqt_SRC ${PK_INTERFACE_XML} daemonproxy)
+
+set_source_files_properties(${PK_TRANSACTION_INTERFACE_XML} PROPERTIES CLASSNAME TransactionProxy)
+qt4_add_dbus_interface(packagekitqt_SRC ${PK_TRANSACTION_INTERFACE_XML} transactionproxy)
+
+qt4_automoc(${packagekitqt_SRC})
+qt4_wrap_cpp(packagekitqt_MOC_SRC ${packagekitqt_HEADERS} ${packagekitqt_HEADERS_PRIVATE})
+
+add_library(packagekit-qt2 SHARED ${packagekitqt_SRC} ${packagekitqt_HEADERS} ${packagekitqt_HEADERS_PRIVATE})
+set_target_properties(packagekit-qt2 PROPERTIES VERSION ${QPACKAGEKIT_VERSION} SOVERSION ${QPACKAGEKIT_API_LEVEL})
+
+target_link_libraries(packagekit-qt2
+		${QT_LIBRARIES}
+)
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/packagekit-qt2.pc.in
+  ${CMAKE_CURRENT_BINARY_DIR}/packagekit-qt2.pc
+  @ONLY
+)
+
+install(TARGETS packagekit-qt2 DESTINATION ${CMAKE_INSTALL_LIBDIR})
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/packagekit-qt2.pc
+	DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
+)
+install(FILES ${packagekitqt_HEADERS}
+	DESTINATION include/PackageKit/packagekit-qt2
+)
+
+add_subdirectory(modules)
diff --git a/src/Daemon b/src/Daemon
new file mode 100644
index 0000000..05d4d36
--- /dev/null
+++ b/src/Daemon
@@ -0,0 +1 @@
+#include "daemon.h"
diff --git a/src/Doxyfile b/src/Doxyfile
new file mode 100644
index 0000000..78c3337
--- /dev/null
+++ b/src/Doxyfile
@@ -0,0 +1,1251 @@
+# Doxyfile 1.5.2
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file that 
+# follow. The default is UTF-8 which is also the encoding used for all text before 
+# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into 
+# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of 
+# possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = QPackageKit2
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 2.0
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = ../../docs/packagekit-qt2
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
+# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, 
+# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, 
+# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, 
+# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = 
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like the Qt-style comments (thus requiring an 
+# explicit @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF      = YES
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
+# sources only. Doxygen will then generate output that is more tailored for Java. 
+# For instance, namespaces will be presented as packages, qualified scopes 
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to 
+# include (a tag file for) the STL sources as input, then you should 
+# set this tag to YES in order to let doxygen match functions declarations and 
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
+# func(std::string) {}). This also make the inheritance and collaboration 
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = NO
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = NO
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from the 
+# version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the program writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = daemon.h transaction.h package.h signature.h eula.h
+# This tag can be used to specify the character encoding of the source files that 
+# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default 
+# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. 
+# See http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
+
+FILE_PATTERNS          = 
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
+# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = *private* *proxy* polkitclient* util.*
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
+# (namespaces, classes, functions, etc.) that should be excluded from the output. 
+# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, 
+# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
+
+# Exlude signal wrappers
+EXCLUDE_SYMBOLS        = 
+EXCLUDE_SYMBOLS       += __emit*
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.  Otherwise they will link to the documentstion.
+
+REFERENCES_LINK_SOURCE = NO
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = 
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = 
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc 
+# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to 
+# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to 
+# specify the directory where the mscgen tool resides. If left empty the tool is assumed to 
+# be found in the default search path.
+
+MSCGEN_PATH            = 
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
+# generate a call dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable call graphs for selected 
+# functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
+# generate a caller dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable caller graphs for selected 
+# functions only using the \callergraph command.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
+# nodes that will be shown in the graph. If the number of nodes in a graph 
+# becomes larger than this value, doxygen will truncate the graph, which is 
+# visualized by representing a node as a red box. Note that doxygen will always 
+# show the root nodes and its direct children regardless of this setting.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, which results in a white background. 
+# Warning: Depending on the platform used, enabling this option may lead to 
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
+# read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = NO
diff --git a/src/Transaction b/src/Transaction
new file mode 100644
index 0000000..1fadece
--- /dev/null
+++ b/src/Transaction
@@ -0,0 +1 @@
+#include "transaction.h"
diff --git a/src/bitfield.cpp b/src/bitfield.cpp
new file mode 100644
index 0000000..2fa6e82
--- /dev/null
+++ b/src/bitfield.cpp
@@ -0,0 +1,70 @@
+#include "bitfield.h"
+
+using namespace PackageKit;
+
+Bitfield::Bitfield () : m_val (0)
+{
+}
+
+Bitfield::Bitfield (qulonglong val) : m_val (val)
+{
+}
+
+Bitfield::~Bitfield ()
+{
+}
+
+qulonglong Bitfield::operator& (qulonglong mask) const
+{
+	return m_val & (1ULL << mask);
+}
+
+qulonglong Bitfield::operator&= (qulonglong mask)
+{
+	m_val &= (1ULL << mask);
+	return m_val;
+}
+
+qulonglong Bitfield::operator| (qulonglong mask) const
+{
+	return m_val | (1ULL << mask);
+}
+
+qulonglong Bitfield::operator|= (qulonglong mask)
+{
+	m_val |= (1ULL << mask);
+	return m_val;
+}
+
+Bitfield Bitfield::operator& (Bitfield mask) const
+{
+	return m_val & mask.m_val;
+}
+
+Bitfield Bitfield::operator&= (Bitfield mask)
+{
+	m_val &= mask.m_val;
+	return m_val;
+}
+
+Bitfield Bitfield::operator| (Bitfield mask) const
+{
+	return m_val | mask.m_val;
+}
+
+Bitfield Bitfield::operator|= (Bitfield mask)
+{
+	m_val |= mask.m_val;
+	return m_val;
+}
+
+
+Bitfield& Bitfield::operator= (const Bitfield& other)
+{
+	if (this == &other)
+		return *this;
+
+	m_val = other.m_val;
+
+	return *this;
+}
diff --git a/src/bitfield.h b/src/bitfield.h
new file mode 100644
index 0000000..d7dd481
--- /dev/null
+++ b/src/bitfield.h
@@ -0,0 +1,33 @@
+#ifndef PACKAGEKIT_BITFIELD_H
+#define PACKAGEKIT_BITFIELD_H
+
+#include <QtGlobal>
+
+namespace PackageKit {
+
+class Bitfield
+{
+public:
+    Bitfield ();
+    Bitfield (qulonglong val);
+    ~Bitfield ();
+
+    qulonglong operator& (qulonglong mask) const;
+    qulonglong operator&= (qulonglong mask);
+    qulonglong operator| (qulonglong mask) const;
+    qulonglong operator|= (qulonglong mask);
+
+    Bitfield operator& (Bitfield mask) const;
+    Bitfield operator&= (Bitfield mask);
+    Bitfield operator| (Bitfield mask) const;
+    Bitfield operator|= (Bitfield mask);
+
+    Bitfield& operator= (const Bitfield& other);
+
+private:
+    qulonglong m_val;
+};
+
+} // End namespace PackageKit
+
+#endif
diff --git a/src/common.h b/src/common.h
new file mode 100644
index 0000000..527eead
--- /dev/null
+++ b/src/common.h
@@ -0,0 +1,35 @@
+/*
+ * This file is part of the QPackageKit project
+ * Copyright (C) 2008 Adrien Bustany <madcat at mymadcat.com>
+ *
+ * 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.
+ */
+
+#define PK_NAME					"org.freedesktop.PackageKit"
+#define PK_PATH					"/org/freedesktop/PackageKit"
+
+#define AUTH_PACKAGE_INSTALL			"org.freedesktop.packagekit.package-install"
+#define AUTH_PACKAGE_INSTALL_UNTRUSTED		"org.freedesktop.packagekit.package-install-untrusted"
+#define AUTH_SYSTEM_TRUST_SIGNING_KEY		"org.freedesktop.packagekit.system-trust-signing-key"
+#define AUTH_PACKAGE_EULA_ACCEPT		"org.freedesktop.packagekit.package-eula-accept"
+#define AUTH_PACKAGE_REMOVE			"org.freedesktop.packagekit.package-remove"
+#define AUTH_SYSTEM_UPDATE			"org.freedesktop.packagekit.system-update"
+#define AUTH_SYSTEM_SOURCES_CONFIGURE		"org.freedesktop.packagekit.system-sources-configure"
+#define AUTH_SYSTEM_SOURCES_REFRESH		"org.freedesktop.packagekit.system-sources-refresh"
+#define AUTH_SYSTEM_NETWORK_PROXY_CONFIGURE	"org.freedesktop.packagekit.system-network-proxy-configure"
+#define AUTH_CANCEL_FOREIGN 			"org.freedesktop.packagekit.cancel-foreign"
+
+#define PK_DESKTOP_DEFAULT_DATABASE		LOCALSTATEDIR "/lib/PackageKit/desktop-files.db"
diff --git a/src/daemon.cpp b/src/daemon.cpp
new file mode 100644
index 0000000..f975c1c
--- /dev/null
+++ b/src/daemon.cpp
@@ -0,0 +1,254 @@
+/*
+* This file is part of the QPackageKit project
+* Copyright (C) 2008 Adrien Bustany <madcat at mymadcat.com>
+* Copyright (C) 2010-2011 Daniel Nicoletti <dantti85-pk at yahoo.com.br>
+*
+* 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.
+*/
+
+#include <QtSql>
+
+#include "daemon.h"
+#include "daemonprivate.h"
+#include "daemonproxy.h"
+
+#include "common.h"
+
+using namespace PackageKit;
+
+Daemon* Daemon::m_global = 0;
+
+Daemon* Daemon::global()
+{
+    if(!m_global) {
+        m_global = new Daemon(qApp);
+    }
+
+    return m_global;
+}
+
+Daemon::Daemon(QObject *parent) :
+    QObject(parent),
+    d_ptr(new DaemonPrivate(this))
+{
+    Q_D(Daemon);
+    d->daemon = new ::DaemonProxy(QLatin1String(PK_NAME),
+                                  QLatin1String(PK_PATH),
+                                  QDBusConnection::systemBus(),
+                                  this);
+
+    connect(d->daemon, SIGNAL(Changed()),
+            this, SIGNAL(changed()));
+    connect(d->daemon, SIGNAL(RepoListChanged()),
+            this, SIGNAL(repoListChanged()));
+    connect(d->daemon, SIGNAL(RestartSchedule()),
+            this, SIGNAL(restartScheduled()));
+    connect(d->daemon, SIGNAL(TransactionListChanged(QStringList)),
+            this, SIGNAL(transactionListChanged(QStringList)));
+    connect(d->daemon, SIGNAL(UpdatesChanged()),
+            this, SIGNAL(updatesChanged()));
+
+    // Set up database for desktop files
+    QSqlDatabase db;
+    db = QSqlDatabase::addDatabase("QSQLITE", PK_DESKTOP_DEFAULT_DATABASE);
+    db.setDatabaseName(PK_DESKTOP_DEFAULT_DATABASE);
+    if (!db.open()) {
+        qDebug() << "Failed to initialize the desktop files database";
+    }
+}
+
+Daemon::~Daemon()
+{
+}
+
+Transaction::Roles Daemon::actions()
+{
+    Q_D(const Daemon);
+    return d->daemon->roles();
+}
+
+QString Daemon::backendName()
+{
+    Q_D(const Daemon);
+    return d->daemon->backendName();
+}
+
+QString Daemon::backendDescription()
+{
+    Q_D(const Daemon);
+    return d->daemon->backendDescription();
+}
+
+QString Daemon::backendAuthor()
+{
+    Q_D(const Daemon);
+    return d->daemon->backendAuthor();
+}
+
+Transaction::Filters Daemon::filters()
+{
+    Q_D(const Daemon);
+    return static_cast<Transaction::Filters>(d->daemon->filters());
+}
+
+Transaction::Groups Daemon::groups()
+{
+    Q_D(const Daemon);
+    return static_cast<Transaction::Groups>(d->daemon->groups());
+}
+
+bool Daemon::locked()
+{
+    Q_D(const Daemon);
+    return d->daemon->locked();
+}
+
+QStringList Daemon::mimeTypes()
+{
+    Q_D(const Daemon);
+    return d->daemon->mimeTypes();
+}
+
+Daemon::Network Daemon::networkState()
+{
+    Q_D(const Daemon);
+    return static_cast<Daemon::Network>(d->daemon->networkState());
+}
+
+QString Daemon::distroID()
+{
+    Q_D(const Daemon);
+    return d->daemon->distroId();
+}
+
+Daemon::Authorize Daemon::canAuthorize(const QString &actionId)
+{
+    Q_D(const Daemon);
+    uint ret;
+    ret = d->daemon->CanAuthorize(actionId);
+    return static_cast<Daemon::Authorize>(ret);
+}
+
+QDBusObjectPath Daemon::getTid()
+{
+    Q_D(const Daemon);
+    return d->daemon->CreateTransaction();
+}
+
+uint Daemon::getTimeSinceAction(Transaction::Role role)
+{
+    Q_D(const Daemon);
+    return d->daemon->GetTimeSinceAction(role);
+}
+
+QList<QDBusObjectPath> Daemon::getTransactionList()
+{
+    Q_D(const Daemon);
+    return d->daemon->GetTransactionList();
+}
+
+QList<Transaction*> Daemon::getTransactionObjects(QObject *parent)
+{
+    Q_D(Daemon);
+    return d->transactions(getTransactionList(), parent);
+}
+
+void Daemon::setHints(const QStringList &hints)
+{
+    Q_D(Daemon);
+    d->hints = hints;
+}
+
+void Daemon::setHints(const QString &hints)
+{
+    Q_D(Daemon);
+    d->hints = QStringList() << hints;
+}
+
+QStringList Daemon::hints()
+{
+    Q_D(const Daemon);
+    return d->hints;
+}
+
+Transaction::InternalError Daemon::setProxy(const QString& http_proxy, const QString& https_proxy, const QString& ftp_proxy, const QString& socks_proxy, const QString& no_proxy, const QString& pac)
+{
+    Q_D(const Daemon);
+    QDBusPendingReply<> r = d->daemon->SetProxy(http_proxy, https_proxy, ftp_proxy, socks_proxy, no_proxy, pac);
+    r.waitForFinished();
+    if (r.isError ()) {
+        return Transaction::parseError(r.error().name());
+    } else {
+        return Transaction::InternalErrorNone;
+    }
+}
+
+void Daemon::stateHasChanged(const QString& reason)
+{
+    Q_D(const Daemon);
+    d->daemon->StateHasChanged(reason);
+}
+
+void Daemon::suggestDaemonQuit()
+{
+    Q_D(const Daemon);
+    d->daemon->SuggestDaemonQuit();
+}
+
+uint Daemon::versionMajor()
+{
+    Q_D(const Daemon);
+    return d->daemon->versionMajor();
+}
+
+uint Daemon::versionMinor()
+{
+    Q_D(const Daemon);
+    return d->daemon->versionMinor();
+}
+
+uint Daemon::versionMicro()
+{
+    Q_D(const Daemon);
+    return d->daemon->versionMicro();
+}
+
+QString Daemon::packageName(const QString &packageID)
+{
+    return packageID.section(QLatin1Char(';'), 0, 0);
+}
+
+QString Daemon::packageVersion(const QString &packageID)
+{
+    return packageID.section(QLatin1Char(';'), 1, 1);
+}
+
+QString Daemon::packageArch(const QString &packageID)
+{
+    return packageID.section(QLatin1Char(';'), 2, 2);
+}
+
+QString Daemon::packageData(const QString &packageID)
+{
+    return packageID.section(QLatin1Char(';'), 3, 3);
+}
+
+QString Daemon::packageIcon(const QString &packageID)
+{
+    return Transaction::packageIcon(packageID);
+}
+
+#include "daemon.moc"
diff --git a/src/daemon.h b/src/daemon.h
new file mode 100644
index 0000000..28bab78
--- /dev/null
+++ b/src/daemon.h
@@ -0,0 +1,405 @@
+/*
+ * This file is part of the QPackageKit project
+ * Copyright (C) 2008 Adrien Bustany <madcat at mymadcat.com>
+ * Copyright (C) 2010-2012 Daniel Nicoletti <dantti12 at gmail.com>
+ *
+ * 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_DAEMON_H
+#define PACKAGEKIT_DAEMON_H
+
+#include <QtCore/QObject>
+#include <QtCore/QMetaEnum>
+
+#include "transaction.h"
+
+namespace PackageKit {
+
+/**
+ * \class Daemon daemon.h Daemon
+ * \author Adrien Bustany \e <madcat at mymadcat.com>
+ * \author Daniel Nicoletti \e <dantti12 at gmail.com>
+ *
+ * \brief Base class used to interact with the PackageKit daemon
+ *
+ * This class holds all the functions enabling the user to interact with the PackageKit daemon.
+ *
+ * Most methods are static so that you can just call Daemon::backendName() to get the name of the backend.
+ * 
+ * This class is a singleton, its constructor is private. Call Daemon::global() to get
+ * an instance of the Daemon object, you only need Daemon::global() when connecting to the signals
+ * of this class.
+ */
+class DaemonPrivate;
+class Daemon : public QObject
+{
+    Q_OBJECT
+    Q_ENUMS(Network)
+    Q_ENUMS(Authorize)
+    Q_PROPERTY(Transaction::Roles actions READ actions NOTIFY changed)
+    Q_PROPERTY(QString backendName READ backendName NOTIFY changed)
+    Q_PROPERTY(QString backendDescription READ backendDescription NOTIFY changed)
+    Q_PROPERTY(QString backendAuthor READ backendAuthor NOTIFY changed)
+    Q_PROPERTY(Transaction::Filters filters READ filters NOTIFY changed)
+    Q_PROPERTY(Transaction::Groups groups READ groups NOTIFY changed)
+    Q_PROPERTY(bool locked READ locked NOTIFY changed)
+    Q_PROPERTY(QStringList mimeTypes READ mimeTypes NOTIFY changed)
+    Q_PROPERTY(Daemon::Network networkState READ networkState NOTIFY changed)
+    Q_PROPERTY(QString distroID READ distroID NOTIFY changed)
+    Q_PROPERTY(uint versionMajor READ versionMajor NOTIFY changed)
+    Q_PROPERTY(uint versionMinor READ versionMinor NOTIFY changed)
+    Q_PROPERTY(uint versionMicro READ versionMicro NOTIFY changed)
+public:
+    /**
+     * Describes the current network state
+     */
+    enum Network {
+        NetworkUnknown,
+        NetworkOffline,
+        NetworkOnline,
+        NetworkWired,
+        NetworkWifi,
+        NetworkMobile
+    };
+
+    /**
+     * Describes the authorization result
+     * \sa canAuthorize()
+     */
+    enum Authorize {
+        AuthorizeUnknown,
+        AuthorizeYes,
+        AuthorizeNo,
+        AuthorizeInteractive
+    };
+
+    /**
+     * \brief Returns an instance of the Daemon
+     *
+     * The Daemon class is a singleton, you can call this method several times,
+     * a single Daemon object will exist.
+     * Use this only when connecting to this class signals
+     */
+    static Daemon* global();
+
+    /**
+     * Destructor
+     */
+    ~Daemon();
+
+    /**
+     * Returns all the actions supported by the current backend
+     */
+    Transaction::Roles actions();
+
+    /**
+     * The backend name, e.g. "yum".
+     */
+    QString backendName();
+
+    /**
+     * The backend description, e.g. "Yellow Dog Update Modifier".
+     */
+    QString backendDescription();
+
+    /**
+     * The backend author, e.g. "Joe Bloggs <joe at blogs.com>"
+     */
+    QString backendAuthor();
+
+    /**
+     * Returns the package filters supported by the current backend
+     */
+    Transaction::Filters filters();
+
+    /**
+     * Returns the package groups supported by the current backend
+     */
+    Transaction::Groups groups();
+
+    /**
+     * Set when the backend is locked and native tools would fail.
+     */
+    bool locked();
+
+    /**
+     * Returns a list containing the MIME types supported by the current backend
+     */
+    QStringList mimeTypes();
+
+    /**
+     * Returns the current network state
+     */
+    Daemon::Network networkState();
+
+    /**
+     * The distribution identifier in the
+     * distro;version;arch form,
+     * e.g. "debian;squeeze/sid;x86_64".
+     */
+    QString distroID();
+
+    /**
+     * Returns the major version number.
+     */
+    uint versionMajor();
+
+    /**
+     * The minor version number.
+     */
+    uint versionMinor();
+
+    /**
+     * The micro version number.
+     */
+    uint versionMicro();
+
+    /**
+     * Allows a client to find out if it would be allowed to authorize an action.
+     * The action ID, e.g. org.freedesktop.packagekit.system-network-proxy-configure
+     * specified in \p actionId
+     * Returm might be either yes, no or interactive \sa Authorize.
+     */
+    Q_INVOKABLE Authorize canAuthorize(const QString &actionId);
+
+    /**
+     * Returns the time (in seconds) since the specified \p action
+     */
+    Q_INVOKABLE uint getTimeSinceAction(Transaction::Role action);
+
+    /**
+     * \brief creates a new transaction path
+     * 
+     * This function register a new DBus path on PackageKit
+     * allowing a \c Transaction object to be created.
+     * 
+     * \note Unless you want to know the transaction id
+     * before creating the \c Transaction object this function
+     * is not useful as simply creating a \c Transaction object will
+     * automatically create this path.
+     */
+    Q_INVOKABLE QDBusObjectPath getTid();
+
+    /**
+     * Returns the list of current transactions
+     */
+    Q_INVOKABLE QList<QDBusObjectPath> getTransactionList();
+
+    /**
+     * Convenience function
+     * Returns the list of current transactions as \c Transaction objects
+     *
+     * You must delete these yourself or pass a
+     * \p parent for these comming transactions
+     */
+    Q_INVOKABLE QList<Transaction*> getTransactionObjects(QObject *parent = 0);
+
+    /**
+     * \brief Sets a global hints for all the transactions to be created
+     *
+     * This method allows the calling session to set transaction \p hints for
+     * the package manager which can change as the transaction runs.
+     *
+     * This method can be sent before the transaction has been run
+     * (by using Daemon::setHints) or whilst it is running
+     * (by using Transaction::setHints).
+     * There is no limit to the number of times this
+     * method can be sent, although some backends may only use the values
+     * that were set before the transaction was started.
+     *
+     * The \p hints can be filled with entries like these
+     * ('locale=en_GB.utf8','idle=true','interactive=false').
+     *
+     * \sa Transaction::setHints
+     */
+    Q_INVOKABLE void setHints(const QStringList &hints);
+
+    /**
+     * Convenience function to set global hints
+     * \sa setHints(const QStringList &hints)
+     */
+    Q_INVOKABLE void setHints(const QString &hints);
+
+    /**
+     * This method returns the current hints
+     */
+    Q_INVOKABLE QStringList hints();
+
+    /**
+     * Sets a proxy to be used for all the network operations
+     */
+    Q_INVOKABLE Transaction::InternalError setProxy(const QString &http_proxy, const QString &https_proxy, const QString &ftp_proxy, const QString &socks_proxy, const QString &no_proxy, const QString &pac);
+
+    /**
+     * \brief Tells the daemon that the system state has changed, to make it reload its cache
+     *
+     * \p reason can be resume or posttrans
+     */
+    Q_INVOKABLE void stateHasChanged(const QString &reason);
+
+    /**
+     * Asks PackageKit to quit, for example to let a native package manager operate
+     */
+    Q_INVOKABLE void suggestDaemonQuit();
+
+    /**
+     * Returns the package name from the \p packageID
+     */
+    Q_INVOKABLE QString packageName(const QString &packageID);
+
+    /**
+     * Returns the package version from the \p packageID
+     */
+    Q_INVOKABLE QString packageVersion(const QString &packageID);
+
+    /**
+     * Returns the package arch from the \p packageID
+     */
+    Q_INVOKABLE QString packageArch(const QString &packageID);
+
+    /**
+     * Returns the package data from the \p packageID
+     */
+    Q_INVOKABLE QString packageData(const QString &packageID);
+
+    /**
+     * Returns the package icon from the \p packageID
+     */
+    Q_INVOKABLE QString packageIcon(const QString &packageID);
+    
+    /**
+     * Returns the string representing the enum
+     * Useful for PackageDetails::Group
+     */
+    template<class T> static QString enumToString(int value, const char *enumName)
+    {
+        QString prefix = enumName;
+        int id = T::staticMetaObject.indexOfEnumerator(enumName);
+        QMetaEnum e = T::staticMetaObject.enumerator(id);
+        if (!e.isValid ()) {
+//             qDebug() << "Invalid enum " << prefix;
+            return QString();
+        }
+        QString enumString = e.valueToKey(value);
+        if (enumString.isNull()) {
+//             qDebug() << "Enum key not found while searching for value" << QString::number(value) << "in enum" << prefix;
+            return QString();
+        }
+
+        // Remove the prefix
+        if(!prefix.isNull() && enumString.indexOf(prefix) == 0) {
+            enumString.remove(0, prefix.length());
+        }
+
+        QString pkName;
+        for(int i = 0 ; i < enumString.length() - 1 ; ++i) {
+            pkName += enumString[i];
+            if(enumString[i+1].isUpper())
+                pkName += QChar('-');
+        }
+        pkName += enumString[enumString.length() - 1];
+
+        return pkName.toLower();
+    }
+    
+    template<class T> static int enumFromString(const QString &str, const char *enumName)
+    {
+        QString prefix = enumName;
+        QString realName;
+        bool lastWasDash = false;
+        QChar buf;
+
+        for(int i = 0 ; i < str.length() ; ++i) {
+            buf = str[i].toLower();
+            if(i == 0 || lastWasDash) {
+                buf = buf.toUpper();
+            }
+
+            lastWasDash = false;
+            if(buf == QLatin1Char('-')) {
+                lastWasDash = true;
+            } else if(buf == QLatin1Char('~')) {
+                lastWasDash = true;
+                realName += "Not";
+            } else {
+                realName += buf;
+            }
+        };
+
+        if (!prefix.isNull()) {
+            realName = prefix + realName;
+        }
+
+        int id = T::staticMetaObject.indexOfEnumerator(enumName);
+        QMetaEnum e = T::staticMetaObject.enumerator(id);
+        int enumValue = e.keyToValue(realName.toAscii().data());
+
+        if (enumValue == -1) {
+            enumValue = e.keyToValue(prefix.append("Unknown").toAscii().data());
+            if (!QString(enumName).isEmpty()) {
+//                 qDebug() << "enumFromString (" << enumName << ") : converted" << str << "to" << QString("Unknown").append(enumName) << ", enum id" << id;
+            }
+        }
+        return enumValue;
+    }
+
+Q_SIGNALS:
+    /**
+     * This signal is emitted when a property on the interface changes.
+     */
+    void changed();
+
+    /**
+     * Emitted when the list of repositories changes
+     */
+    void repoListChanged();
+
+    /**
+     * Emmitted when a restart is scheduled
+     */
+    void restartScheduled();
+
+    /**
+     * \brief Emitted when the current transactions list changes.
+     *
+     * \note This is mostly useful for monitoring the daemon's state.
+     */
+    void transactionListChanged(const QStringList &tids);
+
+    /**
+     * Emitted when new updates are available
+     */
+    void updatesChanged();
+
+    /**
+     * Emitted when the daemon quits
+     */
+    void daemonQuit();
+
+protected:
+    DaemonPrivate * const d_ptr;
+
+private:
+    Q_DECLARE_PRIVATE(Daemon);
+    Q_PRIVATE_SLOT(d_ptr, void serviceUnregistered());
+    Daemon(QObject *parent = 0);
+    static Daemon *m_global;
+};
+
+} // End namespace PackageKit
+
+#endif
diff --git a/src/daemonprivate.cpp b/src/daemonprivate.cpp
new file mode 100644
index 0000000..9765022
--- /dev/null
+++ b/src/daemonprivate.cpp
@@ -0,0 +1,59 @@
+/*
+ * This file is part of the QPackageKit project
+ * Copyright (C) 2008 Adrien Bustany <madcat at mymadcat.com>
+ * Copyright (C) 2010-2011 Daniel Nicoletti <dantti85-pk at yahoo.com.br>
+ *
+ * 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.
+ */
+
+#include "daemonprivate.h"
+#include "transaction.h"
+#include "common.h"
+
+#include <QDBusConnection>
+
+using namespace PackageKit;
+
+DaemonPrivate::DaemonPrivate(Daemon* parent) :
+    q_ptr(parent)
+{
+    m_watcher = new QDBusServiceWatcher(QLatin1String(PK_NAME),
+                                        QDBusConnection::systemBus(),
+                                        QDBusServiceWatcher::WatchForUnregistration,
+                                        q_ptr);
+    q_ptr->connect(m_watcher, SIGNAL(serviceUnregistered(QString)),
+                   SLOT(serviceUnregistered()));
+}
+
+QList<Transaction*> DaemonPrivate::transactions(const QList<QDBusObjectPath> &tids, QObject *parent)
+{
+    QList<Transaction*> transactionList;
+    foreach (const QDBusObjectPath &tid, tids) {
+        Transaction *transaction = new Transaction(tid, parent);
+        transactionList << transaction;
+    }
+    return transactionList;
+}
+
+void DaemonPrivate::serviceUnregistered()
+{
+    Q_Q(Daemon);
+
+    q->daemonQuit();
+
+    // We don't have more transactions running
+    q->transactionListChanged(QStringList());
+}
diff --git a/src/daemonprivate.h b/src/daemonprivate.h
new file mode 100644
index 0000000..1908a75
--- /dev/null
+++ b/src/daemonprivate.h
@@ -0,0 +1,56 @@
+/*
+ * This file is part of the QPackageKit project
+ * Copyright (C) 2008 Adrien Bustany <madcat at mymadcat.com>
+ * Copyright (C) 2010-2011 Daniel Nicoletti <dantti85-pk at yahoo.com.br>
+ *
+ * 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 DAEMON_PRIVATE_H
+#define DAEMON_PRIVATE_H
+
+#include <QtCore/QStringList>
+#include <QtDBus/QDBusServiceWatcher>
+
+#include "daemon.h"
+
+class DaemonProxy;
+
+namespace PackageKit {
+
+class DaemonPrivate
+{
+    Q_DECLARE_PUBLIC(Daemon)
+protected:
+    DaemonPrivate(Daemon *parent);
+    virtual ~DaemonPrivate() {};
+
+    Daemon *q_ptr;
+    ::DaemonProxy *daemon;
+    QStringList hints;
+
+    QList<Transaction*> transactions(const QList<QDBusObjectPath> &tids, QObject *parent);
+
+protected Q_SLOTS:
+    void serviceUnregistered();
+
+private:
+    QDBusServiceWatcher *m_watcher;
+};
+
+} // End namespace PackageKit
+
+#endif
diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt
new file mode 100644
index 0000000..d97a84a
--- /dev/null
+++ b/src/modules/CMakeLists.txt
@@ -0,0 +1,15 @@
+# CMakeLists for PackageKit-Qt lib extra modules
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/packagekit-qt2-config.cmake.in
+  ${CMAKE_CURRENT_BINARY_DIR}/packagekit-qt2-config.cmake
+  @ONLY
+)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/packagekit-qt2-config-version.cmake.in
+  ${CMAKE_CURRENT_BINARY_DIR}/packagekit-qt2-config-version.cmake
+  @ONLY
+)
+
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/packagekit-qt2-config.cmake
+	${CMAKE_CURRENT_BINARY_DIR}/packagekit-qt2-config-version.cmake
+	DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/packagekit-qt2/
+)
diff --git a/src/modules/packagekit-qt2-config-version.cmake.in b/src/modules/packagekit-qt2-config-version.cmake.in
new file mode 100644
index 0000000..78200a1
--- /dev/null
+++ b/src/modules/packagekit-qt2-config-version.cmake.in
@@ -0,0 +1,12 @@
+SET(PACKAGE_VERSION @VERSION@)
+IF (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
+  SET(PACKAGE_VERSION_EXACT "true")
+ENDIF (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
+IF (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
+  SET(PACKAGE_VERSION_COMPATIBLE "true")
+ELSE (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
+  SET(PACKAGE_VERSION_UNSUITABLE "true")
+ENDIF (NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
+IF (PACKAGE_VERSION_UNSUITABLE)
+  MESSAGE("VERSION CHECK FAILED FOR ${PACKAGE_FIND_NAME}. WANTED ${PACKAGE_FIND_VERSION}, HAVE ${PACKAGE_VERSION}")
+ENDIF(PACKAGE_VERSION_UNSUITABLE)
diff --git a/src/modules/packagekit-qt2-config.cmake.in b/src/modules/packagekit-qt2-config.cmake.in
new file mode 100644
index 0000000..0c5288e
--- /dev/null
+++ b/src/modules/packagekit-qt2-config.cmake.in
@@ -0,0 +1,11 @@
+# - Config information for PackageKit-Qt2
+# This file defines:
+#
+#  PACKAGEKIT_QT2_INCLUDE_DIR - the PackageKitQt2 include directory
+#  PACKAGEKIT_QT2_LIBRARIES - Link these to use PackageKitQt2
+
+SET(prefix "@CMAKE_INSTALL_PREFIX@")
+SET(exec_prefix "@CMAKE_INSTALL_PREFIX@")
+SET(PACKAGEKIT_QT2_LIBRARIES "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/libpackagekit-qt2.so" CACHE FILEPATH "Libraries for PackageKit-Qt2")
+SET(PACKAGEKIT_QT2_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include/PackageKit/packagekit-qt2" CACHE PATH "Include path for PackageKit-Qt2")
+SET(PACKAGEKIT_QT2_FOUND "TRUE")
diff --git a/src/packagekit-qt2.pc.in b/src/packagekit-qt2.pc.in
new file mode 100644
index 0000000..ca63c61
--- /dev/null
+++ b/src/packagekit-qt2.pc.in
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/include
+
+Name: packagekit-qt2
+Description: PackageKit is a system daemon for installing stuff.
+Version: @VERSION@
+Requires: QtCore, QtDBus, QtSql, QtXml
+Libs: -L${libdir} -lpackagekit-qt2
+Cflags: -I${includedir}/PackageKit/packagekit-qt2
diff --git a/src/transaction.cpp b/src/transaction.cpp
new file mode 100644
index 0000000..b3266e0
--- /dev/null
+++ b/src/transaction.cpp
@@ -0,0 +1,682 @@
+/*
+ * This file is part of the QPackageKit project
+ * Copyright (C) 2008 Adrien Bustany <madcat at mymadcat.com>
+ * Copyright (C) 2010-2011 Daniel Nicoletti <dantti85-pk at yahoo.com.br>
+ *
+ * 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.
+ */
+
+#include "transaction.h"
+#include "transactionprivate.h"
+#include "transactionproxy.h"
+
+#include "daemon.h"
+#include "common.h"
+
+#include <QtSql/QSqlQuery>
+
+#define CHECK_TRANSACTION                           \
+        if (r.isError()) {                          \
+            d->error = Transaction::parseError(r.error().name()); \
+        }                                           \
+
+#define RUN_TRANSACTION(blurb)                      \
+        Q_D(Transaction);                           \
+        if (init()) {                               \
+            QDBusPendingReply<> r = d->p->blurb;    \
+            r.waitForFinished();                    \
+            CHECK_TRANSACTION                       \
+        }                                           \
+
+using namespace PackageKit;
+
+Transaction::Transaction(QObject *parent) :
+    QObject(parent),
+    d_ptr(new TransactionPrivate(this))
+{
+    connect(Daemon::global(), SIGNAL(daemonQuit()), SLOT(daemonQuit()));
+}
+
+Transaction::Transaction(const QDBusObjectPath &tid, QObject *parent) :
+    QObject(parent),
+    d_ptr(new TransactionPrivate(this))
+{
+    connect(Daemon::global(), SIGNAL(daemonQuit()), SLOT(daemonQuit()));
+    init(tid);
+}
+
+bool Transaction::init(const QDBusObjectPath &tid)
+{
+    Q_D(Transaction);
+
+    if (d->p) {
+        return true;
+    }
+
+    // If the user used a null tid
+    // he want us to get it
+    if (tid.path().isNull()) {
+        d->tid = Daemon::global()->getTid();
+    } else {
+        d->tid = tid;
+    }
+
+    if (d->tid.path().isEmpty()) {
+        d->error = Transaction::InternalErrorDaemonUnreachable;
+        return false;
+    } else {
+        
+    }
+
+    int retry = 0;
+    do {
+        d->p = new TransactionProxy(QLatin1String(PK_NAME),
+                                    d->tid.path(),
+                                    QDBusConnection::systemBus(),
+                                    this);
+        if (!d->p->isValid()) {
+            qWarning() << "Error, cannot create transaction proxy" << d->p->lastError();
+            QDBusMessage message;
+            message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.DBus"),
+                                                     QLatin1String("/"),
+                                                     QLatin1String("org.freedesktop.DBus"),
+                                                     QLatin1String("StartServiceByName"));
+            message << qVariantFromValue(QString("org.freedesktop.PackageKit"));
+            message << qVariantFromValue(0U);
+            QDBusConnection::sessionBus().call(message, QDBus::BlockWithGui);
+
+            // The transaction was not created
+            delete d->p;
+            d->p = 0;
+            retry++;
+        } else {
+            retry = 0;
+        }
+    } while (retry == 1);
+
+    // if the transaction proxy was not created return false
+    if (!d->p) {
+        return false;
+    } else {
+        d->error = Transaction::InternalErrorNone;
+        if (!Daemon::global()->hints().isEmpty()) {
+            setHints(Daemon::global()->hints());
+        }
+    }
+
+    connect(d->p, SIGNAL(Changed()),
+            SIGNAL(changed()));
+    connect(d->p, SIGNAL(Category(QString,QString,QString,QString,QString)),
+            SIGNAL(category(QString,QString,QString,QString,QString)));
+    connect(d->p, SIGNAL(Destroy()),
+            SLOT(destroy()));
+    connect(d->p, SIGNAL(Details(QString,QString,uint,QString,QString,qulonglong)),
+            SLOT(Details(QString,QString,uint,QString,QString,qulonglong)));
+    connect(d->p, SIGNAL(DistroUpgrade(uint,QString,QString)),
+            SLOT(distroUpgrade(uint,QString,QString)));
+    connect(d->p, SIGNAL(ErrorCode(uint,QString)),
+            SLOT(errorCode(uint,QString)));
+    connect(d->p, SIGNAL(Files(QString,QStringList)),
+            SLOT(files(QString,QStringList)));
+    connect(d->p, SIGNAL(Finished(uint,uint)),
+            SLOT(finished(uint,uint)));
+    connect(d->p, SIGNAL(Message(uint,QString)),
+            SLOT(message(uint,QString)));
+    connect(d->p, SIGNAL(Package(uint,QString,QString)),
+            SLOT(Package(uint,QString,QString)));
+    connect(d->p, SIGNAL(RepoDetail(QString,QString,bool)),
+            SIGNAL(repoDetail(QString,QString,bool)));
+    connect(d->p, SIGNAL(RepoSignatureRequired(QString,QString,QString,QString,QString, QString,QString,uint)),
+            SLOT(RepoSignatureRequired(QString,QString,QString,QString,QString, QString,QString,uint)));
+    connect(d->p, SIGNAL(EulaRequired(QString,QString,QString,QString)),
+            SIGNAL(eulaRequired(QString,QString,QString,QString)));
+    connect(d->p, SIGNAL(MediaChangeRequired(uint,QString,QString)),
+            SLOT(mediaChangeRequired(uint,QString,QString)));
+    connect(d->p, SIGNAL(ItemProgress(QString,uint,uint)),
+            SLOT(ItemProgress(QString,uint,uint)));
+    connect(d->p, SIGNAL(RequireRestart(uint,QString)),
+            SLOT(requireRestart(uint,QString)));
+    connect(d->p, SIGNAL(Transaction(QDBusObjectPath,QString,bool,uint,uint,QString,uint,QString)),
+            SLOT(transaction(QDBusObjectPath,QString,bool,uint,uint,QString,uint,QString)));
+    connect(d->p, SIGNAL(UpdateDetail(QString,QStringList,QStringList,QStringList,QStringList,QStringList, uint,QString,QString,uint,QString,QString)),
+            SLOT(UpdateDetail(QString,QStringList,QStringList,QStringList,QStringList,QStringList,uint,QString,QString,uint,QString,QString)));
+    return true;
+}
+
+Transaction::Transaction(const QDBusObjectPath &tid,
+                         const QString &timespec,
+                         bool succeeded,
+                         Role role,
+                         uint duration,
+                         const QString &data,
+                         uint uid,
+                         const QString &cmdline,
+                         QObject *parent) :
+    QObject(parent),
+    d_ptr(new TransactionPrivate(this))
+{
+    Q_D(Transaction);
+    d->tid = tid;
+    d->timespec = QDateTime::fromString(timespec, Qt::ISODate);
+    d->succeeded = succeeded;
+    d->role = role;
+    d->duration = duration;
+    d->data = data;
+    d->uid = uid;
+    d->cmdline = cmdline;
+    d->error = InternalErrorNone;
+}
+
+Transaction::~Transaction()
+{
+    Q_D(Transaction);
+//     qDebug() << "Destroying transaction with tid" << d->tid;
+    delete d;
+}
+
+void Transaction::reset()
+{
+    Q_D(Transaction);
+    d->destroy();
+}
+
+QDBusObjectPath Transaction::tid() const
+{
+    Q_D(const Transaction);
+    return d->tid;
+}
+
+Transaction::InternalError Transaction::error() const
+{
+    Q_D(const Transaction);
+    return d->error;
+}
+
+bool Transaction::allowCancel() const
+{
+    Q_D(const Transaction);
+    if (d->p) {
+        return d->p->allowCancel();
+    }
+    return false;
+}
+
+bool Transaction::isCallerActive() const
+{
+    Q_D(const Transaction);
+    if (d->p) {
+        return d->p->callerActive();
+    }
+    return false;
+}
+
+void Transaction::cancel()
+{
+    RUN_TRANSACTION(Cancel())
+}
+
+QString Transaction::packageName(const QString &packageID)
+{
+    return packageID.section(QLatin1Char(';'), 0, 0);
+}
+
+QString Transaction::packageVersion(const QString &packageID)
+{
+    return packageID.section(QLatin1Char(';'), 1, 1);
+}
+
+QString Transaction::packageArch(const QString &packageID)
+{
+    return packageID.section(QLatin1Char(';'), 2, 2);
+}
+
+QString Transaction::packageData(const QString &packageID)
+{
+    return packageID.section(QLatin1Char(';'), 3, 3);
+}
+
+QString Transaction::packageIcon(const QString &packageID)
+{
+    QString path;
+    QSqlDatabase db = QSqlDatabase::database(PK_DESKTOP_DEFAULT_DATABASE);
+    if (!db.isOpen()) {
+        qDebug() << "Desktop files database is not open";
+        return path;
+    }
+
+    QSqlQuery q(db);
+    q.prepare("SELECT filename FROM cache WHERE package = :name");
+    q.bindValue(":name", Transaction::packageName(packageID));
+    if (q.exec()) {
+        if (q.next()) {
+            QFile desktopFile(q.value(0).toString());
+            if (desktopFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
+                while (!desktopFile.atEnd()) {
+                    QByteArray line = desktopFile.readLine().trimmed();
+                    if (line.startsWith("Icon=")) {
+                        path = line.mid(5);
+                        break;
+                    }
+                }
+                desktopFile.close();
+            } else {
+                qDebug() << "Cannot open desktop file " << q.value(0).toString();
+            }
+        }
+    } else {
+        qDebug() << "Error while running query " << q.executedQuery();
+    }
+
+    return path;
+}
+
+QString Transaction::lastPackage() const
+{
+    Q_D(const Transaction);
+    if (d->p) {
+        return d->p->lastPackage();
+    }
+    return QString();
+}
+
+uint Transaction::percentage() const
+{
+    Q_D(const Transaction);
+    if (d->p) {
+        return d->p->percentage();
+    }
+    return 0;
+}
+
+uint Transaction::elapsedTime() const
+{
+    Q_D(const Transaction);
+    if (d->p) {
+        return d->p->elapsedTime();
+    }
+    return 0;
+}
+
+uint Transaction::remainingTime() const
+{
+    Q_D(const Transaction);
+    if (d->p) {
+        return d->p->remainingTime();
+    }
+    return 0;
+}
+
+uint Transaction::speed() const
+{
+    Q_D(const Transaction);
+    if (d->p) {
+        return d->p->speed();
+    }
+    return 0;
+}
+
+qulonglong Transaction::downloadSizeRemaining() const
+{
+    Q_D(const Transaction);
+    if (d->p) {
+        return d->p->downloadSizeRemaining();
+    }
+    return 0;
+}    
+
+Transaction::Role Transaction::role() const
+{
+    Q_D(const Transaction);
+    if (d->p) {
+        return static_cast<Transaction::Role>(d->p->role());
+    }
+    return d->role;
+}
+
+void Transaction::setHints(const QStringList &hints)
+{
+    Q_D(Transaction);
+    if (d->p) {
+        d->p->SetHints(hints);
+    }
+}
+
+void Transaction::setHints(const QString &hints)
+{
+    setHints(QStringList() << hints);
+}
+
+Transaction::Status Transaction::status() const
+{
+    Q_D(const Transaction);
+    if (d->p) {
+        return static_cast<Transaction::Status>(d->p->status());
+    }
+    return Transaction::StatusUnknown;
+}
+
+QDateTime Transaction::timespec() const
+{
+    Q_D(const Transaction);
+    return d->timespec;
+}
+
+bool Transaction::succeeded() const
+{
+    Q_D(const Transaction);
+    return d->succeeded;
+}
+
+uint Transaction::duration() const
+{
+    Q_D(const Transaction);
+    return d->duration;
+}
+
+QString Transaction::data() const
+{
+    Q_D(const Transaction);
+    return d->data;
+}
+
+uint Transaction::uid() const
+{
+    Q_D(const Transaction);
+    if(d->p) {
+        return d->p->uid();
+    }
+    return d->uid;
+}
+
+QString Transaction::cmdline() const
+{
+    Q_D(const Transaction);
+    return d->cmdline;
+}
+
+void Transaction::acceptEula(const QString &eulaId)
+{
+    RUN_TRANSACTION(AcceptEula(eulaId))
+}
+
+void Transaction::downloadPackages(const QStringList &packageIDs, bool storeInCache)
+{
+    RUN_TRANSACTION(DownloadPackages(storeInCache, packageIDs))
+}
+
+void Transaction::downloadPackage(const QString &packageID, bool storeInCache)
+{
+    downloadPackages(QStringList() << packageID, storeInCache);
+}
+
+void Transaction::getCategories()
+{
+    RUN_TRANSACTION(GetCategories())
+}
+
+void Transaction::getDepends(const QStringList &packageIDs, Transaction::Filters filters, bool recursive)
+{
+    RUN_TRANSACTION(GetDepends(filters, packageIDs, recursive))
+}
+
+void Transaction::getDepends(const QString &packageID, Transaction::Filters filters, bool recursive)
+{
+    getDepends(QStringList() << packageID, filters, recursive);
+}
+
+void Transaction::getDetails(const QStringList &packageIDs)
+{
+    RUN_TRANSACTION(GetDetails(packageIDs))
+}
+
+void Transaction::getDetails(const QString &packageID)
+{
+    getDetails(QStringList() << packageID);
+}
+
+void Transaction::getFiles(const QStringList &packageIDs)
+{
+    RUN_TRANSACTION(GetFiles(packageIDs))
+}
+
+void Transaction::getFiles(const QString &packageID)
+{
+    getFiles(QStringList() << packageID);
+}
+
+void Transaction::getOldTransactions(uint number)
+{
+    RUN_TRANSACTION(GetOldTransactions(number))
+}
+
+void Transaction::getPackages(Transaction::Filters filters)
+{
+    RUN_TRANSACTION(GetPackages(filters))
+}
+
+void Transaction::getRepoList(Transaction::Filters filters)
+{
+    RUN_TRANSACTION(GetRepoList(filters))
+}
+
+void Transaction::getRequires(const QStringList &packageIDs, Transaction::Filters filters, bool recursive)
+{
+    RUN_TRANSACTION(GetRequires(filters, packageIDs, recursive))
+}
+
+void Transaction::getRequires(const QString &packageID, Transaction::Filters filters, bool recursive)
+{
+    getRequires(QStringList() << packageID, filters, recursive);
+}
+
+void Transaction::getUpdatesDetails(const QStringList &packageIDs)
+{
+    RUN_TRANSACTION(GetUpdateDetail(packageIDs))
+}
+
+void Transaction::getUpdateDetail(const QString &packageID)
+{
+    getUpdatesDetails(QStringList() << packageID);
+}
+
+void Transaction::getUpdates(Transaction::Filters filters)
+{
+    RUN_TRANSACTION(GetUpdates(filters))
+}
+
+void Transaction::getDistroUpgrades()
+{
+    RUN_TRANSACTION(GetDistroUpgrades())
+}
+
+void Transaction::installFiles(const QStringList &files, TransactionFlags flags)
+{
+    RUN_TRANSACTION(InstallFiles(flags, files))
+}
+
+void Transaction::installFile(const QString &file, TransactionFlags flags)
+{
+    installFiles(QStringList() << file, flags);
+}
+
+void Transaction::installPackages(const QStringList &packageIDs, TransactionFlags flags)
+{
+    RUN_TRANSACTION(InstallPackages(flags, packageIDs))
+}
+
+void Transaction::installPackage(const QString &packageID, TransactionFlags flags)
+{
+    installPackages(QStringList() << packageID, flags);
+}
+
+void Transaction::installSignature(SigType type, const QString &keyID, const QString &packageID)
+{
+    RUN_TRANSACTION(InstallSignature(type, keyID, packageID))
+}
+
+void Transaction::refreshCache(bool force)
+{
+    RUN_TRANSACTION(RefreshCache(force))
+}
+
+void Transaction::removePackages(const QStringList &packageIDs, bool allowDeps, bool autoremove, TransactionFlags flags)
+{
+    RUN_TRANSACTION(RemovePackages(flags, packageIDs, allowDeps, autoremove))
+}
+
+void Transaction::removePackage(const QString &packageID, bool allowDeps, bool autoremove, TransactionFlags flags)
+{
+    removePackages(QStringList() << packageID, allowDeps, autoremove, flags);
+}
+
+void Transaction::repairSystem(TransactionFlags flags)
+{
+    RUN_TRANSACTION(RepairSystem(flags))
+}
+
+void Transaction::repoEnable(const QString &repoId, bool enable)
+{
+    RUN_TRANSACTION(RepoEnable(repoId, enable))
+}
+
+void Transaction::repoSetData(const QString &repoId, const QString &parameter, const QString &value)
+{
+    RUN_TRANSACTION(RepoSetData(repoId, parameter, value))
+}
+
+void Transaction::resolve(const QStringList &packageNames, Transaction::Filters filters)
+{
+    RUN_TRANSACTION(Resolve(filters, packageNames))
+}
+
+void Transaction::resolve(const QString &packageName, Transaction::Filters filters)
+{
+    resolve(QStringList() << packageName, filters);
+}
+
+void Transaction::searchFiles(const QStringList &search, Transaction::Filters filters)
+{
+    RUN_TRANSACTION(SearchFiles(filters, search))
+}
+
+void Transaction::searchFiles(const QString &search, Transaction::Filters filters)
+{
+    searchFiles(QStringList() << search, filters);
+}
+
+void Transaction::searchDetails(const QStringList &search, Transaction::Filters filters)
+{
+    RUN_TRANSACTION(SearchDetails(filters, search))
+}
+
+void Transaction::searchDetails(const QString &search, Transaction::Filters filters)
+{
+    searchDetails(QStringList() << search, filters);
+}
+
+void Transaction::searchGroups(const QStringList &groups, Transaction::Filters filters)
+{
+    RUN_TRANSACTION(SearchGroups(filters, groups))
+}
+
+void Transaction::searchGroup(const QString &group, Transaction::Filters filters)
+{
+    searchGroups(QStringList() << group, filters);
+}
+
+void Transaction::searchGroup(Group group, Filters filters)
+{
+    QString groupString = Daemon::enumToString<Transaction>(group, "Group");
+    searchGroup(groupString, filters);
+}
+
+void Transaction::searchGroups(Groups groups, Transaction::Filters filters)
+{
+    searchGroups(groups, filters);
+}
+
+void Transaction::searchNames(const QStringList &search, Transaction::Filters filters)
+{
+    RUN_TRANSACTION(SearchNames(filters, search))
+}
+
+void Transaction::searchNames(const QString &search, Transaction::Filters filters)
+{
+    searchNames(QStringList() << search, filters);
+}
+
+void Transaction::updatePackages(const QStringList &packageIDs, TransactionFlags flags)
+{
+    RUN_TRANSACTION(UpdatePackages(flags, packageIDs))
+}
+
+void Transaction::updatePackage(const QString &packageID, TransactionFlags flags)
+{
+    updatePackages(QStringList() << packageID, flags);
+}
+
+void Transaction::upgradeSystem(const QString &distroId, UpgradeKind kind)
+{
+    RUN_TRANSACTION(UpgradeSystem(distroId, kind))
+}
+
+void Transaction::whatProvides(Transaction::Provides type, const QStringList &search, Transaction::Filters filters)
+{
+    RUN_TRANSACTION(WhatProvides(filters, type, search))
+}
+
+void Transaction::whatProvides(Transaction::Provides type, const QString &search, Transaction::Filters filters)
+{
+    whatProvides(type, QStringList() << search, filters);
+}
+
+Transaction::InternalError Transaction::parseError(const QString &errorName)
+{
+    QString error = errorName;
+    if (error.startsWith(QLatin1String("org.freedesktop.packagekit."))) {
+        return Transaction::InternalErrorFailedAuth;
+    }
+    
+    error.remove(QLatin1String("org.freedesktop.PackageKit.Transaction."));
+    
+    if (error.startsWith(QLatin1String("PermissionDenied")) ||
+        error.startsWith(QLatin1String("RefusedByPolicy"))) {
+        return Transaction::InternalErrorFailedAuth;
+    }
+
+    if (error.startsWith(QLatin1String("PackageIdInvalid")) ||
+        error.startsWith(QLatin1String("SearchInvalid")) ||
+        error.startsWith(QLatin1String("FilterInvalid")) ||
+        error.startsWith(QLatin1String("InvalidProvide")) ||
+        error.startsWith(QLatin1String("InputInvalid"))) {
+        return Transaction::InternalErrorInvalidInput;
+    }
+
+    if (error.startsWith(QLatin1String("PackInvalid")) ||
+        error.startsWith(QLatin1String("NoSuchFile")) ||
+        error.startsWith(QLatin1String("NoSuchDirectory"))) {
+        return Transaction::InternalErrorInvalidFile;
+    }
+
+    if (error.startsWith(QLatin1String("NotSupported"))) {
+        return Transaction::InternalErrorFunctionNotSupported;
+    }
+
+    qWarning() << "Transaction::parseError: unknown error" << errorName;
+    return Transaction::InternalErrorFailed;
+}
+
+#include "transaction.moc"
diff --git a/src/transaction.h b/src/transaction.h
new file mode 100644
index 0000000..26f7fe5
--- /dev/null
+++ b/src/transaction.h
@@ -0,0 +1,1256 @@
+/*
+ * This file is part of the QPackageKit project
+ * Copyright (C) 2008 Adrien Bustany <madcat at mymadcat.com>
+ * Copyright (C) 2010-2012 Daniel Nicoletti <dantti12 at gmail.com>
+ *
+ * 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 "bitfield.h"
+
+namespace PackageKit {
+
+/**
+* \class Transaction transaction.h Transaction
+* \author Adrien Bustany \e <madcat at mymadcat.com>
+* \author Daniel Nicoletti \e <dantti12 at gmail.com>
+*
+* \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,
+* or use the reset() method to reuse it
+*
+* \sa Daemon
+*/
+class TransactionPrivate;
+class Transaction : public QObject
+{
+    Q_OBJECT
+    Q_ENUMS(InternalsError)
+    Q_ENUMS(Role)
+    Q_ENUMS(Error)
+    Q_ENUMS(Exit)
+    Q_ENUMS(Message)
+    Q_ENUMS(Status)
+    Q_ENUMS(MediaType)
+    Q_ENUMS(Provides)
+    Q_ENUMS(DistroUpgrade)
+    Q_ENUMS(TransactionFlag)
+    Q_ENUMS(Restart)
+    Q_ENUMS(UpdateState)
+    Q_ENUMS(Group)
+    Q_ENUMS(Info)
+    Q_ENUMS(SigType)
+    Q_FLAGS(TransactionFlag TransactionFlags)
+    Q_FLAGS(Filter Filters)
+    Q_PROPERTY(bool allowCancel READ allowCancel NOTIFY changed)
+    Q_PROPERTY(bool isCallerActive READ isCallerActive NOTIFY changed)
+    Q_PROPERTY(QString lastPackage READ lastPackage NOTIFY changed)
+    Q_PROPERTY(uint percentage READ percentage NOTIFY changed)
+    Q_PROPERTY(uint elapsedTime READ elapsedTime NOTIFY changed)
+    Q_PROPERTY(uint remainingTime READ remainingTime NOTIFY changed)
+    Q_PROPERTY(uint speed READ speed NOTIFY changed)
+    Q_PROPERTY(qulonglong downloadSizeRemaining READ downloadSizeRemaining)
+    Q_PROPERTY(Role role READ role NOTIFY changed)
+    Q_PROPERTY(Status status READ status NOTIFY changed)
+public:
+    /**
+     * Describes an error at the daemon level (for example, PackageKit crashes or is unreachable)
+     *
+     * \sa Transaction::error
+     */
+    enum InternalError {
+        InternalErrorNone = 0,
+        InternalErrorUnkown,
+        InternalErrorFailed,
+        InternalErrorFailedAuth,
+        InternalErrorNoTid,
+        InternalErrorAlreadyTid,
+        InternalErrorRoleUnkown,
+        InternalErrorCannotStartDaemon,
+        InternalErrorInvalidInput,
+        InternalErrorInvalidFile,
+        InternalErrorFunctionNotSupported,
+        InternalErrorDaemonUnreachable
+    };
+
+    /**
+     * Describes the role of the transaction
+     */
+    typedef enum {
+        RoleUnknown,
+        RoleCancel,
+        RoleGetDepends,
+        RoleGetDetails,
+        RoleGetFiles,
+        RoleGetPackages,
+        RoleGetRepoList,
+        RoleGetRequires,
+        RoleGetUpdateDetail,
+        RoleGetUpdates,
+        RoleInstallFiles,
+        RoleInstallPackages,
+        RoleInstallSignature,
+        RoleRefreshCache,
+        RoleRemovePackages,
+        RoleRepoEnable,
+        RoleRepoSetData,
+        RoleResolve,
+        RoleSearchDetails,
+        RoleSearchFile,
+        RoleSearchGroup,
+        RoleSearchName,
+        RoleUpdatePackages,
+        RoleWhatProvides,
+        RoleAcceptEula,
+        RoleDownloadPackages,
+        RoleGetDistroUpgrades,
+        RoleGetCategories,
+        RoleGetOldTransactions,
+        RoleUpgradeSystem, // Since 0.6.11
+        RoleRepairSystem   // Since 0.7.2
+    } Role;
+    typedef Bitfield Roles;
+
+    /**
+     * Describes the different types of error
+     */
+    enum Error {
+        ErrorUnknown,
+        ErrorOom,
+        ErrorNoNetwork,
+        ErrorNotSupported,
+        ErrorInternalError,
+        ErrorGpgFailure,
+        ErrorPackageIdInvalid,
+        ErrorPackageNotInstalled,
+        ErrorPackageNotFound,
+        ErrorPackageAlreadyInstalled,
+        ErrorPackageDownloadFailed,
+        ErrorGroupNotFound,
+        ErrorGroupListInvalid,
+        ErrorDepResolutionFailed,
+        ErrorFilterInvalid,
+        ErrorCreateThreadFailed,
+        ErrorTransactionError,
+        ErrorTransactionCancelled,
+        ErrorNoCache,
+        ErrorRepoNotFound,
+        ErrorCannotRemoveSystemPackage,
+        ErrorProcessKill,
+        ErrorFailedInitialization,
+        ErrorFailedFinalise,
+        ErrorFailedConfigParsing,
+        ErrorCannotCancel,
+        ErrorCannotGetLock,
+        ErrorNoPackagesToUpdate,
+        ErrorCannotWriteRepoConfig,
+        ErrorLocalInstallFailed,
+        ErrorBadGpgSignature,
+        ErrorMissingGpgSignature,
+        ErrorCannotInstallSourcePackage,
+        ErrorRepoConfigurationError,
+        ErrorNoLicenseAgreement,
+        ErrorFileConflicts,
+        ErrorPackageConflicts,
+        ErrorRepoNotAvailable,
+        ErrorInvalidPackageFile,
+        ErrorPackageInstallBlocked,
+        ErrorPackageCorrupt,
+        ErrorAllPackagesAlreadyInstalled,
+        ErrorFileNotFound,
+        ErrorNoMoreMirrorsToTry,
+        ErrorNoDistroUpgradeData,
+        ErrorIncompatibleArchitecture,
+        ErrorNoSpaceOnDevice,
+        ErrorMediaChangeRequired,
+        ErrorNotAuthorized,
+        ErrorUpdateNotFound,
+        ErrorCannotInstallRepoUnsigned,
+        ErrorCannotUpdateRepoUnsigned,
+        ErrorCannotGetFilelist,
+        ErrorCannotGetRequires,
+        ErrorCannotDisableRepository,
+        ErrorRestrictedDownload,
+        ErrorPackageFailedToConfigure,
+        ErrorPackageFailedToBuild,
+        ErrorPackageFailedToInstall,
+        ErrorPackageFailedToRemove,
+        ErrorUpdateFailedDueToRunningProcess,
+        ErrorPackageDatabaseChanged,
+        ErrorProvideTypeNotSupported,
+        ErrorInstallRootInvalid,
+        ErrorCannotFetchSources,
+        ErrorCancelledPriority,
+        ErrorUnfinishedTransaction,
+        ErrorLockRequired
+    };
+
+    /**
+     * Describes how the transaction finished
+     * \sa Transaction::finished()
+     */
+    enum Exit {
+        ExitUnknown,
+        ExitSuccess,
+        ExitFailed,
+        ExitCancelled,
+        ExitKeyRequired,
+        ExitEulaRequired,
+        ExitKilled, /* when we forced the cancel, but had to sigkill */
+        ExitMediaChangeRequired,
+        ExitNeedUntrusted,
+        ExitCancelledPriority,
+        ExitRepairRequired
+    };
+
+    /**
+     * Describes the different package filters
+     */
+    enum Filter {
+        FilterUnknown        = 0x0000001,
+        FilterNone           = 0x0000002,
+        FilterInstalled      = 0x0000004,
+        FilterNotInstalled   = 0x0000008,
+        FilterDevel          = 0x0000010,
+        FilterNotDevel       = 0x0000020,
+        FilterGui            = 0x0000040,
+        FilterNotGui         = 0x0000080,
+        FilterFree           = 0x0000100,
+        FilterNotFree        = 0x0000200,
+        FilterVisible        = 0x0000400,
+        FilterNotVisible     = 0x0000800,
+        FilterSupported      = 0x0001000,
+        FilterNotSupported   = 0x0002000,
+        FilterBasename       = 0x0004000,
+        FilterNotBasename    = 0x0008000,
+        FilterNewest         = 0x0010000,
+        FilterNotNewest      = 0x0020000,
+        FilterArch           = 0x0040000,
+        FilterNotArch        = 0x0080000,
+        FilterSource         = 0x0100000,
+        FilterNotSource      = 0x0200000,
+        FilterCollections    = 0x0400000,
+        FilterNotCollections = 0x0800000,
+        FilterApplication    = 0x1000000,
+        FilterNotApplication = 0x2000000,
+        /* this always has to be at the end of the list */
+        FilterLast           = 0x4000000
+    };
+    Q_DECLARE_FLAGS(Filters, Filter)
+
+    /**
+     * Describes a message's type
+     */
+    enum Message {
+        MessageUnknown,
+        MessageBrokenMirror,
+        MessageConnectionRefused,
+        MessageParameterInvalid,
+        MessagePriorityInvalid,
+        MessageBackendError,
+        MessageDaemonError,
+        MessageCacheBeingRebuilt,
+        MessageUntrustedPackage,
+        MessageNewerPackageExists,
+        MessageCouldNotFindPackage,
+        MessageConfigFilesChanged,
+        MessagePackageAlreadyInstalled,
+        MessageAutoremoveIgnored,
+        MessageRepoMetadataDownloadFailed,
+        MessageRepoForDevelopersOnly,
+        MessageOtherUpdatesHeldBack
+    };
+
+    /**
+     * Describes the current state of the transaction
+     */
+    enum Status {
+        StatusUnknown,
+        StatusWait,
+        StatusSetup,
+        StatusRunning,
+        StatusQuery,
+        StatusInfo,
+        StatusRemove,
+        StatusRefreshCache,
+        StatusDownload,
+        StatusInstall,
+        StatusUpdate,
+        StatusCleanup,
+        StatusObsolete,
+        StatusDepResolve,
+        StatusSigCheck,
+        StatusTestCommit,
+        StatusCommit,
+        StatusRequest,
+        StatusFinished,
+        StatusCancel,
+        StatusDownloadRepository,
+        StatusDownloadPackagelist,
+        StatusDownloadFilelist,
+        StatusDownloadChangelog,
+        StatusDownloadGroup,
+        StatusDownloadUpdateinfo,
+        StatusRepackaging,
+        StatusLoadingCache,
+        StatusScanApplications,
+        StatusGeneratePackageList,
+        StatusWaitingForLock,
+        StatusWaitingForAuth,
+        StatusScanProcessList,
+        StatusCheckExecutableFiles,
+        StatusCheckLibraries,
+        StatusCopyFiles
+    };
+
+    /**
+     * Describes what kind of media is required
+     */
+    enum MediaType {
+        MediaTypeUnknown,
+        MediaTypeCd,
+        MediaTypeDvd,
+        MediaTypeDisc
+    };
+
+    /**
+     * Enum used to describe a "provides" request
+     * \sa whatProvides
+     */
+    enum Provides {
+        ProvidesUnknown,
+        ProvidesAny,
+        ProvidesModalias,
+        ProvidesCodec,
+        ProvidesMimetype,
+        ProvidesFont,
+        ProvidesHardwareDriver,
+        ProvidesPostscriptDriver,
+        ProvidesPlasmaService,
+        ProvidesSharedLib,
+        ProvidesPythonModule,
+        ProvidesLanguageSupport
+    };
+
+    /**
+     * Describes an distro upgrade state
+     */
+    enum DistroUpgrade {
+        DistroUpgradeUnknown,
+        DistroUpgradeStable,
+        DistroUpgradeUnstable
+    };
+
+    /**
+     * Describes the type of distribution upgrade to perform
+     * \sa upgradeSystem()
+     */
+    enum UpgradeKind {
+        UpgradeKindUnknown,
+        UpgradeKindMinimal,
+        UpgradeKindDefault,
+        UpgradeKindComplete
+    };
+
+    /**
+     * Describes the type of distribution upgrade to perform
+     * \sa upgradeSystem()
+     */
+    enum TransactionFlag {
+        TransactionFlagNone         = 1 << 0, // Since: 0.8.1
+        TransactionFlagOnlyTrusted  = 1 << 1, // Since: 0.8.1
+        TransactionFlagSimulate     = 1 << 2, // Since: 0.8.1
+        TransactionFlagOnlyDownload = 1 << 3  // Since: 0.8.1
+    };
+    Q_DECLARE_FLAGS(TransactionFlags, TransactionFlag)
+
+    /**
+     * Describes a restart type
+     */
+    enum Restart {
+        RestartUnknown,
+        RestartNone,
+        RestartApplication,
+        RestartSession,
+        RestartSystem,
+        RestartSecuritySession, /* a library that is being used by this package has been updated for security */
+        RestartSecuritySystem
+    };
+
+    /**
+     * Describes an update's state
+     */
+    enum UpdateState {
+        UpdateStateUnknown,
+        UpdateStateStable,
+        UpdateStateUnstable,
+        UpdateStateTesting
+    };
+
+    /**
+     * Describes the different package groups
+     */
+    enum Group {
+        GroupUnknown,
+        GroupAccessibility,
+        GroupAccessories,
+        GroupAdminTools,
+        GroupCommunication,
+        GroupDesktopGnome,
+        GroupDesktopKde,
+        GroupDesktopOther,
+        GroupDesktopXfce,
+        GroupEducation,
+        GroupFonts,
+        GroupGames,
+        GroupGraphics,
+        GroupInternet,
+        GroupLegacy,
+        GroupLocalization,
+        GroupMaps,
+        GroupMultimedia,
+        GroupNetwork,
+        GroupOffice,
+        GroupOther,
+        GroupPowerManagement,
+        GroupProgramming,
+        GroupPublishing,
+        GroupRepos,
+        GroupSecurity,
+        GroupServers,
+        GroupSystem,
+        GroupVirtualization,
+        GroupScience,
+        GroupDocumentation,
+        GroupElectronics,
+        GroupCollections,
+        GroupVendor,
+        GroupNewest
+    };
+    typedef Bitfield Groups;
+
+    /**
+     * Describes the state of a package
+     */
+    enum Info {
+        InfoUnknown,
+        InfoInstalled,
+        InfoAvailable,
+        InfoLow,
+        InfoEnhancement,
+        InfoNormal,
+        InfoBugfix,
+        InfoImportant,
+        InfoSecurity,
+        InfoBlocked,
+        InfoDownloading,
+        InfoUpdating,
+        InfoInstalling,
+        InfoRemoving,
+        InfoCleanup,
+        InfoObsoleting,
+        InfoCollectionInstalled,
+        InfoCollectionAvailable,
+        InfoFinished,
+        InfoReinstalling,
+        InfoDowngrading,
+        InfoPreparing,
+        InfoDecompressing,
+        InfoUntrusted,
+        InfoTrusted
+    };
+
+    /**
+     * Describes a signature type
+     */
+    enum SigType {
+        SigTypeUnknown,
+        SigTypeGpg
+    };
+
+    /**
+     * Create a transaction object with a new transaction id
+     *
+     * The transaction object \b cannot be reused
+     * (i.e. removePackages then installPackages)
+     *
+     * \warning after creating the transaction object be sure
+     * to verify if it doesn't have any error()
+     */
+    Transaction(QObject *parent = 0);
+
+    /**
+     * Create a transaction object with transaction id \p tid
+     * \note The if \p tid is a NULL string then it will automatically
+     * asks PackageKit for a tid
+     *
+     * The transaction object \b cannot be reused
+     * (i.e. removePackages then installPackages)
+     *
+     * \warning after creating the transaction object be sure
+     * to verify if it doesn't have any error()
+     */
+    Transaction(const QDBusObjectPath &tid, QObject *parent = 0);
+
+    /**
+     * Destructor
+     */
+    ~Transaction();
+
+    /**
+     * \brief Returns the TID of the Transaction
+     *
+     * The TID (Transaction ID) uniquely identifies the transaction.
+     *
+     * \return the TID of the current transaction
+     */
+    QDBusObjectPath tid() const;
+
+    /**
+     * \brief Returns the error status of the Transaction
+     *
+     * \return A value from TransactionError describing the state of the transaction
+     * or 0 in case of not having an error
+     */
+    Transaction::InternalError error() const;
+
+    /**
+     * Indicates whether you can cancel the transaction or not
+     * i.e. the backend forbids cancelling the transaction while
+     * it's installing packages
+     *
+     * \return true if you are able cancel the transaction, false else
+     */
+    bool allowCancel() const;
+
+    /**
+     * Indicates weither the transaction caller is active or not
+     *
+     * The caller can be inactive if it has quitted before the transaction finished.
+     *
+     * \return true if the caller is active, false else
+     */
+    bool isCallerActive() const;
+
+    /**
+     * Returns the last package processed by the transaction
+     *
+     * This is mostly used when getting an already existing Transaction, to
+     * display a more complete summary of the transaction.
+     *
+     * \return the last package processed by the transaction
+     */
+    QString lastPackage() const;
+
+    /**
+     * The percentage complete of the whole transaction.
+     * \return percentage, or 101 if not known.
+     */
+    uint percentage() const;
+
+    /**
+     * The amount of time elapsed during the transaction in seconds.
+     * \return time in seconds.
+     */
+    uint elapsedTime() const;
+
+    /**
+     * The estimated time remaining of the transaction in seconds, or 0 if not known.
+     * \return time in seconds, or 0 if not known.
+     */
+    uint remainingTime() const;
+
+    /**
+     * Returns the estimated speed of the transaction (copying, downloading, etc.)
+     * \return speed bits per second, or 0 if not known.
+     */
+    uint speed() const;
+    
+    /**
+     * Returns the number of bytes remaining to download
+     * \return bytes to download, or 0 if nothing is left to download.
+     */
+    qulonglong downloadSizeRemaining() const;
+
+    /**
+     * Returns information describing the transaction
+     * like InstallPackages, SearchName or GetUpdates
+     * \return the current role of the transaction
+     */
+    Transaction::Role role() const;
+
+    /**
+     * Returns the current state of the transaction
+     * \return a Transaction::Status value describing the status of the transaction
+     */
+    Status status() const;
+
+    /**
+     * \brief Tells the underlying package manager to use the given \p hints
+     *
+     * This method allows the calling session to set transaction \p hints for
+     * the package manager which can change as the transaction runs.
+     *
+     * This method can be sent before the transaction has been run
+     * (by using Daemon::setHints) or whilst it is running
+     * (by using Transaction::setHints).
+     * There is no limit to the number of times this
+     * method can be sent, although some backends may only use the values
+     * that were set before the transaction was started.
+     *
+     * The \p hints can be filled with entries like these
+     * ('locale=en_GB.utf8','idle=true','interactive=false').
+     *
+     * \sa Daemon::setHints
+     */
+    Q_INVOKABLE void setHints(const QStringList &hints);
+
+    /**
+     * Convenience function to set this transaction \p hints
+     * \sa getDetails(const QStringList &hints)
+     */
+    Q_INVOKABLE void setHints(const QString &hints);
+
+    /**
+     * Reset the transaction for reuse
+     */
+    Q_INVOKABLE void reset();
+
+    /**
+     * Returns the date at which the transaction was created
+     * \return a QDateTime object containing the date at which the transaction was created
+     * \note This function only returns a real value for old transactions returned by getOldTransactions
+     */
+    QDateTime timespec() const;
+
+    /**
+     * Returns weither the transaction succeded or not
+     * \return true if the transaction succeeded, false else
+     * \note This function only returns a real value for old transactions returned by getOldTransactions
+     */
+    bool succeeded() const;
+
+    /**
+     * Returns the time the transaction took to finish
+     * \return the number of milliseconds the transaction took to finish
+     * \note This function only returns a real value for old transactions returned by getOldTransactions
+     */
+    uint duration() const;
+
+    /**
+     * Returns some data set by the backend to pass additionnal information
+     * \return a string set by the backend
+     * \note This function only returns a real value for old transactions returned by getOldTransactions
+     */
+    QString data() const;
+
+    /**
+     * Returns the UID of the calling process
+     * \return the uid of the calling process
+     * \note This function only returns a real value for old transactions returned by getOldTransactions
+     */
+    uint uid() const;
+
+    /**
+     * Returns the command line for the calling process
+     * \return a string of the command line for the calling process
+     * \note This function only returns a real value for old transactions returned by getOldTransactions
+     */
+    QString cmdline() const;
+
+    /**
+     * \brief Accepts an EULA
+     *
+     * The EULA is identified by the \sa Eula structure \p info
+     *
+     * \note You need to manually restart the transaction which triggered the EULA.
+     * \sa eulaRequired()
+     */
+    void acceptEula(const QString &eulaID);
+
+    /**
+     * Download the given \p packages to a temp dir, if \p storeInCache is true
+     * the download will be stored in the package manager cache
+     */
+    void downloadPackages(const QStringList &packageIDs, bool storeInCache = false);
+
+    /**
+     * This is a convenience function to download this \p package
+     * \sa downloadPackages(const QStringList &packageIDs, bool storeInCache = false)
+     */
+    Q_INVOKABLE void downloadPackage(const QString &packageID, bool storeInCache = false);
+
+    /**
+     * Returns the collection categories
+     *
+     * \sa category
+     */
+    Q_INVOKABLE void getCategories();
+
+    /**
+     * \brief Gets the list of dependencies for the given \p packages
+     *
+     * You can use the \p filters to limit the results to certain packages.
+     * The \p recursive flag indicates if the package manager should also
+     * fetch the dependencies's dependencies.
+     *
+     * \note This method emits \sa package()
+     */
+    Q_INVOKABLE void getDepends(const QStringList &packageIDs, Filters filters, bool recursive = false);
+
+    /**
+     * Convenience function to get the dependencies of this \p package
+     * \sa getDetails(const QStringList &packageIDs, Filters filters, bool recursive = false)
+     */
+    Q_INVOKABLE void getDepends(const QString &packageID, Filters filters , bool recursive = false);
+
+    /**
+     * Gets more details about the given \p packages
+     *
+     * \sa Transaction::details
+     * \note This method emits \sa package()
+     * with details set
+     */
+    Q_INVOKABLE void getDetails(const QStringList &packageIDs);
+
+    /**
+     * Convenience function to get the details about this \p package
+     * \sa getDetails(const QStringList &packageIDs)
+     */
+    Q_INVOKABLE void getDetails(const QString &packageID);
+
+    /**
+     * Gets the files contained in the given \p packages
+     *
+     * \note This method emits \sa files()
+     */
+    Q_INVOKABLE void getFiles(const QStringList &packageIDs);
+
+    /**
+     * Convenience function to get the files contained in this \p package
+     * \sa getRequires(const QStringList &packageIDs)
+     */
+    Q_INVOKABLE void getFiles(const QString &packageIDs);
+
+    /**
+     * \brief Gets the last \p number finished transactions
+     *
+     * \note You must delete these transactions yourself
+     * \note This method emits \sa transaction()
+     */
+    Q_INVOKABLE void getOldTransactions(uint number);
+
+    /**
+     * Gets all the packages matching the given \p filters
+     *
+     * \note This method emits \sa package()
+     */
+    Q_INVOKABLE void getPackages(Filters filters = FilterNone);
+
+    /**
+     * Gets the list of software repositories matching the given \p filters
+     *
+     * \note This method emits \sa repository()
+     */
+    Q_INVOKABLE void getRepoList(Filters filter = FilterNone);
+
+    /**
+     * \brief Searches for the packages requiring the given \p packages
+     *
+     * The search can be limited using the \p filters parameter.
+     * The \p recursive flag is used to tell if the package manager should
+     * also search for the package requiring the resulting packages.
+     *
+     * \note This method emits \sa package()
+     */
+    Q_INVOKABLE void getRequires(const QStringList &packageIDs, Filters filters, bool recursive = false);
+
+    /**
+     * Convenience function to get packages requiring this package
+     * \sa getRequires(const QStringList &packageIDs, Filters filters, bool recursive = false)
+     */
+    Q_INVOKABLE void getRequires(const QString &packageID, Filters filters, bool recursive = false);
+
+    /**
+     * Retrieves more details about the update for the given \p packageIDs
+     *
+     * \note This method emits \sa updateDetail()
+     */
+    Q_INVOKABLE void getUpdatesDetails(const QStringList &packageIDs);
+
+    /**
+     * Convenience function to get update details
+     * \sa getUpdateDetail(const QStringList &packageIDs)
+     */
+    Q_INVOKABLE void getUpdateDetail(const QString &packageID);
+
+    /**
+     * \p Gets the available updates
+     *
+     * The \p filters parameters can be used to restrict the updates returned
+     *
+     * \note This method emits \sa package()
+     */
+    Q_INVOKABLE void getUpdates(Filters filters = FilterNone);
+
+    /**
+     * Retrieves the available distribution upgrades
+     *
+     * \note This method emits \sa distroUpgrade()
+     */
+    Q_INVOKABLE void getDistroUpgrades();
+
+    /**
+     * \brief Installs the local packages \p files
+     *
+     * \p onlyTrusted indicate if the packages are signed by a trusted authority
+     *
+     * \note This method emits \sa package()
+     * and \sa changed()
+     */
+    Q_INVOKABLE void installFiles(const QStringList &files, TransactionFlags flags = TransactionFlagOnlyTrusted);
+
+    /**
+     * Convenience function to install a file
+     * \sa installFiles(const QStringList &files, TransactionFlags flags)
+     */
+    Q_INVOKABLE void installFile(const QString &file, TransactionFlags flags = TransactionFlagOnlyTrusted);
+
+    /**
+     * Install the given \p packages
+     *
+     * \p only_trusted indicates if we should allow installation of untrusted packages (requires a different authorization)
+     *
+     * \note This method emits \sa package()
+     * and \sa changed()
+     */
+    Q_INVOKABLE void installPackages(const QStringList &packageIDs, TransactionFlags flags = TransactionFlagOnlyTrusted);
+
+    /**
+     * Convenience function to install a package
+     * \sa installPackages(const QStringList &packageIDs, TransactionFlags flags)
+     */
+    Q_INVOKABLE void installPackage(const QString &packageID, TransactionFlags flags = TransactionFlagOnlyTrusted);
+
+    /**
+     * \brief Installs a signature
+     *
+     * \p type, \p keyId and \p package generally come from the Transaction::repoSignatureRequired
+     */
+    Q_INVOKABLE void installSignature(SigType type, const QString &keyID, const QString &packageID);
+
+    /**
+     * Refreshes the package manager's cache
+     *
+     * \note This method emits \sa changed()
+     */
+    Q_INVOKABLE void refreshCache(bool force);
+
+    /**
+     * \brief Removes the given \p packages
+     *
+     * \p allowDeps if the package manager has the right to remove other packages which depend on the
+     * packages to be removed. \p autoRemove tells the package manager to remove all the package which
+     * won't be needed anymore after the packages are uninstalled.
+     *
+     * \note This method emits \sa package()
+     * and \sa changed()
+     */
+    Q_INVOKABLE void removePackages(const QStringList &packageIDs, bool allowDeps = false, bool autoRemove = false, TransactionFlags flags = TransactionFlagOnlyTrusted);
+
+    /**
+     * Convenience function to remove a package
+     * \sa removePackages(const PackageList  &packages, bool allowDeps = false, bool autoRemove = false, TransactionFlags flags)
+     */
+    Q_INVOKABLE void removePackage(const QString &packageID, bool allowDeps = false, bool autoRemove = false, TransactionFlags flags = TransactionFlagOnlyTrusted);
+
+    /**
+     * Repairs a broken system
+     */
+    Q_INVOKABLE void repairSystem(TransactionFlags flags = TransactionFlagOnlyTrusted);
+
+    /**
+     * Activates or disables a repository
+     */
+    Q_INVOKABLE void repoEnable(const QString &repoId, bool enable = true);
+
+    /**
+     * Sets a repository's parameter
+     */
+    Q_INVOKABLE void repoSetData(const QString &repoId, const QString &parameter, const QString &value);
+
+    /**
+     * \brief Tries to create a Package object from the package's name
+     *
+     * The \p filters can be used to restrict the search
+     *
+     * \note This method emits \sa package()
+     */
+    Q_INVOKABLE void resolve(const QStringList &packageNames, Filters filters = FilterNone);
+
+    /**
+     * Convenience function to remove a package name
+     * \sa resolve(const QStringList &packageNames, Filters filters = FilterNone)
+     */
+    Q_INVOKABLE void resolve(const QString &packageName, Filters filters = FilterNone);
+
+    /**
+     * \brief Search in the packages files
+     *
+     * \p filters can be used to restrict the returned packages
+     *
+     * \note This method emits \sa package()
+     */
+    Q_INVOKABLE void searchFiles(const QStringList &search, Filters filters = FilterNone);
+
+    /**
+     * Convenience function to search for a file
+     * \sa searchFiles(const QStringList &search, Filters filters = FilterNone)
+     */
+    Q_INVOKABLE void searchFiles(const QString &search, Filters filters = FilterNone);
+
+    /**
+     * \brief Search in the packages details
+     *
+     * \p filters can be used to restrict the returned packages
+     *
+     * \note This method emits \sa package()
+     */
+    Q_INVOKABLE void searchDetails(const QStringList &search, Filters filters = FilterNone);
+
+    /**
+     * Convenience function to search by details
+     * \sa searchDetails(const QStringList &search, Filters filters = FilterNone)
+     */
+    Q_INVOKABLE void searchDetails(const QString &search, Filters filters = FilterNone);
+
+    /**
+     * \brief Lists all the packages in the given \p group
+     *
+     * \p groups is the name of the group that you want, when searching for
+     * categories prefix it with '@'
+     * \p filters can be used to restrict the returned packages
+     *
+     * \note This method emits \sa package()
+     */
+    Q_INVOKABLE void searchGroups(const QStringList &groups, Filters filters = FilterNone);
+
+    /**
+     * Convenience function to search by group string
+     * \sa searchGroups(const QStringList &groups, Filters filters = FilterNone)
+     */
+    Q_INVOKABLE void searchGroup(const QString &group, Filters filters = FilterNone);
+    
+    /**
+     * Convenience function to search by group enum
+     * \sa searchGroups(const QStringList &groups, Filters filters = FilterNone)
+     */
+    Q_INVOKABLE void searchGroup(Group group, Filters filters = FilterNone);
+
+    /**
+     * \brief Lists all the packages in the given \p group
+     *
+     * \p filters can be used to restrict the returned packages
+     *
+     * \note This method emits \sa package()
+     */
+    Q_INVOKABLE void searchGroups(Groups group, Filters filters = FilterNone);
+
+    /**
+     * \brief Search in the packages names
+     *
+     * \p filters can be used to restrict the returned packages
+     *
+     * \note This method emits \sa package()
+     */
+    Q_INVOKABLE void searchNames(const QStringList &search, Filters filters = FilterNone);
+
+    /**
+     * Convenience function to search by names
+     * \sa searchNames(const QStringList &search, Filters filters)
+     */
+    Q_INVOKABLE void searchNames(const QString &search, Filters filters = FilterNone);
+
+    /**
+     * Update the given \p packages
+     *
+     * \p onlyTrusted indicates if this transaction is only allowed to install trusted packages
+     * \note This method emits \sa package()
+     * and \sa changed()
+     */
+    Q_INVOKABLE void updatePackages(const QStringList &packageIDs, TransactionFlags flags = TransactionFlagOnlyTrusted);
+
+    /**
+     * Convenience function to update a package
+     * \sa updatePackages(const QStringList &packageIDs, TransactionFlags flags)
+     */
+    Q_INVOKABLE void updatePackage(const QString &packageID, TransactionFlags flags = TransactionFlagOnlyTrusted);
+
+    /**
+     * Updates the whole system
+     *
+     * This method perfoms a distribution upgrade to the
+     * specified version.
+     *
+     * The \p type of upgrade, e.g. minimal, default or complete.
+     * Minimal upgrades will download the smallest amount of data
+     * before launching a installer.
+     * The default is to download enough data to launch a full
+     * graphical installer, but a complete upgrade will be
+     * required if there is no internet access during install time.
+     *
+     * \note This method typically emits
+     * \li changed()
+     * \li error()
+     * \li package()
+     */
+    Q_INVOKABLE void upgradeSystem(const QString &distroId, UpgradeKind kind);
+
+    /**
+     * Searchs for a package providing a file/a mimetype
+     *
+     * \note This method emits \sa package()
+     */
+    Q_INVOKABLE void whatProvides(Provides type, const QStringList &search, Filters filters = FilterNone);
+
+    /**
+     * Convenience function to search for what provides
+     * \sa whatProvides(Provides type, const QStringList &search, Filters filters = FilterNone)
+     */
+    Q_INVOKABLE void whatProvides(Provides type, const QString &search, Filters filters = FilterNone);
+
+    /**
+     * Cancels the transaction
+     */
+    Q_INVOKABLE void cancel();
+
+    /**
+     * Returns the package name from the \p packageID
+     */
+    static QString packageName(const QString &packageID);
+
+    /**
+     * Returns the package version from the \p packageID
+     */
+    static QString packageVersion(const QString &packageID);
+
+    /**
+     * Returns the package arch from the \p packageID
+     */
+    static QString packageArch(const QString &packageID);
+
+    /**
+     * Returns the package data from the \p packageID
+     */
+    static QString packageData(const QString &packageID);
+
+    /**
+     * Returns the package icon from the \p packageID
+     */
+    static QString packageIcon(const QString &packageID);
+
+Q_SIGNALS:
+    /**
+     * The transaction has changed one of it's properties
+     */
+    void changed();
+
+    /**
+     * \brief Sends a category
+     *
+     * \li \p parentId is the id of the parent category. A blank parent means a root category
+     * \li \p categoryId is the id of the category
+     * \li \p name is the category's name. This name is localized.
+     * \li \p summary is the category's summary. It is localized.
+     * \li \p icon is the icon identifier eg. server-cfg. If unknown, it is set to icon-missing.
+     *
+     * \sa getCategories()
+     */
+    void category(const QString &parentId, const QString &categoryId, const QString &name, const QString &summary, const QString &icon);
+
+    /**
+     * Emitted when a distribution upgrade is available
+     * \sa getDistroUpgrades()
+     */
+    void distroUpgrade(PackageKit::Transaction::DistroUpgrade type, const QString &name, const QString &description);
+
+    /**
+     * Emitted when an error occurs
+     */
+    void errorCode(PackageKit::Transaction::Error error, const QString &details);
+
+    /**
+     * Emitted when an EULA agreement prevents the transaction from running
+     * \li \c eulaId is the EULA identifier
+     * \li \c package is the package for which an EULA is required
+     * \li \c vendorName is the vendor name
+     * \li \c licenseAgreement is the EULA text
+     *
+     * \note You will need to relaunch the transaction after accepting the EULA
+     * \sa acceptEula()
+     */
+    void eulaRequired(const QString &eulaID, const QString &packageID, const QString &vendor, const QString &licenseAgreement);
+
+    /**
+     * Emitted when a different media is required in order to fetch packages
+     * which prevents the transaction from running
+     * \note You will need to relaunch the transaction after changing the media
+     * \sa Transaction::MediaType
+     */
+    void mediaChangeRequired(PackageKit::Transaction::MediaType type, const QString &id, const QString &text);
+
+    /**
+     * Sends the \p item current progress \p percentage
+     * Currently only a package id is emitted
+     */
+    void itemProgress(const QString &itemID, PackageKit::Transaction::Status status, uint percentage);
+
+    /**
+     * Sends the \p filenames contained in package \p package
+     * \sa getFiles()
+     */
+    void files(const QString &packageID, const QStringList &filenames);
+
+    /**
+     * Emitted when the transaction finishes
+     *
+     * \p status describes the exit status, \p runtime is the number of seconds it took to complete the transaction
+     */
+    void finished(PackageKit::Transaction::Exit status, uint runtime);
+
+    /**
+     * Conveys a message sent from the backend
+     *
+     * \p type is the type of the \p message
+     */
+    void message(PackageKit::Transaction::Message type, const QString &message);
+
+    /**
+     * Emitted when the transaction sends a new package
+     */
+    void package(PackageKit::Transaction::Info info, const QString &packageID, const QString &summary);
+
+    /**
+     * Emitted when the transaction sends details of a package
+     */
+    void details(const QString &packageID,
+                 const QString &license,
+                 PackageKit::Transaction::Group group,
+                 const QString &detail,
+                 const QString &url,
+                 qulonglong size);
+
+    /**
+     * Emitted when the transaction sends details of an update
+     */
+    void updateDetail(const QString &packageID,
+                      const QStringList &updates,
+                      const QStringList &obsoletes,
+                      const QStringList &vendorUrls,
+                      const QStringList &bugzillaUrls,
+                      const QStringList &cveUrls,
+                      PackageKit::Transaction::Restart restart,
+                      const QString &updateText,
+                      const QString &changelog,
+                      PackageKit::Transaction::UpdateState state,
+                      const QDateTime &issued,
+                      const QDateTime &updated);
+
+    /**
+      * Sends some additional details about a software repository
+      * \sa getRepoList()
+      */
+    void repoDetail(const QString &repoId, const QString &description, bool enabled);
+
+    /**
+     * Emitted when the user has to validate a repository's signature
+     * \sa installSignature()
+     */
+    void repoSignatureRequired(const QString &packageID,
+                               const QString &repoName,
+                               const QString &keyUrl,
+                               const QString &keyUserid,
+                               const QString &keyId,
+                               const QString &keyFingerprint,
+                               const QString &keyTimestamp,
+                               PackageKit::Transaction::SigType type);
+
+    /**
+     * Indicates that a restart is required
+     * \p package is the package who triggered the restart signal
+     */
+    void requireRestart(PackageKit::Transaction::Restart type, const QString &packageID);
+
+    /**
+     * Sends an old transaction
+     * \sa getOldTransactions()
+     */
+    void transaction(PackageKit::Transaction *transaction);
+
+protected:
+    static Transaction::InternalError parseError(const QString &errorName);
+
+    TransactionPrivate * const d_ptr;
+
+private:
+    friend class Daemon;
+    bool init(const QDBusObjectPath &tid = QDBusObjectPath());
+    Transaction(const QDBusObjectPath &tid,
+                const QString &timespec,
+                bool succeeded,
+                Role role,
+                uint duration,
+                const QString &data,
+                uint uid,
+                const QString &cmdline,
+                QObject *parent);
+    Q_DECLARE_PRIVATE(Transaction);
+    Q_DISABLE_COPY(Transaction)
+    Q_PRIVATE_SLOT(d_ptr, void Details(const QString &pid, const QString &license, uint group, const QString &detail, const QString &url, qulonglong size));
+    Q_PRIVATE_SLOT(d_ptr, void distroUpgrade(uint type, const QString &name, const QString &description));
+    Q_PRIVATE_SLOT(d_ptr, void errorCode(uint error, const QString &details));
+    Q_PRIVATE_SLOT(d_ptr, void mediaChangeRequired(uint mediaType, const QString &mediaId, const QString &mediaText));
+    Q_PRIVATE_SLOT(d_ptr, void files(const QString &pid, const QStringList &filenames));
+    Q_PRIVATE_SLOT(d_ptr, void finished(uint exitCode, uint runtime));
+    Q_PRIVATE_SLOT(d_ptr, void message(uint type, const QString &message));
+    Q_PRIVATE_SLOT(d_ptr, void Package(uint info, const QString &pid, const QString &summary));
+    Q_PRIVATE_SLOT(d_ptr, void ItemProgress(const QString &itemID, uint status, uint percentage));
+    Q_PRIVATE_SLOT(d_ptr, void RepoSignatureRequired(const QString &pid, const QString &repoName, const QString &keyUrl, const QString &keyUserid, const QString &keyId, const QString &keyFingerprint, const QString &keyTimestamp, uint type));
+    Q_PRIVATE_SLOT(d_ptr, void requireRestart(uint type, const QString &pid));
+    Q_PRIVATE_SLOT(d_ptr, void transaction(const QDBusObjectPath &oldTid, const QString &timespec, bool succeeded, uint role, uint duration, const QString &data, uint uid, const QString &cmdline));
+    Q_PRIVATE_SLOT(d_ptr, void UpdateDetail(const QString &package_id, const QStringList &updates, const QStringList &obsoletes, const QStringList &vendor_urls, const QStringList &bugzilla_urls, const QStringList &cve_urls, uint restart, const QString &update_text, const QString &changelog, uint state, const QString &issued, const QString &updated));
+    Q_PRIVATE_SLOT(d_ptr, void destroy());
+    Q_PRIVATE_SLOT(d_ptr, void daemonQuit());
+};
+Q_DECLARE_OPERATORS_FOR_FLAGS(Transaction::Filters)
+Q_DECLARE_OPERATORS_FOR_FLAGS(Transaction::TransactionFlags)
+
+} // End namespace PackageKit
+
+Q_DECLARE_METATYPE(PackageKit::Transaction::Info)
+
+#endif
diff --git a/src/transactionprivate.cpp b/src/transactionprivate.cpp
new file mode 100644
index 0000000..1bf50e1
--- /dev/null
+++ b/src/transactionprivate.cpp
@@ -0,0 +1,193 @@
+/*
+ * This file is part of the QPackageKit project
+ * Copyright (C) 2008 Adrien Bustany <madcat at mymadcat.com>
+ * Copyright (C) 2010-2011 Daniel Nicoletti <dantti85-pk at yahoo.com.br>
+ *
+ * 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.
+ */
+
+#include "transactionprivate.h"
+
+#include "transactionproxy.h"
+
+#include <QStringList>
+#include <QDebug>
+
+using namespace PackageKit;
+
+TransactionPrivate::TransactionPrivate(Transaction* parent) :
+    q_ptr(parent),
+    p(0),
+    role(Transaction::RoleUnknown)
+{
+}
+
+void TransactionPrivate::Details(const QString &pid,
+                                 const QString &license,
+                                 uint group,
+                                 const QString &detail,
+                                 const QString &url,
+                                 qulonglong size)
+{
+    Q_Q(Transaction);
+    q->details(pid,
+               license,
+               static_cast<Transaction::Group>(group),
+               detail,
+               url,
+               size);
+}
+
+void TransactionPrivate::distroUpgrade(uint type, const QString &name, const QString &description)
+{
+    Q_Q(Transaction);
+    q->distroUpgrade(static_cast<Transaction::DistroUpgrade>(type),
+                     name,
+                     description);
+}
+
+void TransactionPrivate::errorCode(uint error, const QString &details)
+{
+    Q_Q(Transaction);
+    q->errorCode(static_cast<Transaction::Error>(error), details);
+}
+
+void TransactionPrivate::mediaChangeRequired(uint mediaType, const QString &mediaId, const QString &mediaText)
+{
+    Q_Q(Transaction);
+    q->mediaChangeRequired(static_cast<Transaction::MediaType>(mediaType),
+                           mediaId,
+                           mediaText);
+}
+
+void TransactionPrivate::files(const QString &pid, const QStringList &fileList)
+{
+    Q_Q(Transaction);
+    q->files(pid, fileList);
+}
+
+void TransactionPrivate::finished(uint exitCode, uint runtime)
+{
+    Q_Q(Transaction);
+    q->finished(static_cast<Transaction::Exit>(exitCode), runtime);
+}
+
+void TransactionPrivate::destroy()
+{
+    Q_Q(Transaction);
+    if (p) {
+       delete p;
+       p = 0;
+    }
+}
+
+void TransactionPrivate::daemonQuit()
+{
+    Q_Q(Transaction);
+    if (p) {
+        q->finished(Transaction::ExitFailed, 0);
+        destroy();
+    }
+}
+
+void TransactionPrivate::message(uint type, const QString &message)
+{
+    Q_Q(Transaction);
+    q->message(static_cast<Transaction::Message>(type), message);
+}
+
+void TransactionPrivate::Package(uint info, const QString &pid, const QString &summary)
+{
+    Q_Q(Transaction);
+    q->package(static_cast<Transaction::Info>(info),
+               pid,
+               summary);
+}
+
+void TransactionPrivate::ItemProgress(const QString &itemID, uint status, uint percentage)
+{
+    Q_Q(Transaction);
+    q->itemProgress(itemID,
+                    static_cast<Transaction::Status>(status),
+                    percentage);
+}
+
+void TransactionPrivate::RepoSignatureRequired(const QString &pid,
+                                               const QString &repoName,
+                                               const QString &keyUrl,
+                                               const QString &keyUserid,
+                                               const QString &keyId,
+                                               const QString &keyFingerprint,
+                                               const QString &keyTimestamp,
+                                               uint type)
+{
+    Q_Q(Transaction);
+    q->repoSignatureRequired(pid,
+                             repoName,
+                             keyUrl,
+                             keyUserid,
+                             keyId,
+                             keyFingerprint,
+                             keyTimestamp,
+                             static_cast<Transaction::SigType>(type));
+}
+
+void TransactionPrivate::requireRestart(uint type, const QString &pid)
+{
+    Q_Q(Transaction);
+    q->requireRestart(static_cast<Transaction::Restart>(type), pid);
+}
+
+void TransactionPrivate::transaction(const QDBusObjectPath &oldTid,
+                                     const QString &timespec,
+                                     bool succeeded,
+                                     uint role,
+                                     uint duration,
+                                     const QString &data,
+                                     uint uid,
+                                     const QString &cmdline)
+{
+    Q_Q(Transaction);
+    q->transaction(new Transaction(oldTid, timespec, succeeded, static_cast<Transaction::Role>(role), duration, data, uid, cmdline, q->parent()));
+}
+
+void TransactionPrivate::UpdateDetail(const QString &package_id,
+                                      const QStringList &updates,
+                                      const QStringList &obsoletes,
+                                      const QStringList &vendor_urls,
+                                      const QStringList &bugzilla_urls,
+                                      const QStringList &cve_urls,
+                                      uint restart,
+                                      const QString &update_text,
+                                      const QString &changelog,
+                                      uint state,
+                                      const QString &issued,
+                                      const QString &updated)
+{
+    Q_Q(Transaction);
+    q->updateDetail(package_id,
+                    updates,
+                    obsoletes,
+                    vendor_urls,
+                    bugzilla_urls,
+                    cve_urls,
+                    static_cast<Transaction::Restart>(restart),
+                    update_text,
+                    changelog,
+                    static_cast<Transaction::UpdateState>(state),
+                    QDateTime::fromString(issued, Qt::ISODate),
+                    QDateTime::fromString(updated, Qt::ISODate));
+}
diff --git a/src/transactionprivate.h b/src/transactionprivate.h
new file mode 100644
index 0000000..b70aa22
--- /dev/null
+++ b/src/transactionprivate.h
@@ -0,0 +1,83 @@
+/*
+ * This file is part of the QPackageKit project
+ * Copyright (C) 2008 Adrien Bustany <madcat at mymadcat.com>
+ * Copyright (C) 2010-2011 Daniel Nicoletti <dantti85-pk at yahoo.com.br>
+ *
+ * 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_PRIVATE_H
+#define PACKAGEKIT_TRANSACTION_PRIVATE_H
+
+#include <QtCore/QString>
+#include <QtCore/QHash>
+
+#include "transaction.h"
+
+class TransactionProxy;
+
+namespace PackageKit {
+
+class TransactionPrivate
+{
+    Q_DECLARE_PUBLIC(Transaction)
+protected:
+    TransactionPrivate(Transaction *parent);
+    virtual ~TransactionPrivate() {};
+
+    QDBusObjectPath tid;
+    ::TransactionProxy* p;
+    Transaction *q_ptr;
+
+    // Only used for old transactions
+    QDateTime timespec;
+    Transaction::Role role;
+    bool succeeded;
+    uint duration;
+    QString data;
+    uint uid;
+    QString cmdline;
+
+    Transaction::InternalError error;
+
+protected Q_SLOTS:
+    void Details(const QString &pid, const QString &license, uint group, const QString &detail, const QString &url, qulonglong size);
+    void distroUpgrade(uint type, const QString &name, const QString &description);
+    void errorCode(uint error, const QString &details);
+    void mediaChangeRequired(uint mediaType, const QString &mediaId, const QString &mediaText);
+    void files(const QString &pid, const QStringList &file_list);
+    void finished(uint exitCode, uint runtime);
+    void message(uint type, const QString &message);
+    void Package(uint info, const QString &pid, const QString &summary);
+    void ItemProgress(const QString &itemID, uint status, uint percentage);
+    void RepoSignatureRequired(const QString &pid,
+                               const QString &repoName,
+                               const QString &keyUrl,
+                               const QString &keyUserid,
+                               const QString &keyId,
+                               const QString &keyFingerprint,
+                               const QString &keyTimestamp,
+                               uint type);
+    void requireRestart(uint type, const QString &pid);
+    void transaction(const QDBusObjectPath &oldTid, const QString &timespec, bool succeeded, uint role, uint duration, const QString &data, uint uid, const QString &cmdline);
+    void UpdateDetail(const QString &package_id, const QStringList &updates, const QStringList &obsoletes, const QStringList &vendor_urls, const QStringList &bugzilla_urls, const QStringList &cve_urls, uint restart, const QString &update_text, const QString &changelog, uint state, const QString &issued, const QString &updated);
+    void destroy();
+    void daemonQuit();
+};
+
+} // End namespace PackageKit
+
+#endif



More information about the Neon-commits mailing list