diff options
author | Sebastian Reichel <sre@ring0.de> | 2017-04-16 01:19:16 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2017-04-18 22:08:34 +0200 |
commit | a211b960a7590910b46c1d59acaeda5e87b5b522 (patch) | |
tree | da94483c1d1719d71777477452d34092df91e215 /src/pdf-stock | |
parent | 2bee9e0eb0f46d41a381e3fc32ff98a192f9493a (diff) | |
download | serial-barcode-scanner-a211b960a7590910b46c1d59acaeda5e87b5b522.tar.bz2 |
all: switch from session to system bus
Diffstat (limited to 'src/pdf-stock')
-rw-r--r-- | src/pdf-stock/main.vala | 2 | ||||
-rw-r--r-- | src/pdf-stock/pdf-stock.vala | 2 | ||||
-rw-r--r-- | src/pdf-stock/test.vala | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/pdf-stock/main.vala b/src/pdf-stock/main.vala index fee62af..49613f4 100644 --- a/src/pdf-stock/main.vala +++ b/src/pdf-stock/main.vala @@ -15,7 +15,7 @@ public static int main(string[] args) { Bus.own_name( - BusType.SESSION, + BusType.SYSTEM, "io.mainframe.shopsystem.StockPDF", BusNameOwnerFlags.NONE, on_bus_aquired, diff --git a/src/pdf-stock/pdf-stock.vala b/src/pdf-stock/pdf-stock.vala index c1e9b6a..e971f78 100644 --- a/src/pdf-stock/pdf-stock.vala +++ b/src/pdf-stock/pdf-stock.vala @@ -169,7 +169,7 @@ public class StockPDF { /* get stock */ try { - Database db = Bus.get_proxy_sync(BusType.SESSION, "io.mainframe.shopsystem.Database", "/io/mainframe/shopsystem/database"); + Database db = Bus.get_proxy_sync(BusType.SYSTEM, "io.mainframe.shopsystem.Database", "/io/mainframe/shopsystem/database"); stock = db.get_stock(); timestamp = new DateTime.now_local().to_unix(); } catch(IOError e) { diff --git a/src/pdf-stock/test.vala b/src/pdf-stock/test.vala index 9cd3a7e..cc3da4f 100644 --- a/src/pdf-stock/test.vala +++ b/src/pdf-stock/test.vala @@ -15,7 +15,7 @@ public static int main(string args[]) { try { - PDFStock stock = Bus.get_proxy_sync(BusType.SESSION, "io.mainframe.shopsystem.StockPDF", "/io/mainframe/shopsystem/stockpdf"); + PDFStock stock = Bus.get_proxy_sync(BusType.SYSTEM, "io.mainframe.shopsystem.StockPDF", "/io/mainframe/shopsystem/stockpdf"); var pdfdata = stock.generate(); FileUtils.set_contents("test.pdf", (string) pdfdata, pdfdata.length); } catch(IOError e) { |