manpagez: man pages & more
html files: goffice
Home | html | info | man

GOFileOpener

GOFileOpener

Synopsis

                    GOFileOpener;
                    GOFileOpenerClass;
gboolean            (*GOFileOpenerProbeFunc)            (GOFileOpener const *fo,
                                                         GsfInput *input,
                                                         GOFileProbeLevel pl);
void                (*GOFileOpenerOpenFunc)             (GOFileOpener const *fo,
                                                         GOIOContext *io_context,
                                                         gpointer FIXME_FIXME_workbook_view,
                                                         GsfInput *input);
void                (*GOFileOpenerOpenFuncWithEnc)      (GOFileOpener const *fo,
                                                         gchar const *enc,
                                                         GOIOContext *io_context,
                                                         gpointer FIXME_workbook_view,
                                                         GsfInput *input);
gboolean            go_file_opener_can_probe            (GOFileOpener const *fo,
                                                         GOFileProbeLevel pl);
GOFileOpener *      go_file_opener_for_id               (char const *id);
char const *        go_file_opener_get_description      (GOFileOpener const *fo);
char const *        go_file_opener_get_id               (GOFileOpener const *fo);
GSList const *      go_file_opener_get_mimes            (GOFileOpener const *fo);
GSList const *      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,
                                                         GOIOContext *io_context,
                                                         gpointer FIXME_workbook_view,
                                                         GsfInput *input);
gboolean            go_file_opener_probe                (GOFileOpener const *fo,
                                                         GsfInput *input,
                                                         GOFileProbeLevel 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);
GList *             go_get_file_openers                 (void);
#define             GO_FILE_OPENER_METHOD               (obj,
                                                         name)

Object Hierarchy

  GObject
   +----GOFileOpener

Description

Details

GOFileOpener

typedef struct _GOFileOpener GOFileOpener;


GOFileOpenerClass

typedef struct {
	GObjectClass parent_class;

	/* private */
	gboolean  (*can_probe) (GOFileOpener const *fo,
				GOFileProbeLevel pl);
	gboolean  (*probe) (GOFileOpener const *fo,
	                    GsfInput *input,
	                    GOFileProbeLevel pl);
	void      (*open)  (GOFileOpener const *fo,
			    gchar const *opt_enc,
	                    GOIOContext *io_context,
	                    gpointer  fixme_fixme_workbook_view,
	                    GsfInput *input);
} GOFileOpenerClass;


GOFileOpenerProbeFunc ()

gboolean            (*GOFileOpenerProbeFunc)            (GOFileOpener const *fo,
                                                         GsfInput *input,
                                                         GOFileProbeLevel pl);

fo :

input :

pl :

Returns :


GOFileOpenerOpenFunc ()

void                (*GOFileOpenerOpenFunc)             (GOFileOpener const *fo,
                                                         GOIOContext *io_context,
                                                         gpointer FIXME_FIXME_workbook_view,
                                                         GsfInput *input);

fo :

io_context :

FIXME_FIXME_workbook_view :

input :


GOFileOpenerOpenFuncWithEnc ()

void                (*GOFileOpenerOpenFuncWithEnc)      (GOFileOpener const *fo,
                                                         gchar const *enc,
                                                         GOIOContext *io_context,
                                                         gpointer FIXME_workbook_view,
                                                         GsfInput *input);

fo :

enc :

io_context :

FIXME_workbook_view :

input :


go_file_opener_can_probe ()

gboolean            go_file_opener_can_probe            (GOFileOpener const *fo,
                                                         GOFileProbeLevel pl);

fo :

pl :

Returns :


go_file_opener_for_id ()

GOFileOpener *      go_file_opener_for_id               (char const *id);

Searches for file opener with given id, registered using go_file_opener_register

id :

File opener's ID

Returns :

GOFileOpener object or NULL if opener cannot be found.

go_file_opener_get_description ()

char const *        go_file_opener_get_description      (GOFileOpener const *fo);

fo :

Returns :


go_file_opener_get_id ()

char const *        go_file_opener_get_id               (GOFileOpener const *fo);

fo :

Returns :


go_file_opener_get_mimes ()

GSList const *      go_file_opener_get_mimes            (GOFileOpener const *fo);

fo :

Returns :


go_file_opener_get_suffixes ()

GSList const *      go_file_opener_get_suffixes         (GOFileOpener const *fo);

fo :

Returns :


go_file_opener_get_type ()

GType               go_file_opener_get_type             (void);

Returns :


go_file_opener_is_encoding_dependent ()

gboolean            go_file_opener_is_encoding_dependent
                                                        (GOFileOpener const *fo);

fo :

Returns :


go_file_opener_new ()

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.

id :

Optional ID of the opener (or NULL)

description :

Description of supported file format

suffixes :

List of suffixes to associate with the opener

mimes :

List of mime types to associate with the opener

probe_func :

Optional pointer to "probe" function (or NULL)

open_func :

Pointer to "open" function

Returns :

newly created GOFileOpener object.

go_file_opener_new_with_enc ()

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.

id :

Optional ID of the opener (or NULL)

description :

Description of supported file format

suffixes :

List of suffixes to associate with the opener

mimes :

List of mime types to associate with the opener

probe_func :

Optional pointer to "probe" function (or NULL)

open_func :

Pointer to "open" function

Returns :

newly created GOFileOpener object.

go_file_opener_open ()

void                go_file_opener_open                 (GOFileOpener const *fo,
                                                         gchar const *opt_enc,
                                                         GOIOContext *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 go_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.

fo :

GOFileOpener object

opt_enc :

Optional encoding

io_context :

Context for i/o operation

FIXME_workbook_view :

Workbook View

input :

Gsf input stream

go_file_opener_probe ()

gboolean            go_file_opener_probe                (GOFileOpener const *fo,
                                                         GsfInput *input,
                                                         GOFileProbeLevel pl);

Checks if a given file is supported by the opener.

fo :

GOFileOpener

input :

GsfInput

pl :

GOFileProbeLevel

Returns :

TRUE, if the opener can read given file and FALSE otherwise.

go_file_opener_register ()

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).

fo :

GOFileOpener object

priority :

Opener's priority

go_file_opener_setup ()

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.

fo :

Newly created GOFileOpener object

id :

Optional ID of the opener (or NULL)

description :

Description of supported file format

suffixes :

List of suffixes to associate with the opener

mimes :

List of mime types to associate with the opener

encoding_dependent :

whether the opener depends on an encoding sel.

probe_func :

Optional pointer to "probe" function (or NULL)

open_func :

Pointer to "open" function

go_file_opener_unregister ()

void                go_file_opener_unregister           (GOFileOpener *fo);

Removes fo opener from list of available file openers. Reference count for the opener is decremented inside the function.

fo :

GOFileOpener object previously registered using go_file_opener_register

go_get_file_openers ()

GList *             go_get_file_openers                 (void);

Returns :

list of known GOFileOpener types (do not modify list)

GO_FILE_OPENER_METHOD()

#define             GO_FILE_OPENER_METHOD(obj,name)

obj :

name :

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.