X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/blobdiff_plain/d1b3a4bfd613d84e0afcc3ba2f33bd585f3ebbe6..668277bebdb304516895a949e8d01503bd859331:/server/query.h diff --git a/server/query.h b/server/query.h index 735f43a4..d193c78a 100644 --- a/server/query.h +++ b/server/query.h @@ -15,6 +15,7 @@ struct query { char *name; /* query name */ char *shortname; /* abbreviated query name (must be 4 chars) */ + int version; /* query version */ enum query_type type; /* query type */ char *rvar; /* range variable */ enum tables rtable; /* range table */ @@ -51,7 +52,7 @@ struct validate /* Validated Object Types */ enum vo_type {V_NAME, V_ID, V_TYPE, V_TYPEDATA, V_RENAME, V_CHAR, - V_WILD, V_UPWILD, V_LEN, V_NUM}; + V_LEN, V_NUM}; /* Validated Object Definition */ struct valobj @@ -64,16 +65,6 @@ struct valobj int error; }; - -/* prototypes from cache.dc */ -void flush_cache(void); -int name_to_id(char *name, enum tables type, int *id); -int id_to_name(int id, enum tables type, char **name); -int cache_entry(char *name, enum tables type, int id); -void flush_name(char *name, enum tables type); -void cache_commit(void); -void cache_abort(void); - /* prototypes from increment.dc */ void incremental_before(enum tables table, char *qualx, char **argv); void incremental_clear_before(void); @@ -83,10 +74,12 @@ void incremental_clear_after(void); /* prototypes from qrtn.dc */ int check_query_access(struct query *q, char *argv[], client *cl); int set_next_object_id(char *objectx, enum tables table, int limit); +int name_to_id(char *name, enum tables type, int *id); +int id_to_name(int id, enum tables type, char **name); /* prototypes from qsubs.c */ -void list_queries(int (*action)(int, char *[], void *), +void list_queries(client *cl, int (*action)(int, char *[], void *), void *actarg); void help_query(struct query *q, int (*action)(int, char *[], void *), void *actarg); -struct query *get_query_by_name(char *name); +struct query *get_query_by_name(char *name, int version);