http_file_repair.h File Reference

Point-to-point file repair. More...

#include "../alclib/defines.h"
#include "flute_defines.h"
#include "flute.h"
#include <curl/curl.h>
#include <curl/types.h>
#include <curl/easy.h>

Include dependency graph for http_file_repair.h:

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

Go to the source code of this file.

Data Structures

struct  chunk

Typedefs

typedef chunk chunk_t

Functions

size_t write_to_buffer (void *ptr, size_t size, size_t nmemb, void *a)
char * http_file_repair (flute_receiver_t *receiver, int openfile, int *retval, CURL *curl, char *serviceURI)


Detailed Description

Point-to-point file repair.

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

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 http_file_repair.h.


Typedef Documentation

typedef struct chunk chunk_t


Function Documentation

char* http_file_repair ( flute_receiver_t receiver,
int  openfile,
int *  retval,
CURL *  curl,
char *  serviceURI 
)

This function handles PTP file repair.

Parameters:
receiver pointer to structure containing receiver information
openfile open received file automatically
retval stores return value
curl libcurl handle
serviceURI post file repair serviceURI
Returns:
session description for the PTMP repair session if 302 response received, NULL otherwise

Definition at line 611 of file http_file_repair.c.

References trans_obj::block_list, block_ready_to_decode(), trans_obj::bs, compute_blocking_structure(), create_object(), file::encoding, file::es_len, trans_obj::es_len, trans_unit::esi, trans_obj::fd, flute_receiver::fdt, file::fec_enc_id, trans_obj::fec_enc_id, file::fec_inst_id, trans_obj::fec_inst_id, file, fdt::file_list, get_alc_session(), get_session_basedir(), get_session_obj_list(), GZ_SUFFIX, insert_object(), trans_block::k, trans_obj::len, file::location, MAX_HTTP_URL_LENGTH, MAX_PATH_LENGTH, file::max_sb_len, trans_obj::max_sb_len, blocking_struct::N, trans_block::nb_of_rx_units, file::next, trans_unit::next, trans_obj::next, parse_data(), flute_receiver::rx_automatic, flute_receiver::s_id, trans_block::sbn, file::status, trans_obj::tmp_filename, trans_obj::toi, file::toi, file::transfer_len, trans_block::unit_list, flute_receiver::verbosity, and write_to_buffer().

Referenced by flute_receiver_report().

Here is the call graph for this function:

Here is the caller graph for this function:

size_t write_to_buffer ( void *  ptr,
size_t  size,
size_t  nmemb,
void *  a 
)

This function writes received data to the buffer.

Parameters:
ptr pointer to the received data (it will not be zero terminated)
size the size of the data is size multiplied with nmemb
nmemb the size of the data is size multiplied with nmemb
a stores recveived data
Returns:
number of bytes written

Definition at line 590 of file http_file_repair.c.

References chunk::data, and chunk::size.

Referenced by flute_receiver_report(), and http_file_repair().

Here is the caller graph for this function:


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