Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
urlapi.h File Reference
#include "curl.h"

Go to the source code of this file.

Macros

#define CURLU_DEFAULT_PORT   (1<<0) /* return default port number */
 
#define CURLU_NO_DEFAULT_PORT
 
#define CURLU_DEFAULT_SCHEME
 
#define CURLU_NON_SUPPORT_SCHEME   (1<<3) /* allow non-supported scheme */
 
#define CURLU_PATH_AS_IS   (1<<4) /* leave dot sequences */
 
#define CURLU_DISALLOW_USER   (1<<5) /* no user+password allowed */
 
#define CURLU_URLDECODE   (1<<6) /* URL decode on get */
 
#define CURLU_URLENCODE   (1<<7) /* URL encode on set */
 
#define CURLU_APPENDQUERY   (1<<8) /* append a form style part */
 
#define CURLU_GUESS_SCHEME   (1<<9) /* legacy curl-style guessing */
 
#define CURLU_NO_AUTHORITY
 
#define CURLU_ALLOW_SPACE   (1<<11) /* Allow spaces in the URL */
 
#define CURLU_PUNYCODE   (1<<12) /* get the hostname in punycode */
 
#define CURLU_PUNY2IDN   (1<<13) /* punycode => IDN conversion */
 
#define CURLU_GET_EMPTY
 
#define CURLU_NO_GUESS_SCHEME   (1<<15) /* for get, do not accept a guess */
 

Typedefs

typedef struct Curl_URL CURLU
 

Enumerations

enum  CURLUcode {
  CURLUE_OK , CURLUE_BAD_HANDLE , CURLUE_BAD_PARTPOINTER , CURLUE_MALFORMED_INPUT ,
  CURLUE_BAD_PORT_NUMBER , CURLUE_UNSUPPORTED_SCHEME , CURLUE_URLDECODE , CURLUE_OUT_OF_MEMORY ,
  CURLUE_USER_NOT_ALLOWED , CURLUE_UNKNOWN_PART , CURLUE_NO_SCHEME , CURLUE_NO_USER ,
  CURLUE_NO_PASSWORD , CURLUE_NO_OPTIONS , CURLUE_NO_HOST , CURLUE_NO_PORT ,
  CURLUE_NO_QUERY , CURLUE_NO_FRAGMENT , CURLUE_NO_ZONEID , CURLUE_BAD_FILE_URL ,
  CURLUE_BAD_FRAGMENT , CURLUE_BAD_HOSTNAME , CURLUE_BAD_IPV6 , CURLUE_BAD_LOGIN ,
  CURLUE_BAD_PASSWORD , CURLUE_BAD_PATH , CURLUE_BAD_QUERY , CURLUE_BAD_SCHEME ,
  CURLUE_BAD_SLASHES , CURLUE_BAD_USER , CURLUE_LACKS_IDN , CURLUE_TOO_LARGE ,
  CURLUE_LAST
}
 
enum  CURLUPart {
  CURLUPART_URL , CURLUPART_SCHEME , CURLUPART_USER , CURLUPART_PASSWORD ,
  CURLUPART_OPTIONS , CURLUPART_HOST , CURLUPART_PORT , CURLUPART_PATH ,
  CURLUPART_QUERY , CURLUPART_FRAGMENT , CURLUPART_ZONEID
}
 

Functions

CURL_EXTERN CURLUcurl_url (void)
 
CURL_EXTERN void curl_url_cleanup (CURLU *handle)
 
CURL_EXTERN CURLUcurl_url_dup (const CURLU *in)
 
CURL_EXTERN CURLUcode curl_url_get (const CURLU *handle, CURLUPart what, char **part, unsigned int flags)
 
CURL_EXTERN CURLUcode curl_url_set (CURLU *handle, CURLUPart what, const char *part, unsigned int flags)
 
CURL_EXTERN const char * curl_url_strerror (CURLUcode)
 

Macro Definition Documentation

◆ CURLU_ALLOW_SPACE

#define CURLU_ALLOW_SPACE   (1<<11) /* Allow spaces in the URL */

Definition at line 95 of file urlapi.h.

◆ CURLU_APPENDQUERY

#define CURLU_APPENDQUERY   (1<<8) /* append a form style part */

Definition at line 92 of file urlapi.h.

◆ CURLU_DEFAULT_PORT

#define CURLU_DEFAULT_PORT   (1<<0) /* return default port number */

Definition at line 84 of file urlapi.h.

◆ CURLU_DEFAULT_SCHEME

#define CURLU_DEFAULT_SCHEME
Value:
(1<<2) /* return default scheme if
missing */

Definition at line 86 of file urlapi.h.

◆ CURLU_DISALLOW_USER

#define CURLU_DISALLOW_USER   (1<<5) /* no user+password allowed */

Definition at line 89 of file urlapi.h.

◆ CURLU_GET_EMPTY

#define CURLU_GET_EMPTY
Value:
(1<<14) /* allow empty queries and fragments
when extracting the URL or the
components */

