uri.h File Reference

Funtions for file URI handling. More...

#include "flute_defines.h"
#include "../alclib/defines.h"

Include dependency graph for uri.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  uri

Typedefs

typedef uri uri_t

Functions

uri_talloc_uri_struct (void)
uri_tparse_uri (char *uri_string, int len)
char * uri_string (uri_t *uri)
void free_uri (uri_t *uri)
char * get_uri_host_and_path (uri_t *uri)
void set_uri_scheme (uri_t *uri, char *scheme)
void set_uri_user (uri_t *uri, char *user)
void set_uri_host (uri_t *uri, char *host)
void set_uri_path (uri_t *uri, char *path)


Detailed Description

Funtions for file URI handling.

Author
peltotal
Date
2007/02/28 08:58:01
Revision
1.11

MAD-FLUTELIB: Implementation of FLUTE protocol. Copyright (c) 2003-2007 TUT - Tampere University of Technology main authors/contacts: jani.peltotalo@tut.fi and sami.peltotalo@tut.fi

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

In addition, as a special exception, TUT - Tampere University of Technology gives permission to link the code of this program with the OpenSSL library (or with modified versions of OpenSSL that use the same license as OpenSSL), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than OpenSSL. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.

Definition in file uri.h.


Typedef Documentation

typedef struct uri uri_t


Function Documentation

uri_t* alloc_uri_struct ( void   ) 

This function allocates memory for uri_t structure.

Returns:
pointer to allocated uri_t structure, NULL in error cases.

Definition at line 595 of file uri.c.

Referenced by encode_directory(), and encode_file().

Here is the caller graph for this function:

void free_uri ( uri_t uri  ) 

This function frees uri_t structure.

Parameters:
uri uri_t structure

Definition at line 714 of file uri.c.

References uri::frag, uri::host, uri::params, uri::passwd, uri::path, uri::port, uri::query, uri::scheme, and uri::user.

Referenced by encode_directory(), encode_file(), fdtbasedrecv(), fdtbasedsend(), free_query_str(), name_incomplete_objects(), receiver_in_ui_mode(), and repair_sender_in_fdt_based_mode().

Here is the caller graph for this function:

char* get_uri_host_and_path ( uri_t uri  ) 

This function returns host and path string (e.g. www.foo.com/foo).

Parameters:
uri uri_t structure
Returns:
pointer to constructed string, NULL in error cases.

Definition at line 747 of file uri.c.

References uri::host, and uri::path.

Referenced by fdtbasedrecv(), main(), name_incomplete_objects(), and receiver_in_ui_mode().

Here is the caller graph for this function:

uri_t* parse_uri ( char *  uri_string,
int  len 
)

This function parses URI string to the uri_t structure.

Parameters:
uri_string URI string
len length of thr URI string
Returns:
pointer to constructed uri_t structure, NULL in error cases.

Definition at line 606 of file uri.c.

References parse_authority(), parse_frag(), parse_path(), and parse_scheme().

Referenced by fdtbasedrecv(), fdtbasedsend(), name_incomplete_objects(), parse_query_string(), receiver_in_ui_mode(), remove_gz_files(), and repair_sender_in_fdt_based_mode().

Here is the call graph for this function:

Here is the caller graph for this function:

void set_uri_host ( uri_t uri,
char *  host 
)

This function sets hostname.

Parameters:
uri uri_t structure
host (sender's) hostname

Definition at line 803 of file uri.c.

References uri::host.

Referenced by encode_directory(), encode_file(), and parse_hostport().

Here is the caller graph for this function:

void set_uri_path ( uri_t uri,
char *  path 
)

This function sets path.

Parameters:
uri uri_t structure
path file path

Definition at line 817 of file uri.c.

References uri::path.

Referenced by encode_directory(), encode_file(), and parse_path().

Here is the caller graph for this function:

void set_uri_scheme ( uri_t uri,
char *  scheme 
)

This function sets scheme.

Parameters:
uri uri_t structure
scheme URI scheme (file, http, ftp...)

Definition at line 775 of file uri.c.

References uri::scheme.

Referenced by encode_directory(), encode_file(), parse_params(), parse_query(), and parse_scheme().

Here is the caller graph for this function:

void set_uri_user ( uri_t uri,
char *  user 
)

This function sets username.

Parameters:
uri uri_t structure
user username

Definition at line 789 of file uri.c.

References uri::user.

Referenced by encode_directory(), encode_file(), and parse_userinfo().

Here is the caller graph for this function:

char* uri_string ( uri_t uri  ) 

This function constructs URI string.

Parameters:
uri uri_t structure
Returns:
pointer to constructed URI string, NULL in error cases.

Definition at line 648 of file uri.c.

References uri::host, uri::path, uri::port, and uri::scheme.

Referenced by encode_directory(), and encode_file().

Here is the caller graph for this function:


Generated on Fri Mar 9 20:08:58 2007 for MAD-FCL by  doxygen 1.5.0