Functions¶
Details¶
- 
Gsf.base64_decode_simple(data, len)¶
- Parameters: - Returns: - the number of bytes converted - Return type: - Decodes a chunk of base64 encoded data from data back into data. 
- 
Gsf.base64_decode_step(in_, len, out, state, save)¶
- Parameters: - Returns: - the number of bytes converted - state: - holds the number of bits that are stored in save - save: - leftover bits that have not yet been decoded - Return type: - Decodes a chunk of base64 encoded data 
- 
Gsf.base64_encode_close(in_, break_lines, out, state, save)¶
- Parameters: - Returns: - a count of the number of bytes in the final block. - state: - holds the number of bits that are stored in save - save: - leftover bits that have not yet been decoded - Return type: - This funcion should be called to when finished encoding everything, to flush off the last little bit. 
- 
Gsf.base64_encode_simple(data, len)¶
- Parameters: - Returns: - the number of bytes encoded - Return type: - Encodes data from data back into data using base64 encoding. 
- 
Gsf.base64_encode_step(in_, len, break_lines, out, state, save)¶
- Parameters: - Returns: - the number of bytes encoded - state: - holds the number of bits that are stored in save - save: - leftover bits that have not yet been decoded - Return type: - Performs an ‘encode step’, only encodes blocks of 3 characters from in into the output out at a time, saves left-over state in state and save (initialise to 0 on first invocation). 
- 
Gsf.doc_meta_dump(meta)¶
- Parameters: - meta ( - Gsf.DocMetaData) –- Gsf.DocMetaData- A debugging utility to dump the content of meta via g_print 
- 
Gsf.error_quark()¶
- Returns: - the #GQuark used to identify libgsf errors in - GLib.Errorstructures. Specific error codes come from the- Gsf.Errorenumeration.- Return type: - int
- 
Gsf.extension_pointer(path)¶
- Parameters: - path ( - str) – A filename or file path.- Returns: - A pointer to the extension part of the filename, or a pointer to the end of the string if the filename does not have an extension. - Return type: - str- Extracts the extension from the end of a filename (the part after the final ‘.’ in the filename). 
- 
Gsf.filename_to_utf8(filename, quoted)¶
- Parameters: - Returns: - filename using utf-8 encoding for display - Return type: - A utility wrapper to make sure filenames are valid utf8. Caller must - GLib.freethe result.
- 
Gsf.init()¶
- Initializes the GSF library 
- 
Gsf.init_dynamic(module)¶
- Parameters: - module ( - GObject.TypeModule) –- GObject.TypeModule.- Initializes the GSF library and associates it with a type module mod. 
- 
Gsf.le_get_double(p)¶
- Parameters: - p ( - objector- None) – pointer to storage- Returns: - interpreted data - Return type: - float- Interpret binary data as a double in little endian order. 
- 
Gsf.le_get_float(p)¶
- Parameters: - p ( - objector- None) – pointer to storage- Returns: - interpreted data - Return type: - float- Interpret binary data as a float in little endian order. 
- 
Gsf.le_get_guint64(p)¶
- Parameters: - p ( - objector- None) – pointer to storage- Returns: - interpreted data - Return type: - int- Interpret binary data as a guint64 (8 byte unsigned integer type) in little endian order. 
- 
Gsf.le_set_double(p, d)¶
- Parameters: - Store a value of type double in memory in little endian order 
- 
Gsf.le_set_float(p, f)¶
- Parameters: - Store a value of type float in memory in little endian order. 
- 
Gsf.mem_dump(ptr, len)¶
- Parameters: - Dump len bytes from the memory location given by ptr. 
- 
Gsf.msole_iconv_win_codepage()¶
- Returns: - our best guess at the applicable windows code page based on an environment variable or the current locale. - Return type: - int
- 
Gsf.msole_inflate(input, offset)¶
- Parameters: - Returns: - A - GLib.ByteArraythat the caller is responsible for freeing- Return type: - Decompresses an LZ compressed stream. 
- 
Gsf.msole_language_for_lid(lid)¶
- Parameters: - lid ( - int) – numerical language id- Returns: - the xx_YY style string (can be just xx or xxx) for the given LID. If the LID is not found, is set to 0x0400, or is set to 0x0000, will return “-none-” - Return type: - str
- 
Gsf.msole_lid_for_language(lang)¶
- Parameters: - lang ( - stror- None) – Language id, i.e., locale name.- Returns: - the LID (Language Identifier) for the input language. If lang is - None, return 0x0400 (“-none-“), and not 0x0000 (“no proofing”)- Return type: - int
- 
Gsf.msole_lid_to_codepage(lid)¶
- Parameters: - lid ( - int) – numerical language id- Returns: - our best guess at the codepage for the given language id - Return type: - int
- 
Gsf.msole_lid_to_codepage_str(lid)¶
- Parameters: - lid ( - int) – numerical language id- Returns: - the Iconv codepage string for the given LID. - Return type: - str
- 
Gsf.odf_get_ns()¶
- Returns: - the used ODF namespace - Return type: - Gsf.XMLInNS- New in version 1.14.24. 
- 
Gsf.odf_get_version()¶
- Returns: - the ODF version: 102. - Return type: - int- Gives the ODF version used by libgsf when writing Open Document files. - New in version 1.14.24. 
- 
Gsf.odf_get_version_string()¶
- Returns: - the ODF version as a string: “1.2”. - Return type: - str- Gives the ODF version used by libgsf when writing Open Document files. - New in version 1.14.24. 
- 
Gsf.open_pkg_foreach_rel(opkg, func, *user_data)¶
- Parameters: - opkg (Gsf.Input) –Gsf.Input
- func (Gsf.OpenPkgIter) –Gsf.OpenPkgIter
- user_data (objectorNone) –object
 - New in 1.14.9 - Walks each relationship associated with opkg and calls func with user_data. 
