| API Documentation for the Zeitgeist Client Library | ||||
|---|---|---|---|---|
| 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);
Associate a mimetype with a given interpretation type. Registered mimetypes
can be looked up with zeitgeist_interpretation_for_mimetype(). You can
register a regular expression as mimetype if you instead of this function
invoke zeitgeist_register_mimetype_regex().
Mimetypes 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.
See the list of common interpretation types.
|
A mimetype string. Fx. text/plain |
|
A URI defining the interpretation type to associate with mimetype
|
void zeitgeist_register_mimetype_regex (const gchar *mimetype_regex,const gchar *interpretation_uri);
Associate a range of mimetypes with a given interpretation type.
Registered mimetypes can be looked up with
zeitgeist_interpretation_for_mimetype(). If you only need to register one
specific mimetype it is more efficient if you instead of this function
call zeitgeist_register_mimetype().
Mimetypes 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.
See the list of common interpretation types.
|
A regular expression matching a certain range of mimetypes. Fx. text/.* to match all text sub types. |
|
A URI defining the interpretation type to associate with the matched mimetypes |
const gchar * zeitgeist_interpretation_for_mimetype
(const gchar *mimetype);
Look up the interpretation type associated with mimetype. Please see the
list of common
interpretation types.
|
A mimetype string. Fx. text/plain |
Returns : |
A URI defining the interpretation type associated with mimetype or
NULL in case mimetype is unknown. |
void zeitgeist_register_uri_scheme (const gchar *uri_scheme,const gchar *manifestation_type);
Associate a URI scheme with a given 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.
See the list of common manifestation types.
|
A URI scheme such as http:// |
const gchar * zeitgeist_manifestation_for_uri (const gchar *uri);
Look up a manifestation type for a given URI. Eg. if you pass in file:///tmp/foo.txt you will get back ZEITGEIST_NFO_FILE_DATA_OBJECT.
See the list of common manifestation types.
|
A URI |
Returns : |
A manifestation type for uri or NULL in case no suitable
manifestation type is known |