Main Page   Compound List   File List   Compound Members   File Members   Related Pages  

core.h

Go to the documentation of this file.
00001 
00004 #ifndef GALE_CORE_H
00005 #define GALE_CORE_H
00006 
00007 #include "gale/types.h"
00008 #include "oop.h"
00009 
00019 void gale_init(const char *name,int argc,char * const *argv);
00020 
00026 void gale_init_signals(oop_source *oop);
00027 
00029 struct gale_text gale_var(struct gale_text name);
00030 
00032 void gale_set(struct gale_text var,struct gale_text value);
00033 
00034 struct gale_environ;
00035 
00039 struct gale_environ *gale_save_environ(void);
00040 
00044 void gale_restore_environ(struct gale_environ *env);
00045 
00046 #ifndef VERSION
00047 #error You must define VERSION.
00048 #endif
00049 
00052 #define GALE_BANNER ( \
00053 "Gale version " VERSION ", copyright 1997-2001 Dan Egnor\n" \
00054 "This software comes with ABSOLUTELY NO WARRANTY.  You may redistribute\n" \
00055 "it under certain conditions.  Run \"gale-config --license\" for information." \
00056 )
00057 
00060 struct gale_packet {
00062         struct gale_text routing;
00064         struct gale_data content;
00065 };
00066 
00072 
00073 struct gale_link;
00074 
00076 static const int gale_port = 11512;
00077 
00078 struct gale_link *new_link(struct oop_source *oop);
00079 void delete_link(struct gale_link *);
00080 void link_shutdown(struct gale_link *);
00081 void link_set_fd(struct gale_link *,int fd);
00082 int link_get_fd(struct gale_link *);
00083 
00084 void link_on_error(struct gale_link *,
00085      void *(*)(struct gale_link *,int,void *),
00086      void *);
00087 
00088 void link_put(struct gale_link *,struct gale_packet *);
00089 void link_will(struct gale_link *,struct gale_packet *);
00090 void link_subscribe(struct gale_link *,struct gale_text spec);
00091 
00092 int link_queue_num(struct gale_link *);
00093 size_t link_queue_mem(struct gale_link *);
00094 struct gale_time link_queue_time(struct gale_link *);
00095 void link_queue_drop(struct gale_link *);
00096 
00097 void link_on_empty(struct gale_link *, 
00098      void *(*)(struct gale_link *,void *),
00099      void *);
00100 void link_on_message(struct gale_link *,
00101      void *(*)(struct gale_link *,struct gale_packet *,void *),
00102      void *);
00103 void link_on_will(struct gale_link *,
00104      void *(*)(struct gale_link *,struct gale_packet *,void *),
00105      void *);
00106 void link_on_subscribe(struct gale_link *,
00107      void *(*)(struct gale_link *,struct gale_text,void *),
00108      void *);
00115 void ltx_publish(struct gale_link *,struct gale_text spec);
00116 void ltx_watch(struct gale_link *,struct gale_text category);
00117 void ltx_forget(struct gale_link *,struct gale_text category);
00118 void ltx_complete(struct gale_link *,struct gale_text category);
00119 void ltx_assert(struct gale_link *,struct gale_text cat,struct gale_data cid);
00120 void ltx_retract(struct gale_link *,struct gale_text cat,struct gale_data cid);
00121 void ltx_fetch(struct gale_link *,struct gale_data cid);
00122 void ltx_miss(struct gale_link *,struct gale_data cid);
00123 void ltx_supply(struct gale_link *,struct gale_data cid,struct gale_data data);
00124 
00125 int lrx_publish(struct gale_link *,struct gale_text *spec);
00126 int lrx_watch(struct gale_link *,struct gale_text *category);
00127 int lrx_forget(struct gale_link *,struct gale_text *category);
00128 int lrx_complete(struct gale_link *,struct gale_text *category);
00129 int lrx_assert(struct gale_link *,struct gale_text *cat,struct gale_data *cid);
00130 int lrx_retract(struct gale_link *,struct gale_text *cat,struct gale_data *cid);
00131 int lrx_fetch(struct gale_link *,struct gale_data *cid);
00132 int lrx_miss(struct gale_link *,struct gale_data *cid);
00133 int lrx_supply(struct gale_link *,struct gale_data *cid,struct gale_data *data);
00136 #endif

Generated at Sun Sep 7 13:55:26 2003 for Gale by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000