pam_pkcs11 0.6.12
uri.h File Reference

This module contains several functions to retrieve data from an URL. More...

#include <stdlib.h>

Go to the source code of this file.

Macros

#define URI_EXTERN   extern
 

Functions

URI_EXTERN int is_uri (const char *path)
 
URI_EXTERN int is_file (const char *path)
 
URI_EXTERN int is_dir (const char *path)
 
URI_EXTERN int is_symlink (const char *path)
 
URI_EXTERN int get_from_uri (const char *uri_str, unsigned char **data, size_t *length)
 Downloads data from a given URI.
 

Detailed Description

This module contains several functions to retrieve data from an URL.

Some examples of valid URL's:

Definition in file uri.h.

Macro Definition Documentation

◆ URI_EXTERN

#define URI_EXTERN   extern

Definition at line 39 of file uri.h.

Referenced by get_from_uri(), is_dir(), is_file(), is_symlink(), and is_uri().

Function Documentation

◆ get_from_uri()

URI_EXTERN int get_from_uri ( const char * uri_str,
unsigned char ** data,
size_t * length )

Downloads data from a given URI.

Parameters
uri_strURL string where to retrieve data
dataPointer to a String buffer where data is retrieved
lengthLength of retrieved data
Returns
-1 on error, 0 on sucess

References URI_EXTERN.

◆ is_dir()

URI_EXTERN int is_dir ( const char * path)

References URI_EXTERN.

◆ is_file()

URI_EXTERN int is_file ( const char * path)

References URI_EXTERN.

◆ is_symlink()

URI_EXTERN int is_symlink ( const char * path)

References URI_EXTERN.

◆ is_uri()

URI_EXTERN int is_uri ( const char * path)

References URI_EXTERN.