Definition at line 98 of file urlapi.h.

◆ CURLU_GUESS_SCHEME

#define CURLU_GUESS_SCHEME   (1<<9) /* legacy curl-style guessing */

Definition at line 93 of file urlapi.h.

◆ CURLU_NO_AUTHORITY

#define CURLU_NO_AUTHORITY
Value:
(1<<10) /* Allow empty authority when the
scheme is unknown. */

Definition at line 94 of file urlapi.h.

◆ CURLU_NO_DEFAULT_PORT

#define CURLU_NO_DEFAULT_PORT
Value:
(1<<1) /* act as if no port number was set,
if the port number matches the
default for the scheme */

Definition at line 85 of file urlapi.h.

◆ CURLU_NO_GUESS_SCHEME

#define CURLU_NO_GUESS_SCHEME   (1<<15) /* for get, do not accept a guess */

Definition at line 99 of file urlapi.h.

◆ CURLU_NON_SUPPORT_SCHEME

#define CURLU_NON_SUPPORT_SCHEME   (1<<3) /* allow non-supported scheme */

Definition at line 87 of file urlapi.h.

◆ CURLU_PATH_AS_IS

#define CURLU_PATH_AS_IS   (1<<4) /* leave dot sequences */

Definition at line 88 of file urlapi.h.

◆ CURLU_PUNY2IDN

#define CURLU_PUNY2IDN   (1<<13) /* punycode => IDN conversion */

Definition at line 97 of file urlapi.h.

◆ CURLU_PUNYCODE

#define CURLU_PUNYCODE   (1<<12) /* get the hostname in punycode */

Definition at line 96 of file urlapi.h.

◆ CURLU_URLDECODE

#define CURLU_URLDECODE   (1<<6) /* URL decode on get */

Definition at line 90 of file urlapi.h.

◆ CURLU_URLENCODE

#define CURLU_URLENCODE   (1<<7) /* URL encode on set */

Definition at line 91 of file urlapi.h.

Typedef Documentation

◆ CURLU

typedef struct Curl_URL CURLU

Definition at line 101 of file urlapi.h.

Enumeration Type Documentation

◆ CURLUcode

enum CURLUcode
Enumerator
CURLUE_OK 
CURLUE_BAD_HANDLE 
CURLUE_BAD_PARTPOINTER 
CURLUE_MALFORMED_INPUT 
CURLUE_BAD_PORT_NUMBER 
CURLUE_UNSUPPORTED_SCHEME 
CURLUE_URLDECODE 
CURLUE_OUT_OF_MEMORY 
CURLUE_USER_NOT_ALLOWED 
CURLUE_UNKNOWN_PART 
CURLUE_NO_SCHEME 
CURLUE_NO_USER 
CURLUE_NO_PASSWORD 
CURLUE_NO_OPTIONS 
CURLUE_NO_HOST 
CURLUE_NO_PORT 
CURLUE_NO_QUERY 
CURLUE_NO_FRAGMENT 
CURLUE_NO_ZONEID 
CURLUE_BAD_FILE_URL 
CURLUE_BAD_FRAGMENT 
CURLUE_BAD_HOSTNAME 
CURLUE_BAD_IPV6 
CURLUE_BAD_LOGIN 
CURLUE_BAD_PASSWORD 
CURLUE_BAD_PATH 
CURLUE_BAD_QUERY 
CURLUE_BAD_SCHEME 
CURLUE_BAD_SLASHES 
CURLUE_BAD_USER 
CURLUE_LACKS_IDN 
CURLUE_TOO_LARGE 
CURLUE_LAST 

Definition at line 34 of file urlapi.h.

