diff options
author | Sebastian Reichel <sre@ring0.de> | 2013-02-05 23:35:08 +0100 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2013-02-05 23:35:08 +0100 |
commit | 9ca296d963a1803a40e3b4761c85fb59673e96f1 (patch) | |
tree | 01c17f30967abc48c40c70379b1e428afdeda264 /src/main.vala | |
parent | 1a800aab781077b8a4729ea151138b0b5d7f6057 (diff) | |
download | serial-barcode-scanner-9ca296d963a1803a40e3b4761c85fb59673e96f1.tar.bz2 |
initial code for GPG support
Diffstat (limited to 'src/main.vala')
-rw-r--r-- | src/main.vala | 11 |
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); |