catalog_file_info_new
Creates a new catalog file information.
struct catalog_file_info * catalog_file_info_new ( void);
This function creates a new catalog file information. It's an allocation function.
Result: a pointer to the catalog file information structure. Returns NULL when an erro occured. .
catalog_file_info_set_name
Sets the catalog's name.
gint catalog_file_info_set_name ( struct catalog_file_info *p, gchar *name);
This function sets the catalog's name. It's the name displayed in the tree (it's not the file name). New name may be NULL, in this case the catalog hasn't got name.
Parameters
p | the catalog file info to set the name |
name | the new catalog name |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
catalog_file_info_set_title
Sets the catalog's file name.
gint catalog_file_info_set_title ( struct catalog_file_info *p, gchar *title);
This function sets the catalog's file name. Why file name is call title? In the first version of GWhere file name and title were the same data. Warning : New file name may be NULL, in this case the catalog hasn't got file name. In this case the catalog doesn't exist!!
Parameters
p | the catalog file info to set the file name |
title | the new catalog file name |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
catalog_file_info_set_full_name
Sets the catalog's full file name.
gint catalog_file_info_set_full_name ( struct catalog_file_info *p, gchar *full_name);
This function sets the catalog's full file name. The full file name is the file name with path. Warning : New full file name may be NULL, in this case the catalog hasn't got file name. In this case the catalog doesn't exist!!
Parameters
p | the catalog file info to set the full file name |
full_name | the new catalog full file name |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
catalog_file_info_set_version
Sets the catalog's file format version.
gint catalog_file_info_set_version ( struct catalog_file_info *p, gchar *version);
This function sets the catalog's file format version.
Parameters
p | the catalog file info to set the file format version |
version | the new catalog file format version |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
catalog_file_info_set_program_maker
Sets the catalog's program maker.
gint catalog_file_info_set_program_maker ( struct catalog_file_info *p, gchar *program_maker);
This function sets the catalog's program maker. Program maker is the program that built this catalog
Parameters
p | the catalog file info to set the program maker |
program_maker | the new catalog program maker |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
catalog_file_info_set_categories
Sets the catalog's categories list.
gint catalog_file_info_set_categories ( struct catalog_file_info *p, GList *categories);
This function sets the catalog's categories list.
Parameters
p | the catalog file info to set the categories list |
categories | the new catalog categories list |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
catalog_file_info_append_category
Appends a category to the catalog's categories list.
gint catalog_file_info_append_category ( struct catalog_file_info *p, struct category *category);
This function appends a category to the catalog's categories list.
Parameters
p | the catalog file info to set the categories list |
category | the new catalog category |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
catalog_file_info_remove_category
Removes a category to the catalog's categories list.
gint catalog_file_info_remove_category ( struct catalog_file_info *p, struct category *category);
This function removes a category to the catalog's categories list.
Parameters
p | the catalog file info to remove the categories list |
category | the category to remove |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
catalog_file_info_set_description
Sets the catalog's description.
gint catalog_file_info_set_description ( struct catalog_file_info *p, gchar *description);
This function sets the catalog's description.
Parameters
p | struct catalog_file_info* the catalog file info to set the description |
program_maker | gchar* the new catalog description |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
catalog_file_info_set_ismodified
Sets the catalog modification state.
gint catalog_file_info_set_ismodified ( struct catalog_file_info *p, gboolean b);
This function sets the catalog modification state. Sets true if the catalog is modified else sets false if catalog isn't modified.
Parameters
p | the catalog file info to set the modification state |
b | the new catalog program maker |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
catalog_file_info_get_name
Gets the catalog's name.
gchar * catalog_file_info_get_name ( struct catalog_file_info *p);
This function gets the catalog's name. It's the name displayed in the tree (it's not the file name).
Parameters
p | the catalog file info to get the name |
Result: the catalog's name. Returns "" if the catalog's name is NULL Returns NULL when an error occured. .
catalog_file_info_get_title
Gets the catalog's file name.
gchar * catalog_file_info_get_title ( struct catalog_file_info *p);
This function gets the catalog's file name. Why file name is call title? In the first version of GWhere file name and title were the same data.
Parameters
p | the catalog file info to get the file name |
Result: the catalog's file name. Returns "" if the catalog's file name is NULL Returns NULL when an error occured. .
catalog_file_info_get_full_name
Gets the catalog's full file name.
gchar * catalog_file_info_get_full_name ( struct catalog_file_info *p);
This function gets the catalog's full file name. The full file name is the file name with path.
Parameters
p | the catalog file info to get the full file name |
Result: the catalog's full file name. Returns "" if the catalog's full file name is NULL Returns NULL when an error occured. .
catalog_file_info_get_version
Gets the catalog's file format version.
gchar * catalog_file_info_get_version ( struct catalog_file_info *p);
This function gets the catalog's file format version.
Parameters
p | the catalog file info to get the file format version |
Result: the catalog's file format version. Returns "" if the catalog's file format is NULL Returns NULL when an error occured. .
catalog_file_info_get_program_maker
Gets the catalog's program maker.
gchar * catalog_file_info_get_program_maker ( struct catalog_file_info *p);
This function gets the catalog's program maker. Program maker is the program that built this catalog
Parameters
p | the catalog file info to get the program maker |
Result: the catalog's program maker. Returns "" if the catalog's program maker is NULL Returns NULL when an error occured. .
catalog_file_info_get_categories
Gets the catalog's categories list.
GList * catalog_file_info_get_categories ( struct catalog_file_info *p);
This function gets the catalog's categories list.
Parameters
p | the catalog file info to get the categories list |
Result: the catalog's categories list. Returns NULL if catalog hasn't got categories. Returns NULL when an error occured. .
catalog_file_info_get_category
Gets a special category in the catalog
struct category * catalog_file_info_get_category ( struct catalog_file_info *p, gchar *category);
This function gets the category with a special name from the catalog.
Parameters
p | the catalog file info to get the category category the category name |
Result: a pointer to the category. Returns the default category if don't find the category. Returns NULL when an error occured. .
catalog_file_info_get_category_by_index
Gets a special category in the catalog
struct category * catalog_file_info_get_category_by_index ( struct catalog_file_info *p, guint index);
This function gets the category with a special index from the catalog.
Parameters
p | the catalog file info to get the category index the category index |
Result: a pointer to the category. Returns the default category if don't find the category. Returns NULL when an error occured. .
catalog_file_info_get_description
Gets the catalog's description.
gchar * catalog_file_info_get_description ( struct catalog_file_info *p);
This function gets the catalog's description.
Parameters
p | the catalog file info to get the description |
Result: the catalog's description. Returns "" if the catalog's description is NULL Returns NULL when an error occured. .
catalog_file_info_get_size
Gets the catalog file size.
gulong catalog_file_info_get_size ( struct catalog_file_info *p);
This function gets the size of catalog file. Warning : this function doesn't control if full file name exist!!
Parameters
p | the catalog file info to get file size |
Result: the size of catalog file. Returns 0 when an error occured. .
catalog_file_info_get_ismodified
Gets the catalog modification state.
gboolean catalog_file_info_get_ismodified ( struct catalog_file_info *p);
This function gets the catalog modification state. Gets true if the catalog is modified else gets false if catalog isn't modified.
Parameters
p | the catalog file info to get the modification state |
Result: is modified or no. Returns FALSE when an error occured. .
catalog_file_info_category_free
Frees a category from catalog file info.
gint catalog_file_info_category_free ( struct category *category, gpointer data);
This function frees a category from catalog file info. It is used by catalog_file_info_free().
Parameters
category | category to free from catalog file info |
data | unused pointer |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
catalog_file_info_free
Frees datas structure.
gboolean catalog_file_info_free ( struct catalog_file_info *p);
This function frees the catalog file information's datas.
Parameters
p | the catalog file info to free |
Result: an error code. Returns 0 when it's done. Returns -1 when an error occured. .
|