| Zeitgeist Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
void zeitgeist_register_mimetype (const gchar *mimetype,const gchar *interpretation_uri); void zeitgeist_register_mimetype_regex (const gchar *mimetype_regex,const gchar *interpretation_uri); const gchar * zeitgeist_interpretation_for_mimetype (const gchar *mimetype); void zeitgeist_register_uri_scheme (const gchar *uri_scheme,const gchar *manifestation_type); const gchar * zeitgeist_manifestation_for_uri (const gchar *uri);
void zeitgeist_register_mimetype (const gchar *mimetype,const gchar *interpretation_uri);
zeitgeist_register_mimetype:
Associate a MIME-type with a given interpretation type. Registered MIME-types can be looked up with zeitgeist_interpretation_for_mimetype().
You can register a regular expression as mimetype if instead of this function you invoke zeitgeist_register_mimetype_regex().
MIME-types are first looked up by their exact name and then if none is found the regular expressions will be checked as fallbacks.
This library will install a wide range a common mimetypes for you, so unless you have very specific needs you will normally not have to call this function.
|
the (null) instance |
|
. A MIME-type string. Eg. text/plain. [in] |
|
. A URI defining the subject interpretation type to associate with "mimetype". [in] |
void zeitgeist_register_mimetype_regex (const gchar *mimetype_regex,const gchar *interpretation_uri);
zeitgeist_register_mimetype_regex:
Associate a range of MIME-types with a given interpretation type. Registered MIME-types can be looked up with zeitgeist_interpretation_for_mimetype().
If you only need to register one specific MIME-type, it is more efficient to use zeitgeist_register_mimetype() instead of this function.
MIME-types are first looked up by their exact name and then if none is found the regular expressions will be checked as fallbacks.
This library will install a wide range a common mimetypes for you, so unless you have very specific needs you will normally not have to call this function.
|
the (null) instance |
|
. A regular expression matching a certain range of mimetypes. Eg. text/.* to match all text subtypes. [in] |
|
. A URI defining the subject interpretation type to associate with the matched MIME-types. [in] |
const gchar * zeitgeist_interpretation_for_mimetype
(const gchar *mimetype);
zeitgeist_interpretation_for_mimetype:
Look up the subject interpretation type associated with mimetype.
|
the (null) instance |
|
. A MIME-type string. Eg. text/plain. [in][allow-none] |
Returns : |
A URI defining the subject interpretation type associated with "mimetype" or NULL in case "mimetype" is unknown. [transfer none]
|
void zeitgeist_register_uri_scheme (const gchar *uri_scheme,const gchar *manifestation_type);
zeitgeist_register_uri_scheme:
Associate a URI scheme with a given subject manifestation type. You can find the manifestation type of a given URI by passing it to zeitgeist_manifestation_for_uri().
This library will install a range a common URI schemes for you, so unless you have very specific needs you will normally not have to call this function.
|
the (null) instance |
|
. A URI scheme such as http:\/\/. [in] |
|
. A URI defining the subject manifestation type to associate with "uri_scheme". [in] |
const gchar * zeitgeist_manifestation_for_uri (const gchar *uri);
zeitgeist_manifestation_for_uri
Look up a subject manifestation type for a given URI. Eg. if you pass in file:\/\/\/tmp/foo.txt you will get back ZEITGEIST_NFO_FILE_DATA_OBJECT.
|
the (null) instance |
|
. An URI. [in] |
Returns : |
A subject manifestation type for uri or NULL in case no suitable manifestation type is known. [transfer none]
|