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

features.c File Reference


Detailed Description

Header parsing routines.

Author:
Raphael Manfredi
Date:
2001-2003

#include "common.h"
#include "features.h"
#include "lib/walloc.h"
#include "lib/header.h"
#include "lib/misc.h"
#include "lib/glib-missing.h"
#include "if/gnet_property_priv.h"
#include "lib/override.h"

Data Structures

struct  header_x_feature

Functions

 RCSID ("$Id:features.c, v 1.12 2005/08/15 13:07:51 rmanfredi Exp $")
void features_close (void)
void header_features_add (struct xfeature_t *xfeatures, gchar *feature_name, int feature_version_major, int feature_version_minor)
 Add support for feature_name with the specified version to the X-Features header.

void header_features_cleanup (struct xfeature_t *xfeatures)
 Removes all memory used by the header_features_add.

void header_features_generate (struct xfeature_t *xfeatures, gchar *buf, size_t len, size_t *rw)
 Adds the X-Features header to a HTTP request.

void header_get_feature (const gchar *feature_name, const header_t *header, guint *feature_version_major, guint *feature_version_minor)
 Retrieves the major and minor version from a feature in the X-Features header, if no support was found both major and minor are 0.


Variables

xfeatures_t xfeatures


Function Documentation

void features_close void   ) 
 

void header_features_add struct xfeature_t xfeatures,
gchar *  feature_name,
int  feature_version_major,
int  feature_version_minor
 

Add support for feature_name with the specified version to the X-Features header.

void header_features_cleanup struct xfeature_t xfeatures  ) 
 

Removes all memory used by the header_features_add.

void header_features_generate struct xfeature_t xfeatures,
gchar *  buf,
size_t  len,
size_t *  rw
 

Adds the X-Features header to a HTTP request.

Parameters:
xfeatures structure holding the collected features
buf should point to the beginning of the header.
len no brief description.
rw the number of bytes that were already written.
*rw is changed too *rw + bytes written

void header_get_feature const gchar *  feature_name,
const header_t header,
guint *  feature_version_major,
guint *  feature_version_minor
 

Retrieves the major and minor version from a feature in the X-Features header, if no support was found both major and minor are 0.

RCSID "$Id:features.  c,
v 1.12 2005/08/15 13:07:51 rmanfredi Exp $" 
 


Variable Documentation

xfeatures_t xfeatures
 


Generated on Sun Feb 12 10:50:00 2006 for Gtk-Gnutella by doxygen 1.3.6