/*************************************************************************** libMiniCash Copyright © 2013-2022 christoph holzheuer c.holzheuer@sourceworx.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. ***************************************************************************/ #ifndef LIBMINICASH_H #define LIBMINICASH_H #include "libMiniCash_global.h" /** @mainpage libMiniCash @section xxx Die libMiniCash Dll libMiniCash enthält die von den Kassensystemen 'miniCash' und 'miniCash.connect' gemeinsam verwendete Funktionalität als Dll. @subsection xxz Funktionsbereiche - Datenmodelle und Datentypen - Eingabe der Verkäufe - Setup-Dialoge - Erzeugung der Abrechnungen - Druckersteuerung @section sec3 Ideen & TODO: @subsection sec3_1 Ideen: - oberfläche erneuern? - beim server hochfahren: daten abholen, puffern, wahlweise via usb - adressverwaltung einbeziehen, für personalisierte Abrechnungen @subsection sec3_2 TODO für 1.0: - wlan first, disk backup - netzprotocol, erfinden oder json/xml - splash screen? - fehler dulden wg. kassenschlange, hinterher kennzeichnen - server security: only allowed hosts - auto feeder zum testen - data: kasse|count|cust|pos|price|timestamp - protocol: [...]: transaction, -: storno; - kasse: semi blocking (soll genau was heissen, chris?) - Beim einlesen mitzählen, Ergebnis in den statusbar. - suche bei Storno mit mehreren Feldern zulassen - setup.exe bauen @subsection sec3_3 TODO für 0.9: - backup über WLAN -> Adhoc Netzwerk einrichten - layouts verwenden - handbuch schreiben - vernünftiger setup-dialog mit abbruch möglichkeit @subsection sec3_4 TODO für 0.8: - Auswertung: laden und speichern : - Printbuttons ab/an schalten : - Kurzanleitung : - programm muss immer starten, fehlerloop verwirrt nur QUARK: Programm _kann_ ohne Laufwerk nicht starten! - help about : mit hinweis auf sourceworx & logo - fonts vereinheitlichen - statusbar einbinden ?!? - Caps lock abschalten, wie ? */ /** * @brief der namespace miniCash enthält Definitionen und Konstanten. * * Hier stehen die Konstanten für * - die HTML-Templates zur Erzeugung der Print-Files * - Die Dateipfade * - die RegEx zur Eingabekontrolle * - Copyright-Hinweise * Der Namespace gilt Anwendungsübergreifend sowohl für die Library als * auch die damit implementierten Anwendungen. */ namespace miniCash { /// networkstate typedef enum { Disabled = 0, UnConnected, Error, Connected, IsServer, ServerReady, CStateSize } CState; [[maybe_unused]] constexpr static const char* cstDisabled = " "; [[maybe_unused]] constexpr static const char* cstUnConnected = "--Ready"; [[maybe_unused]] constexpr static const char* cstError = "Error"; [[maybe_unused]] constexpr static const char* cstConnected = "Connected"; [[maybe_unused]] constexpr static const char* cstIsServer = "Ready"; [[maybe_unused]] constexpr static const char* cstServerReady = "Connected"; [[maybe_unused]] static const char* const icnConnected = ":images/connect.png"; [[maybe_unused]] static const char* const icnUnConnected = ":images/disconnect.png"; [[maybe_unused]] static const char* const icnServer = ":images/_server.png"; /// basics [[maybe_unused]] static const char* const orgName = "source::worx"; [[maybe_unused]] static const char* const domainName = "sourceworx.org"; /// eigene KassenID [[maybe_unused]] static const char* const keySelfID = "selfID"; [[maybe_unused]] static const char* const selfID = "1"; /// transaktionszähler, vormals die hässliche Zähldatei [[maybe_unused]] static const char* const keyTransCount = "TransCount"; [[maybe_unused]] static const char* const transCount = "1"; /// file handling [[maybe_unused]] static const char* const keyMobileDrive = "MobileDrive"; [[maybe_unused]] static const char* const mobileDrive = "E:/"; [[maybe_unused]] static const char* const dataDir = "/miniCash.data/"; [[maybe_unused]] static const char* const filetype = ".mcd"; /// address handling [[maybe_unused]] static const char* const keyAddressFile = "AddressFile"; /// defaults [[maybe_unused]] static const char* const keyProfit = "Profit"; [[maybe_unused]] static const char* const profit = "15"; [[maybe_unused]] static const char* const keyFooterText = "FooterText"; /// networking [[maybe_unused]] static const char* const keyIsTcpReceiver = "isTcpReceiver"; [[maybe_unused]] static const bool isTcpReceiver = false; [[maybe_unused]] static const char* const keyIsTcpSender = "isTcpSender"; [[maybe_unused]] static const bool isTcpSender = true; [[maybe_unused]] static const int senderTimeout = 60000; [[maybe_unused]] static const char* const keyReceiverPort = "receiverPort"; [[maybe_unused]] static const int receiverPort = 7077; [[maybe_unused]] static const char* const keyReceiverHost = "receiverHost"; /// resource handling [[maybe_unused]] static const char* const tplFinal = ":templates/tplFinal.html"; [[maybe_unused]] static const char* const tplPayoff = ":templates/tplPayoff.html"; [[maybe_unused]] static const char* const tplReceipt = ":templates/tplReceipt.html"; /// input filter [[maybe_unused]] static const char* const fCustID = "^[0-9]{4}$"; [[maybe_unused]] static const char* const fItemNo = "^[0-9]{1,3}$"; [[maybe_unused]] static const char* const fPrice = "^[0-9]{1,3}(,[0-9]{1,2})?$"; [[maybe_unused]] static const char* const fSrcDrive = "^[e-zE-Z]$"; [[maybe_unused]] static const char* const fProfit = "^[0-9]{2}$"; [[maybe_unused]] static const char* const fFromID = "^1[1-3][0-9]{2}$"; [[maybe_unused]] static const char* const fToID = "^1[1-3][0-9]{2}$"; /// misc [[maybe_unused]] static const char* const versionLib = "Version 0.8.42, 14.07.2022"; [[maybe_unused]] static const char* const copyright = "miniCash, © 2013-2022 Christoph Holzheuer c.holzheuer@sourceworx.org "; [[maybe_unused]] static const char* const copyShort = "miniCash, © 2013-2022\nc.holzheuer@sourceworx.org "; } #endif // LIBMINICASH_H