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

fifo.h File Reference


Detailed Description

A FIFO.

Author:
Raphael Manfredi
Date:
2004

#include <glib.h>

Go to the source code of this file.

Data Structures

struct  fifo

Typedefs

typedef fifo fifo_t
typedef void(* fifo_free_t )(gpointer item, gpointer udata)

Functions

fifo_tfifo_make (void)
 Create new FIFO.

void fifo_free (fifo_t *f)
 Destroy FIFO.

void fifo_free_all (fifo_t *f, fifo_free_t cb, gpointer udata)
 Destroy FIFO, invoking freeing callback on all items still held.

gint fifo_count (fifo_t *f)
 Returns amount of items queued in FIFO.

void fifo_put (fifo_t *f, gconstpointer data)
 Add entry to FIFO.

gpointer fifo_remove (fifo_t *f)
 Remove entry from FIFO.


Typedef Documentation

typedef void(* fifo_free_t)(gpointer item, gpointer udata)
 

typedef struct fifo fifo_t
 


Function Documentation

gint fifo_count fifo_t f  ) 
 

Returns amount of items queued in FIFO.

void fifo_free fifo_t f  ) 
 

Destroy FIFO.

void fifo_free_all fifo_t f,
fifo_free_t  cb,
gpointer  udata
 

Destroy FIFO, invoking freeing callback on all items still held.

Parameters:
f the FIFO to free
cb the freeing callback to invoke on all items.
udata the extra user data passed as-is to the freeing callback.

fifo_t* fifo_make void   ) 
 

Create new FIFO.

void fifo_put fifo_t f,
gconstpointer  data
 

Add entry to FIFO.

gpointer fifo_remove fifo_t f  ) 
 

Remove entry from FIFO.

Returns:
the oldest item still held in FIFO, NULL if no item remains.


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