/*! * * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file StorageGlobals.cpp * \author (last) Peter Lucia * \date (last) 15-Oct-2020 * \author (original) Behrouz NematiPour * \date (original) 26-Aug-2020 * */ // Qt #include // Project #include "StorageGlobals.h" /*! * \brief Storage * \details The container of the constant global variable withing Storage namespace members. * For example it currently includes USB mount root folder and SD Card mount root folder and such, * which is used by Logger, DriveWatcher, ... . */ namespace Storage { /****** TO BE CONSISTENT, ALWAYS INCLUDE '/' AT THE END OF ALL THE FOLDER/DIR/PATH IN HERE ******/ // USB #ifdef BUILD_FOR_TARGET const char *USB_Mount_Point = "/media/usb/"; #else const char *USB_Mount_Point = "/media/denali/usb-disk/"; #endif const char *USB_File_System = "vfat"; // SD-CARD const short Available_Space_Percent = 15; #ifdef BUILD_FOR_TARGET const char *SDCard_Base_Path_Name = "/media/sd-card/"; #else // should not be in the project application folder. [not tracking by git] const char *SDCard_Base_Path_Name = "/media/denali/sd-card/"; #endif // Settings #ifdef BUILD_FOR_TARGET const char *Settings_Path_Name = "/home/root/.config/"; #else // should be in the project application folder. [is tracking by git] const char *Settings_Path_Name = "/home/denali/Projects/application/resources/settings/"; #endif // Scripts #ifdef BUILD_FOR_TARGET const char *Scripts_Path_Name = "/home/root/scripts/"; #else // should be in the project application folder. [is tracking by git] const char *Scripts_Path_Name = "/home/denali/Projects/application/scripts/"; #endif // Treatment // Please notice that is the folder not the path // and it needs to be concatenated after SDCard_Base_Path_Name for each build configuration const char *Treatment_Log_Folder = "treatment/"; // FIXME : Not sure having global settings object is a good idea. #ifdef BUILD_FOR_DESKTOP QSettings WifiSettings("/home/denali/wifi.ini"); #elif BUILD_FOR_TARGET QSettings WifiSettings("/home/root/wifi.ini", QSettings::IniFormat); #endif // TODO : These need to be removed from here because they are only used in their specific classes. // Date and Time const char *Date_Time_Set_Sh = "date_time_set.sh"; // WiFi Settings const char *Wifi_Disconnect_Network = "wifi_disconnect_network.sh"; const char *Wifi_Generate_WPA_Supplicant = "wifi_generate_wpa_supplicant.sh"; const char *Wifi_Read_DNS = "wifi_read_dns.sh"; const char *Wifi_Read_Gateway = "wifi_read_gateway.sh"; const char *Wifi_Read_IP_Settings = "wifi_read_ip_settings.sh"; const char *Wifi_Get_Auto_Assigned_IP = "wifi_request_auto_assigned_ip.sh"; const char *Wifi_Reset_Adapter = "wifi_reset_adapter.sh"; const char *Wifi_Reset_Interface = "wifi_reset_interface.sh"; const char *Wifi_Scan_For_Networks = "wifi_scan_for_networks.sh"; const char *Wifi_Set_Auto_Assigned_IP = "wifi_set_auto_assigned_ip.sh"; const char *Wifi_Set_DNS = "wifi_set_dns.sh"; const char *Wifi_Set_Static_IP = "wifi_set_static_ip.sh"; const char *Wifi_Set_Gateway = "wifi_set_gateway.sh"; const char *Wifi_Set_SubnetMask = "wifi_set_subnetmask.sh"; const char *Wifi_Start_WPA_Supplicant = "wifi_start_wpa_supplicant.sh"; const char *WifiSettings_SSID = "wifi/ssid"; const char *WifiSettings_MacAddress = "wifi/macAddress"; const char *WifiSettings_ConfPath = "wifi/confPath"; const char *WifiSettings_Security_Types = "wifi/security"; const char *WifiSettings_IPAddress = "wifi/ipAddress"; const char *WifiSettings_Gateway = "wifi/gateway"; const char *WifiSettings_SubnetMask = "wifi/subnetmask"; const char *WifiSettings_DNS = "wifi/dns"; const char *WifiSettings_UseDHCP = "wifi/useDHCP"; #ifdef BUILD_FOR_DESKTOP const char *Path_FileSystem_Checksums = "/home/denali/Projects/application/scripts/checksums_desktop.conf"; const char *Path_Modules_Check = "/home/denali/Projects/application/scripts/modules_check.out"; const char *Path_Touchscreen_Check = "/home/denali/Projects/application/scripts/touchscreen_check.out"; const char *Path_Bluetooth_Check = "/home/denali/Projects/application/scripts/bluetoothctl_check.out"; const char *Path_RTC_Check = "/home/denali/Projects/application/scripts/rtc_check.out"; #elif BUILD_FOR_TARGET const char *Path_FileSystem_Checksums = "/home/root/checksums_desktop.conf"; const char *Path_Modules_Check = "/tmp/modules_check.out"; const char *Path_Touchscreen_Check = "/tmp/touchscreen_check.out"; const char *Path_Bluetooth_Check = "/tmp/bluetoothctl_check.out"; const char *Path_RTC_Check = "/tmp/rtc_check.out"; #endif }