2 * Copyright (C) 2007 Benjamin Otte <otte@gnome.org>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301 USA
20 #include <glib-object.h>
22 #ifndef _SWFDEC_URL_H_
23 #define _SWFDEC_URL_H_
27 typedef struct _SwfdecURL SwfdecURL
;
29 #define SWFDEC_TYPE_URL swfdec_url_get_type()
30 GType
swfdec_url_get_type (void) G_GNUC_CONST
;
32 SwfdecURL
* swfdec_url_new (const char * string
);
33 SwfdecURL
* swfdec_url_new_components (const char * protocol
,
34 const char * hostname
,
38 SwfdecURL
* swfdec_url_new_parent (const SwfdecURL
* url
);
39 SwfdecURL
* swfdec_url_new_relative (const SwfdecURL
* url
,
41 SwfdecURL
* swfdec_url_new_from_input (const char * input
);
42 SwfdecURL
* swfdec_url_copy (const SwfdecURL
* url
);
43 void swfdec_url_free (SwfdecURL
* url
);
45 const char * swfdec_url_get_url (const SwfdecURL
* url
);
46 const char * swfdec_url_get_protocol (const SwfdecURL
* url
);
47 const char * swfdec_url_get_host (const SwfdecURL
* url
);
48 guint
swfdec_url_get_port (const SwfdecURL
* url
);
49 const char * swfdec_url_get_path (const SwfdecURL
* url
);
50 const char * swfdec_url_get_query (const SwfdecURL
* url
);
51 char * swfdec_url_format_for_display (const SwfdecURL
* url
);
53 gboolean
swfdec_url_has_protocol (const SwfdecURL
* url
,
54 const char * protocol
);
56 gboolean
swfdec_url_is_parent (const SwfdecURL
* parent
,
57 const SwfdecURL
* child
);
58 gboolean
swfdec_url_is_local (const SwfdecURL
* url
);
60 gboolean
swfdec_url_host_equal (gconstpointer a
,
62 gboolean
swfdec_url_equal (gconstpointer a
,
64 guint
swfdec_url_hash (gconstpointer url
);
66 gboolean
swfdec_url_path_is_relative (const char * path
);