/builddir/build/BUILD/gru-0.2.0/src/network/gru_uri.c File Reference

#include "gru_uri.h"

Functions

gru_uri_t gru_uri_parse (const char *url, gru_status_t *status)
gru_export gru_uri_t gru_uri_parse_ex (const char *gru_restrict url, gru_uri_parse_opt_t parseopt, gru_status_t *gru_restrict status)
 URI parser with additional options.
char * gru_uri_simple_format (const gru_uri_t *uri, gru_status_t *status)
char * gru_uri_format (const gru_uri_t *uri, gru_uri_format_opt_t fopt, gru_status_t *status)
bool gru_uri_set_scheme (gru_uri_t *uri, const char *scheme)
 Sets the scheme in a URI object.
bool gru_uri_set_path (gru_uri_t *uri, const char *path)
 Sets the URI path.
gru_export gru_uri_t gru_uri_clone (gru_uri_t other, gru_status_t *status)
 Clone a URI object.
void gru_uri_cleanup (gru_uri_t *uri)
 Cleans up a URI object.

Function Documentation

void gru_uri_cleanup ( gru_uri_t uri  ) 

Cleans up a URI object.

Parameters:
uri a pointer to a URI object to clean
Examples:
network/gru_uri_test.c, and network/gru_uri_test_opt.c.
gru_export gru_uri_t gru_uri_clone ( gru_uri_t  other,
gru_status_t status 
)

Clone a URI object.

Parameters:
other the object to clone
status status object
Returns:
A cloned object that must's be cleaned up after use. Check the status object to determine whether cloning was successful or not
char* gru_uri_format ( const gru_uri_t uri,
gru_uri_format_opt_t  fopt,
gru_status_t status 
)
gru_uri_t gru_uri_parse ( const char *  url,
gru_status_t status 
)
gru_export gru_uri_t gru_uri_parse_ex ( const char *gru_restrict  url,
gru_uri_parse_opt_t  parseopt,
gru_status_t *gru_restrict  status 
)

URI parser with additional options.

Parameters:
uri URI string (ie.: scheme://host:port/path)
parseopt parse options (see gru_uri_format_opt_t)
status status object
Returns:
A parsed URI object with each component of the URI broken down
Examples:
network/gru_uri_test_opt.c.
bool gru_uri_set_path ( gru_uri_t uri,
const char *  path 
)

Sets the URI path.

Parameters:
uri a pointer to an URI object
path the path
Returns:
true if success or false otherwise
bool gru_uri_set_scheme ( gru_uri_t uri,
const char *  scheme 
)

Sets the scheme in a URI object.

Parameters:
uri a pointer to an URI object
scheme the scheme to set it to
Returns:
true if success or false otherwise
char* gru_uri_simple_format ( const gru_uri_t uri,
gru_status_t status 
)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on 7 Jan 2019 for GRU - Generic Reusable Utilities by  doxygen 1.6.1