Qpid Proton C API  0.18.1
url.h
Go to the documentation of this file.
1 #ifndef PROTON_URL_H
2 #define PROTON_URL_H 1
3 
4 /*
5  * Licensed to the Apache Software Foundation (ASF) under one
6  * or more contributor license agreements. See the NOTICE file
7  * distributed with this work for additional information
8  * regarding copyright ownership. The ASF licenses this file
9  * to you under the Apache License, Version 2.0 (the
10  * "License"); you may not use this file except in compliance
11  * with the License. You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing,
16  * software distributed under the License is distributed on an
17  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18  * KIND, either express or implied. See the License for the
19  * specific language governing permissions and limitations
20  * under the License.
21  */
22 
23 #include <proton/import_export.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
41 typedef struct pn_url_t pn_url_t;
42 
46 PNX_EXTERN pn_url_t *pn_url(void);
47 
66 PNX_EXTERN pn_url_t *pn_url_parse(const char *url);
67 
70 PNX_EXTERN void pn_url_free(pn_url_t *url);
71 
75 PNX_EXTERN void pn_url_clear(pn_url_t *url);
76 
83 PNX_EXTERN const char *pn_url_str(pn_url_t *url);
84 
92 PNX_EXTERN const char *pn_url_get_scheme(pn_url_t *url);
93 PNX_EXTERN const char *pn_url_get_username(pn_url_t *url);
94 PNX_EXTERN const char *pn_url_get_password(pn_url_t *url);
95 PNX_EXTERN const char *pn_url_get_host(pn_url_t *url);
96 PNX_EXTERN const char *pn_url_get_port(pn_url_t *url);
97 PNX_EXTERN const char *pn_url_get_path(pn_url_t *url);
110 PNX_EXTERN void pn_url_set_scheme(pn_url_t *url, const char *scheme);
111 PNX_EXTERN void pn_url_set_username(pn_url_t *url, const char *username);
112 PNX_EXTERN void pn_url_set_password(pn_url_t *url, const char *password);
113 PNX_EXTERN void pn_url_set_host(pn_url_t *url, const char *host);
114 PNX_EXTERN void pn_url_set_port(pn_url_t *url, const char *port);
115 PNX_EXTERN void pn_url_set_path(pn_url_t *url, const char *path);
124 #ifdef __cplusplus
125 }
126 #endif
127 
128 #endif /* url.h */
void pn_url_clear(pn_url_t *url)
Clear the contents of the URL.
void pn_url_free(pn_url_t *url)
Free a URL.
struct pn_url_t pn_url_t
A parsed URL.
Definition: url.h:41
pn_url_t * pn_url_parse(const char *url)
Parse a string URL as a pn_url_t.
pn_url_t * pn_url(void)
Create an empty URL.
const char * pn_url_str(pn_url_t *url)
Return the string form of a URL.