|
|
|||
File indexing completed on 2025-12-16 10:17:11
0001 /* 0002 * Copyright (c) CERN 2013-2017 0003 * 0004 * Copyright (c) Members of the EMI Collaboration. 2010-2013 0005 * See http://www.eu-emi.eu/partners for details on the copyright 0006 * holders. 0007 * 0008 * Licensed under the Apache License, Version 2.0 (the "License"); 0009 * you may not use this file except in compliance with the License. 0010 * You may obtain a copy of the License at 0011 * 0012 * http://www.apache.org/licenses/LICENSE-2.0 0013 * 0014 * Unless required by applicable law or agreed to in writing, software 0015 * distributed under the License is distributed on an "AS IS" BASIS, 0016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0017 * See the License for the specific language governing permissions and 0018 * limitations under the License. 0019 */ 0020 0021 #pragma once 0022 #ifndef GFAL_URI_H 0023 #define GFAL_URI_H 0024 0025 #include <glib.h> 0026 #include <gfal_api.h> 0027 0028 #ifdef __cplusplus 0029 extern "C" 0030 { 0031 #endif 0032 0033 // URI struct 0034 // Please, note that there is a difference between a component being NULL (undefined) 0035 // and being the empty string. 0036 // i.e. empty = separator was present, but value missing 0037 // undefined = separator was not present 0038 typedef struct gfal2_uri { 0039 char *scheme; 0040 char *userinfo; 0041 char *host; 0042 unsigned port; 0043 char *path; 0044 char *query; 0045 char *fragment; 0046 0047 const char *original; 0048 } gfal2_uri; 0049 0050 /* 0051 * Parse an URI 0052 */ 0053 gfal2_uri* gfal2_parse_uri(const char *uri, GError **err); 0054 0055 /* 0056 * Free an URI. It is safe to call if uri is NULL. 0057 */ 0058 void gfal2_free_uri(gfal2_uri* uri); 0059 0060 /* 0061 * Returns a newly allocated string with the serialized uri 0062 */ 0063 char *gfal2_join_uri(gfal2_uri* uri); 0064 0065 /* 0066 * url-decodes the string, and returns a pointer to the same string 0067 * Modifies the buffer pointed by str!! 0068 */ 0069 char *gfal2_urldecode(char *str); 0070 0071 0072 #ifdef __cplusplus 0073 } 0074 #endif 0075 0076 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|