00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00036 #ifndef _url_h_
00037 #define _url_h_
00038
00039 #include <glib.h>
00040
00044 typedef struct {
00045 GHashTable *params;
00046 gint count;
00047 } url_params_t;
00048
00049 #define url_params_count(x) ((x)->count)
00050
00051 typedef enum {
00052 URL_POLICY_ALLOW_IP_AS_HOST = (1 << 0),
00053 URL_POLICY_ALLOW_LOCAL_HOSTS = (1 << 1),
00054 URL_POLICY_ALLOW_ANY_PORT = (1 << 2),
00055 URL_POLICY_ALLOW_STATIC_FILES = (1 << 3),
00056 URL_POLICY_ALLOW_ANY_CHAR = (1 << 4),
00057
00058 URL_POLICY_GWC_RULES = 0
00059 } url_policy_t;
00060
00061
00062
00063
00064
00065 gchar *url_escape(const gchar *url);
00066 gchar *url_escape_query(const gchar *url);
00067 gint url_escape_into(const gchar *url, gchar *target, gint len);
00068 gchar *url_escape_cntrl(gchar *url);
00069 gchar *url_unescape(gchar *url, gboolean inplace);
00070
00071 url_params_t *url_params_parse(gchar *query);
00072 const gchar *url_params_get(url_params_t *up, const gchar *name);
00073 void url_params_free(url_params_t *up);
00074 gchar *url_normalize(gchar *url, url_policy_t pol);
00075
00076 #endif
00077
00078
00079