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

features.h File Reference


Detailed Description

Header parsing routines.

Author:
Raphael Manfredi
Date:
2001-2003

#include "common.h"
#include "lib/header.h"

Go to the source code of this file.

Enumerations

enum  xfeature_t { FEATURES_DOWNLOADS, FEATURES_UPLOADS, FEATURES_CONNECTIONS, NUM_FEATURES }

Functions

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.
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 features_close (void)
void header_features_generate (xfeature_t xf, gchar *buf, size_t len, size_t *rw)
 Adds the X-Features header to a HTTP request.


Enumeration Type Documentation

enum xfeature_t
 

Enumeration values:
FEATURES_DOWNLOADS 
FEATURES_UPLOADS 
FEATURES_CONNECTIONS 
NUM_FEATURES 


Function Documentation

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.

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