Commit aa95e5e5 authored by Per Cederqvist's avatar Per Cederqvist

Moved the comments before what they comment.

parent 02bbbae1
/*
* $Id: cache.h,v 0.12 1994/02/20 14:14:15 law Exp $
* $Id: cache.h,v 0.13 1994/02/20 16:21:15 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -32,100 +32,103 @@ struct matching_info *match_table;
/******** initiation and shutdown of cache *******************************/
Success init_cache(void);
/* initiate cache (called at initiation/startup of server) */
Success init_cache(void);
void free_all_cache(void);
/* flush, shutdown cache and free all cache memory (called at shutdown) */
void free_all_cache(void);
void cache_emergency_exit(void);
/* dump emergency files, etc, if possible */
void cache_emergency_exit(void);
/******** miscellanous cache master routines *****************************/
void cache_limit_size(void);
/* end-of-atomic, may clear read entries */
void cache_limit_size(void);
void cache_sync(void);
/* flush all, dont wait for disk */
void cache_sync(void);
Bool sync_part(void);
/* sync timout routine, TRUE=>long timeout before next */
Bool sync_part(void);
void cache_sync_all(void);
/* flush all & wait until disk is synced */
void cache_sync_all(void);
void tell_cache_garb_text(int running);
/* tell cache that garb_text is in progress, ie never flush cache */
void tell_cache_garb_text(int running);
/* dump cache statistics etc */
void dump_cache_stats(FILE *stat_file);
void dump_cache_mem_usage(FILE *stat_file);
/* dump cache statistics etc */
/******** object manipulation routines ***********************************/
/* mark as changed (object is to be re-written to disk) */
void mark_person_as_changed(Pers_no pers);
void mark_text_as_changed(Text_no text);
void mark_conference_as_changed(Conf_no conf);
/* mark as changed (object is to be re-written to disk) */
/* lock (do never remove object from memory) & unlock */
void cached_lock_conf(Conf_no conf);
void cached_unlock_conf(Conf_no conf);
void cached_lock_person(Pers_no pers);
void cached_unlock_person(Pers_no pers);
/* lock (do never remove object from memory) & unlock */
/* create object (returns FALSE if person existed) */
Success cached_create_person(Pers_no pers);
Conf_no cached_create_conf(String name);
Text_no cached_create_text(const String message);
/* create object (returns FALSE if person existed) */
/* get object from database */
Person *cached_get_person_stat(Pers_no person);
Conference *cached_get_conf_stat(Conf_no conf);
Text_stat *cached_get_text_stat(Text_no text);
/* get object from database */
String cached_get_text(Text_no text);
/* return text. String is to be freed by caller */
String cached_get_text(Text_no text);
/* remove object from database */
Success cached_delete_person(Pers_no pers);
Success cached_delete_text(Text_no text);
Success cached_delete_conf(Conf_no conf);
/* remove object from database */
/* return number of next existing object */
Pers_no traverse_person(Pers_no sead);
Conf_no traverse_conference(Conf_no sead);
Text_no traverse_text(Text_no sead);
/* return number of next existing object */
Text_no query_next_text_num(void);
/* returns highest text_num +1 */
Text_no query_next_text_num(void);
/******** misc conference routines **************************************/
void cached_change_name(Conf_no conf,String new_name);
/* change conferance name
/* Change conferance name.
cached_change_name(foo,EMPTY_STRING);
is used when a conference is deleted */
is used when a conference is deleted. */
void cached_change_name(Conf_no conf,String new_name);
Bool cached_conf_exists(Conf_no conf);
/* returns TRUE when a conference exists */
Bool cached_conf_exists(Conf_no conf);
Conf_type cached_get_conf_type(Conf_no conf);
/* returns conference type
/* returns conference type.
conf_type is set when mark_conference_as_changed is called (?) */
Conf_type cached_get_conf_type(Conf_no conf);
Garb_nice cached_get_garb_nice(Conf_no conf);
/* Get garb_nice from smallconf */
Garb_nice cached_get_garb_nice(Conf_no conf);
String cached_get_name(Conf_no conf);
/* returns conference name from smallconf */
String cached_get_name(Conf_no conf);
Local_text_no cached_get_highest_local_no(Conf_no conf);
/* returns highes text number in a certain conference */
Local_text_no cached_get_highest_local_no(Conf_no conf);
Success cached_lookup_name(const String name,Conf_list_old *result);
/* match from name => conf_list_old */
Success cached_lookup_name(const String name,Conf_list_old *result);
/* How many conferences exists? */
Conf_no cached_no_of_existing_conferences(void);
/******** miscellanous wierd routines ************************************/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment