2008-05-17 Matthias Clasen <mclasen@redhat.com>
+ * gio/gio-sections.txt: Add new api
+
+2008-05-17 Matthias Clasen <mclasen@redhat.com>
+
Bug 528648 – Extra >s in Object Construction section...
* gobject/tut_howto.xml: Fix a formatting glitch
g_content_type_get_mime_type
g_content_type_get_icon
g_content_type_can_be_executable
+g_content_type_from_mime_type
g_content_type_guess
g_content_types_get_registered
</SECTION>
}
char *
+g_content_type_from_mime_type (const char *mime_type)
+{
+ char *key, *content_type;
+
+ g_return_val_if_fail (mime_type != NULL, NULL);
+
+ key = g_strconcat ("MIME\\DataBase\\Content Type\\", mime_type, NULL);
+ content_type = get_registry_classes_key (key, L"Extension");
+ g_free (key);
+
+ return content_type;
+}
+
+char *
g_content_type_guess (const char *filename,
const guchar *data,
gsize data_size,
}
/**
+ * g_content_type_from_mime_type:
+ * @mime_type: a mime type string.
+ *
+ * Tries to find a content type based on the mime type name.
+ *
+ * Returns: Newly allocated string with content type or NULL when does not know.
+ *
+ * Since: 2.18
+ **/
+char *
+g_content_type_from_mime_type (const char *mime_type)
+{
+ g_return_val_if_fail (mime_type != NULL, NULL);
+
+ /* mime type and content type are same on unixes */
+ return g_strdup (mime_type);
+}
+
+/**
* g_content_type_guess:
* @filename: a string.
* @data: a stream of data.
GIcon * g_content_type_get_icon (const char *type);
gboolean g_content_type_can_be_executable (const char *type);
+char * g_content_type_from_mime_type (const char *mime_type);
+
char * g_content_type_guess (const char *filename,
const guchar *data,
gsize data_size,
g_content_type_get_mime_type
g_content_type_get_icon
g_content_type_can_be_executable
+g_content_type_from_mime_type
g_content_type_guess
g_content_types_get_registered
#endif