34 {
36 CURLUE_BAD_HANDLE, /* 1 */
41 CURLUE_URLDECODE, /* 6 */
44 CURLUE_UNKNOWN_PART, /* 9 */
45 CURLUE_NO_SCHEME, /* 10 */
46 CURLUE_NO_USER, /* 11 */
47 CURLUE_NO_PASSWORD, /* 12 */
48 CURLUE_NO_OPTIONS, /* 13 */
49 CURLUE_NO_HOST, /* 14 */
50 CURLUE_NO_PORT, /* 15 */
51 CURLUE_NO_QUERY, /* 16 */
52 CURLUE_NO_FRAGMENT, /* 17 */
53 CURLUE_NO_ZONEID, /* 18 */
54 CURLUE_BAD_FILE_URL, /* 19 */
55 CURLUE_BAD_FRAGMENT, /* 20 */
56 CURLUE_BAD_HOSTNAME, /* 21 */
57 CURLUE_BAD_IPV6, /* 22 */
58 CURLUE_BAD_LOGIN, /* 23 */
59 CURLUE_BAD_PASSWORD, /* 24 */
60 CURLUE_BAD_PATH, /* 25 */
61 CURLUE_BAD_QUERY, /* 26 */
62 CURLUE_BAD_SCHEME, /* 27 */
63 CURLUE_BAD_SLASHES, /* 28 */
64 CURLUE_BAD_USER, /* 29 */
65 CURLUE_LACKS_IDN, /* 30 */
66 CURLUE_TOO_LARGE, /* 31 */
68} CURLUcode;
CURLUcode
Definition urlapi.h:34
@ CURLUE_URLDECODE
Definition urlapi.h:41
@ CURLUE_BAD_PARTPOINTER
Definition urlapi.h:37
@ CURLUE_NO_PASSWORD
Definition urlapi.h:47
@ CURLUE_BAD_PORT_NUMBER
Definition urlapi.h:39
@ CURLUE_BAD_IPV6
Definition urlapi.h:57
@ CURLUE_BAD_SCHEME
Definition urlapi.h:62
@ CURLUE_BAD_LOGIN
Definition urlapi.h:58
@ CURLUE_LAST
Definition urlapi.h:67
@ CURLUE_UNSUPPORTED_SCHEME
Definition urlapi.h:40
@ CURLUE_NO_ZONEID
Definition urlapi.h:53
@ CURLUE_NO_SCHEME
Definition urlapi.h:45
@ CURLUE_BAD_PATH
Definition urlapi.h:60
@ CURLUE_OK
Definition urlapi.h:35
@ CURLUE_NO_FRAGMENT
Definition urlapi.h:52
@ CURLUE_BAD_USER
Definition urlapi.h:64
@ CURLUE_BAD_FILE_URL
Definition urlapi.h:54
@ CURLUE_BAD_SLASHES
Definition urlapi.h:63
@ CURLUE_NO_QUERY
Definition urlapi.h:51
@ CURLUE_LACKS_IDN
Definition urlapi.h:65
@ CURLUE_NO_USER
Definition urlapi.h:46
@ CURLUE_BAD_FRAGMENT
Definition urlapi.h:55
@ CURLUE_USER_NOT_ALLOWED
Definition urlapi.h:43
@ CURLUE_NO_OPTIONS
Definition urlapi.h:48
@ CURLUE_MALFORMED_INPUT
Definition urlapi.h:38
@ CURLUE_NO_HOST
Definition urlapi.h:49
@ CURLUE_TOO_LARGE
Definition urlapi.h:66
@ CURLUE_BAD_HANDLE
Definition urlapi.h:36
@ CURLUE_OUT_OF_MEMORY
Definition urlapi.h:42
@ CURLUE_NO_PORT
Definition urlapi.h:50
@ CURLUE_BAD_QUERY
Definition urlapi.h:61
@ CURLUE_UNKNOWN_PART
Definition urlapi.h:44
@ CURLUE_BAD_PASSWORD
Definition urlapi.h:59
@ CURLUE_BAD_HOSTNAME
Definition urlapi.h:56

◆ CURLUPart

enum CURLUPart
Enumerator
CURLUPART_URL 
CURLUPART_SCHEME 
CURLUPART_USER 
CURLUPART_PASSWORD 
CURLUPART_OPTIONS 
CURLUPART_HOST 
CURLUPART_PORT 
CURLUPART_PATH 
CURLUPART_QUERY 
CURLUPART_FRAGMENT 
CURLUPART_ZONEID 

Definition at line 70 of file urlapi.h.

70 {
81 CURLUPART_ZONEID /* added in 7.65.0 */
82} CURLUPart;
CURLUPart
Definition urlapi.h:70
@ CURLUPART_PASSWORD
Definition urlapi.h:74
@ CURLUPART_USER
Definition urlapi.h:73
@ CURLUPART_HOST
Definition urlapi.h:76
@ CURLUPART_OPTIONS
Definition urlapi.h:75
@ CURLUPART_PATH
Definition urlapi.h:78
@ CURLUPART_URL
Definition urlapi.h:71
@ CURLUPART_SCHEME
Definition urlapi.h:72
@ CURLUPART_FRAGMENT
Definition urlapi.h:80
@ CURLUPART_ZONEID
Definition urlapi.h:81
@ CURLUPART_PORT
Definition urlapi.h:77
@ CURLUPART_QUERY
Definition urlapi.h:79

Function Documentation

◆ curl_url()

CURL_EXTERN CURLU * curl_url ( void )

◆ curl_url_cleanup()

CURL_EXTERN void curl_url_cleanup ( CURLU * handle)

◆ curl_url_dup()

CURL_EXTERN CURLU * curl_url_dup ( const CURLU * in)

◆ curl_url_get()

CURL_EXTERN CURLUcode curl_url_get ( const CURLU * handle,
CURLUPart what,
char ** part,
unsigned int flags )

◆ curl_url_set()

CURL_EXTERN CURLUcode curl_url_set ( CURLU * handle,
CURLUPart what,
const char * part,
unsigned int flags )

◆ curl_url_strerror()

CURL_EXTERN const char * curl_url_strerror ( CURLUcode )