1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 Database of pre-defined templates
7 <!-- ##### SECTION Long_Description ##### -->
9 This section describes a set of functions to locate and add templates and related information in
10 the LibGlabels template database.
13 <!-- ##### SECTION See_Also ##### -->
18 <!-- ##### SECTION Stability_Level ##### -->
21 <!-- ##### SECTION Image ##### -->
24 <!-- ##### ENUM lglDbRegStatus ##### -->
26 This enumeration defines a set of possible return values for lgl_db_register_template().
29 @LGL_DB_REG_OK: Registration successful.
30 @LGL_DB_REG_BAD_PAPER_ID: Registration failed because paper id is unknown.
31 @LGL_DB_REG_BRAND_PART_EXISTS: Registration failed because template with same brand and part name/number already exists.
32 @LGL_DB_REG_FILE_WRITE_ERROR: Registration failed because an error while writing to disk.
34 <!-- ##### ENUM lglDbDeleteStatus ##### -->
36 This enumeration defines a set of possible return values for lgl_db_delete_template_by_name() or lgl_db_delete_template_by_brand_part().
39 @LGL_DB_DELETE_OK: Deletion successful.
40 @LGL_DB_DELETE_DOES_NOT_EXIST: Deletion failed because template with given brand and part name/number does not exist.
41 @LGL_DB_DELETE_NOT_USER_DEFINED: Deletion failed because given template is not a user defined template.
42 @LGL_DB_DELETE_FILE_ERROR: Deletion failed because of an error while attempting to remove template from disk.
44 <!-- ##### FUNCTION lgl_db_init ##### -->
52 <!-- ##### USER_FUNCTION lglDbNotifyFunc ##### -->
54 Defines the type of notify callback function to be called when database changes.
57 @user_data: Pointer to user data that is passed to the notify function.
60 <!-- ##### FUNCTION lgl_db_notify_add ##### -->
70 <!-- ##### FUNCTION lgl_db_notify_remove ##### -->
78 <!-- ##### FUNCTION lgl_db_get_paper_id_list ##### -->
87 <!-- ##### FUNCTION lgl_db_free_paper_id_list ##### -->
95 <!-- ##### FUNCTION lgl_db_get_paper_name_list ##### -->
104 <!-- ##### FUNCTION lgl_db_free_paper_name_list ##### -->
112 <!-- ##### FUNCTION lgl_db_lookup_paper_from_id ##### -->
121 <!-- ##### FUNCTION lgl_db_lookup_paper_from_name ##### -->
130 <!-- ##### FUNCTION lgl_db_lookup_paper_id_from_name ##### -->
139 <!-- ##### FUNCTION lgl_db_lookup_paper_name_from_id ##### -->
148 <!-- ##### FUNCTION lgl_db_is_paper_id_known ##### -->
157 <!-- ##### FUNCTION lgl_db_is_paper_id_other ##### -->
166 <!-- ##### FUNCTION lgl_db_get_category_id_list ##### -->
175 <!-- ##### FUNCTION lgl_db_free_category_id_list ##### -->
183 <!-- ##### FUNCTION lgl_db_get_category_name_list ##### -->
192 <!-- ##### FUNCTION lgl_db_free_category_name_list ##### -->
200 <!-- ##### FUNCTION lgl_db_lookup_category_from_id ##### -->
209 <!-- ##### FUNCTION lgl_db_lookup_category_from_name ##### -->
218 <!-- ##### FUNCTION lgl_db_lookup_category_id_from_name ##### -->
227 <!-- ##### FUNCTION lgl_db_lookup_category_name_from_id ##### -->
236 <!-- ##### FUNCTION lgl_db_is_category_id_known ##### -->
245 <!-- ##### FUNCTION lgl_db_get_brand_list ##### -->
255 <!-- ##### FUNCTION lgl_db_free_brand_list ##### -->
263 <!-- ##### FUNCTION lgl_db_register_template ##### -->
272 <!-- ##### FUNCTION lgl_db_delete_template_by_brand_part ##### -->
282 <!-- ##### FUNCTION lgl_db_delete_template_by_name ##### -->
291 <!-- ##### FUNCTION lgl_db_does_template_exist ##### -->
301 <!-- ##### FUNCTION lgl_db_does_template_name_exist ##### -->
310 <!-- ##### FUNCTION lgl_db_get_template_name_list_all ##### -->
321 <!-- ##### FUNCTION lgl_db_get_similar_template_name_list ##### -->
330 <!-- ##### FUNCTION lgl_db_free_template_name_list ##### -->
338 <!-- ##### FUNCTION lgl_db_lookup_template_from_name ##### -->
347 <!-- ##### FUNCTION lgl_db_lookup_template_from_brand_part ##### -->
357 <!-- ##### FUNCTION lgl_db_get_vendor_name_list ##### -->
366 <!-- ##### FUNCTION lgl_db_free_vendor_name_list ##### -->
374 <!-- ##### FUNCTION lgl_db_is_vendor_name_known ##### -->
383 <!-- ##### FUNCTION lgl_db_lookup_vendor_from_name ##### -->
392 <!-- ##### FUNCTION lgl_db_print_known_papers ##### -->
400 <!-- ##### FUNCTION lgl_db_print_known_categories ##### -->
408 <!-- ##### FUNCTION lgl_db_print_known_templates ##### -->
416 <!-- ##### FUNCTION lgl_db_print_known_vendors ##### -->