9
9
* Copyright 1999-2001 Ximian, Inc. (www.ximian.com)
11
11
* This program is free software; you can redistribute it and/or
12
* modify it under the terms of version 2 of the GNU General Public
12
* modify it under the terms of version 2 of the GNU Lesser General Public
13
13
* License as published by the Free Software Foundation.
15
15
* This program is distributed in the hope that it will be useful,
16
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
18
* GNU Lesser General Public License for more details.
20
* You should have received a copy of the GNU General Public License
20
* You should have received a copy of the GNU Lesser General Public License
21
21
* along with this program; if not, write to the Free Software
22
22
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
52
52
* Parses @url_string relative to @base.
54
* Return value: a parsed CamelURL.
54
* Returns a parsed #CamelURL
57
57
camel_url_new_with_base (CamelURL *base, const char *url_string)
279
* @ex: a CamelException
278
* @url_string: a URL string
279
* @ex: a #CamelException
281
281
* Parses an absolute URL.
283
* Return value: a CamelURL, or %NULL.
283
* Returns a #CamelURL if it can be parsed, or %NULL otherwise
286
286
camel_url_new (const char *url_string, CamelException *ex)
301
301
* camel_url_to_string:
303
* @flags: additional translation options.
305
* Return value: a string representing @url, which the caller must free.
303
* @flags: additional translation options
305
* Flatten a #CamelURL into a string.
307
* Returns a string representing @url, which the caller must free
308
310
camel_url_to_string (CamelURL *url, guint32 flags)
411
413
url->part = g_strdup (part); \
418
* camel_url_set_protocol:
420
* @protocol: protocol schema
422
* Set the protocol of a #CamelURL.
414
424
DEFINE_CAMEL_URL_SET (protocol)
428
* camel_url_set_user:
432
* Set the user of a #CamelURL.
415
434
DEFINE_CAMEL_URL_SET (user)
438
* camel_url_set_authmech:
440
* @authmech: authentication mechanism
442
* Set the authmech of a #CamelURL.
416
444
DEFINE_CAMEL_URL_SET (authmech)
448
* camel_url_set_passwd:
452
* Set the password of a #CamelURL.
417
454
DEFINE_CAMEL_URL_SET (passwd)
458
* camel_url_set_host:
462
* Set the hostname of a #CamelURL.
418
464
DEFINE_CAMEL_URL_SET (host)
468
* camel_url_set_path:
472
* Set the path component of a #CamelURL.
419
474
DEFINE_CAMEL_URL_SET (path)
478
* camel_url_set_query:
482
* Set the query of a #CamelURL.
420
484
DEFINE_CAMEL_URL_SET (query)
488
* camel_url_set_fragment:
490
* @fragment: url fragment
492
* Set the fragment of a #CamelURL.
421
494
DEFINE_CAMEL_URL_SET (fragment)
498
* camel_url_set_port:
502
* Set the port on a #CamelURL.
424
505
camel_url_set_port (CamelURL *url, int port)
426
507
url->port = port;
512
* camel_url_set_param:
514
* @name: name of the param to set
515
* @value: value of the param to set
517
* Set a param on the #CamelURL.
430
520
camel_url_set_param (CamelURL *url, const char *name, const char *value)
435
525
g_datalist_remove_data(&url->params, name);
530
* camel_url_get_param:
532
* @name: name of the param
534
* Get the value of the specified param on the URL.
536
* Returns the value of a param if found or %NULL otherwise
439
539
camel_url_get_param (CamelURL *url, const char *name)
484
584
* This %-encodes the given URL part and returns the escaped version
485
585
* in allocated memory, which the caller must free when it is done.
587
* Returns the encoded string
488
590
camel_url_encode (const char *part, const char *escape_extra)