diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/administration.hpp | 18 | ||||
| -rw-r--r-- | include/config.hpp | 4 | ||||
| -rw-r--r-- | include/countries.hpp | 10 | ||||
| -rw-r--r-- | include/exporter.hpp | 10 | ||||
| -rw-r--r-- | include/importer.hpp | 14 | ||||
| -rw-r--r-- | include/logger.hpp | 4 | ||||
| -rw-r--r-- | include/ui.hpp | 2 |
7 files changed, 31 insertions, 31 deletions
diff --git a/include/administration.hpp b/include/administration.hpp index 2d6d621..51e72d8 100644 --- a/include/administration.hpp +++ b/include/administration.hpp @@ -489,9 +489,9 @@ namespace administration { // Setup functions. // ======================= - void create_empty(char* save_file); - void create_default(char* save_file); - void create_from_file(char* save_file); + void create_empty(const char* save_file); + void create_default(const char* save_file); + void create_from_file(const char* save_file); void destroy(); void sort_data(); @@ -519,11 +519,11 @@ namespace administration { // Other functions. // ======================= - char* get_file_path(); + const char* get_file_path(); s32 get_next_id(); s32 get_next_sequence_number(); - char* get_currency_symbol_for_currency(char* code); - char* get_default_currency(); + const char* get_currency_symbol_for_currency(const char* code); + const char* get_default_currency(); time_t get_default_invoice_expire_duration(); ai_service get_active_ai_service(); ai_service get_ai_service(ai_provider provider); @@ -563,7 +563,7 @@ namespace administration { a_err project_remove(project data); void project_cancel(project data); a_err project_is_valid(project data); - char* project_get_status_string(project data); + const char* project_get_status_string(project data); u32 project_get_all(project* buffer); u32 project_get_partial_list(u32 page_index, u32 page_size, project* buffer); a_err project_get_by_id(project* buffer, char* id); @@ -610,7 +610,7 @@ namespace administration { void invoice_destroy(invoice* invoice); a_err invoice_is_valid(invoice* invoice); bool invoice_has_intra_community_services(invoice* invoice); - char* invoice_get_status_string(invoice* invoice); + const char* invoice_get_status_string(invoice* invoice); u32 invoice_get_partial_list_outgoing(u32 page_index, u32 page_size, invoice* buffer); u32 invoice_get_partial_list_incomming(u32 page_index, u32 page_size, invoice* buffer); u32 invoice_get_all(invoice* buffer); @@ -635,7 +635,7 @@ namespace administration { // Activity functions. // =================== a_err activity_import(activity ac); - a_err activity_add(char* user, char* ref_id, char* message); + a_err activity_add(const char* user, const char* ref_id, const char* message); u32 activity_get_all_for_object(activity* buffer, char* ref_id); u32 activity_count(); a_err activity_get_by_index(u32 index, activity* buffer); diff --git a/include/config.hpp b/include/config.hpp index 7650e75..b7b38d5 100644 --- a/include/config.hpp +++ b/include/config.hpp @@ -34,9 +34,9 @@ #define SIMULATE_SLOW_DISK 0 #define SIMULATE_WRITE_FAILURE 0 -namespace config { - static const char* PROGRAM_VERSION = "0.1.0"; // major.minor.patch +#define PROGRAM_VERSION "0.1.0" // major.minor.patch +namespace config { namespace colors { static const ImU32 COLOR_ERROR_OUTLINE = IM_COL32(255, 0, 0, 80); static const ImU32 COLOR_ERROR = IM_COL32(235, 64, 52, 255); diff --git a/include/countries.hpp b/include/countries.hpp index 1595b85..de91dab 100644 --- a/include/countries.hpp +++ b/include/countries.hpp @@ -39,14 +39,14 @@ namespace country { s32 get_count(); const char* get_code_by_index(s32 index); - time_t get_default_invoice_expire_duration(char* country_code); + time_t get_default_invoice_expire_duration(const char* country_code); bool is_EU(const char* country_code); bool is_enabled(const char* country_code); bool tax_is_implemented(const char* country_code); - void fill_tax_report_with_categories(char* country_code, tax_report* report); - bool add_billing_item_to_tax_report(char* country_code, tax_report* report, invoice* inv, billing_item* item); - float calculate_tax_report_final(char* country_code, tax_report* report); - time_t get_invoice_date_to_use_for_tax_report(char* country_code, invoice* inv); + void fill_tax_report_with_categories(const char* country_code, tax_report* report); + bool add_billing_item_to_tax_report(const char* country_code, tax_report* report, invoice* inv, billing_item* item); + float calculate_tax_report_final(const char* country_code, tax_report* report); + time_t get_invoice_date_to_use_for_tax_report(const char* country_code, invoice* inv); u32 get_available_tax_rates(const char* country_code, tax_rate* buffer, u32 buffer_size); } diff --git a/include/exporter.hpp b/include/exporter.hpp index 82c18b2..3ac57b0 100644 --- a/include/exporter.hpp +++ b/include/exporter.hpp @@ -42,8 +42,8 @@ namespace exporter { time_t done_at; e_err error; status status; - char* sender; - char* recipient; + const char* sender; + const char* recipient; const char* subject; const char* text; send_email_callback callback; @@ -51,10 +51,10 @@ namespace exporter { typedef struct { - char* provider_name; - bool (*send_email)(char* sender, char* recipient, const char* subject, const char* text); + const char* provider_name; + bool (*send_email)(const char* sender, const char* recipient, const char* subject, const char* text); } email_provider_impl; email_provider_impl get_email_provider_implementation(email_provider provider); - exporter::export_request* send_email(char* sender, char* recipient, const char* subject, const char* text, send_email_callback ev); + exporter::export_request* send_email(const char* sender, const char* recipient, const char* subject, const char* text, send_email_callback ev); }
\ No newline at end of file diff --git a/include/importer.hpp b/include/importer.hpp index 2360d29..b432b45 100644 --- a/include/importer.hpp +++ b/include/importer.hpp @@ -62,18 +62,18 @@ namespace importer { typedef struct { - char* provider_name; - char* default_model; - bool (*upload_file)(char* file_path, char* file_id, size_t file_id_len); - bool (*query_with_file)(const char* query, size_t query_length, char* file_id, char** response); - bool (*batch_query_with_file)(const char** queries, size_t query_count, char* file_id, invoice* buffer, batch_query_response_handler response_handler); + const char* provider_name; + const char* default_model; + bool (*upload_file)(const char* file_path, char* file_id, size_t file_id_len); + bool (*query_with_file)(const char* query, size_t query_length, const char* file_id, char** response); + bool (*batch_query_with_file)(const char** queries, size_t query_count, const char* file_id, invoice* buffer, batch_query_response_handler response_handler); bool (*get_available_models)(model_list_request* buffer); } ai_provider_impl; typedef struct { - char* provider_name; - bool (*send_email)(char* sender, char* recipient, const char* subject, const char* text); + const char* provider_name; + bool (*send_email)(const char* sender, const char* recipient, const char* subject, const char* text); } email_provider_impl; const char* error_to_string(i_err error); diff --git a/include/logger.hpp b/include/logger.hpp index 0f8d658..b37f343 100644 --- a/include/logger.hpp +++ b/include/logger.hpp @@ -41,7 +41,7 @@ namespace logger { void clear(); void aerr(a_err errors); - void info(const char* fmt, ...) IM_FMTARGS(2); - void error(const char* fmt, ...) IM_FMTARGS(2); + void info(const char* fmt, ...) IM_FMTARGS(1); + void error(const char* fmt, ...) IM_FMTARGS(1); }
\ No newline at end of file diff --git a/include/ui.hpp b/include/ui.hpp index 54d3e97..4636601 100644 --- a/include/ui.hpp +++ b/include/ui.hpp @@ -111,7 +111,7 @@ namespace ImGui void ProjectDropdown(char* project_id); void TaxRateDropdown(char* tax_internal_code, bool outgoing, bool has_error); bool CurrencyDropdown(char* currency); - void ToggleDropdown(bool *buffer, char* option1, char* option2); + void ToggleDropdown(bool *buffer, const char* option1, const char* option2); bool BeginExportDropdown(const char* title, const char* text, exporter::export_request* active_request); }
\ No newline at end of file |
