From 08483ba66f8da1bbec05f93e5e3493d3794c02bb Mon Sep 17 00:00:00 2001
From: root
Date: Tue, 30 Apr 2013 00:36:52 -0700
Subject: Tue Apr 30 00:36:52 PDT 2013
---
community/cinnamon-control-center/PKGBUILD | 15 +-
community/cinnamon/PKGBUILD | 14 +-
community/cinnamon/fallback-helpers.patch | 7 +-
community/cinnamon/gnome-3.8.patch | 849 +++++++----
community/cinnamon/switch-applications.patch | 24 -
community/darkhttpd/PKGBUILD | 12 +-
community/fatrat/PKGBUILD | 11 +-
community/fatrat/pion-5.0.diff | 1570 ++++++++++++++++++++
community/fbshot/PKGBUILD | 22 -
community/fltk2/PKGBUILD | 28 -
community/gemrb/PKGBUILD | 8 +-
community/gource/PKGBUILD | 8 +-
community/gpointing-device-settings/PKGBUILD | 57 +-
community/gprolog/PKGBUILD | 6 +-
community/hwinfo/PKGBUILD | 22 +-
community/libvirt/PKGBUILD | 16 +-
community/log4cpp/PKGBUILD | 18 +-
community/log4cpp/gcc43.patch | 26 -
community/muffin/PKGBUILD | 8 +-
community/nemo/PKGBUILD | 8 +-
community/pion/PKGBUILD | 20 +-
community/rawtherapee/PKGBUILD | 4 +-
community/rekonq/PKGBUILD | 6 +-
community/virtualgl/PKGBUILD | 5 +-
extra/glibmm/PKGBUILD | 6 +-
extra/goffice/PKGBUILD | 6 +-
extra/xfce4-session/PKGBUILD | 24 +-
...ession-4.10.0-store-the-watch-function-id.patch | 26 +
...10.0-use-the-async-spawn-function-of-glib.patch | 79 +
libre/cgminer-libre/PKGBUILD | 12 +-
libre/mcomix-libre/PKGBUILD | 17 +-
multilib-staging/gens-gs/PKGBUILD | 61 +
multilib-staging/gens-gs/gens-gtk.patch | 187 +++
multilib-staging/lib32-gtk2/PKGBUILD | 57 +
multilib-staging/lib32-gtk2/gtk-modules-32.patch | 12 +
multilib-staging/lib32-gtk2/gtk2.install | 16 +
.../lib32-gtk2/xid-collision-debug.patch | 15 +
multilib-staging/lib32-pango/PKGBUILD | 49 +
multilib-staging/lib32-pango/pango.install | 21 +
multilib-staging/lib32-wxgtk/PKGBUILD | 50 +
pcr/mosquitto/PKGBUILD | 27 +-
pcr/mosquitto/mosquitto.service | 22 +
42 files changed, 2904 insertions(+), 547 deletions(-)
create mode 100644 community/fatrat/pion-5.0.diff
delete mode 100644 community/fbshot/PKGBUILD
delete mode 100644 community/fltk2/PKGBUILD
delete mode 100644 community/log4cpp/gcc43.patch
create mode 100644 extra/xfce4-session/xfce4-session-4.10.0-store-the-watch-function-id.patch
create mode 100644 extra/xfce4-session/xfce4-session-4.10.0-use-the-async-spawn-function-of-glib.patch
create mode 100755 multilib-staging/gens-gs/PKGBUILD
create mode 100755 multilib-staging/gens-gs/gens-gtk.patch
create mode 100644 multilib-staging/lib32-gtk2/PKGBUILD
create mode 100644 multilib-staging/lib32-gtk2/gtk-modules-32.patch
create mode 100644 multilib-staging/lib32-gtk2/gtk2.install
create mode 100644 multilib-staging/lib32-gtk2/xid-collision-debug.patch
create mode 100644 multilib-staging/lib32-pango/PKGBUILD
create mode 100644 multilib-staging/lib32-pango/pango.install
create mode 100755 multilib-staging/lib32-wxgtk/PKGBUILD
create mode 100644 pcr/mosquitto/mosquitto.service
diff --git a/community/cinnamon-control-center/PKGBUILD b/community/cinnamon-control-center/PKGBUILD
index c303de52b..3e6a3f2de 100644
--- a/community/cinnamon-control-center/PKGBUILD
+++ b/community/cinnamon-control-center/PKGBUILD
@@ -1,17 +1,16 @@
-# $Id: PKGBUILD 88800 2013-04-22 12:29:37Z bgyorgy $
+# $Id: PKGBUILD 89381 2013-04-29 01:59:05Z bgyorgy $
# Maintainer: Alexandre Filgueira
# Jan de Groot
pkgname=cinnamon-control-center
-pkgver=1.7.3
-pkgrel=3
+pkgver=1.7.4
+pkgrel=1
pkgdesc="The Control Center for Cinnamon"
arch=('i686' 'x86_64')
-depends=('cinnamon' 'cheese' 'libgnomekbd' 'libgtop' 'network-manager-applet')
-optdepends=('mesa-demos: provides glxinfo for graphics information'
- 'gnome-color-manager: for color management tasks')
+depends=('cinnamon' 'cheese' 'libgnomekbd' 'network-manager-applet')
+optdepends=('gnome-color-manager: for color management tasks')
makedepends=('intltool' 'gnome-common')
url="https://github.com/linuxmint/cinnamon-control-center"
install=cinnamon-control-center.install
@@ -20,7 +19,7 @@ options=('!libtool' '!emptydirs')
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/cinnamon-control-center/archive/$pkgver.tar.gz"
"gnomerrlabeler.patch"
"idle-delay.patch")
-sha256sums=('44a4484238c2b9e9060d062028438df589fc29c9e3da45edad068198a990c8be'
+sha256sums=('33425b57d13acf015ddbeba8e9139f7b3488d80f900bd2234f49db1c0944c96b'
'826de61fa60349a99c6895f2ffb0ea1c7f71031b17dd80bb245e3834b30b6ff6'
'42ea92628dc234d65e582592a66c0011d5bb2c2eac14854a06f7a9dc923c8d67')
@@ -51,8 +50,6 @@ package() {
make DESTDIR="$pkgdir" install
# Remove unused stuff
- make -C panels/datetime DESTDIR="$pkgdir" uninstall
- make -C panels/printers DESTDIR="$pkgdir" uninstall
make -C panels/sound DESTDIR="$pkgdir" uninstall
make -C panels/sound/data DESTDIR="$pkgdir" install
make -C shell DESTDIR="$pkgdir" uninstall
diff --git a/community/cinnamon/PKGBUILD b/community/cinnamon/PKGBUILD
index cf5e13723..370a97288 100644
--- a/community/cinnamon/PKGBUILD
+++ b/community/cinnamon/PKGBUILD
@@ -1,12 +1,12 @@
-# $Id: PKGBUILD 88934 2013-04-25 02:04:16Z bgyorgy $
+# $Id: PKGBUILD 89378 2013-04-29 01:43:41Z bgyorgy $
# Maintainer: Alexandre Filgueira
# Contributor: M0Rf30
# Contributor: unifiedlinux
# Contributor: CReimer
pkgname=cinnamon
-pkgver=1.7.4
-pkgrel=3
+pkgver=1.7.7
+pkgrel=1
pkgdesc="Linux desktop which provides advanced innovative features and a traditional user experience"
arch=('i686' 'x86_64')
url="http://cinnamon.linuxmint.com/"
@@ -30,12 +30,12 @@ source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxmint/Cinnamon/tarball/
"gnome-3.8.patch"
"switch-applications.patch"
"fallback-helpers.patch")
-md5sums=('95260dc968ca9be32c265b35df2dd49d'
+md5sums=('a0ed2648d1d95edeac2e45e2c11508fe'
'2b1ece84416c3e4de030be15f1774d82'
'c3f25b06d345d9d36c197cd96e08f496'
- 'cf2efbe1a5c48e1be53a0e8e4b7c3181'
- '16258907bf51cd8c1569263791ffa620'
- 'f7aa8ace9c9543ba2fd66bd530244fed')
+ '5136c2901dfda09e8b969a8b62b59209'
+ '3880fa4c5234771644e5b57a1ade4456'
+ '0dac5a546bf16921a4fdde8525366a24')
build() {
cd ${srcdir}/linuxmint-Cinnamon*
diff --git a/community/cinnamon/fallback-helpers.patch b/community/cinnamon/fallback-helpers.patch
index 6fe318bd9..b6810cdba 100644
--- a/community/cinnamon/fallback-helpers.patch
+++ b/community/cinnamon/fallback-helpers.patch
@@ -3,7 +3,7 @@ diff -Naur linuxmint-Cinnamon-b41bad0.orig/files/usr/share/gnome-session/session
+++ linuxmint-Cinnamon-b41bad0/files/usr/share/gnome-session/sessions/cinnamon2d.session 2013-04-25 01:30:35.435650613 +0200
@@ -1,5 +1,5 @@
[GNOME Session]
- Name=Cinnamon 2D
+ Name=Cinnamon (Software Rendering)
-RequiredComponents=cinnamon2d;gnome-settings-daemon;
+RequiredComponents=cinnamon2d;gnome-settings-daemon;gnome-fallback-media-keys-helper;gnome-fallback-mount-helper;
DesktopName=GNOME
@@ -11,11 +11,10 @@ diff -Naur linuxmint-Cinnamon-b41bad0.orig/files/usr/share/gnome-session/session
diff -Naur linuxmint-Cinnamon-b41bad0.orig/files/usr/share/gnome-session/sessions/cinnamon.session linuxmint-Cinnamon-b41bad0/files/usr/share/gnome-session/sessions/cinnamon.session
--- linuxmint-Cinnamon-b41bad0.orig/files/usr/share/gnome-session/sessions/cinnamon.session 2013-04-15 15:55:01.000000000 +0200
+++ linuxmint-Cinnamon-b41bad0/files/usr/share/gnome-session/sessions/cinnamon.session 2013-04-25 01:30:33.645607769 +0200
-@@ -1,6 +1,6 @@
+@@ -1,5 +1,5 @@
[GNOME Session]
Name=Cinnamon
-RequiredComponents=cinnamon;gnome-settings-daemon;
+RequiredComponents=cinnamon;gnome-settings-daemon;gnome-fallback-media-keys-helper;gnome-fallback-mount-helper;
- IsRunnableHelper=/usr/lib/gnome-session/gnome-session-check-accelerated
- FallbackSession=cinnamon2d
DesktopName=GNOME
+
diff --git a/community/cinnamon/gnome-3.8.patch b/community/cinnamon/gnome-3.8.patch
index 61cd9180f..f27131aa5 100644
--- a/community/cinnamon/gnome-3.8.patch
+++ b/community/cinnamon/gnome-3.8.patch
@@ -1,7 +1,7 @@
-From f4020d3960fa96a101bdb1c3ac1e1a452dbbf48c Mon Sep 17 00:00:00 2001
+From 2ba97ed278777fcb96b86cd58e9176536585ad2d Mon Sep 17 00:00:00 2001
From: Michael Webster
Date: Fri, 19 Apr 2013 13:19:50 -0400
-Subject: [PATCH 01/15] Disable XInput on cinnamon startup (for 3.8 compat)
+Subject: [PATCH 01/16] Disable XInput on cinnamon startup (for 3.8 compat)
This has no effect on < 1.14 clutter
---
@@ -24,10 +24,10 @@ index 418fb60..ac90d91 100644
1.8.1.6
-From cc68659ecdd9e43128ec2b4555479f930c0d1ccd Mon Sep 17 00:00:00 2001
+From 72133f97fbd99c78169cec49e18b97da3edba524 Mon Sep 17 00:00:00 2001
From: Michael Webster
Date: Fri, 19 Apr 2013 13:21:40 -0400
-Subject: [PATCH 02/15] Explain change
+Subject: [PATCH 02/16] Explain change
---
src/main.c | 4 +++-
@@ -55,10 +55,10 @@ index ac90d91..9d37975 100644
1.8.1.6
-From f3777b3b2733b965bd348c7175ee67ee268aee06 Mon Sep 17 00:00:00 2001
+From 28210e29e3e0d81c68320b9511574a168f5779e4 Mon Sep 17 00:00:00 2001
From: Michael Webster
Date: Tue, 16 Apr 2013 17:01:30 -0400
-Subject: [PATCH 03/15] Add backgroundManager - this is needed for gnome 3.8
+Subject: [PATCH 03/16] Add backgroundManager - this is needed for gnome 3.8
compatibility, as gnome-settings-daemon no longer handles the desktop
background.
@@ -107,10 +107,10 @@ index 0aa47c5..a2a9479 100644
PKG_CHECK_MODULES(TRAY, gtk+-3.0)
PKG_CHECK_MODULES(GVC, libpulse libpulse-mainloop-glib gobject-2.0)
diff --git a/data/org.cinnamon.gschema.xml.in b/data/org.cinnamon.gschema.xml.in
-index ffbad92..6f55477 100644
+index f12f8c5..939ea70 100644
--- a/data/org.cinnamon.gschema.xml.in
+++ b/data/org.cinnamon.gschema.xml.in
-@@ -720,6 +720,23 @@
+@@ -746,6 +746,23 @@
@@ -134,7 +134,7 @@ index ffbad92..6f55477 100644
"wallpaper"
-@@ -750,8 +767,60 @@
+@@ -776,8 +793,60 @@
This key defines the delay for the slideshow.
@@ -253,7 +253,7 @@ index f964aed..4a38c84 100644
class BackgroundSidePage (SidePage):
def __init__(self, name, icon, keywords, advanced, content_box):
- SidePage.__init__(self, name, icon, keywords, advanced, content_box)
+ SidePage.__init__(self, name, icon, keywords, advanced, content_box, True)
- self._gnome_background_schema = Gio.Settings("org.gnome.desktop.background")
self._cinnamon_background_schema = Gio.Settings("org.cinnamon.background")
self._add_wallpapers_dialog = AddWallpapersDialog()
@@ -296,7 +296,7 @@ index f964aed..4a38c84 100644
advanced_options_box.pack_start(hbox, False, False, 0)
self.content_box.show_all()
diff --git a/js/ui/main.js b/js/ui/main.js
-index 11920a4..5cae372 100644
+index 74154ab..99aee95 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -86,6 +86,7 @@ let _cssStylesheet = null;
@@ -317,7 +317,7 @@ index 11920a4..5cae372 100644
// the color is used as the default contents for the Muffin root background
// actor so set it anyways.
diff --git a/src/Makefile.am b/src/Makefile.am
-index 51413aa..6efce18 100644
+index 3bab29c..6bac83c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -105,6 +105,7 @@ cinnamon_public_headers_h = \
@@ -820,20 +820,20 @@ index 0000000..9a56e32
1.8.1.6
-From 590a48961f2c7a1b18fb914a1d7212ffcdf03017 Mon Sep 17 00:00:00 2001
+From c971d472a88f8ea725b2bef33715016e111732d9 Mon Sep 17 00:00:00 2001
From: Michael Webster
Date: Tue, 16 Apr 2013 18:28:16 -0400
-Subject: [PATCH 04/15] Change default background
+Subject: [PATCH 04/16] Change default background
---
data/org.cinnamon.gschema.xml.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/org.cinnamon.gschema.xml.in b/data/org.cinnamon.gschema.xml.in
-index 6f55477..35b0972 100644
+index 939ea70..6d8c82d 100644
--- a/data/org.cinnamon.gschema.xml.in
+++ b/data/org.cinnamon.gschema.xml.in
-@@ -782,7 +782,7 @@
+@@ -808,7 +808,7 @@
@@ -846,20 +846,20 @@ index 6f55477..35b0972 100644
1.8.1.6
-From ac8b0954c7506ae88059e488539f88d55329f070 Mon Sep 17 00:00:00 2001
+From 0147459229b449757bac9a92c173c4bd3c2f9eca Mon Sep 17 00:00:00 2001
From: Michael Webster
Date: Tue, 16 Apr 2013 18:41:16 -0400
-Subject: [PATCH 05/15] Use distro-agnostic background..
+Subject: [PATCH 05/16] Use distro-agnostic background..
---
data/org.cinnamon.gschema.xml.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/org.cinnamon.gschema.xml.in b/data/org.cinnamon.gschema.xml.in
-index 35b0972..0d01089 100644
+index 6d8c82d..567dca8 100644
--- a/data/org.cinnamon.gschema.xml.in
+++ b/data/org.cinnamon.gschema.xml.in
-@@ -782,7 +782,7 @@
+@@ -808,7 +808,7 @@
@@ -872,33 +872,33 @@ index 35b0972..0d01089 100644
1.8.1.6
-From 81dbccb60231744999463a5b84c7c36358570929 Mon Sep 17 00:00:00 2001
+From 706d244a9dbe2ace9860044e2245a285d8473f47 Mon Sep 17 00:00:00 2001
From: dalcde
Date: Mon, 15 Apr 2013 18:34:48 +0800
-Subject: [PATCH 06/15] [GDbus] Port DBus to GDBus (AltLinux patch)
+Subject: [PATCH 06/16] [GDbus] Port DBus to GDBus (AltLinux patch)
---
- .../applets/brightness@cinnamon.org/applet.js | 39 ++--
- .../cinnamon/applets/power@cinnamon.org/applet.js | 102 +++++----
- .../cinnamon/applets/sound@cinnamon.org/applet.js | 244 +++++----------------
+ .../applets/brightness@cinnamon.org/applet.js | 39 +-
+ .../cinnamon/applets/power@cinnamon.org/applet.js | 102 ++--
+ .../cinnamon/applets/sound@cinnamon.org/applet.js | 511 ++++++---------------
.../cinnamon/applets/xrandr@cinnamon.org/applet.js | 19 +-
- js/misc/gnomeSession.js | 147 ++++---------
- js/misc/modemManager.js | 79 ++++---
- js/misc/screenSaver.js | 89 ++++----
+ js/misc/gnomeSession.js | 147 ++----
+ js/misc/modemManager.js | 79 ++--
+ js/misc/screenSaver.js | 89 ++--
js/ui/appletManager.js | 1 -
- js/ui/automountManager.js | 106 +++++----
- js/ui/autorunManager.js | 27 +--
- js/ui/calendar.js | 71 +++---
- js/ui/cinnamonDBus.js | 96 ++++----
- js/ui/endSessionDialog.js | 79 ++++---
- js/ui/keyboard.js | 48 ++--
+ js/ui/automountManager.js | 106 ++---
+ js/ui/autorunManager.js | 27 +-
+ js/ui/calendar.js | 71 +--
+ js/ui/cinnamonDBus.js | 96 ++--
+ js/ui/endSessionDialog.js | 79 ++--
+ js/ui/keyboard.js | 48 +-
js/ui/layout.js | 14 +-
- js/ui/magnifierDBus.js | 134 +++++++----
+ js/ui/magnifierDBus.js | 134 ++++--
js/ui/main.js | 6 -
js/ui/messageTray.js | 13 +-
- js/ui/notificationDaemon.js | 193 ++++++++--------
- js/ui/scripting.js | 34 ++-
- 20 files changed, 688 insertions(+), 853 deletions(-)
+ js/ui/notificationDaemon.js | 193 ++++----
+ js/ui/scripting.js | 34 +-
+ 20 files changed, 774 insertions(+), 1034 deletions(-)
diff --git a/files/usr/share/cinnamon/applets/brightness@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/brightness@cinnamon.org/applet.js
index 9cbda80..9087b25 100644
@@ -1064,12 +1064,11 @@ index c342fe7..b6b2bcd 100644
this.menu = new Applet.AppletPopupMenu(this, orientation);
this.menuManager.addMenu(this.menu);
-
-- this.set_applet_icon_symbolic_name('battery-missing');
++
+ //this.set_applet_icon_symbolic_name('battery-missing');
- this._proxy = new PowerManagerProxy(DBus.session, BUS_NAME, OBJECT_PATH);
- this._smProxy = new SettingsManagerProxy(DBus.session, BUS_NAME, OBJECT_PATH);
-
-+
-+ //this.set_applet_icon_symbolic_name('battery-missing');
+ this._proxy = new PowerManagerProxy(Gio.DBus.session, BUS_NAME, OBJECT_PATH);
+ this._smProxy = new SettingsManagerProxy(Gio.DBus.session, BUS_NAME, OBJECT_PATH);
+
@@ -1080,10 +1079,10 @@ index c342fe7..b6b2bcd 100644
this._devicesChanged();
},
-- _devicesChanged: function() {
-- this.set_applet_icon_symbolic_name('battery-missing');
+- _devicesChanged: function() {
- this._proxy.GetRemote('Icon', Lang.bind(this, function(icon, error) {
- if (icon) {
+- this.set_applet_icon_symbolic_name('battery-missing');
- let gicon = Gio.icon_new_for_string(icon);
- this._applet_icon.gicon = gicon;
- this.actor.show();
@@ -1109,7 +1108,7 @@ index c342fe7..b6b2bcd 100644
this._readOtherDevices();
this._updateLabel();
diff --git a/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js
-index 1113b1e..5bfaf26 100644
+index 50c4e1e..c8427ac 100644
--- a/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js
+++ b/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js
@@ -1,7 +1,6 @@
@@ -1120,7 +1119,7 @@ index 1113b1e..5bfaf26 100644
const Lang = imports.lang;
const Cinnamon = imports.gi.Cinnamon;
const Clutter = imports.gi.Clutter;
-@@ -12,90 +11,45 @@ const Gvc = imports.gi.Gvc;
+@@ -12,95 +11,50 @@ const Gvc = imports.gi.Gvc;
const Pango = imports.gi.Pango;
const Tooltips = imports.ui.tooltips;
@@ -1167,7 +1166,7 @@ index 1113b1e..5bfaf26 100644
- inSignature: '',
- outSignature: '' },
- { name: 'SetPosition',
-- inSignature: 'a{ov}',
+- inSignature: 'ox',
- outSignature: '' }],
- properties: [{ name: 'Metadata',
- signature: 'a{sv}',
@@ -1234,7 +1233,7 @@ index 1113b1e..5bfaf26 100644
+
+
+
-+
++
+
+
+
@@ -1250,27 +1249,28 @@ index 1113b1e..5bfaf26 100644
/* global values */
let icon_path = "/usr/share/cinnamon/theme/";
-@@ -112,120 +66,20 @@ const VOLUME_ADJUSTMENT_STEP = 0.05; /* Volume adjustment step in % */
+-let compatible_players = [ "clementine", "mpd", "exaile", "banshee", "rhythmbox", "rhythmbox3", "pragha", "quodlibet", "guayadeque", "amarok", "googlemusicframe", "xbmc", "noise", "xnoise", "gmusicbrowser", "spotify", "audacious", "vlc", "beatbox", "songbird", "pithos", "gnome-mplayer", "nuvolaplayer", "qmmp" ];
+-let support_seek = [ "clementine", "banshee", "rhythmbox", "rhythmbox3", "pragha", "quodlibet", "amarok", "noise", "xnoise", "gmusicbrowser", "spotify", "vlc", "beatbox", "gnome-mplayer", "qmmp" ];
++let compatible_players = [ "clementine", "mpd", "exaile", "banshee", "rhythmbox", "rhythmbox3", "pragha", "quodlibet", "guayadeque", "amarok", "googlemusicframe", "xbmc", "noise", "xnoise", "gmusicbrowser", "spotify", "audacious", "vlc", "beatbox", "songbird", "pithos", "gnome-mplayer", "nuvolaplayer" ];
++let support_seek = [ "clementine", "banshee", "rhythmbox", "rhythmbox3", "pragha", "quodlibet", "amarok", "noise", "xnoise", "gmusicbrowser", "spotify", "vlc", "beatbox", "gnome-mplayer" ];
+ /* dummy vars for translation */
+ let x = _("Playing");
+ x = _("Paused");
+@@ -112,131 +66,20 @@ const VOLUME_ADJUSTMENT_STEP = 0.05; /* Volume adjustment step in % */
const ICON_SIZE = 28;
-function Prop() {
- this._init.apply(this, arguments);
-+var PropProxy = Gio.DBusProxy.makeProxyWrapper(PropIFace);
-+function Prop(owner, initCallback, cancellable) {
-+ return new PropProxy(Gio.DBus.session, owner, '/org/mpris/MediaPlayer2', initCallback, cancellable);
- }
-
+-}
+-
-Prop.prototype = {
- _init: function(owner) {
- DBus.session.proxifyObject(this, owner, '/org/mpris/MediaPlayer2', this);
- }
-+var MediaServer2Proxy = Gio.DBusProxy.makeProxyWrapper(MediaServer2IFace);
-+function MediaServer2(owner, initCallback, cancellable) {
-+ return new MediaServer2Proxy(Gio.DBus.session, owner, '/org/mpris/MediaPlayer2', initCallback, cancellable);
- }
+-}
-DBus.proxifyPrototype(Prop.prototype, PropIFace)
-
+-
-function MediaServer2() {
- this._init.apply(this, arguments);
-}
@@ -1293,13 +1293,19 @@ index 1113b1e..5bfaf26 100644
- callback(this, quit);
- }));
- }
--}
++var PropProxy = Gio.DBusProxy.makeProxyWrapper(PropIFace);
++function Prop(owner, initCallback, cancellable) {
++ return new PropProxy(Gio.DBus.session, owner, '/org/mpris/MediaPlayer2', initCallback, cancellable);
+ }
-DBus.proxifyPrototype(MediaServer2.prototype, MediaServer2IFace)
--
+
-function MediaServer2Player() {
- this._init.apply(this, arguments);
--}
--
++var MediaServer2Proxy = Gio.DBusProxy.makeProxyWrapper(MediaServer2IFace);
++function MediaServer2(owner, initCallback, cancellable) {
++ return new MediaServer2Proxy(Gio.DBus.session, owner, '/org/mpris/MediaPlayer2', initCallback, cancellable);
+ }
+
-MediaServer2Player.prototype = {
- _init: function(owner) {
- this._owner = owner;
@@ -1333,6 +1339,9 @@ index 1113b1e..5bfaf26 100644
- callback(this, position);
- }));
- },
+- setPosition: function(value) {
+- this.SetRemote('Position', value);
+- },
- getShuffle: function(callback) {
- this.GetRemote('Shuffle', Lang.bind(this,
- function(shuffle, ex) {
@@ -1371,6 +1380,14 @@ index 1113b1e..5bfaf26 100644
- else
- value = "None"
- this.SetRemote('LoopStatus', value);
+- },
+- getCanSeek: function(callback) {
+- this.GetRemote('CanSeek', Lang.bind(this,
+- function(canSeek, err) {
+- if (!err) {
+- callback(this, canSeek);
+- }
+- }));
- }
+var MediaServer2PlayerProxy = Gio.DBusProxy.makeProxyWrapper(MediaServer2PlayerIFace);
+function MediaServer2Player(owner, initCallback, cancellable) {
@@ -1380,15 +1397,427 @@ index 1113b1e..5bfaf26 100644
function TrackInfo() {
this._init.apply(this, arguments);
-@@ -715,7 +569,7 @@ MyApplet.prototype = {
+@@ -355,7 +198,6 @@ Player.prototype = {
+ _init: function(system_status_button, owner) {
+ PopupMenu.PopupMenuSection.prototype._init.call(this);
+
+- this.showPosition = true; // @todo: Get from settings
+ this._owner = owner;
+ this._system_status_button = system_status_button;
+ this._name = this._owner.split('.')[3];
+@@ -389,7 +231,7 @@ Player.prototype = {
+ this.infos_top.add_actor(this._artist.getActor());
+ this.infos_bottom.add_actor(this._album.getActor());
+ this.infos_top.add_actor(this._title.getActor());
+-
++ this.infos_bottom.add_actor(this._time.getActor());
+ this._trackInfosTop.set_child(this.infos_top);
+ this._trackInfosBottom.set_child(this.infos_bottom);
+
+@@ -414,90 +256,39 @@ Player.prototype = {
+ this._trackControls.set_child(this.controls);
+ this.addActor(this._trackControls);
+
+- this._seekControls = new St.Bin({style_class: 'sound-seek', x_align: St.Align.START});
+- this.seekControls = new St.BoxLayout({style_class: 'sound-seek-box'});
+- this.seekControls.add_actor(this._time.getActor());
+-
+- this._positionSlider = new PopupMenu.PopupSliderMenuItem(0);
+- this._positionSlider.connect('value-changed', Lang.bind(this, function(item) {
+- let time = item._value * this._songLength;
+- this._time.setLabel(this._formatTime(time) + " / " + this._formatTime(this._songLength));
+- }));
+- this._positionSlider.connect('drag-end', Lang.bind(this, function(item) {
+- let time = item._value * this._songLength;
+- this._time.setLabel(this._formatTime(time) + " / " + this._formatTime(this._songLength));
+- this._wantedSeekValue = Math.round(time * 1000000);
+- this._mediaServerPlayer.SetPositionRemote(this._trackObj, time * 1000000);
+- }));
+-
+- this.sliderBin = new St.Bin({style_class: 'sound-seek-slider'});
+- this.sliderBin.set_child(this._positionSlider.actor);
+- this.seekControls.add_actor(this.sliderBin);
+- this._seekControls.set_child(this.seekControls);
+- this.addActor(this._seekControls);
+-
+- this._mediaServer.getRaise(Lang.bind(this, function(sender, raise) {
+- if (raise) {
+- this._raiseButton = new ControlButton('go-up',
+- Lang.bind(this, function () { this._mediaServer.RaiseRemote(); this._system_status_button.menu.actor.hide(); }));
+- this._raiseButtonTooltip = new Tooltips.Tooltip(this._raiseButton.button, _("Open Player"));
+- this.controls.add_actor(this._raiseButton.getActor());
+- }
+- }));
+-
+- this._mediaServer.getQuit(Lang.bind(this, function(sender, quit) {
+- if (quit) {
+- this._quitButton = new ControlButton('window-close',
+- Lang.bind(this, function () { this._mediaServer.QuitRemote(); }));
+- this.controls.add_actor(this._quitButton.getActor());
+- this._quitButtonTooltip = new Tooltips.Tooltip(this._quitButton.button, _("Quit Player"));
+- }
+- }));
++ let CanRaise = this._mediaServer.CanRaise;
++ let CanQuit = this._mediaServer.CanQuit;
++ if (CanRaise) {
++ this._raiseButton = new ControlButton('go-up',
++ Lang.bind(this, function () { this._mediaServer.RaiseRemote(); this._system_status_button.menu.actor.hide(); }));
++ this._raiseButtonTooltip = new Tooltips.Tooltip(this._raiseButton.button, _("Open Player"));
++ this.controls.add_actor(this._raiseButton.getActor());
++ }
++ if (CanQuit) {
++ this._quitButton = new ControlButton('window-close',
++ Lang.bind(this, function () { this._mediaServer.QuitRemote(); }));
++ this.controls.add_actor(this._quitButton.getActor());
++ this._quitButtonTooltip = new Tooltips.Tooltip(this._quitButton.button, _("Quit Player"));
++ }
+
+ /* this players don't support seek */
+- if (support_seek.indexOf(this._name) == -1) {
++ if (support_seek.indexOf(this._name) == -1)
+ this._time.hide();
+- this.showPosition = false;
+- this._positionSlider.hide();
+- }
+ this._getStatus();
+ this._trackId = {};
+ this._getMetadata();
+ this._currentTime = 0;
+ this._getPosition();
+- this._wantedSeekValue = 0;
+- this._updatePositionSlider();
+
+- this._prop.connect('PropertiesChanged', Lang.bind(this, function(sender, iface, value) {
++ this._prop.connectSignal('PropertiesChanged', Lang.bind(this, function(sender, iface, value) {
+ if (value["PlaybackStatus"])
+- this._setStatus(iface, value["PlaybackStatus"]);
++ this._setStatus(value["PlaybackStatus"]);
+ if (value["Metadata"])
+- this._setMetadata(iface, value["Metadata"]);
+- //qmmp
+- if(sender._dbusBusName == 'org.mpris.MediaPlayer2.qmmp') {
+- if (value["playbackStatus"])
+- this._setStatus(iface, value["playbackStatus"]);
+- if (value["metadata"])
+- this._setMetadata(sender, value["metadata"]);
+- }
++ this._setMetadata(value["Metadata"]);
+ }));
+
+- this._mediaServerPlayer.connect('Seeked', Lang.bind(this, function(sender, value) {
+- if (value > 0) {
+- this._setPosition(value);
+- }
+- // Seek initiated by the position slider
+- else if (this._wantedSeekValue > 0) {
+- // Some broken gstreamer players (Banshee) reports always 0
+- // when the track is seeked so we set the position at the
+- // value we set on the slider
+- this._setPosition(this._wantedSeekValue);
+- }
+- // Seek value send by the player
+- else
+- this._setPosition(value);
+-
+- this._wantedSeekValue = 0;
++ this._mediaServerPlayer.connectSignal('Seeked', Lang.bind(this, function(sender, iface, [value]) {
++ this._setPosition(sender, value);
+ }));
+
+ Mainloop.timeout_add(1000, Lang.bind(this, this._getPosition));
+@@ -512,45 +303,26 @@ Player.prototype = {
+ this._playerInfo.setText(this._getName() + " - " + _(status));
+ },
+
+- _updatePositionSlider: function(position) {
+- this._mediaServerPlayer.getCanSeek(Lang.bind(this, function(sender, canSeek) {
+- this._canSeek = canSeek;
+-
+- if (this._songLength == 0 || position == false)
+- this._canSeek = false
+-
+- // Clem: The following code was commented out. When the next song started, it resulted in hiding the sound menu, making it hard for the user to repeatedly click on the next song button.
+- // There's probably a better fix and this was not tested with players which don't support seeking, but it fixes the regression created by the slider (apparently when the slider is hidden it closes the menu)
+- // if (this._playerStatus == "Playing" && this._canSeek && this.showPosition)
+- // this._positionSlider.actor.show();
+- // else
+- // this._positionSlider.actor.hide();
+- }));
+- },
+-
+- _setPosition: function(value) {
+- if (value == null && this._playerStatus != 'Stopped') {
+- this._updatePositionSlider(false);
+- }
+- else {
+- this._currentTime = value / 1000000;
+- this._updateTimer();
+- }
++ _setPosition: function(sender, value) {
++ this._stopTimer();
++ this._currentTime = value / 1000000;
++ this._updateTimer();
++ if (this._playerStatus == "Playing")
++ this._runTimer();
+ },
+
+ _getPosition: function() {
+- this._mediaServerPlayer.getPosition(Lang.bind(this, function(sender, value) {
+- this._setPosition(value);
+- }));
++ this._setPosition(this._mediaServerPlayer.Position);
++ Mainloop.timeout_add(1000, Lang.bind(this, this._getPosition));
+ },
+
+- _setMetadata: function(sender, metadata) {
++ _setMetadata: function(metadata) {
+ if (metadata["mpris:length"]) {
+ // song length in secs
+- this._songLength = metadata["mpris:length"] / 1000000;
++ this._songLength = metadata["mpris:length"].unpack() / 1000000;
+ // FIXME upstream
+ if (this._name == "quodlibet")
+- this._songLength = metadata["mpris:length"] / 1000;
++ this._songLength = metadata["mpris:length"].unpack() / 1000;
+ // reset timer
+ this._stopTimer();
+ if (this._playerStatus == "Playing")
+@@ -559,26 +333,29 @@ Player.prototype = {
+ this._stopTimer();
+ }
+ if (metadata["xesam:artist"])
+- this._artist.setLabel(metadata["xesam:artist"].toString());
++ this._artist.setLabel(metadata["xesam:artist"].unpack());
+ else
+ this._artist.setLabel(_("Unknown Artist"));
+ if (metadata["xesam:album"])
+- this._album.setLabel(metadata["xesam:album"].toString());
++ this._album.setLabel(metadata["xesam:album"].unpack());
+ else
+ this._album.setLabel(_("Unknown Album"));
+ if (metadata["xesam:title"])
+- this._title.setLabel(metadata["xesam:title"].toString());
++ this._title.setLabel(metadata["xesam:title"].unpack());
+ else
+ this._title.setLabel(_("Unknown Title"));
+-
+- if (metadata["mpris:trackid"]) {
+- this._trackObj = metadata["mpris:trackid"];
+- }
++ /*if (metadata["mpris:trackid"]) {
++ this._trackId = {
++ _init: function() {
++ DBus.session.proxifyObject(this, this._owner, metadata["mpris:trackid"]);
++ }
++ }
++ }*/
+
+ let change = false;
+ if (metadata["mpris:artUrl"]) {
+- if (this._trackCoverFile != metadata["mpris:artUrl"].toString()) {
+- this._trackCoverFile = metadata["mpris:artUrl"].toString();
++ if (this._trackCoverFile != metadata["mpris:artUrl"].unpack()) {
++ this._trackCoverFile = metadata["mpris:artUrl"].unpack();
+ change = true;
+ }
+ }
+@@ -600,8 +377,7 @@ Player.prototype = {
+ cover.read_async(null, null, Lang.bind(this, this._onReadCover));
+ }
+ else {
+- cover_path = decodeURIComponent(this._trackCoverFile);
+- cover_path = cover_path.replace("file://", "");
++ cover_path = decodeURIComponent(this._trackCoverFile.substr(7));
+ this._showCover(cover_path);
+ }
+ }
+@@ -611,13 +387,10 @@ Player.prototype = {
+ },
+
+ _getMetadata: function() {
+- this._mediaServerPlayer.getMetadata(Lang.bind(this,
+- this._setMetadata
+- ));
++ this._setMetadata(this._mediaServerPlayer.Metadata);
+ },
+
+- _setStatus: function(sender, status) {
+- this._updatePositionSlider();
++ _setStatus: function(status) {
+ this._playerStatus = status;
+ if (status == "Playing") {
+ this._playButton.setIcon("media-playback-pause");
+@@ -631,53 +404,39 @@ Player.prototype = {
+ this._playButton.setIcon("media-playback-start");
+ this._stopTimer();
+ }
+-
+ this._playerInfo.setImage("player-" + status.toLowerCase());
+ this._setName(status);
+ },
+
+ _getStatus: function() {
+- this._mediaServerPlayer.getPlaybackStatus(Lang.bind(this,
+- this._setStatus
+- ));
++ this._setStatus(this._mediaServerPlayer.PlaybackStatus);
+ },
+
+ _updateRate: function() {
+- this._mediaServerPlayer.getRate(Lang.bind(this, function(sender, rate) {
+- this._rate = rate;
+- }));
++ this._rate = this._mediaServerPlayer.Rate;
+ },
+
+ _updateTimer: function() {
+- if (this.showPosition && this._canSeek) {
+- if (!isNaN(this._currentTime) && !isNaN(this._songLength) && this._currentTime > 0)
+- this._positionSlider.setValue(this._currentTime / this._songLength);
+- else
+- this._positionSlider.setValue(0);
+- }
+ this._time.setLabel(this._formatTime(this._currentTime) + " / " + this._formatTime(this._songLength));
+ },
+
+ _runTimer: function() {
+- if (this._playerStatus == 'Playing') {
+- this._timeoutId = Mainloop.timeout_add_seconds(1, Lang.bind(this, this._runTimer));
+- this._currentTime += 1;
+- this._updateTimer();
+- }
++ /*if (!Tweener.resumeTweens(this)) {
++ Tweener.addTween(this,
++ { time: this._songLength - this._currentTime,
++ transition: 'linear',
++ onUpdate: Lang.bind(this, this._updateTimer) });
++ }*/
+ },
+
+ _pauseTimer: function() {
+- if (this._timeoutId != 0) {
+- Mainloop.source_remove(this._timeoutId);
+- this._timeoutId = 0;
+- }
+- this._updateTimer();
++ //Tweener.pauseTweens(this);
+ },
+
+ _stopTimer: function() {
++ /*Tweener.removeTweens(this);
+ this._currentTime = 0;
+- this._pauseTimer();
+- this._updateTimer();
++ this._updateTimer();*/
+ },
+
+ _formatTime: function(s) {
+@@ -771,7 +530,7 @@ MediaPlayerLauncher.prototype = {
+ },
+
+ activate: function (event) {
+- this._menu.actor.hide();
++ this._menu.actor.hide();
+ this._app.activate_full(-1, event.get_time());
+ return true;
+ }
+@@ -799,7 +558,7 @@ MyApplet.prototype = {
this._players = {};
// watch players
for (var p=0; p 0){
+@@ -1137,19 +896,19 @@ MyApplet.prototype = {
+ this._mutedChanged (null, null, '_output');
+ this._volumeChanged (null, null, '_output');
+ let sinks = this._control.get_sinks();
+- this._selectDeviceItem.menu.removeAll();
+- for (let i = 0; i < sinks.length; i++) {
+- let sink = sinks[i];
+- let menuItem = new PopupMenu.PopupMenuItem(sink.get_description());
+- if (sinks[i].get_id() == this._output.get_id()) {
+- menuItem.setShowDot(true);
+- }
+- menuItem.connect('activate', Lang.bind(this, function() {
+- log('Changing default sink to ' + sink.get_description());
+- this._control.set_default_sink(sink);
+- }));
+- this._selectDeviceItem.menu.addMenuItem(menuItem);
+- }
++ this._selectDeviceItem.menu.removeAll();
++ for (let i = 0; i < sinks.length; i++) {
++ let sink = sinks[i];
++ let menuItem = new PopupMenu.PopupMenuItem(sink.get_description());
++ if (sinks[i].get_id() == this._output.get_id()) {
++ menuItem.setShowDot(true);
++ }
++ menuItem.connect('activate', Lang.bind(this, function() {
++ log('Changing default sink to ' + sink.get_description());
++ this._control.set_default_sink(sink);
++ }));
++ this._selectDeviceItem.menu.addMenuItem(menuItem);
++ }
+ } else {
+ this._outputSlider.setValue(0);
+ this.setIconName('audio-volume-muted-symbolic');
diff --git a/files/usr/share/cinnamon/applets/xrandr@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/xrandr@cinnamon.org/applet.js
index 0dcf74d..c2d152a 100644
--- a/files/usr/share/cinnamon/applets/xrandr@cinnamon.org/applet.js
@@ -2512,7 +2941,7 @@ index f55cf93..69edb51 100644
function KeyboardSource() {
this._init.apply(this, arguments);
diff --git a/js/ui/layout.js b/js/ui/layout.js
-index 76303b9..b97459e 100644
+index 3446e7a..7523b6f 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -488,12 +488,14 @@ Chrome.prototype = {
@@ -2721,14 +3150,14 @@ index 72bba26..4d21797 100644
-DBus.conformExport(CinnamonMagnifier.prototype, MagnifierIface);
-DBus.conformExport(CinnamonMagnifierZoomRegion.prototype, ZoomRegionIface);
diff --git a/js/ui/main.js b/js/ui/main.js
-index 5cae372..180db5c 100644
+index 99aee95..b602915 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -1,7 +1,6 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const Clutter = imports.gi.Clutter;
--const DBus = imports.dbus;
+-const DBus= imports.dbus;
const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;
const Gtk = imports.gi.Gtk;
@@ -3112,15 +3541,14 @@ index 42c4f6d..9163d29 100644
1.8.1.6
-From d85e078c0ed09a8b9f8d3ea2ebec1043b6d150c1 Mon Sep 17 00:00:00 2001
+From 135d2228bbf6d3b1be5f90e0e599cd3880e06d93 Mon Sep 17 00:00:00 2001
From: dalcde
Date: Tue, 16 Apr 2013 16:58:30 +0800
-Subject: [PATCH 07/15] [GDBus][Sound/Power Applet] Fix dbus port issues
+Subject: [PATCH 07/16] [GDBus][Sound/Power Applet] Fix dbus port issues
---
- .../cinnamon/applets/power@cinnamon.org/applet.js | 2 +-
- .../cinnamon/applets/sound@cinnamon.org/applet.js | 83 ++++++++++------------
- 2 files changed, 37 insertions(+), 48 deletions(-)
+ files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js
index b6b2bcd..fad39ab 100644
@@ -3135,204 +3563,14 @@ index b6b2bcd..fad39ab 100644
this._devicesChanged();
}
catch (e) {
-diff --git a/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js
-index 5bfaf26..52b8cde 100644
---- a/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js
-+++ b/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js
-@@ -37,7 +37,7 @@ const MediaServer2PlayerIFace =
-
-
-
--
-+
-
-
-
-@@ -256,23 +256,20 @@ Player.prototype = {
- this._trackControls.set_child(this.controls);
- this.addActor(this._trackControls);
-
-- this._mediaServer.getRaise(Lang.bind(this, function(sender, raise) {
-- if (raise) {
-- this._raiseButton = new ControlButton('go-up',
-- Lang.bind(this, function () { this._mediaServer.RaiseRemote(); this._system_status_button.menu.actor.hide(); }));
-- this._raiseButtonTooltip = new Tooltips.Tooltip(this._raiseButton.button, _("Open Player"));
-- this.controls.add_actor(this._raiseButton.getActor());
-- }
-- }));
--
-- this._mediaServer.getQuit(Lang.bind(this, function(sender, quit) {
-- if (quit) {
-- this._quitButton = new ControlButton('window-close',
-- Lang.bind(this, function () { this._mediaServer.QuitRemote(); }));
-- this.controls.add_actor(this._quitButton.getActor());
-- this._quitButtonTooltip = new Tooltips.Tooltip(this._quitButton.button, _("Quit Player"));
-- }
-- }));
-+ let CanRaise = this._mediaServer.CanRaise;
-+ let CanQuit = this._mediaServer.CanQuit;
-+ if (CanRaise) {
-+ this._raiseButton = new ControlButton('go-up',
-+ Lang.bind(this, function () { this._mediaServer.RaiseRemote(); this._system_status_button.menu.actor.hide(); }));
-+ this._raiseButtonTooltip = new Tooltips.Tooltip(this._raiseButton.button, _("Open Player"));
-+ this.controls.add_actor(this._raiseButton.getActor());
-+ }
-+ if (CanQuit) {
-+ this._quitButton = new ControlButton('window-close',
-+ Lang.bind(this, function () { this._mediaServer.QuitRemote(); }));
-+ this.controls.add_actor(this._quitButton.getActor());
-+ this._quitButtonTooltip = new Tooltips.Tooltip(this._quitButton.button, _("Quit Player"));
-+ }
-
- /* this players don't support seek */
- if (support_seek.indexOf(this._name) == -1)
-@@ -283,14 +280,14 @@ Player.prototype = {
- this._currentTime = 0;
- this._getPosition();
-
-- this._prop.connect('PropertiesChanged', Lang.bind(this, function(sender, iface, value) {
-+ this._prop.connectSignal('PropertiesChanged', Lang.bind(this, function(sender, iface, value) {
- if (value["PlaybackStatus"])
-- this._setStatus(iface, value["PlaybackStatus"]);
-+ this._setStatus(value["PlaybackStatus"]);
- if (value["Metadata"])
-- this._setMetadata(iface, value["Metadata"]);
-+ this._setMetadata(value["Metadata"]);
- }));
-
-- this._mediaServerPlayer.connect('Seeked', Lang.bind(this, function(sender, value) {
-+ this._mediaServerPlayer.connectSignal('Seeked', Lang.bind(this, function(sender, iface, [value]) {
- this._setPosition(sender, value);
- }));
-
-@@ -315,19 +312,17 @@ Player.prototype = {
- },
-
- _getPosition: function() {
-- this._mediaServerPlayer.getPosition(Lang.bind(this,
-- this._setPosition
-- ));
-+ this._setPosition(this._mediaServerPlayer.Position);
- Mainloop.timeout_add(1000, Lang.bind(this, this._getPosition));
- },
-
-- _setMetadata: function(sender, metadata) {
-+ _setMetadata: function(metadata) {
- if (metadata["mpris:length"]) {
- // song length in secs
-- this._songLength = metadata["mpris:length"] / 1000000;
-+ this._songLength = metadata["mpris:length"].unpack() / 1000000;
- // FIXME upstream
- if (this._name == "quodlibet")
-- this._songLength = metadata["mpris:length"] / 1000;
-+ this._songLength = metadata["mpris:length"].unpack() / 1000;
- // reset timer
- this._stopTimer();
- if (this._playerStatus == "Playing")
-@@ -338,15 +333,15 @@ Player.prototype = {
- this._stopTimer();
- }
- if (metadata["xesam:artist"])
-- this._artist.setLabel(metadata["xesam:artist"].toString());
-+ this._artist.setLabel(metadata["xesam:artist"].unpack());
- else
- this._artist.setLabel(_("Unknown Artist"));
- if (metadata["xesam:album"])
-- this._album.setLabel(metadata["xesam:album"].toString());
-+ this._album.setLabel(metadata["xesam:album"].unpack());
- else
- this._album.setLabel(_("Unknown Album"));
- if (metadata["xesam:title"])
-- this._title.setLabel(metadata["xesam:title"].toString());
-+ this._title.setLabel(metadata["xesam:title"].unpack());
- else
- this._title.setLabel(_("Unknown Title"));
- /*if (metadata["mpris:trackid"]) {
-@@ -359,8 +354,8 @@ Player.prototype = {
-
- let change = false;
- if (metadata["mpris:artUrl"]) {
-- if (this._trackCoverFile != metadata["mpris:artUrl"].toString()) {
-- this._trackCoverFile = metadata["mpris:artUrl"].toString();
-+ if (this._trackCoverFile != metadata["mpris:artUrl"].unpack()) {
-+ this._trackCoverFile = metadata["mpris:artUrl"].unpack();
- change = true;
- }
- }
-@@ -392,12 +387,10 @@ Player.prototype = {
- },
-
- _getMetadata: function() {
-- this._mediaServerPlayer.getMetadata(Lang.bind(this,
-- this._setMetadata
-- ));
-+ this._setMetadata(this._mediaServerPlayer.Metadata);
- },
-
-- _setStatus: function(sender, status) {
-+ _setStatus: function(status) {
- this._playerStatus = status;
- if (status == "Playing") {
- this._playButton.setIcon("media-playback-pause");
-@@ -416,15 +409,11 @@ Player.prototype = {
- },
-
- _getStatus: function() {
-- this._mediaServerPlayer.getPlaybackStatus(Lang.bind(this,
-- this._setStatus
-- ));
-+ this._setStatus(this._mediaServerPlayer.PlaybackStatus);
- },
-
- _updateRate: function() {
-- this._mediaServerPlayer.getRate(Lang.bind(this, function(sender, rate) {
-- this._rate = rate;
-- }));
-+ this._rate = this._mediaServerPlayer.Rate;
- },
-
- _updateTimer: function() {
-@@ -569,7 +558,7 @@ MyApplet.prototype = {
- this._players = {};
- // watch players
- for (var p=0; p
Date: Fri, 19 Apr 2013 19:09:18 -0400
-Subject: [PATCH 08/15] Fix gicon error - power applet
+Subject: [PATCH 08/16] Fix gicon error - power applet
---
files/usr/share/cinnamon/applets/power@cinnamon.org/applet.js | 2 +-
@@ -3355,10 +3593,10 @@ index fad39ab..3a13eab 100644
1.8.1.6
-From 3d78b5c929e7e3b0ee24d4b537492740e7bebf2f Mon Sep 17 00:00:00 2001
+From 647bd58c93541acdba11cd11d586d2cb08a0a4eb Mon Sep 17 00:00:00 2001
From: Michael Webster
Date: Fri, 19 Apr 2013 19:44:33 -0400
-Subject: [PATCH 09/15] Remove unused
+Subject: [PATCH 09/16] Remove unused
---
src/cinnamon-background-manager.c | 34 ----------------------------------
@@ -3427,10 +3665,10 @@ index 9d95250..67427ed 100644
1.8.1.6
-From d08b882470b135591fb99bd9ff7c63619fcaea82 Mon Sep 17 00:00:00 2001
+From 7a8233638187d00798cf3a4b66a27d707eaec804 Mon Sep 17 00:00:00 2001
From: dalcde
Date: Sat, 20 Apr 2013 15:42:13 +0800
-Subject: [PATCH 10/15] [GDBus][Power applet] Some fixes and cleanup
+Subject: [PATCH 10/16] [GDBus][Power applet] Some fixes and cleanup
---
.../cinnamon/applets/power@cinnamon.org/applet.js | 52 ++++++----------------
@@ -3549,10 +3787,10 @@ index 3a13eab..5f81d91 100644
1.8.1.6
-From c93e9746b321ad6d0aa38ec28c15fe7b3f18f8f7 Mon Sep 17 00:00:00 2001
+From 1a74c4a4d010a6ddcd2350b1ea298710bc1c08b1 Mon Sep 17 00:00:00 2001
From: Michael Webster
Date: Sat, 20 Apr 2013 10:59:54 -0400
-Subject: [PATCH 11/15] Move CLUTTER_DISABLE_XINPUT to session startup file
+Subject: [PATCH 11/16] Move CLUTTER_DISABLE_XINPUT to session startup file
---
files/usr/bin/gnome-session-cinnamon | 2 +-
@@ -3586,10 +3824,10 @@ index 9d37975..418fb60 100644
1.8.1.6
-From de1719e63518884cad6c9d63d508f737eab35d49 Mon Sep 17 00:00:00 2001
+From dfa107fd874866da2f634c65a90e2c13a447464c Mon Sep 17 00:00:00 2001
From: Michael Webster
Date: Sat, 20 Apr 2013 12:23:29 -0400
-Subject: [PATCH 12/15] Add Xinput disable to cinnamon2d
+Subject: [PATCH 12/16] Add Xinput disable to cinnamon2d
---
files/usr/bin/cinnamon2d | 2 +-
@@ -3607,10 +3845,10 @@ index 1eced99..7f42517 100755
1.8.1.6
-From 15d57d1c15f34d44b23f74b21929d996d4465afb Mon Sep 17 00:00:00 2001
+From 28b39b2372a571ddcc1298f34f2d7e653f6b2e96 Mon Sep 17 00:00:00 2001
From: Michael Webster
Date: Sat, 20 Apr 2013 12:29:43 -0400
-Subject: [PATCH 13/15] Fix session file
+Subject: [PATCH 13/16] Fix session file
---
files/usr/bin/gnome-session-cinnamon | 2 +-
@@ -3629,10 +3867,10 @@ index 56c37f5..31c9eff 100755
1.8.1.6
-From 03436393c322fd97d8216c3481d28cd34833c656 Mon Sep 17 00:00:00 2001
+From aba3a7666d3679e5803862af07edc47e7b093b11 Mon Sep 17 00:00:00 2001
From: Michael Webster
Date: Sat, 20 Apr 2013 12:36:45 -0400
-Subject: [PATCH 14/15] Add cinnamon3d command
+Subject: [PATCH 14/16] Add cinnamon3d command
---
files/usr/bin/cinnamon3d | 2 ++
@@ -3651,10 +3889,10 @@ index 0000000..4891783
1.8.1.6
-From 850da270967622b95be9e0c5edd8e230eb4be5a1 Mon Sep 17 00:00:00 2001
+From 3e1cdf6d88ade9abe5a0b8773b565d345c01f2cb Mon Sep 17 00:00:00 2001
From: Michael Webster
Date: Sat, 20 Apr 2013 12:37:26 -0400
-Subject: [PATCH 15/15] Fix perms
+Subject: [PATCH 15/16] Fix perms
---
files/usr/bin/cinnamon3d | 0
@@ -3667,3 +3905,58 @@ new mode 100755
--
1.8.1.6
+
+From 7904eaf179918f4f97b328f2b5f340776544ca49 Mon Sep 17 00:00:00 2001
+From: Michael Webster
+Date: Mon, 22 Apr 2013 18:27:39 -0400
+Subject: [PATCH 16/16] Sledgehammer merge of:
+
+f251f0b77d01cb9a80212b1dce2538c60a5bf59e
+
+Don't ask...
+---
+ .../share/cinnamon/applets/sound@cinnamon.org/applet.js | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js b/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js
+index c8427ac..a7b2e09 100644
+--- a/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js
++++ b/files/usr/share/cinnamon/applets/sound@cinnamon.org/applet.js
+@@ -53,8 +53,8 @@ const MediaServer2PlayerIFace =
+
+ /* global values */
+ let icon_path = "/usr/share/cinnamon/theme/";
+-let compatible_players = [ "clementine", "mpd", "exaile", "banshee", "rhythmbox", "rhythmbox3", "pragha", "quodlibet", "guayadeque", "amarok", "googlemusicframe", "xbmc", "noise", "xnoise", "gmusicbrowser", "spotify", "audacious", "vlc", "beatbox", "songbird", "pithos", "gnome-mplayer", "nuvolaplayer" ];
+-let support_seek = [ "clementine", "banshee", "rhythmbox", "rhythmbox3", "pragha", "quodlibet", "amarok", "noise", "xnoise", "gmusicbrowser", "spotify", "vlc", "beatbox", "gnome-mplayer" ];
++let compatible_players = [ "clementine", "mpd", "exaile", "banshee", "rhythmbox", "rhythmbox3", "pragha", "quodlibet", "guayadeque", "amarok", "googlemusicframe", "xbmc", "noise", "xnoise", "gmusicbrowser", "spotify", "audacious", "vlc", "beatbox", "songbird", "pithos", "gnome-mplayer", "nuvolaplayer", "qmmp"];
++let support_seek = [ "clementine", "banshee", "rhythmbox", "rhythmbox3", "pragha", "quodlibet", "amarok", "noise", "xnoise", "gmusicbrowser", "spotify", "vlc", "beatbox", "gnome-mplayer", "qmmp" ];
+ /* dummy vars for translation */
+ let x = _("Playing");
+ x = _("Paused");
+@@ -285,6 +285,13 @@ Player.prototype = {
+ this._setStatus(value["PlaybackStatus"]);
+ if (value["Metadata"])
+ this._setMetadata(value["Metadata"]);
++ // qmmp
++ if (sender._dbusBusName == 'org.mpris.MediaPlayer2.qmmp') {
++ if (value["playbackStatus"])
++ this._setStatus(value["playbackStatus"]);
++ if (value["metadata"])
++ this._setMetadata(value["metadata"]);
++ }
+ }));
+
+ this._mediaServerPlayer.connectSignal('Seeked', Lang.bind(this, function(sender, iface, [value]) {
+@@ -377,7 +384,8 @@ Player.prototype = {
+ cover.read_async(null, null, Lang.bind(this, this._onReadCover));
+ }
+ else {
+- cover_path = decodeURIComponent(this._trackCoverFile.substr(7));
++ cover_path = decodeURIComponent(this._trackCoverFile;
++ cover_path = cover_path.replace("file://", "");
+ this._showCover(cover_path);
+ }
+ }
+--
+1.8.1.6
+
diff --git a/community/cinnamon/switch-applications.patch b/community/cinnamon/switch-applications.patch
index ce2e31825..1254a7ce4 100644
--- a/community/cinnamon/switch-applications.patch
+++ b/community/cinnamon/switch-applications.patch
@@ -12,30 +12,6 @@ diff -Naur linuxmint-Cinnamon-b41bad0.orig/files/usr/lib/cinnamon-settings/modul
[_("Run dialog (must restart Cinnamon)"), "org.gnome.desktop.wm.keybindings", "panel-run-dialog", True, "cinnamon"],
[_("Menu button (must restart Cinnamon)"), "org.cinnamon.muffin", "overlay-key", False, "cinnamon"],
-diff -Naur linuxmint-Cinnamon-b41bad0.orig/js/ui/altTab.js linuxmint-Cinnamon-b41bad0/js/ui/altTab.js
---- linuxmint-Cinnamon-b41bad0.orig/js/ui/altTab.js 2013-04-15 15:55:01.000000000 +0200
-+++ linuxmint-Cinnamon-b41bad0/js/ui/altTab.js 2013-04-24 21:22:38.309568355 +0200
-@@ -203,9 +203,9 @@
- }
- } else if (binding == 'switch-group-backward') {
- this._select(0, this._appIcons[0].cachedWindows.length - 1);
-- } else if (binding == 'switch-windows-backward') {
-+ } else if (binding == 'switch-applications-backward') {
- this._select(this._appIcons.length - 1);
-- } else if (binding == 'no-switch-windows') {
-+ } else if (binding == 'no-switch-applications') {
- this._select(0);
- } else if (this._appIcons.length == 1) {
- this._select(0);
-@@ -296,7 +296,7 @@
- return false;
- }
- Main.wm.showWorkspaceOSD();
-- that.refresh('no-switch-windows');
-+ that.refresh('no-switch-applications');
- return true;
- };
- let keysym = event.get_key_symbol();
diff -Naur linuxmint-Cinnamon-b41bad0.orig/js/ui/windowManager.js linuxmint-Cinnamon-b41bad0/js/ui/windowManager.js
--- linuxmint-Cinnamon-b41bad0.orig/js/ui/windowManager.js 2013-04-15 15:55:01.000000000 +0200
+++ linuxmint-Cinnamon-b41bad0/js/ui/windowManager.js 2013-04-24 21:21:22.447677094 +0200
diff --git a/community/darkhttpd/PKGBUILD b/community/darkhttpd/PKGBUILD
index bcc749245..525cdccb8 100644
--- a/community/darkhttpd/PKGBUILD
+++ b/community/darkhttpd/PKGBUILD
@@ -1,21 +1,25 @@
-# $Id: PKGBUILD 65106 2012-02-20 04:47:15Z spupykin $
+# $Id: PKGBUILD 89410 2013-04-29 10:56:40Z spupykin $
# Maintainer: Sergej Pupykin
# Maintainer: Vesa Kaihlavirta
pkgname=darkhttpd
-pkgver=1.8
-pkgrel=2
+pkgver=1.9
+pkgrel=1
pkgdesc="A small, static webserver"
arch=('i686' 'x86_64')
url="http://dmr.ath.cx/net/darkhttpd/"
license=('BSD')
depends=('glibc')
source=($url/$pkgname-$pkgver.tar.bz2)
-md5sums=('cff3861af17b109d796993a990ec4c5b')
+md5sums=('156f239af542028c3fb5c2248aa0db8d')
build() {
cd $srcdir/$pkgname-$pkgver
make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
install -D $srcdir/$pkgname-$pkgver/darkhttpd $pkgdir/usr/sbin/darkhttpd
mkdir -p $pkgdir/usr/share/licenses/$pkgname
head -n 18 darkhttpd.c >$pkgdir/usr/share/licenses/$pkgname/license
diff --git a/community/fatrat/PKGBUILD b/community/fatrat/PKGBUILD
index b962073e5..f1c3df7ae 100644
--- a/community/fatrat/PKGBUILD
+++ b/community/fatrat/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 87410 2013-03-31 19:18:13Z stephane $
+# $Id: PKGBUILD 89533 2013-04-29 19:20:35Z stativ $
# Maintainer: Lukas Jirkovsky
pkgname=fatrat
pkgver=1.2.0_beta2
-pkgrel=6
+pkgrel=7
pkgdesc="QT4 based download manager with support for HTTP, FTP, SFTP, BitTorrent, rapidshare and more"
arch=('i686' 'x86_64')
url="http://fatrat.dolezel.info/"
@@ -11,9 +11,10 @@ depends=('gloox' 'libtorrent-rasterbar' 'pion' 'qtwebkit' 'curl')
optdepends=('geoip: GeoIP support' 'java-runtime: Java plugins')
makedepends=('boost' 'cmake' 'java-environment')
source=(http://www.dolezel.info/download/data/fatrat/fatrat-$pkgver.tar.xz \
- QTBUG-22829-workaround.diff)
+ QTBUG-22829-workaround.diff pion-5.0.diff)
md5sums=('ad823d2a81f0583316ece815b928c71b'
- '9c017f227437b8a72e92219ee6d58578')
+ '9c017f227437b8a72e92219ee6d58578'
+ 'd7d398e7b6415c0a81eb4960d8271997')
build() {
cd "$srcdir/$pkgname-$pkgver"
@@ -22,6 +23,8 @@ build() {
patch -Np1 < "$srcdir/QTBUG-22829-workaround.diff" || true
# fix help generation with qt4
sed -s 's|qcollectiongenerator|qcollectiongenerator-qt4|' -i CMakeLists.txt
+ # fix for the new pion
+ patch -Np1 < "$srcdir/pion-5.0.diff" || true
cmake \
-DWITH_EVERYTHING=ON \
diff --git a/community/fatrat/pion-5.0.diff b/community/fatrat/pion-5.0.diff
new file mode 100644
index 000000000..ff84fb902
--- /dev/null
+++ b/community/fatrat/pion-5.0.diff
@@ -0,0 +1,1570 @@
+diff -rup fatrat-1.2.0_beta2/CMakeLists.txt fatrat-1.2.0_beta2.new/CMakeLists.txt
+--- fatrat-1.2.0_beta2/CMakeLists.txt 2012-07-14 12:44:27.000000000 +0100
++++ fatrat-1.2.0_beta2.new/CMakeLists.txt 2013-04-29 19:17:48.697623940 +0100
+@@ -148,19 +148,13 @@ if(WITH_DOCUMENTATION)
+ set(QT_USE_QTHELP TRUE)
+ endif(WITH_DOCUMENTATION)
+ if(WITH_WEBINTERFACE)
+- pkg_check_modules(pion-net REQUIRED "pion-net >= 3.0.0")
++ pkg_check_modules(pion REQUIRED "pion >= 5.0.0")
+
+- if(pion-net_FOUND)
+- include_directories(${pion-net_INCLUDE_DIRS})
+- #message(STATUS "Pion libdir: ${pion-net_LIBDIR}")
+-
+- #FILE(GLOB pion_FileService "${pion-net_LIBDIR}/pion/plugins/FileService.*")
+- #if(pion_FileService MATCHES "^$")
+- # message(FATAL_ERROR "Pion-net FileService plugin not found (libpion-net-plugins?) - ${pion_FileService}")
+- #endif(pion_FileService MATCHES "^$")
+- else(pion-net_FOUND)
+- message(FATAL_ERROR "No pion-net library found")
+- endif(pion-net_FOUND)
++ if(pion_FOUND)
++ include_directories(${pion_INCLUDE_DIRS})
++ else(pion_FOUND)
++ message(FATAL_ERROR "No pion library found")
++ endif(pion_FOUND)
+ endif(WITH_WEBINTERFACE)
+
+ #set(CMAKE_REQUIRED_INCLUDES "sys/types.h")
+@@ -570,9 +564,7 @@ ${fatrat_QRC_H} ${lrelease_outputs})
+ add_executable(fatrat-conf src/fatrat-conf.cpp)
+
+ # This used to be a workaround until it started causing the exact opposite... oh dear!
+-#STRING(REPLACE "-mt" "" pion-net_LIBRARIES "${pion-net_LIBRARIES}")
+-#message(STATUS ${pion-net_LIBRARIES})
+-target_link_libraries(fatrat -ldl -lpthread ${QT_LIBRARIES} ${libtorrent_LDFLAGS} ${gloox_LDFLAGS} ${curl_LDFLAGS} ${Boost_LIBRARIES} ${pion-net_LIBRARIES} ${QT_ADDITIONAL_LIBS} ${XATTR_LIBRARIES} -export-dynamic)
++target_link_libraries(fatrat -ldl -lpthread ${QT_LIBRARIES} ${libtorrent_LDFLAGS} ${gloox_LDFLAGS} ${curl_LDFLAGS} ${Boost_LIBRARIES} ${pion_LIBRARIES} ${QT_ADDITIONAL_LIBS} ${XATTR_LIBRARIES} -export-dynamic)
+ target_link_libraries(fatrat-conf ${QT_LIBRARIES})
+
+ set(fatrat_DEV_HEADERS
+Only in fatrat-1.2.0_beta2.new/: CMakeLists.txt.orig
+diff -rup fatrat-1.2.0_beta2/config.h.in fatrat-1.2.0_beta2.new/config.h.in
+--- fatrat-1.2.0_beta2/config.h.in 2012-07-14 12:44:27.000000000 +0100
++++ fatrat-1.2.0_beta2.new/config.h.in 2013-04-29 19:18:03.241412755 +0100
+@@ -13,7 +13,7 @@
+ #cmakedefine WITH_CXX0X
+
+ #ifdef WITH_WEBINTERFACE
+-# define PION_NET_PLUGINS "${pion-net_LIBDIR}/pion/plugins"
++# define PION_NET_PLUGINS "${pion_LIBDIR}/pion/plugins"
+ #endif
+
+ #cmakedefine ENABLE_FAKEDOWNLOAD
+diff -rup fatrat-1.2.0_beta2/src/remote/HttpService.cpp fatrat-1.2.0_beta2.new/src/remote/HttpService.cpp
+--- fatrat-1.2.0_beta2/src/remote/HttpService.cpp 2012-07-14 12:44:27.000000000 +0100
++++ fatrat-1.2.0_beta2.new/src/remote/HttpService.cpp 2013-04-29 19:17:17.076634049 +0100
+@@ -51,9 +51,8 @@ respects for all of the code used other
+ #include
+ #include
+ #include
+-#include
+-#include
+-#include
++#include
++#include
+ #include
+ #include "pion/FileService.hpp"
+ #include
+@@ -63,7 +62,7 @@ respects for all of the code used other
+ #include
+ #include
+
+-using namespace pion::net;
++using namespace pion::http;
+
+ extern QList g_queues;
+ extern QReadWriteLock g_queuesLock;
+@@ -172,16 +171,16 @@ void HttpService::applySettings()
+
+ void HttpService::setupAuth()
+ {
+- pion::net::PionUserManagerPtr userManager(new pion::net::PionUserManager);
++ pion::user_manager_ptr userManager(new pion::user_manager);
+ QString password = getSettingsValue("remote/password").toString();
+
+- m_auth_ptr = pion::net::HTTPAuthPtr( new pion::net::HTTPBasicAuth(userManager, "FatRat Web Interface") );
+- m_server->setAuthentication(m_auth_ptr);
+- m_auth_ptr->addRestrict("/");
+-
+- m_auth_ptr->addUser("fatrat", password.toStdString());
+- m_auth_ptr->addUser("admin", password.toStdString());
+- m_auth_ptr->addUser("user", password.toStdString());
++ m_auth_ptr = pion::http::auth_ptr( new pion::http::basic_auth(userManager, "FatRat Web Interface") );
++ m_server->set_authentication(m_auth_ptr);
++ m_auth_ptr->add_restrict("/");
++
++ m_auth_ptr->add_user("fatrat", password.toStdString());
++ m_auth_ptr->add_user("admin", password.toStdString());
++ m_auth_ptr->add_user("user", password.toStdString());
+ }
+
+ void HttpService::setup()
+@@ -190,28 +189,30 @@ void HttpService::setup()
+
+ try
+ {
+- m_server = new pion::net::WebServer(m_port);
++ m_server = new pion::http::plugin_server(m_port);
+
+ setupAuth();
+ setupSSL();
+
+- m_server->addService("/xmlrpc", new XmlRpcService);
+- m_server->addService("/subclass", new SubclassService);
+- m_server->addService("/log", new LogService);
+- m_server->addService("/browse", new TransferTreeBrowserService);
+- m_server->addService("/", new pion::plugins::FileService);
+- m_server->setServiceOption("/", "directory", DATA_LOCATION "/data/remote");
+- m_server->setServiceOption("/", "file", DATA_LOCATION "/data/remote/index.html");
+- m_server->addService("/copyrights", new pion::plugins::FileService);
+- m_server->setServiceOption("/copyrights", "file", DATA_LOCATION "/README");
+- m_server->addService("/download", new TransferDownloadService);
+- m_server->addService("/captcha", new CaptchaService);
++ m_server->add_service("/xmlrpc", new XmlRpcService);
++ m_server->add_service("/subclass", new SubclassService);
++ m_server->add_service("/log", new LogService);
++ m_server->add_service("/browse", new TransferTreeBrowserService);
++ m_server->add_service("/", new pion::plugins::FileService);
++ m_server->set_service_option("/", "directory", DATA_LOCATION "/data/remote");
++ m_server->set_service_option("/", "file", DATA_LOCATION "/data/remote/index.html");
++ m_server->add_service("/copyrights", new pion::plugins::FileService);
++ m_server->set_service_option("/copyrights", "file", DATA_LOCATION "/README");
++ m_server->add_service("/download", new TransferDownloadService);
++ m_server->add_service("/captcha", new CaptchaService);
+
+ m_server->start();
+ Logger::global()->enterLogMessage("HttpService", tr("Listening on port %1").arg(m_port));
++ std::cout << "Listening on port " << m_port << std::endl;
+ }
+ catch(const std::exception& e)
+ {
++ std::cerr << e.what() << std::endl;
+ Logger::global()->enterLogMessage("HttpService", tr("Failed to start: %1").arg(e.what()));
+ }
+ }
+@@ -225,29 +226,29 @@ void HttpService::setupSSL()
+ if (file.isEmpty() || !QFile::exists(file))
+ {
+ Logger::global()->enterLogMessage("HttpService", tr("SSL key file not found, disabling HTTPS"));
+- m_server->setSSLFlag(false);
++ m_server->set_ssl_flag(false);
+ m_strSSLPem.clear();
+ }
+ else
+ {
+ Logger::global()->enterLogMessage("HttpService", tr("Loading a SSL key from %1").arg(file));
+ m_strSSLPem = file;
+- m_server->setSSLKeyFile(file.toStdString());
+- m_server->setSSLFlag(true);
++ m_server->set_ssl_key_file(file.toStdString());
++ m_server->set_ssl_flag(true);
+ }
+ }
+ else
+ {
+ Logger::global()->enterLogMessage("HttpService", tr("Running in plain HTTP mode"));
+- m_server->setSSLFlag(false);
++ m_server->set_ssl_flag(false);
+ m_strSSLPem.clear();
+ }
+ }
+
+-void HttpService::LogService::operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)
++void HttpService::LogService::operator()(pion::http::request_ptr &request, pion::tcp::connection_ptr &tcp_conn)
+ {
+- HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request, boost::bind(&TCPConnection::finish, tcp_conn)));
+- QString uuidTransfer = QString::fromStdString(getRelativeResource(request->getResource()));
++ pion::http::response_writer_ptr writer(pion::http::response_writer::create(tcp_conn, *request, boost::bind(&pion::tcp::connection::finish, tcp_conn)));
++ QString uuidTransfer = QString::fromStdString(get_relative_resource(request->get_resource()));
+ QString data;
+
+ if (uuidTransfer.isEmpty())
+@@ -260,8 +261,8 @@ void HttpService::LogService::operator()
+
+ if (!q || !t)
+ {
+- writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_FOUND);
+- writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND);
++ writer->get_response().set_status_code(pion::http::types::RESPONSE_CODE_NOT_FOUND);
++ writer->get_response().set_status_message(pion::http::types::RESPONSE_MESSAGE_NOT_FOUND);
+ writer->send();
+ return;
+ }
+@@ -272,16 +273,16 @@ void HttpService::LogService::operator()
+ g_queuesLock.unlock();
+ }
+
+- writer->getResponse().addHeader("Content-Type", "text/plain");
++ writer->get_response().add_header("Content-Type", "text/plain");
+ writer->write(data.toStdString());
+ writer->send();
+ }
+
+-void HttpService::TransferTreeBrowserService::operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)
++void HttpService::TransferTreeBrowserService::operator()(pion::http::request_ptr &request, pion::tcp::connection_ptr &tcp_conn)
+ {
+- HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request, boost::bind(&TCPConnection::finish, tcp_conn)));
+- QString uuidTransfer = QString::fromStdString(getRelativeResource(request->getResource()));
+- QString path = QString::fromStdString(request->getQuery("path"));
++ pion::http::response_writer_ptr writer(pion::http::response_writer::create(tcp_conn, *request, boost::bind(&pion::tcp::connection::finish, tcp_conn)));
++ QString uuidTransfer = QString::fromStdString(get_relative_resource(request->get_resource()));
++ QString path = QString::fromStdString(request->get_query("path"));
+
+ path = path.replace("+", " ");
+ path = QUrl::fromPercentEncoding(path.toUtf8());
+@@ -294,8 +295,8 @@ void HttpService::TransferTreeBrowserSer
+
+ if (path.contains("/..") || path.contains("../"))
+ {
+- writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_FORBIDDEN);
+- writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_FORBIDDEN);
++ writer->get_response().set_status_code(pion::http::types::RESPONSE_CODE_FORBIDDEN);
++ writer->get_response().set_status_message(pion::http::types::RESPONSE_MESSAGE_FORBIDDEN);
+ writer->send();
+ return;
+ }
+@@ -304,8 +305,8 @@ void HttpService::TransferTreeBrowserSer
+
+ if (!q || !t)
+ {
+- writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_FOUND);
+- writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND);
++ writer->get_response().set_status_code(pion::http::types::RESPONSE_CODE_NOT_FOUND);
++ writer->get_response().set_status_message(pion::http::types::RESPONSE_MESSAGE_NOT_FOUND);
+ writer->send();
+ return;
+ }
+@@ -320,8 +321,8 @@ void HttpService::TransferTreeBrowserSer
+
+ if (!dir.cd(path))
+ {
+- writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_FOUND);
+- writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND);
++ writer->get_response().set_status_code(pion::http::types::RESPONSE_CODE_NOT_FOUND);
++ writer->get_response().set_status_message(pion::http::types::RESPONSE_MESSAGE_NOT_FOUND);
+ writer->send();
+ return;
+ }
+@@ -371,11 +372,11 @@ void HttpService::TransferTreeBrowserSer
+ writer->send();
+ }
+
+-void HttpService::TransferDownloadService::operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)
++void HttpService::TransferDownloadService::operator()(pion::http::request_ptr &request, pion::tcp::connection_ptr &tcp_conn)
+ {
+- HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request, boost::bind(&TCPConnection::finish, tcp_conn)));
+- QString transfer = QString::fromStdString(request->getQuery("transfer"));
+- QString path = QString::fromStdString(request->getQuery("path"));
++ pion::http::response_writer_ptr writer(pion::http::response_writer::create(tcp_conn, *request, boost::bind(&pion::tcp::connection::finish, tcp_conn)));
++ QString transfer = QString::fromStdString(request->get_query("transfer"));
++ QString path = QString::fromStdString(request->get_query("path"));
+
+ path = path.replace("+", " ");
+ path = QUrl::fromPercentEncoding(path.toUtf8());
+@@ -387,8 +388,8 @@ void HttpService::TransferDownloadServic
+
+ if (path.contains("/..") || path.contains("../"))
+ {
+- writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_FORBIDDEN);
+- writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_FORBIDDEN);
++ writer->get_response().set_status_code(pion::http::types::RESPONSE_CODE_FORBIDDEN);
++ writer->get_response().set_status_message(pion::http::types::RESPONSE_MESSAGE_FORBIDDEN);
+ writer->send();
+ return;
+ }
+@@ -397,8 +398,8 @@ void HttpService::TransferDownloadServic
+
+ if (!q || !t)
+ {
+- writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_FOUND);
+- writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND);
++ writer->get_response().set_status_code(pion::http::types::RESPONSE_CODE_NOT_FOUND);
++ writer->get_response().set_status_message(pion::http::types::RESPONSE_MESSAGE_NOT_FOUND);
+ writer->send();
+ return;
+ }
+@@ -428,24 +429,24 @@ void HttpService::TransferDownloadServic
+ response_file.update();
+
+ pion::plugins::DiskFileSenderPtr sender_ptr(pion::plugins::DiskFileSender::create(response_file, request, tcp_conn, 8192));
+- sender_ptr->getWriter()->getResponse().addHeader("Content-Disposition", disposition.toStdString());
++ sender_ptr->getWriter()->get_response().add_header("Content-Disposition", disposition.toStdString());
+
+ if (unsigned long long fileSize = response_file.getFileSize())
+ {
+ std::stringstream fileSizeStream;
+ fileSizeStream << fileSize;
+- sender_ptr->getWriter()->getResponse().addHeader("Content-Length", fileSizeStream.str());
++ sender_ptr->getWriter()->get_response().add_header("Content-Length", fileSizeStream.str());
+ }
+
+ sender_ptr->send();
+ }
+
+-void HttpService::SubclassService::operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)
++void HttpService::SubclassService::operator()(pion::http::request_ptr &request, pion::tcp::connection_ptr &tcp_conn)
+ {
+- pion::net::HTTPResponseWriterPtr writer = HTTPResponseWriter::create(tcp_conn, *request, boost::bind(&TCPConnection::finish, tcp_conn));
++ pion::http::response_writer_ptr writer = pion::http::response_writer::create(tcp_conn, *request, boost::bind(&pion::tcp::connection::finish, tcp_conn));
+ HttpService::WriteBackImpl wb = HttpService::WriteBackImpl(writer);
+- QString transfer = QString::fromStdString(request->getQuery("transfer"));
+- QString method = QString::fromStdString(getRelativeResource(request->getResource()));
++ QString transfer = QString::fromStdString(request->get_query("transfer"));
++ QString method = QString::fromStdString(get_relative_resource(request->get_resource()));
+
+ Queue* q = 0;
+ Transfer* t = 0;
+@@ -460,15 +461,15 @@ void HttpService::SubclassService::opera
+ g_queuesLock.unlock();
+ }
+
+- writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_FOUND);
+- writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND);
++ writer->get_response().set_status_code(pion::http::types::RESPONSE_CODE_NOT_FOUND);
++ writer->get_response().set_status_message(pion::http::types::RESPONSE_MESSAGE_NOT_FOUND);
+ writer->send();
+ return;
+ }
+
+ QMultiMap map;
+- pion::net::HTTPTypes::QueryParams params = request->getQueryParams();
+- for (pion::net::HTTPTypes::QueryParams::iterator it = params.begin(); it != params.end(); it++)
++ pion::ihash_multimap params = request->get_queries();
++ for (pion::ihash_multimap::iterator it = params.begin(); it != params.end(); it++)
+ {
+ map.insert(QString::fromStdString(it->first), QString::fromStdString(it->second));
+ }
+@@ -481,7 +482,7 @@ void HttpService::SubclassService::opera
+ g_queuesLock.unlock();
+ }
+
+-HttpService::WriteBackImpl::WriteBackImpl(pion::net::HTTPResponseWriterPtr& writer)
++HttpService::WriteBackImpl::WriteBackImpl(pion::http::response_writer_ptr& writer)
+ : m_writer(writer)
+ {
+
+@@ -489,7 +490,7 @@ HttpService::WriteBackImpl::WriteBackImp
+
+ void HttpService::WriteBackImpl::writeNoCopy(void* data, size_t bytes)
+ {
+- m_writer->writeNoCopy(data, bytes);
++ m_writer->write_no_copy(data, bytes);
+ }
+
+ void HttpService::WriteBackImpl::send()
+@@ -504,13 +505,13 @@ void HttpService::WriteBackImpl::write(c
+
+ void HttpService::WriteBackImpl::setContentType(const char* type)
+ {
+- m_writer->getResponse().addHeader("Content-Type", type);
++ m_writer->get_response().add_header("Content-Type", type);
+ }
+
+ void HttpService::WriteBackImpl::writeFail(QString error)
+ {
+- m_writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_FOUND);
+- m_writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND);
++ m_writer->get_response().set_status_code(pion::http::types::RESPONSE_CODE_NOT_FOUND);
++ m_writer->get_response().set_status_message(pion::http::types::RESPONSE_MESSAGE_NOT_FOUND);
+ }
+
+ int HttpService::findTransfer(QString transferUUID, Queue** q, Transfer** t, bool lockForWrite)
+@@ -601,9 +602,9 @@ QVariant HttpService::generateCertificat
+
+
+ /*
+-void HttpService::CaptchaService::operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)
++void HttpService::CaptchaService::operator()(pion::http::request_ptr &request, pion::tcp::connection_ptr &tcp_conn)
+ {
+- m_cap.writer = HTTPResponseWriter::create(tcp_conn, *request, boost::bind(&TCPConnection::finish, tcp_conn));
++ m_cap.writer = pion::http::response_writer::create(tcp_conn, *request, boost::bind(&pion::tcp::connection::finish, tcp_conn));
+
+ std::string upgrade, connection;
+ upgrade = request->getHeader("Upgrade");
+@@ -616,8 +617,8 @@ void HttpService::CaptchaService::operat
+
+ if (connection != "upgrade" || upgrade != "websocket" || m_cap.key1.empty() || m_cap.key2.empty())
+ {
+- m_cap.writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_BAD_REQUEST);
+- m_cap.writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_BAD_REQUEST);
++ m_cap.writer->get_response().set_status_code(pion::http::types::RESPONSE_CODE_BAD_REQUEST);
++ m_cap.writer->get_response().set_status_message(pion::http::types::RESPONSE_MESSAGE_BAD_REQUEST);
+ m_cap.writer->send();
+ }
+
+@@ -668,30 +669,30 @@ void HttpService::CaptchaService::CapSer
+
+ */
+
+-void HttpService::CaptchaHttpResponseWriter::handleWrite(const boost::system::error_code &write_error, std::size_t bytes_written)
++void HttpService::CaptchaHttpResponseWriter::handle_write(const boost::system::error_code &write_error, std::size_t bytes_written)
+ {
+ if (!bytes_written)
+ {
+ // TODO: handle errors
+ HttpService::instance()->removeCaptchaClient(client);
+- sendFinalChunk();
++ send_final_chunk();
+ delete client;
+ }
+
+- pion::net::HTTPResponseWriter::handleWrite(write_error, bytes_written);
++ pion::http::response_writer::handle_write(write_error, bytes_written);
+ }
+
+-void HttpService::CaptchaService::operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)
++void HttpService::CaptchaService::operator()(pion::http::request_ptr &request, pion::tcp::connection_ptr &tcp_conn)
+ {
+- if (request->hasQuery("id"))
++ if (request->has_query("id"))
+ {
+- QString id = QString::fromStdString(request->getQuery("id"));
+- QString solution = QString::fromStdString(request->getQuery("solution"));
++ QString id = QString::fromStdString(request->get_query("id"));
++ QString solution = QString::fromStdString(request->get_query("solution"));
+
+ int iid = id.toInt();
+ HttpService::instance()->m_captchaHttp.captchaEntered(iid, solution);
+
+- pion::net::HTTPResponseWriterPtr writer = HTTPResponseWriter::create(tcp_conn, *request, boost::bind(&TCPConnection::finish, tcp_conn));
++ pion::http::response_writer_ptr writer = pion::http::response_writer::create(tcp_conn, *request, boost::bind(&pion::tcp::connection::finish, tcp_conn));
+ writer->send();
+ }
+ else
+@@ -709,13 +710,13 @@ void HttpService::CaptchaService::operat
+ RegisteredClient* client = new RegisteredClient;
+
+ client->writer = CaptchaHttpResponseWriter::create(client, tcp_conn, *request,
+- boost::bind(&TCPConnection::finish, tcp_conn));
++ boost::bind(&pion::tcp::connection::finish, tcp_conn));
+ HttpService::instance()->addCaptchaClient(client);
+
+- client->writer->getResponse().addHeader("Content-Type", "text/event-stream");
+- client->writer->getResponse().addHeader("Cache-Control", "no-store, no-cache, must-revalidate, max-age=0");
+- client->writer->getResponse().addHeader("Expires", "Tue, 03 Jul 2001 06:00:00 GMT");
+- client->writer->getResponse().addHeader("Pragma", "no-cache");
++ client->writer->get_response().add_header("Content-Type", "text/event-stream");
++ client->writer->get_response().add_header("Cache-Control", "no-store, no-cache, must-revalidate, max-age=0");
++ client->writer->get_response().add_header("Expires", "Tue, 03 Jul 2001 06:00:00 GMT");
++ client->writer->get_response().add_header("Pragma", "no-cache");
+ }
+ }
+
+@@ -747,7 +748,7 @@ void HttpService::RegisteredClient::push
+ writer->clear();
+
+ writer->write(buf.data(), buf.length());
+- writer->sendChunk(boost::bind(&HttpService::RegisteredClient::finished, this));
++ writer->send_chunk(boost::bind(&HttpService::RegisteredClient::finished, this));
+ }
+ else
+ writeInProgressLock.unlock();
+@@ -760,7 +761,7 @@ void HttpService::RegisteredClient::keep
+
+ writer->clear();
+ writer->write(": keepalive\r\n\r\n");
+- writer->sendChunk(boost::bind(&HttpService::RegisteredClient::finished, this));
++ writer->send_chunk(boost::bind(&HttpService::RegisteredClient::finished, this));
+ }
+
+ void HttpService::addCaptchaEvent(int id, QString url)
+@@ -803,5 +804,5 @@ void HttpService::keepalive()
+
+ void HttpService::RegisteredClient::terminate()
+ {
+- writer->getTCPConnection()->finish();
++ writer->get_connection()->finish();
+ }
+diff -rup fatrat-1.2.0_beta2/src/remote/HttpService.h fatrat-1.2.0_beta2.new/src/remote/HttpService.h
+--- fatrat-1.2.0_beta2/src/remote/HttpService.h 2012-07-14 12:44:27.000000000 +0100
++++ fatrat-1.2.0_beta2.new/src/remote/HttpService.h 2013-04-29 19:17:17.076634049 +0100
+@@ -40,7 +40,8 @@ respects for all of the code used other
+ #include
+ #include
+ #include
+-#include
++#include
++#include
+ #include "captcha/CaptchaHttp.h"
+ #include "remote/TransferHttpService.h"
+
+@@ -48,7 +49,8 @@ respects for all of the code used other
+ # error This file is not supposed to be included!
+ #endif
+
+-#include
++#include
++#include
+
+ class Queue;
+ class Transfer;
+@@ -83,8 +85,8 @@ private:
+ void killCaptchaClients();
+ private:
+ static HttpService* m_instance;
+- pion::net::WebServer* m_server;
+- pion::net::HTTPAuthPtr m_auth_ptr;
++ pion::http::plugin_server* m_server;
++ pion::http::auth_ptr m_auth_ptr;
+ CaptchaHttp m_captchaHttp;
+ quint16 m_port;
+ QString m_strSSLPem;
+@@ -94,27 +96,27 @@ private:
+ QList m_registeredCaptchaClients;
+ QMutex m_registeredCaptchaClientsMutex;
+
+- class LogService : public pion::net::WebService
++ class LogService : public pion::http::plugin_service
+ {
+- void operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn);
++ void operator()(pion::http::request_ptr &request, pion::tcp::connection_ptr &tcp_conn);
+ };
+- class TransferTreeBrowserService : public pion::net::WebService
++ class TransferTreeBrowserService : public pion::http::plugin_service
+ {
+- void operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn);
++ void operator()(pion::http::request_ptr &request, pion::tcp::connection_ptr &tcp_conn);
+ };
+- class TransferDownloadService : public pion::net::WebService
++ class TransferDownloadService : public pion::http::plugin_service
+ {
+- void operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn);
++ void operator()(pion::http::request_ptr &request, pion::tcp::connection_ptr &tcp_conn);
+ };
+- class SubclassService : public pion::net::WebService
++ class SubclassService : public pion::http::plugin_service
+ {
+ public:
+- void operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn);
++ void operator()(pion::http::request_ptr &request, pion::tcp::connection_ptr &tcp_conn);
+ };
+- /*class CaptchaService : public pion::net::WebService
++ /*class CaptchaService : public pion::http::plugin_service
+ {
+ public:
+- void operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn);
++ void operator()(pion::http::request_ptr &request, pion::tcp::connection_ptr &tcp_conn);
+ private:
+ class CapServCap
+ {
+@@ -126,15 +128,15 @@ private:
+ std::string key1, key2;
+ char sig[8];
+ int inbuf;
+- pion::net::TCPConnectionPtr tcp_conn;
++ pion::tcp::connection_ptr tcp_conn;
+ } m_cap;
+ };*/
+
+ class CaptchaHttpResponseWriter;
+- class CaptchaService : public pion::net::WebService
++ class CaptchaService : public pion::http::plugin_service
+ {
+ public:
+- void operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn);
++ void operator()(pion::http::request_ptr &request, pion::tcp::connection_ptr &tcp_conn);
+ };
+ struct RegisteredClient
+ {
+@@ -151,16 +153,16 @@ private:
+ void terminate();
+ };
+
+- class CaptchaHttpResponseWriter : public pion::net::HTTPResponseWriter
++ class CaptchaHttpResponseWriter : public pion::http::response_writer
+ {
+ public:
+- CaptchaHttpResponseWriter(HttpService::RegisteredClient* cl, pion::net::TCPConnectionPtr &tcp_conn, const pion::net::HTTPRequest& request, FinishedHandler handler = FinishedHandler())
+- : pion::net::HTTPResponseWriter(tcp_conn, request, handler), client(cl)
++ CaptchaHttpResponseWriter(HttpService::RegisteredClient* cl, pion::tcp::connection_ptr &tcp_conn, const pion::http::request& request, finished_handler_t handler = finished_handler_t())
++ : pion::http::response_writer(tcp_conn, request, handler), client(cl)
+ {
+
+ }
+
+- static inline boost::shared_ptr create(HttpService::RegisteredClient* cl, pion::net::TCPConnectionPtr &tcp_conn, const pion::net::HTTPRequest& request, FinishedHandler handler = FinishedHandler())
++ static inline boost::shared_ptr create(HttpService::RegisteredClient* cl, pion::tcp::connection_ptr &tcp_conn, const pion::http::request& request, finished_handler_t handler = finished_handler_t())
+ {
+ return boost::shared_ptr(new CaptchaHttpResponseWriter(cl, tcp_conn, request, handler));
+ }
+@@ -171,7 +173,7 @@ private:
+ m_http_response->prepareBuffersForSend(write_buffers, getTCPConnection()->getKeepAlive(),
+ sendingChunkedMessage());
+ }*/
+- virtual void handleWrite(const boost::system::error_code &write_error, std::size_t bytes_written);
++ virtual void handle_write(const boost::system::error_code &write_error, std::size_t bytes_written);
+
+ HttpService::RegisteredClient* client;
+ };
+@@ -179,14 +181,14 @@ private:
+ class WriteBackImpl : public TransferHttpService::WriteBack
+ {
+ public:
+- WriteBackImpl(pion::net::HTTPResponseWriterPtr& writer);
++ WriteBackImpl(pion::http::response_writer_ptr& writer);
+ void write(const char* data, size_t bytes);
+ void writeFail(QString error);
+ void writeNoCopy(void* data, size_t bytes);
+ void send();
+ void setContentType(const char* type);
+ private:
+- pion::net::HTTPResponseWriterPtr m_writer;
++ pion::http::response_writer_ptr m_writer;
+ };
+ };
+
+diff -rup fatrat-1.2.0_beta2/src/remote/pion/FileService.cpp fatrat-1.2.0_beta2.new/src/remote/pion/FileService.cpp
+--- fatrat-1.2.0_beta2/src/remote/pion/FileService.cpp 2012-07-14 12:44:27.000000000 +0100
++++ fatrat-1.2.0_beta2.new/src/remote/pion/FileService.cpp 2013-04-29 19:17:17.079967487 +0100
+@@ -15,13 +15,14 @@
+ #include
+
+ #include "FileService.hpp"
+-#include
+-#include
++#include
++#include
+ #include
+ #include
+
+ using namespace pion;
+-using namespace pion::net;
++using namespace pion::http;
++using namespace pion::tcp;
+
+ namespace pion { // begin namespace pion
+ namespace plugins { // begin namespace plugins
+@@ -49,7 +50,7 @@ FileService::FileService(void)
+ m_writable(false)
+ {}
+
+-void FileService::setOption(const std::string& name, const std::string& value)
++void FileService::set_option(const std::string& name, const std::string& value)
+ {
+ if (name == "directory") {
+ m_directory = value;
+@@ -104,10 +105,10 @@ void FileService::setOption(const std::s
+ }
+ }
+
+-void FileService::operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn)
++void FileService::operator()(request_ptr& request, connection_ptr& tcp_conn)
+ {
+ // get the relative resource path for the request
+- const std::string relative_path(getRelativeResource(request->getResource()));
++ const std::string relative_path(get_relative_resource(request->get_resource()));
+
+ // determine the path of the file being requested
+ boost::filesystem::path file_path;
+@@ -117,7 +118,7 @@ void FileService::operator()(HTTPRequest
+ if (m_file.empty()) {
+ // no file is specified, either in the request or in the options
+ PION_LOG_WARN(m_logger, "No file option defined ("
+- << getResource() << ")");
++ << get_resource() << ")");
+ sendNotFoundResponse(request, tcp_conn);
+ return;
+ } else {
+@@ -129,7 +130,7 @@ void FileService::operator()(HTTPRequest
+ if (m_directory.empty()) {
+ // no directory is specified for the relative file
+ PION_LOG_WARN(m_logger, "No directory option defined ("
+- << getResource() << "): " << relative_path);
++ << get_resource() << "): " << relative_path);
+ sendNotFoundResponse(request, tcp_conn);
+ return;
+ } else {
+@@ -142,7 +143,7 @@ void FileService::operator()(HTTPRequest
+ std::string string = file_path.string();
+ if (string.find(m_directory.string()) != 0) {
+ PION_LOG_WARN(m_logger, "Request for file outside of directory ("
+- << getResource() << "): " << relative_path);
++ << get_resource() << "): " << relative_path);
+ static const std::string FORBIDDEN_HTML_START =
+ "\n"
+ "403 Forbidden\n"
+@@ -152,14 +153,14 @@ void FileService::operator()(HTTPRequest
+ static const std::string FORBIDDEN_HTML_FINISH =
+ " is not in the configured directory.
\n"
+ "\n";
+- HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
+- boost::bind(&TCPConnection::finish, tcp_conn)));
+- writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_FORBIDDEN);
+- writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_FORBIDDEN);
+- if (request->getMethod() != HTTPTypes::REQUEST_METHOD_HEAD) {
+- writer->writeNoCopy(FORBIDDEN_HTML_START);
+- writer << request->getResource();
+- writer->writeNoCopy(FORBIDDEN_HTML_FINISH);
++ response_writer_ptr writer(response_writer::create(tcp_conn, *request,
++ boost::bind(&connection::finish, tcp_conn)));
++ writer->get_response().set_status_code(types::RESPONSE_CODE_FORBIDDEN);
++ writer->get_response().set_status_message(types::RESPONSE_MESSAGE_FORBIDDEN);
++ if (request->get_method() != types::REQUEST_METHOD_HEAD) {
++ writer->write_no_copy(FORBIDDEN_HTML_START);
++ writer << request->get_resource();
++ writer->write_no_copy(FORBIDDEN_HTML_FINISH);
+ }
+ writer->send();
+ return;
+@@ -168,7 +169,7 @@ void FileService::operator()(HTTPRequest
+ // requests specifying directories are not allowed
+ if (boost::filesystem::is_directory(file_path)) {
+ PION_LOG_WARN(m_logger, "Request for directory ("
+- << getResource() << "): " << relative_path);
++ << get_resource() << "): " << relative_path);
+ static const std::string FORBIDDEN_HTML_START =
+ "\n"
+ "403 Forbidden\n"
+@@ -178,21 +179,21 @@ void FileService::operator()(HTTPRequest
+ static const std::string FORBIDDEN_HTML_FINISH =
+ " is a directory.\n"
+ "\n";
+- HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
+- boost::bind(&TCPConnection::finish, tcp_conn)));
+- writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_FORBIDDEN);
+- writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_FORBIDDEN);
+- if (request->getMethod() != HTTPTypes::REQUEST_METHOD_HEAD) {
+- writer->writeNoCopy(FORBIDDEN_HTML_START);
+- writer << request->getResource();
+- writer->writeNoCopy(FORBIDDEN_HTML_FINISH);
++ response_writer_ptr writer(response_writer::create(tcp_conn, *request,
++ boost::bind(&connection::finish, tcp_conn)));
++ writer->get_response().set_status_code(types::RESPONSE_CODE_FORBIDDEN);
++ writer->get_response().set_status_message(types::RESPONSE_MESSAGE_FORBIDDEN);
++ if (request->get_method() != types::REQUEST_METHOD_HEAD) {
++ writer->write_no_copy(FORBIDDEN_HTML_START);
++ writer << request->get_resource();
++ writer->write_no_copy(FORBIDDEN_HTML_FINISH);
+ }
+ writer->send();
+ return;
+ }
+
+- if (request->getMethod() == HTTPTypes::REQUEST_METHOD_GET
+- || request->getMethod() == HTTPTypes::REQUEST_METHOD_HEAD)
++ if (request->get_method() == types::REQUEST_METHOD_GET
++ || request->get_method() == types::REQUEST_METHOD_HEAD)
+ {
+ // the type of response we will send
+ enum ResponseType {
+@@ -207,7 +208,7 @@ void FileService::operator()(HTTPRequest
+ DiskFile response_file;
+
+ // get the If-Modified-Since request header
+- const std::string if_modified_since(request->getHeader(HTTPTypes::HEADER_IF_MODIFIED_SINCE));
++ const std::string if_modified_since(request->get_header(types::HEADER_IF_MODIFIED_SINCE));
+
+ // check the cache for a corresponding entry (if enabled)
+ // note that m_cache_setting may equal 0 if m_scan_setting == 1
+@@ -225,18 +226,18 @@ void FileService::operator()(HTTPRequest
+ // all requests must correspond with existing cache entries
+ // since no match was found, just return file not found
+ PION_LOG_WARN(m_logger, "Request for unknown file ("
+- << getResource() << "): " << relative_path);
++ << get_resource() << "): " << relative_path);
+ response_type = RESPONSE_NOT_FOUND;
+ } else {
+ PION_LOG_DEBUG(m_logger, "No cache entry for request ("
+- << getResource() << "): " << relative_path);
++ << get_resource() << "): " << relative_path);
+ }
+
+ } else {
+ // found an existing cache entry
+
+ PION_LOG_DEBUG(m_logger, "Found cache entry for request ("
+- << getResource() << "): " << relative_path);
++ << get_resource() << "): " << relative_path);
+
+ if (m_cache_setting == 0) {
+ // cache is disabled
+@@ -253,12 +254,12 @@ void FileService::operator()(HTTPRequest
+ // no need to read the file; the modified times match!
+ response_type = RESPONSE_NOT_MODIFIED;
+ } else {
+- if (request->getMethod() == HTTPTypes::REQUEST_METHOD_HEAD) {
++ if (request->get_method() == types::REQUEST_METHOD_HEAD) {
+ response_type = RESPONSE_HEAD_OK;
+ } else {
+ response_type = RESPONSE_OK;
+ PION_LOG_DEBUG(m_logger, "Cache disabled, reading file ("
+- << getResource() << "): " << relative_path);
++ << get_resource() << "): " << relative_path);
+ }
+ }
+
+@@ -290,7 +291,7 @@ void FileService::operator()(HTTPRequest
+ // get the response type
+ if (cache_itr->second.getLastModifiedString() == if_modified_since) {
+ response_type = RESPONSE_NOT_MODIFIED;
+- } else if (request->getMethod() == HTTPTypes::REQUEST_METHOD_HEAD) {
++ } else if (request->get_method() == types::REQUEST_METHOD_HEAD) {
+ response_type = RESPONSE_HEAD_OK;
+ } else {
+ response_type = RESPONSE_OK;
+@@ -301,7 +302,7 @@ void FileService::operator()(HTTPRequest
+
+ PION_LOG_DEBUG(m_logger, (cache_was_updated ? "Updated" : "Using")
+ << " cache entry for request ("
+- << getResource() << "): " << relative_path);
++ << get_resource() << "): " << relative_path);
+ }
+ }
+ }
+@@ -310,7 +311,7 @@ void FileService::operator()(HTTPRequest
+ // make sure that the file exists
+ if (! boost::filesystem::exists(file_path)) {
+ PION_LOG_WARN(m_logger, "File not found ("
+- << getResource() << "): " << relative_path);
++ << get_resource() << "): " << relative_path);
+ sendNotFoundResponse(request, tcp_conn);
+ return;
+ }
+@@ -318,7 +319,7 @@ void FileService::operator()(HTTPRequest
+ response_file.setFilePath(file_path);
+
+ PION_LOG_DEBUG(m_logger, "Found file for request ("
+- << getResource() << "): " << relative_path);
++ << get_resource() << "): " << relative_path);
+
+ // determine the MIME type
+ response_file.setMimeType(findMIMEType( response_file.getFilePath().string() ));
+@@ -330,7 +331,7 @@ void FileService::operator()(HTTPRequest
+ if (response_file.getLastModifiedString() == if_modified_since) {
+ // no need to read the file; the modified times match!
+ response_type = RESPONSE_NOT_MODIFIED;
+- } else if (request->getMethod() == HTTPTypes::REQUEST_METHOD_HEAD) {
++ } else if (request->get_method() == types::REQUEST_METHOD_HEAD) {
+ response_type = RESPONSE_HEAD_OK;
+ } else {
+ response_type = RESPONSE_OK;
+@@ -341,7 +342,7 @@ void FileService::operator()(HTTPRequest
+ }
+ // add new entry to the cache
+ PION_LOG_DEBUG(m_logger, "Adding cache entry for request ("
+- << getResource() << "): " << relative_path);
++ << get_resource() << "): " << relative_path);
+ boost::mutex::scoped_lock cache_lock(m_cache_mutex);
+ m_cache_map.insert( std::make_pair(relative_path, response_file) );
+ }
+@@ -360,43 +361,43 @@ void FileService::operator()(HTTPRequest
+ // sending headers only -> use our own response object
+
+ // prepare a response and set the Content-Type
+- HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
+- boost::bind(&TCPConnection::finish, tcp_conn)));
+- writer->getResponse().setContentType(response_file.getMimeType());
++ response_writer_ptr writer(response_writer::create(tcp_conn, *request,
++ boost::bind(&connection::finish, tcp_conn)));
++ writer->get_response().set_content_type(response_file.getMimeType());
+
+ // set Last-Modified header to enable client-side caching
+- writer->getResponse().addHeader(HTTPTypes::HEADER_LAST_MODIFIED,
++ writer->get_response().add_header(types::HEADER_LAST_MODIFIED,
+ response_file.getLastModifiedString());
+
+ std::stringstream out;
+ out << response_file.getFileSize();
+- writer->getResponse().addHeader(HTTPTypes::HEADER_CONTENT_LENGTH, out.str());
++ writer->get_response().add_header(types::HEADER_CONTENT_LENGTH, out.str());
+
+ switch(response_type) {
+ case RESPONSE_UNDEFINED:
+ case RESPONSE_NOT_FOUND:
+ case RESPONSE_OK:
+ // this should never happen
+- throw UndefinedResponseException(request->getResource());
++ throw UndefinedResponseException(request->get_resource());
+ break;
+ case RESPONSE_NOT_MODIFIED:
+ // set "Not Modified" response
+- writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_MODIFIED);
+- writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_MODIFIED);
++ writer->get_response().set_status_code(types::RESPONSE_CODE_NOT_MODIFIED);
++ writer->get_response().set_status_message(types::RESPONSE_MESSAGE_NOT_MODIFIED);
+ break;
+ case RESPONSE_HEAD_OK:
+ // set "OK" response (not really necessary since this is the default)
+- writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_OK);
+- writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_OK);
++ writer->get_response().set_status_code(types::RESPONSE_CODE_OK);
++ writer->get_response().set_status_message(types::RESPONSE_MESSAGE_OK);
+ break;
+ }
+
+ // send the response
+ writer->send();
+ }
+- } else if (request->getMethod() == HTTPTypes::REQUEST_METHOD_POST
+- || request->getMethod() == HTTPTypes::REQUEST_METHOD_PUT
+- || request->getMethod() == HTTPTypes::REQUEST_METHOD_DELETE)
++ } else if (request->get_method() == types::REQUEST_METHOD_POST
++ || request->get_method() == types::REQUEST_METHOD_PUT
++ || request->get_method() == types::REQUEST_METHOD_DELETE)
+ {
+ // If not writable, then send 405 (Method Not Allowed) response for POST, PUT or DELETE requests.
+ if (!m_writable) {
+@@ -409,24 +410,24 @@ void FileService::operator()(HTTPRequest
+ static const std::string NOT_ALLOWED_HTML_FINISH =
+ " is not allowed on this server.\n"
+ "