| Swfdec Reference Manual | ||||
|---|---|---|---|---|
SwfdecURLSwfdecURL — URL handling in Swfdec
|
SwfdecURL;
SwfdecURL* swfdec_url_copy (const SwfdecURL *url);
void swfdec_url_free (SwfdecURL *url);
const char* swfdec_url_get_host (const SwfdecURL *url);
const char* swfdec_url_get_path (const SwfdecURL *url);
const char* swfdec_url_get_protocol (const SwfdecURL *url);
const char* swfdec_url_get_query (const SwfdecURL *url);
const char* swfdec_url_get_url (const SwfdecURL *url);
SwfdecURL* swfdec_url_new (const char *string);
SwfdecURL* swfdec_url_new_relative (const SwfdecURL *url,
const char *string);
SwfdecURL is Swfdec's way of handling URLs. You probably don't need to mess
with this type unless you want to write a SwfdecLoader. In that case you
will want to use @swfdec_loader_get_url() to get its url and then use the
functions in this section to access it.
typedef struct _SwfdecURL SwfdecURL;
this is the structure used for URLs. It is a boxed type to glib's type system and it is not reference counted. It is also a static struct in that it cannot be modified after creation.
void swfdec_url_free (SwfdecURL *url);
Frees the URL and its associated ressources.
url : |
a SwfdecURL |
const char* swfdec_url_get_host (const SwfdecURL *url);
Gets the host for url. If the host includes a portnumber, it will be present
in the returned string.
url : |
a SwfdecURL |
| Returns : | the host or NULL if none (typically for file URLs).
|
const char* swfdec_url_get_path (const SwfdecURL *url);
Gets the path associated with url. If it contains no path, NULL is
returned.
url : |
a SwfdecURL |
| Returns : | the path or NULL if none
|
const char* swfdec_url_get_protocol (const SwfdecURL *url);
Gets the protocol used by this URL, such as "http" or "file".
url : |
a SwfdecURL |
| Returns : | the protocol used or "error" if the URL is broken |
const char* swfdec_url_get_query (const SwfdecURL *url);
Gets the query string associated with url. If the URL does not have a query
string, NULL is returned.
url : |
a SwfdecURL |
| Returns : | Query string or NULL
|
const char* swfdec_url_get_url (const SwfdecURL *url);
Gets the whole URL.
url : |
a SwfdecURL |
| Returns : | the complete URL as string |
SwfdecURL* swfdec_url_new (const char *string);
Parses the given string into a URL for use in swfdec.
string : |
a full-qualified URL encoded in UTF-8 |
| Returns : | a new SwfdecURL |