Main Page | Modules | Alphabetical List | Data Structures | Directories | 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
struct  features

Functions

featuresfeatures_get (xfeature_t xf)
void header_features_cleanup (xfeature_t xf)
 Removes all memory used by the header_features_add.
void features_close (void)
void header_features_add (xfeature_t xf, const 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_generate (xfeature_t xf, gchar *dst, size_t len, size_t *rw)
 Adds the X-Features header to a HTTP request.
gboolean 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 and FALSE is returned.


Function Documentation

void features_close void   ) 
 

struct features* features_get xfeature_t  xf  )  [static]
 

void header_features_add xfeature_t  xf,
const 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 xfeature_t  xf  )  [static]
 

Removes all memory used by the header_features_add.

void header_features_generate xfeature_t  xf,
gchar *  dst,
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

gboolean 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 and FALSE is returned.


Generated on Sat Jun 30 17:53:26 2007 for gtk-gnutella by  doxygen 1.3.9.1