File: URL_8h.html

package info (click to toggle)
libzdb 3.1-0.2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, stretch
  • size: 3,504 kB
  • ctags: 1,486
  • sloc: ansic: 6,072; sh: 3,600; makefile: 110; xml: 87; lex: 35
file content (556 lines) | stat: -rw-r--r-- 30,928 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>URL.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<style type="text/css" media="screen">
    body {background-color:white;}
    body,div,p,dl,.memname, .params, .exception {font: normal normal normal 16px/22px "HelveticaNeue", Helvetica, "Arial Narrow", Arial, sans-serif;}
    #nav-path {display:none;}
    h2:first-of-type {margin-top:2px; border:none;}
    h2.groupheader {font-size:26px; line-height:28px;color:#286796;}
    div.groupheader { font-weight:600; font-size:18px;color: rgb(51, 51, 51);}
    h3 {font-size:20px;color: rgb(51, 51, 51);}
    div.header { background-image:none; background-color: #3b96d7; color:white;}
    div.title {text-align:center;font-size: 28px; font-weight:100;}
    .summary {display:none;}
    dl.section {border:none;}
    .memproto > *, .memitem > * {
            box-shadow: none!important;
            -moz-box-shadow: none!important;
            -webkit-box-shadow: none!important;
            background-image:none!important;
    }
    .memproto {
            border-bottom: 1px #b8c8e9 solid;
            background-color: #f7fcff;
    }
    pre {white-space: pre-wrap;}
    .textinfo {color: #428bca;}
    .textnote {color: #a94442;}
</style>
</head><body>
<!-- Generated by Doxygen 1.8.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_bb61871b4c63e4e6685a8d6c52430594.html">zdb</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">URL.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><b>URL</b> represent an immutable Uniform Resource Locator. </p>
<p>A Uniform Resource Locator (URL), is used to uniquely identify a resource on the Internet. The URL is a compact text string with a restricted syntax that consists of four main components: </p>
<center><code> &lt;protocol&gt;://&lt;authority&gt;&lt;path&gt;?&lt;query&gt; </code></center><p>The &lt;protocol&gt; part is mandatory, the other components may or may not be present in an URL string. For instance the <code>file</code> protocol only use the path component while a <code>http</code> protocol may use all components. Here is an example where all components are used:</p>
<pre>
<a href="http://user:password@www.foo.bar:8080/document/index.csp?querystring#ref">http://user:password@www.foo.bar:8080/document/index.csp?querystring#ref</a>
</pre><p>The following URL components are automatically unescaped according to the escaping mechanism defined in RFC 2396; <code>credentials</code>, <code>path</code> and parameter <code>values</code>.</p>
<p>An <em>IPv6 address</em> can be used for host as defined in <a href="http://www.ietf.org/rfc/rfc2732.txt">RFC2732</a> by enclosing the address in [brackets]. For instance, mysql://[2010:836B:4179::836B:4179]:3306/test</p>
<p>For more information about the URL syntax and specification, see, <a href="ftp://ftp.rfc-editor.org/in-notes/rfc2396.txt">RFC2396 - Uniform Resource Identifiers (URI): Generic Syntax</a> </p>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a0acb682b8260ab1c60b918599864e2e5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#a0acb682b8260ab1c60b918599864e2e5">T</a>&#160;&#160;&#160;URL_T</td></tr>
<tr class="separator:a0acb682b8260ab1c60b918599864e2e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ad715731329590a33bd1e32189213c0f6"><td class="memItemLeft" align="right" valign="top">typedef struct URL_S *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#ad715731329590a33bd1e32189213c0f6">T</a></td></tr>
<tr class="separator:ad715731329590a33bd1e32189213c0f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a1e85f50a8c6036c34b642a49cc08d5fb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#a1e85f50a8c6036c34b642a49cc08d5fb">URL_new</a> (const char *url)</td></tr>
<tr class="memdesc:a1e85f50a8c6036c34b642a49cc08d5fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new URL object from the <code>url</code> parameter string.  <a href="#a1e85f50a8c6036c34b642a49cc08d5fb">More...</a><br/></td></tr>
<tr class="separator:a1e85f50a8c6036c34b642a49cc08d5fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47232899a21dc2c53576d071f169d827"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#a47232899a21dc2c53576d071f169d827">URL_create</a> (const char *url,...)</td></tr>
<tr class="memdesc:a47232899a21dc2c53576d071f169d827"><td class="mdescLeft">&#160;</td><td class="mdescRight">Factory method for building an URL object using a variable argument list.  <a href="#a47232899a21dc2c53576d071f169d827">More...</a><br/></td></tr>
<tr class="separator:a47232899a21dc2c53576d071f169d827"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3dc09880813e8dd994333ae37534c0d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#ad3dc09880813e8dd994333ae37534c0d">URL_free</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> *U)</td></tr>
<tr class="memdesc:ad3dc09880813e8dd994333ae37534c0d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy a URL object.  <a href="#ad3dc09880813e8dd994333ae37534c0d">More...</a><br/></td></tr>
<tr class="separator:ad3dc09880813e8dd994333ae37534c0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63f81fa482efdabd205cf78e4e98a2dc"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#a63f81fa482efdabd205cf78e4e98a2dc">URL_toString</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> U)</td></tr>
<tr class="memdesc:a63f81fa482efdabd205cf78e4e98a2dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a string representation of this URL object.  <a href="#a63f81fa482efdabd205cf78e4e98a2dc">More...</a><br/></td></tr>
<tr class="separator:a63f81fa482efdabd205cf78e4e98a2dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Properties</div></td></tr>
<tr class="memitem:a5935142198a699d229d70f86e82818af"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#a5935142198a699d229d70f86e82818af">URL_getProtocol</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> U)</td></tr>
<tr class="memdesc:a5935142198a699d229d70f86e82818af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the protocol of the URL.  <a href="#a5935142198a699d229d70f86e82818af">More...</a><br/></td></tr>
<tr class="separator:a5935142198a699d229d70f86e82818af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aacaa1aec7e9ade15ebfc22dd41735433"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#aacaa1aec7e9ade15ebfc22dd41735433">URL_getUser</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> U)</td></tr>
<tr class="memdesc:aacaa1aec7e9ade15ebfc22dd41735433"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the user name from the authority part of the URL.  <a href="#aacaa1aec7e9ade15ebfc22dd41735433">More...</a><br/></td></tr>
<tr class="separator:aacaa1aec7e9ade15ebfc22dd41735433"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3dcc48c833113b7f0e0761a5c3d64d6"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#ad3dcc48c833113b7f0e0761a5c3d64d6">URL_getPassword</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> U)</td></tr>
<tr class="memdesc:ad3dcc48c833113b7f0e0761a5c3d64d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the password from the authority part of the URL.  <a href="#ad3dcc48c833113b7f0e0761a5c3d64d6">More...</a><br/></td></tr>
<tr class="separator:ad3dcc48c833113b7f0e0761a5c3d64d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0c4f1729a8813497b07739161a3c6a6"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#ac0c4f1729a8813497b07739161a3c6a6">URL_getHost</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> U)</td></tr>
<tr class="memdesc:ac0c4f1729a8813497b07739161a3c6a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the hostname of the URL.  <a href="#ac0c4f1729a8813497b07739161a3c6a6">More...</a><br/></td></tr>
<tr class="separator:ac0c4f1729a8813497b07739161a3c6a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a72bd52429ecfcddac421a0fe33d0dc76"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#a72bd52429ecfcddac421a0fe33d0dc76">URL_getPort</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> U)</td></tr>
<tr class="memdesc:a72bd52429ecfcddac421a0fe33d0dc76"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the port of the URL.  <a href="#a72bd52429ecfcddac421a0fe33d0dc76">More...</a><br/></td></tr>
<tr class="separator:a72bd52429ecfcddac421a0fe33d0dc76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1d31ab7c8cb60a17a6f6ae5908562a0"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#ae1d31ab7c8cb60a17a6f6ae5908562a0">URL_getPath</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> U)</td></tr>
<tr class="memdesc:ae1d31ab7c8cb60a17a6f6ae5908562a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the path of the URL.  <a href="#ae1d31ab7c8cb60a17a6f6ae5908562a0">More...</a><br/></td></tr>
<tr class="separator:ae1d31ab7c8cb60a17a6f6ae5908562a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef8b66bf7af385f19cdef37a146883c5"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#aef8b66bf7af385f19cdef37a146883c5">URL_getQueryString</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> U)</td></tr>
<tr class="memdesc:aef8b66bf7af385f19cdef37a146883c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the query string of the URL.  <a href="#aef8b66bf7af385f19cdef37a146883c5">More...</a><br/></td></tr>
<tr class="separator:aef8b66bf7af385f19cdef37a146883c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd0b689bc94dd9691eb2176d7e33c0e5"><td class="memItemLeft" align="right" valign="top">const char **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#abd0b689bc94dd9691eb2176d7e33c0e5">URL_getParameterNames</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> U)</td></tr>
<tr class="memdesc:abd0b689bc94dd9691eb2176d7e33c0e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an array of string objects with the names of the parameters contained in this URL.  <a href="#abd0b689bc94dd9691eb2176d7e33c0e5">More...</a><br/></td></tr>
<tr class="separator:abd0b689bc94dd9691eb2176d7e33c0e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff59eddfcccae220998b9955af59267c"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#aff59eddfcccae220998b9955af59267c">URL_getParameter</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> U, const char *name)</td></tr>
<tr class="memdesc:aff59eddfcccae220998b9955af59267c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the value of a URL parameter as a string, or NULL if the parameter does not exist.  <a href="#aff59eddfcccae220998b9955af59267c">More...</a><br/></td></tr>
<tr class="separator:aff59eddfcccae220998b9955af59267c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Class methods</div></td></tr>
<tr class="memitem:aee9ecaebd7994ccb6d5df86485c0edac"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#aee9ecaebd7994ccb6d5df86485c0edac">URL_unescape</a> (char *url)</td></tr>
<tr class="memdesc:aee9ecaebd7994ccb6d5df86485c0edac"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Class method</b>, unescape an url string.  <a href="#aee9ecaebd7994ccb6d5df86485c0edac">More...</a><br/></td></tr>
<tr class="separator:aee9ecaebd7994ccb6d5df86485c0edac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4462b77aa13275d47a954b6d5ccf8d9e"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#a4462b77aa13275d47a954b6d5ccf8d9e">URL_escape</a> (const char *url)</td></tr>
<tr class="memdesc:a4462b77aa13275d47a954b6d5ccf8d9e"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Class method</b>, escape an url string converting unsafe characters to a hex (%HEXHEX) representation.  <a href="#a4462b77aa13275d47a954b6d5ccf8d9e">More...</a><br/></td></tr>
<tr class="separator:a4462b77aa13275d47a954b6d5ccf8d9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a0acb682b8260ab1c60b918599864e2e5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;&#160;&#160;URL_T</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="ad715731329590a33bd1e32189213c0f6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct URL_S* <a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a1e85f50a8c6036c34b642a49cc08d5fb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> URL_new </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>url</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new URL object from the <code>url</code> parameter string. </p>
<p>The url string <em>must</em> start with a protocol specifier, such as <code><a href="http://">http://</a></code> or <code><a href="ftp://">ftp://</a></code> </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>A string specifying the URL </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A URL object or NULL if the <code>url</code> parameter cannot be parsed as an URL. </dd></dl>

</div>
</div>
<a class="anchor" id="a47232899a21dc2c53576d071f169d827"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> URL_create </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Factory method for building an URL object using a variable argument list. </p>
<p><em>Important</em>: since the '%' character is used as a format specifier (e.g. %s for string, %d for integer and so on), submitting an URL escaped string (i.e. a %HEXHEX encoded string) in the <code>url</code> parameter can produce undesired results. In this case, use either the <a class="el" href="URL_8h.html#a1e85f50a8c6036c34b642a49cc08d5fb" title="Create a new URL object from the url parameter string. ">URL_new()</a> method or <a class="el" href="URL_8h.html#aee9ecaebd7994ccb6d5df86485c0edac" title="Class method, unescape an url string. ">URL_unescape()</a> the <code>url</code> parameter first. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>A string specifying the URL </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A URL object or NULL if the <code>url</code> parameter cannot be parsed as an URL. </dd></dl>

</div>
</div>
<a class="anchor" id="ad3dc09880813e8dd994333ae37534c0d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void URL_free </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> *&#160;</td>
          <td class="paramname"><em>U</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destroy a URL object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>A URL object reference </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a5935142198a699d229d70f86e82818af"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* URL_getProtocol </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>U</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the protocol of the URL. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>An URL object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The protocol name </dd></dl>

</div>
</div>
<a class="anchor" id="aacaa1aec7e9ade15ebfc22dd41735433"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* URL_getUser </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>U</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the user name from the authority part of the URL. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>An URL object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A username specified in the URL or NULL if not found </dd></dl>

</div>
</div>
<a class="anchor" id="ad3dcc48c833113b7f0e0761a5c3d64d6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* URL_getPassword </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>U</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the password from the authority part of the URL. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>An URL object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A password specified in the URL or NULL if not found </dd></dl>

</div>
</div>
<a class="anchor" id="ac0c4f1729a8813497b07739161a3c6a6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* URL_getHost </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>U</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the hostname of the URL. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>An URL object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The hostname of the URL or NULL if not found </dd></dl>

</div>
</div>
<a class="anchor" id="a72bd52429ecfcddac421a0fe33d0dc76"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int URL_getPort </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>U</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the port of the URL. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>An URL object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The port number of the URL or -1 if not specified </dd></dl>

</div>
</div>
<a class="anchor" id="ae1d31ab7c8cb60a17a6f6ae5908562a0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* URL_getPath </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>U</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the path of the URL. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>An URL object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The path of the URL or NULL if not found </dd></dl>

</div>
</div>
<a class="anchor" id="aef8b66bf7af385f19cdef37a146883c5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* URL_getQueryString </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>U</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the query string of the URL. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>An URL object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The query string of the URL or NULL if not found </dd></dl>

</div>
</div>
<a class="anchor" id="abd0b689bc94dd9691eb2176d7e33c0e5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char** URL_getParameterNames </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>U</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns an array of string objects with the names of the parameters contained in this URL. </p>
<p>If the URL has no parameters, the method returns NULL. The last value in the array is NULL. To print all parameter names and their values contained in this URL, the following code can be used: </p>
<pre>
  const char **params = URL_getParameterNames(U);
  if (params) 
          for (int i = 0; params[i]; i++)
                  printf("%s = %s\n", params[i], URL_getParameter(U, params[i]));
</pre> <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>An URL object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array of string objects, each string containing the name of a URL parameter; or NULL if the URL has no parameters </dd></dl>

</div>
</div>
<a class="anchor" id="aff59eddfcccae220998b9955af59267c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* URL_getParameter </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>U</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the value of a URL parameter as a string, or NULL if the parameter does not exist. </p>
<p>If you use this method with a multi-valued parameter, the value returned is the first value found. Lookup is <em>case-sensitive</em>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>An URL object </td></tr>
    <tr><td class="paramname">name</td><td>The parameter name to lookup </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The parameter value or NULL if not found </dd></dl>

</div>
</div>
<a class="anchor" id="a63f81fa482efdabd205cf78e4e98a2dc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* URL_toString </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>U</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns a string representation of this URL object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>An URL object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The URL string </dd></dl>

</div>
</div>
<a class="anchor" id="aee9ecaebd7994ccb6d5df86485c0edac"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* URL_unescape </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>url</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><b>Class method</b>, unescape an url string. </p>
<p>The <code>url</code> parameter is modified by this method. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>an escaped url string </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the unescaped <code>url</code> string </dd></dl>

</div>
</div>
<a class="anchor" id="a4462b77aa13275d47a954b6d5ccf8d9e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* URL_escape </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>url</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><b>Class method</b>, escape an url string converting unsafe characters to a hex (%HEXHEX) representation. </p>
<p>The following URL unsafe characters are encoded: </p>
<pre>&lt;&gt;"#%%{}|\^ [] `</pre><p> as well as characters in the interval 00-1F hex (0-31 decimal) and in the interval 7F-FF (127-255 decimal) <em>The caller must free the returned string.</em> If the <code>url</code> parameter is NULL then this method returns NULL, if it is the empty string "" a <em>new</em> empty string is returned. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>an url string </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the escaped string </dd></dl>

</div>
</div>
</div><!-- contents -->
<p style="text-align:center;color:#808080;font-size:90%;margin:40px 0 20px 0;">
Copyright &copy; <a href="http://tildeslash.com/">Tildeslash Ltd</a>. All
rights reserved.</p>
</body></html>