summaryrefslogtreecommitdiffstats
path: root/src/main.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.vala')
-rw-r--r--src/main.vala11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main.vala b/src/main.vala
index 7f9d3c1..81f006d 100644
--- a/src/main.vala
+++ b/src/main.vala
@@ -19,6 +19,8 @@ public AudioPlayer audio;
public CSVMemberFile csvimport;
public ScannerSession localsession;
public MainLoop loop;
+public PGPKeyArchive pgp;
+public KeyFile cfg;
const OptionEntry[] option_entries = {
{ "version", 'v', OptionFlags.IN_MAIN, OptionArg.NONE, ref opt_version, "output version information and exit", null },
@@ -64,6 +66,15 @@ public static int main(string[] args) {
loop = new MainLoop();
localsession = new ScannerSession();
+ try {
+ cfg = new KeyFile();
+ cfg.load_from_file("ktt-shopsystem.cfg", KeyFileFlags.NONE);
+ } catch(Error e) {
+ error("Could not load configuration file: %s", e.message);
+ }
+
+ pgp = new PGPKeyArchive(cfg);
+
dev.received_barcode.connect((data) => {
if(localsession.interpret(data))
dev.blink(10);