- opkg (
- 
Gsf.open_pkg_open_rel(opkg, rel)¶
- Parameters: - opkg (Gsf.Input) –Gsf.Input
- rel (Gsf.OpenPkgRel) –Gsf.OpenPkgRel
 - Raises: - Returns: - a new - Gsf.Inputwhich the called needs to unref, or- Noneand sets err- Return type: 
- opkg (
- 
Gsf.open_pkg_open_rel_by_id(opkg, id)¶
- Parameters: - Raises: - Returns: - Return type: - New in 1.14.7 - Open opkg’s relation id 
- 
Gsf.open_pkg_open_rel_by_type(opkg, type)¶
- Parameters: - Raises: - Returns: - Return type: - New in 1.14.9 - Open one of opkg’s relationships with type=`type`. 
- 
Gsf.open_pkg_parse_rel_by_id(xin, id, dtd, ns)¶
- Parameters: - xin (Gsf.XMLIn) –Gsf.XMLIn
- id (str) – target id
- dtd (Gsf.XMLInNode) –Gsf.XMLInNode
- ns (Gsf.XMLInNS) –Gsf.XMLInNS
 - Returns: - Noneon success or a- GLib.Erroron failure.- Return type: - Convenience function to parse a related part. 
- xin (
- 
Gsf.property_settings_find(name, params)¶
- Parameters: - name (str) –
- params ([GObject.Parameter]) –
 - Return type: 
- name (
- 
Gsf.property_settings_free(params)¶
- Parameters: - params ([ - GObject.Parameter]) –
- 
Gsf.shutdown()¶
- De-intializes the GSF library Currently does nothing. 
- 
Gsf.shutdown_dynamic(module)¶
- Parameters: - module ( - GObject.TypeModule) – currently unused- De-intializes the GSF library from a type module. Currently does nothing. 
- 
Gsf.value_get_docprop_array(value)¶
- Parameters: - value ( - GObject.Value) – A- GObject.Valueof type- Gsf.DocPropVector.- Returns: - A - GLib.Arrayof- GObject.Value- Return type: - [ - GObject.Value] or- None- This function returns the array of values inside - Gsf.DocPropVector. No additional references are created.
- 
Gsf.value_get_docprop_varray(value)¶
- Parameters: - value ( - GObject.Value) –- Return type: - GObject.ValueArray
- 
Gsf.value_get_docprop_vector(value)¶
- Parameters: - value ( - GObject.Value) – A- GObject.Valueof type- Gsf.DocPropVector.- Returns: - A pointer to the - Gsf.DocPropVectorstructure in value- Return type: - Gsf.DocPropVector- This function returns a pointer to the - Gsf.DocPropVectorstructure in value. No additional references are created.
- 
Gsf.vba_inflate(input, offset, size, add_null_terminator)¶
- Parameters: - Returns: - A pointer to guint8 array - Return type: - Decompresses VBA stream. 
- 
Gsf.xmlDocFormatDump(output, cur, encoding, format)¶
- Parameters: - output (Gsf.Output) –Gsf.Output
- cur (libxml2.Doc) –libxml2.DocPtr
- encoding (strorNone) – The encoding to use.
- format (bool) –Trueto reformat the output.
 - Returns: - status from xmlSaveFormatFileTo. - Return type: - Dumps the document cur into output. 
- output (
- 
Gsf.xml_gvalue_from_str(res, t, str)¶
- Parameters: - res (GObject.Value) – Result value
- t (GObject.GType) – Type of data
- str (str) – Value string
 - Returns: - True when parsing of str as a value of type t was succesfull; false otherwise. - Return type: - Try to parse str as a value of type t into res. 
- res (
- 
Gsf.xml_probe(input, func)¶
- Parameters: - input (Gsf.Input) –Gsf.Input
- func (Gsf.XMLProbeFunc) –Gsf.XMLProbeFunc
 - Returns: - Trueon success.- Return type: 
- input (