Home Download Musics Developers
API Sources Tools File Format Technicals

sc68 URL
[file68 library documentation.]


Detailed Description

Provides functions for sc68 URL manipulation.


Files

file  url68.h
 sc68 URL header.


Functions

int url68_get_protocol (char *protocol, int size, const char *url)
 Get protocol from URL string.

int url68_local_protocol (const char *protocol)
 Test if a protocol is local.

istream_turl68_stream_create (const char *url, int mode)
 Create a stream for an URL.


Function Documentation

int url68_get_protocol char *  protocol,
int  size,
const char *  url
 

Get protocol from URL string.

Parameters:
protocol buffer to store URL
size protocol buffer size
url UR string
Returns:
error code
Return values:
0 success
-1 failure

int url68_local_protocol const char *  protocol  ) 
 

Test if a protocol is local.

Note:
Currently the url68_local_protocol() function tests if protocol is local and seekable.
Parameters:
protocol protocol to test
Returns:
1 protocol is local (0,"","FILE","LOCAL","NULL")

0 protocol may be remote

istream_t* url68_stream_create const char *  url,
int  mode
 

Create a stream for an URL.

Here is a list of protocols currently supported:

  • file:// local file
  • local:// alias for file://
  • stdin:// standard input
  • stdout:// standard output
  • stderr:// standard error
  • null:// null (zero) file
  • protocol supported by curl (HTTP, HTTPS, FTP, GOPHER, DICT, TELNET, LDAP or FILE)

Parameters:
url URL or file
mode open mode (1:read, 2:write).
Returns:
stream
Return values:
0 error