Add some skeleton functions to make the option-using code in gnucash/gnome-utils and gnucash/gnome happy.

This commit is contained in:
John Ralls 2020-04-04 14:23:55 -07:00
parent 99103ffd10
commit 1eef796f09
2 changed files with 81 additions and 0 deletions

View File

@ -1142,3 +1142,21 @@ void
gnc_option_db_book_options(GncOptionDB*) gnc_option_db_book_options(GncOptionDB*)
{ {
} }
const QofInstance*
gnc_option_db_lookup_qofinstance_value(GncOptionDB*, const char*, const char*)
{
return nullptr;
}
GList*
gnc_option_db_lookup_glist_value(GncOptionDB*, const char*, const char*)
{
return nullptr;
}
void
gnc_option_db_set_glist_value(GncOptionDB*, const char*, const char*, GList*)
{
}

View File

@ -104,7 +104,70 @@ void gnc_option_db_save(GncOptionDB* odb, QofBook* book,
*/ */
void gnc_option_db_book_options(GncOptionDB*); void gnc_option_db_book_options(GncOptionDB*);
/**
* Retrieve the string value of an option in the GncOptionDB
*
* @param odb the GncOptionDB
* @param section the section in which the option is stored
* @param name the option name
* @return the static char* of the value or nullptr if the option isn't found
* or if its value isn't a string.
*/
const char* gnc_option_db_lookup_string_value(GncOptionDB*, const char*,
const char*);
/**
* Set the string value of an option in the GncOptionDB.
*
* The value will not be saved if the option is not in the GncOptionDB or if the
* type of the option isn't string or text.
*
* @param odb the GncOptionDB
* @param section the section in which the option is stored
* @param name the option name
* @param value the value to be stored in the option.
*/
void gnc_option_db_set_string_value(GncOptionDB*, const char*,
const char*, const char*);
/**
* Retrieve the string value of an option in the GncOptionDB
*
* @param odb the GncOptionDB
* @param section the section in which the option is stored
* @param name the option name
* @return the const QofInstance* of the value or nullptr if the option isn't
* found or if its value isn't a QofInstance*.
*/
const QofInstance* gnc_option_db_lookup_qofinstance_value(GncOptionDB*,
const char*,
const char*);
/**
* Retrieve the GList* value of an option in the GncOptionDB
*
* @param odb the GncOptionDB
* @param section the section in which the option is stored
* @param name the option name
* @return the GList* of the value or nullptr if the option isn't found
* or if its value isn't a string.
*/
GList* gnc_option_db_lookup_glist_value(GncOptionDB*, const char*, const char*);
/**
* Set the GList* value of an option in the GncOptionDB.
*
* The value will not be saved if the option is not in the GncOptionDB or if the
* type of the option isn't string or text.
*
* @param odb the GncOptionDB
* @param section the section in which the option is stored
* @param name the option name
* @param value the value to be stored in the option.
*/
void gnc_option_db_set_glist_value(GncOptionDB*, const char*,
const char*, GList*);
#ifdef __cplusplus #ifdef __cplusplus
} }