Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

bh_download.h File Reference


Detailed Description

Handles the client-side of the Browse Host function.

Author:
Raphael Manfredi
Date:
2005

#include "common.h"
#include "search.h"
#include "rx.h"
#include "rx_link.h"
#include "rx_inflate.h"
#include "rx_chunk.h"
#include "if/core/wrap.h"
#include "if/core/gnutella.h"

Go to the source code of this file.

Data Structures

struct  browse_ctx

Defines

#define BH_DL_INFLATE   (1 << 0) /**< Inflate input */
 Inflate input.

#define BH_DL_GUNZIP   (1 << 1) /**< gunzip input */
 gunzip input

#define BH_DL_CHUNKED   (1 << 2) /**< Getting chunked data */
 Getting chunked data.


Functions

browse_ctxbrowse_host_dl_create (gpointer owner, gnet_host_t *host, gnet_search_t sh)
 Initialize the browse host context.

void browse_host_dl_free (struct browse_ctx *bc)
 Terminate host browsing.

gboolean browse_host_dl_for_search (struct browse_ctx *bc, gnet_search_t sh)
 Check sure the browse-host context is for the proper search ID.

void browse_host_dl_write (struct browse_ctx *bc, gchar *data, size_t len)
 Received data from outside the RX stack.

gboolean browse_host_dl_receive (struct browse_ctx *bc, gnet_host_t *host, wrap_io_t *wio, const gchar *vendor, guint32 flags)
 Prepare reception of query hit data by building an appropriate RX stack.

bio_sourcebrowse_host_io_source (struct browse_ctx *bc)
 Fetch the I/O source of the RX stack.

void browse_host_dl_close (struct browse_ctx *bc)
 Disable the RX stack.

void browse_host_dl_search_closed (struct browse_ctx *bc, gnet_search_t sh)
 Signal that the corresponding search was closed.


Define Documentation

#define BH_DL_CHUNKED   (1 << 2) /**< Getting chunked data */
 

Getting chunked data.

#define BH_DL_GUNZIP   (1 << 1) /**< gunzip input */
 

gunzip input

#define BH_DL_INFLATE   (1 << 0) /**< Inflate input */
 

Inflate input.


Function Documentation

void browse_host_dl_close struct browse_ctx bc  ) 
 

Disable the RX stack.

struct browse_ctx* browse_host_dl_create gpointer  owner,
gnet_host_t host,
gnet_search_t  sh
 

Initialize the browse host context.

gboolean browse_host_dl_for_search struct browse_ctx bc,
gnet_search_t  sh
 

Check sure the browse-host context is for the proper search ID.

void browse_host_dl_free struct browse_ctx bc  ) 
 

Terminate host browsing.

gboolean browse_host_dl_receive struct browse_ctx bc,
gnet_host_t host,
wrap_io_t wio,
const gchar *  vendor,
guint32  flags
 

Prepare reception of query hit data by building an appropriate RX stack.

Returns:
TRUE if we may continue with the download, FALSE if the search was already closed in the GUI.

void browse_host_dl_search_closed struct browse_ctx bc,
gnet_search_t  sh
 

Signal that the corresponding search was closed.

void browse_host_dl_write struct browse_ctx bc,
gchar *  data,
size_t  len
 

Received data from outside the RX stack.

struct bio_source* browse_host_io_source struct browse_ctx bc  ) 
 

Fetch the I/O source of the RX stack.


Generated on Sun Feb 12 10:49:59 2006 for Gtk-Gnutella by doxygen 1.3.6