|  |  |  | Goffice Reference Manual |  | 
|---|---|---|---|---|
gboolean go_file_opener_can_probe (GOFileOpener const *fo, FileProbeLevel pl); GOFileOpener* go_file_opener_for_id (char const *id); charconst * go_file_opener_get_description (GOFileOpener const *fo); charconst * go_file_opener_get_id (GOFileOpener const *fo); GSListconst * go_file_opener_get_mimes (GOFileOpener const *fo); GSListconst * go_file_opener_get_suffixes (GOFileOpener const *fo); GType go_file_opener_get_type (void); gboolean go_file_opener_is_encoding_dependent (GOFileOpener const *fo); GOFileOpener* go_file_opener_new (char const *id, char const *description, GSList *suffixes, GSList *mimes, GOFileOpenerProbeFunc probe_func, GOFileOpenerOpenFunc open_func); GOFileOpener* go_file_opener_new_with_enc (char const *id, char const *description, GSList *suffixes, GSList *mimes, GOFileOpenerProbeFunc probe_func, GOFileOpenerOpenFuncWithEnc open_func); void go_file_opener_open (GOFileOpener const *fo, gchar const *opt_enc, IOContext *io_context, gpointer FIXME_workbook_view, GsfInput *input); gboolean go_file_opener_probe (GOFileOpener const *fo, GsfInput *input, FileProbeLevel pl); void go_file_opener_register (GOFileOpener *fo, gint priority); void go_file_opener_setup (GOFileOpener *fo, const gchar *id, const gchar *description, GSList *suffixes, GSList *mimes, gboolean encoding_dependent, GOFileOpenerProbeFunc probe_func, GOFileOpenerOpenFunc open_func); void go_file_opener_unregister (GOFileOpener *fo);
gboolean            go_file_opener_can_probe            (GOFileOpener const *fo,
                                                         FileProbeLevel pl);
| 
 | |
| 
 | |
| Returns : | 
GOFileOpener* go_file_opener_for_id (char const *id);
Searches for file opener with given id, registered using
go_file_opener_register
| 
 | File opener's ID | 
| Returns : | GOFileOpener object or NULLif opener cannot be found. | 
charconst * go_file_opener_get_description (GOFileOpener const *fo);
| 
 | |
| Returns : | 
GSListconst * go_file_opener_get_mimes (GOFileOpener const *fo);
| 
 | |
| Returns : | 
GSListconst * go_file_opener_get_suffixes (GOFileOpener const *fo);
| 
 | |
| Returns : | 
gboolean            go_file_opener_is_encoding_dependent
                                                        (GOFileOpener const *fo);
| 
 | |
| Returns : | 
GOFileOpener*       go_file_opener_new                  (char const *id,
                                                         char const *description,
                                                         GSList *suffixes,
                                                         GSList *mimes,
                                                         GOFileOpenerProbeFunc probe_func,
                                                         GOFileOpenerOpenFunc open_func);
Creates new GOFileOpener object. Optional id will be used
after registering it with go_file_opener_register function.
| 
 | Optional ID of the opener (or NULL) | 
| 
 | Description of supported file format | 
| 
 | List of suffixes to associate with the opener | 
| 
 | List of mime types to associate with the opener | 
| 
 | Optional pointer to "probe" function (or NULL) | 
| 
 | Pointer to "open" function | 
| Returns : | newly created GOFileOpener object. | 
GOFileOpener*       go_file_opener_new_with_enc         (char const *id,
                                                         char const *description,
                                                         GSList *suffixes,
                                                         GSList *mimes,
                                                         GOFileOpenerProbeFunc probe_func,
                                                         GOFileOpenerOpenFuncWithEnc open_func);
Creates new GOFileOpener object. Optional id will be used
after registering it with go_file_opener_register function.
| 
 | Optional ID of the opener (or NULL) | 
| 
 | Description of supported file format | 
| 
 | List of suffixes to associate with the opener | 
| 
 | List of mime types to associate with the opener | 
| 
 | Optional pointer to "probe" function (or NULL) | 
| 
 | Pointer to "open" function | 
| Returns : | newly created GOFileOpener object. | 
void                go_file_opener_open                 (GOFileOpener const *fo,
                                                         gchar const *opt_enc,
                                                         IOContext *io_context,
                                                         gpointer FIXME_workbook_view,
                                                         GsfInput *input);
Reads content of file_name file into workbook wbv is attached to.
Results are reported using io_context object, use
gnumeric_io_error_occurred to find out if operation was successful.
The state of wbv and its workbook is undefined if operation fails, you
should destroy them in that case.
| 
 | GOFileOpener object | 
| 
 | Optional encoding | 
| 
 | Context for i/o operation | 
| 
 | Workbook View | 
| 
 | Gsf input stream | 
gboolean            go_file_opener_probe                (GOFileOpener const *fo,
                                                         GsfInput *input,
                                                         FileProbeLevel pl);
Checks if a given file is supported by the opener.
| 
 | GOFileOpener | 
| 
 | GsfInput | 
| 
 | FileProbeLevel | 
| Returns : | TRUE, if the opener can read given file andFALSEotherwise. | 
void                go_file_opener_register             (GOFileOpener *fo,
                                                         gint priority);
Adds fo opener to the list of available file openers, making it
available for Gnumeric i/o routines. The opener is registered with given
priority. The priority is used to determine the order in which openers
will be tried when reading a file. The higher the priority, the sooner it
will be tried. Default XML-based Gnumeric file opener is registered at
priority 50. Recommended range for priority is [0, 100].
Reference count for the opener is incremented inside the function, but
you don't have to (and shouldn't) call g_object_unref on it if it's
floating object (for example, when you pass object newly created with
go_file_opener_new and not referenced anywhere).
| 
 | GOFileOpener object | 
| 
 | Opener's priority | 
void                go_file_opener_setup                (GOFileOpener *fo,
                                                         const gchar *id,
                                                         const gchar *description,
                                                         GSList *suffixes,
                                                         GSList *mimes,
                                                         gboolean encoding_dependent,
                                                         GOFileOpenerProbeFunc probe_func,
                                                         GOFileOpenerOpenFunc open_func);
Sets up GOFileOpener object, newly created with g_object_new function. This is intended to be used only by GOFileOpener derivates. Use go_file_opener_new, if you want to create GOFileOpener object.
| 
 | Newly created GOFileOpener object | 
| 
 | Optional ID of the opener (or NULL) | 
| 
 | Description of supported file format | 
| 
 | List of suffixes to associate with the opener | 
| 
 | List of mime types to associate with the opener | 
| 
 | whether the opener depends on an encoding sel. | 
| 
 | Optional pointer to "probe" function (or NULL) | 
| 
 | Pointer to "open" function |