2015-05-11 00:18:22 +02:00
|
|
|
#ifndef CONFIG_H
|
|
|
|
#define CONFIG_H
|
|
|
|
|
|
|
|
#cmakedefine USE_COLORIZED_LOGS
|
|
|
|
|
2015-09-24 21:59:20 +02:00
|
|
|
#define DOORLOCK_VERSION_MAJOR "@DOORLOCK_VERSION_MAJOR@"
|
|
|
|
#define DOORLOCK_VERSION_MINOR "@DOORLOCK_VERSION_MINOR@"
|
|
|
|
#define DOORLOCK_VERSION_PATCH "@DOORLOCK_VERSION_PATCH@"
|
|
|
|
#define DOORLOCK_VERSION "@DOORLOCK_VERSION@"
|
2015-09-23 15:47:52 +02:00
|
|
|
|
2015-09-24 21:59:20 +02:00
|
|
|
#define DOORLOCK_GIT_BRANCH @GIT_BRANCH@
|
|
|
|
#define DOORLOCK_GIT_COMMIT_HASH @GIT_COMMIT_HASH@
|
2015-09-23 15:47:52 +02:00
|
|
|
|
2015-05-11 00:18:22 +02:00
|
|
|
#ifdef DEBUG
|
|
|
|
#define DEFAULT_LOG_LEVEL LogLevel::debug2
|
|
|
|
#else
|
|
|
|
#define DEFAULT_LOG_LEVEL LogLevel::info
|
|
|
|
#endif
|
|
|
|
|
2015-05-13 16:50:44 +02:00
|
|
|
#define DEFAULT_TOKEN_TIMEOUT (60*5)
|
2015-05-13 16:20:12 +02:00
|
|
|
#define DEFAULT_PORT 5555
|
2015-05-13 16:40:30 +02:00
|
|
|
#define DEFAULT_WEB_PREFIX "https://lock.binary.kitchen/"
|
2015-05-24 19:15:47 +02:00
|
|
|
#define DEFAULT_LDAP_URI "ldaps://ldap1.binary.kitchen/ ldaps://ldap2.binary.kitchen/ ldaps://ldapm.binary.kitchen/"
|
2016-04-11 18:12:26 +02:00
|
|
|
#define DEFAULT_BINDDN "cn=%s,ou=people,dc=binary-kitchen,dc=de"
|
2016-04-03 17:03:50 +02:00
|
|
|
#define DEFAULT_TOKEN_LENGTH 6
|
2016-07-20 19:47:42 +02:00
|
|
|
#define DEFAULT_LOG_DIR "/var/log/"
|
2015-09-23 15:29:05 +02:00
|
|
|
#define DEFAULT_SERIAL_DEVICE "/dev/ttyAMA0"
|
2015-09-23 15:33:27 +02:00
|
|
|
#define DEFAULT_SERIAL_BAUDRATE 9600UL
|
2015-05-12 01:28:02 +02:00
|
|
|
|
2016-07-20 19:47:42 +02:00
|
|
|
#define LOG_FILENAME "doorlockd.log"
|
2016-07-20 20:21:43 +02:00
|
|
|
#define LOG_SCRIPTS_FILENAME "doorlockd-scripts.log"
|
2016-07-20 19:47:42 +02:00
|
|
|
|
2015-10-07 15:44:43 +02:00
|
|
|
#define SHARED_LOCATION "@CMAKE_INSTALL_PREFIX@/share/doorlockd/"
|
2015-10-07 17:44:45 +02:00
|
|
|
|
2015-10-07 15:44:43 +02:00
|
|
|
#define IMAGE_LOCATION SHARED_LOCATION "images/"
|
2015-10-07 17:44:45 +02:00
|
|
|
#define IMAGE_LED_GREEN IMAGE_LOCATION "led-green.png"
|
|
|
|
#define IMAGE_LED_RED IMAGE_LOCATION "led-red.png"
|
|
|
|
|
2015-05-21 13:56:20 +02:00
|
|
|
|
2015-10-07 17:42:52 +02:00
|
|
|
#define SOUNDS_LOCATION SHARED_LOCATION "sounds/"
|
|
|
|
#define SOUND_LOCK SOUNDS_LOCATION "lock.wav"
|
|
|
|
#define SOUND_UNLOCK SOUNDS_LOCATION "unlock.wav"
|
|
|
|
#define SOUND_EMERGENCY_UNLOCK SOUNDS_LOCATION "emergency_unlock.wav"
|
|
|
|
#define SOUND_ZONK SOUNDS_LOCATION "zonk.wav"
|
|
|
|
#define SOUND_LOCK_BUTTON SOUNDS_LOCATION "lock_button.wav"
|
|
|
|
#define SOUND_UNLOCK_BUTTON SOUNDS_LOCATION "unlock_button.wav"
|
|
|
|
|
2016-07-20 20:04:39 +02:00
|
|
|
#define PRE_LOCK_SCRIPT "@CMAKE_INSTALL_PREFIX@/etc/doorlockd/pre_lock"
|
|
|
|
#define POST_LOCK_SCRIPT "@CMAKE_INSTALL_PREFIX@/etc/doorlockd/post_lock"
|
|
|
|
#define PRE_UNLOCK_SCRIPT "@CMAKE_INSTALL_PREFIX@/etc/doorlockd/pre_unlock"
|
|
|
|
#define POST_UNLOCK_SCRIPT "@CMAKE_INSTALL_PREFIX@/etc/doorlockd/post_unlock"
|
|
|
|
#define EMERGENCY_UNLOCK_SCRIPT "@CMAKE_INSTALL_PREFIX@/etc/doorlockd/emergency_unlock"
|
2015-05-25 15:47:44 +02:00
|
|
|
|
2015-05-11 00:18:22 +02:00
|
|
|
#endif
|