Galago - desktop presence framework

galago-list.h

Go to the documentation of this file.
00001 
00021 #ifndef _GALAGO_LIST_H_
00022 #define _GALAGO_LIST_H_
00023 
00024 typedef struct _GalagoList GalagoList;
00025 
00026 #include <libgalago/galago-types.h>
00027 
00031 struct _GalagoList
00032 {
00033     GalagoList *prev;
00034     GalagoList *next;
00035 
00036     void  *data;
00037 };
00038 
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042 
00048 GalagoList *galago_list_new(void);
00049 
00057 void galago_list_destroy(GalagoList *list);
00058 
00066 void galago_list_destroy_1(GalagoList *list);
00067 
00075 GalagoList *galago_list_dup(const GalagoList *list);
00076 
00085 GalagoList *galago_list_append(GalagoList *list, void *data);
00086 
00095 GalagoList *galago_list_prepend(GalagoList *list, void *data);
00096 
00105 GalagoList *galago_list_remove(GalagoList *list, void *data);
00106 
00117 GalagoList *galago_list_remove_link(GalagoList *list, GalagoList *link);
00118 
00127 GalagoList *galago_list_delete_link(GalagoList *list, GalagoList *link);
00128 
00137 GalagoList *galago_list_find(GalagoList *list, void *data);
00138 
00146 void galago_list_foreach(const GalagoList *list, GalagoForEachFunc func,
00147                          void *user_data);
00148 
00156 GalagoList *galago_list_get_first(GalagoList *list);
00157 
00165 GalagoList *galago_list_get_last(GalagoList *list);
00166 
00174 GalagoList *galago_list_get_prev(GalagoList *list);
00175 
00183 GalagoList *galago_list_get_next(GalagoList *list);
00184 
00192 void *galago_list_get_data(GalagoList *list);
00193 
00201 size_t galago_list_get_count(const GalagoList *list);
00202 
00203 #ifdef __cplusplus
00204 }
00205 #endif
00206 
00207 #endif /* _GALAGO_LIST_H_ */