![]() |
![]() |
![]() |
GIO Reference Manual | ![]() |
---|---|---|---|---|
gboolean g_content_type_equals (const char *type1, const char *type2); gboolean g_content_type_is_a (const char *type, const char *supertype); gboolean g_content_type_is_unknown (const char *type); char* g_content_type_get_description (const char *type); char* g_content_type_get_mime_type (const char *type); GIcon* g_content_type_get_icon (const char *type); gboolean g_content_type_can_be_executable (const char *type); char* g_content_type_guess (const char *filename, const guchar *data, gsize data_size, gboolean *result_uncertain); GList* g_content_types_get_registered (void);
gboolean g_content_type_equals (const char *type1, const char *type2);
Compares two content types for equality.
|
a content type string. |
|
a content type string. |
Returns : |
TRUE if the two strings are identical or equivalent,
FALSE otherwise.
|
gboolean g_content_type_is_a (const char *type, const char *supertype);
Determines if type
is a subset of supertype
.
|
a content type string. a content type string. |
|
a string. |
Returns : |
TRUE if type is a kind of supertype ,
FALSE otherwise.
|
gboolean g_content_type_is_unknown (const char *type);
|
a content type string. a content type string. |
Returns : |
char* g_content_type_get_description (const char *type);
|
a content type string. a content type string. |
Returns : |
a short description of the content type type .
|
char* g_content_type_get_mime_type (const char *type);
|
a content type string. a content type string. |
Returns : |
the registered mime-type for the given type .
|
GIcon* g_content_type_get_icon (const char *type);
|
a content type string. a content type string. |
Returns : |
GIcon corresponding to the content type. |
gboolean g_content_type_can_be_executable (const char *type);
|
a content type string. |
Returns : |
TRUE if the file type corresponds to something that
can be executable, FALSE otherwise. Note that for instance
things like textfiles can be executables (i.e. scripts)
|
char* g_content_type_guess (const char *filename, const guchar *data, gsize data_size, gboolean *result_uncertain);
|
a string. |
|
a stream of data. |
|
the size of data .
|
|
a flag indicating the certainty of the result. |
Returns : |
a string indicating a guessed content type for the
given data. If the function is uncertain, result_uncertain
will be set to TRUE .
|