| 1 | PROJECT arboo_server |
|---|
| 2 | OBJECT_KEY AN, # MAIN PREFIX |
|---|
| 3 | MAX_KEY 40, # MAX NUMBER OF AN ATTRIBUTE |
|---|
| 4 | MAX_OBJECT 6, # MAX DIFFERENT STRUCTURES |
|---|
| 5 | MAX_STRING_LEN 1024, |
|---|
| 6 | MAX_PAR_CNT 16, |
|---|
| 7 | MAGIC_NUMBER 0x927289, # MAGIC_NUMBER 6 HEX DIGITS |
|---|
| 8 | |
|---|
| 9 | SERVER_INCLUDES (~ |
|---|
| 10 | #include <stdio.h> |
|---|
| 11 | #include <aisc.h> |
|---|
| 12 | #include <aisc_com.h>~) |
|---|
| 13 | INCLUDE_INCLUDES (~$$(#FILE aisc_include.header)~) |
|---|
| 14 | |
|---|
| 15 | DATA { |
|---|
| 16 | |
|---|
| 17 | # ********************************* USER DATA ******************************************* |
|---|
| 18 | |
|---|
| 19 | # ******************************* PRIVAT STRUCTURES: DO NOT CHANGE ********************************* |
|---|
| 20 | |
|---|
| 21 | @STRUCT, @SKEY, @SKEYC, @SDOCU; |
|---|
| 22 | |
|---|
| 23 | dll_public, , , (~Vater einer DoubledLinkedList dll~), { |
|---|
| 24 | @TYPE, @IDENT, @REF, @ACC, @SAVE, @KEY, @KEYC, @INIT, @DOCU; |
|---|
| 25 | t_key, key, t, r, , , , , (~ The key~); |
|---|
| 26 | int, cnt, t, r, , CNT, 0, , (~ Number of elements~); |
|---|
| 27 | long, hash, t, , , , , , (~ Hash Table~); |
|---|
| 28 | dllheader_ext, parent, flt, r, , PARENT, 1, , (~ My Owner~); |
|---|
| 29 | dllheader_ext, last, flt, r, , LAST, 2, , (~ Pointer to the last element~); |
|---|
| 30 | }; |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | dll_header, COMMON, 0, (~Der Link Header (sollte Kopf jeder Funktion sein)~), { |
|---|
| 34 | @TYPE, @IDENT, @REF, @ACC, @SAVE, @KEY, @KEYC, @INIT, @DOCU; |
|---|
| 35 | t_key, key, t, r, , KEY, 0, , (~ The Key~); |
|---|
| 36 | aisc_string, aisc_get_keystring, %, r, , KEYSTRING, 1, , (~ THE STRING of the KEY ~); |
|---|
| 37 | dll_public, parent, ls, r, , (~~), 2, , (~ Pointer to dll_public~); |
|---|
| 38 | aisc_string, ident, t, , 1, IDENT, 5, , (~ The ident [not necessary]~); |
|---|
| 39 | }; |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | # ********************************* USER STRUCTURES ******************************************* |
|---|
| 43 | |
|---|
| 44 | AN_revers, REVERS, 4, (~ Revers mapping for shorts ~), { |
|---|
| 45 | @TYPE, @IDENT, @REF, @ACC, @SAVE, @KEY, @KEYC, @INIT, @DOCU; |
|---|
| 46 | dllh, mh, t, , 1, (~~), 0, , (~Header~); |
|---|
| 47 | aisc_string, full_name, t, rw, , , , , (~ the full name of a species ~); |
|---|
| 48 | aisc_string, acc, t, rw, , , , , (~ accession number ~); |
|---|
| 49 | aisc_string, add_id, t, rw, , , , , (~ additional id data ~); |
|---|
| 50 | }; |
|---|
| 51 | |
|---|
| 52 | AN_shorts, SHORTS, 3, (~ a dictionary ~), SAVEDIRECTION HORIZONTAL, { |
|---|
| 53 | @TYPE, @IDENT, @REF, @ACC, @SAVE, @KEY, @KEYC, @INIT, @DOCU; |
|---|
| 54 | dllh, mh, t, , 1, (~~), 0, , (~Header~); |
|---|
| 55 | aisc_string, full_name, t, r, 1, FULL_NAME, 10, , (~ the full name of a species ~); |
|---|
| 56 | aisc_string, acc, t, r, 1, ACC, 11, , (~ accession number ~); |
|---|
| 57 | aisc_string, add_id, t, r, 1, ADDID, 12, , (~ additional id data ~); |
|---|
| 58 | aisc_string, shrt, t, r, 1, SHORT, 13, , (~ The Short ~); |
|---|
| 59 | }; |
|---|
| 60 | |
|---|
| 61 | |
|---|
| 62 | # called from code using id AN_LOCAL |
|---|
| 63 | # single functions: LOCAL_GET_SHORT LOCAL_DEL_SHORT |
|---|
| 64 | |
|---|
| 65 | AN_local, LOCAL, 2, (~local communication buffer~), { |
|---|
| 66 | @TYPE, @IDENT, @REF, @ACC, @SAVE, @KEY, @KEYC, @INIT, @DOCU; |
|---|
| 67 | dllh, mh, t, , , (~~), 0, , (~Header~); |
|---|
| 68 | int, socket, t, , , , , names_init_socket(THIS), (~the callback~), DESTROY names_destroy_socket(THIS); |
|---|
| 69 | aisc_string, whoami, t, , , WHOAMI, 10, , (~ who am i ~); |
|---|
| 70 | aisc_string, full_name, t, rw, , FULL_NAME, 11, "", (~ the full name of a species ~); |
|---|
| 71 | aisc_string, acc, t, rw, , ACCESSION, 12, "", (~ accession number ~); |
|---|
| 72 | aisc_string, add_id, t, rw, , ADDID, 13, "", (~ additional id data ~); |
|---|
| 73 | int, use_advice, t, rw, , USEADVICE, 14, , (~ use the advice ~); |
|---|
| 74 | aisc_string, advice, t, rw, , ADVICE, 15, "", (~ advice for the short name ~); |
|---|
| 75 | aisc_string, get_short, %, r, , GET_SHORT, 16, , (~ get a short name ~); |
|---|
| 76 | int, del_short, %, r, , DEL_SHORT, 17, , (~ forget stored short name ~); |
|---|
| 77 | }; |
|---|
| 78 | |
|---|
| 79 | |
|---|
| 80 | # called from code using id AN_MAIN |
|---|
| 81 | # single functions: MAIN_SHUTDOWN MAIN_SAVEALL |
|---|
| 82 | |
|---|
| 83 | AN_main, MAIN, 1, (~Die globalen Daten~), SAVEDIRECTION VERTICAL, { |
|---|
| 84 | @TYPE, @IDENT, @REF, @ACC, @SAVE, @KEY, @KEYC, @INIT, @DOCU; |
|---|
| 85 | t_key, key, t, n, , , , , (~Der KEY~); |
|---|
| 86 | AN_local, loc_st, d, , , LOCAL, 10, , (~Die Parameter~); |
|---|
| 87 | AN_shorts, shorts1, d, r, 1, SHORTS1, 12, , (~ the unique letters for a word ~); |
|---|
| 88 | AN_shorts, names, d, r, 1, NAMES, 16, , (~ the unique names first*second*S*accession ~); |
|---|
| 89 | AN_revers, revers, d, r, , , , , (~ the revers unique names first*second*S*accession ~); |
|---|
| 90 | int, touched, t, r, , TOUCHED, 19, 0, (~ Does the database need to be saved ~); |
|---|
| 91 | aisc_string, server_shutdown, %, w, , SHUTDOWN, 20, , (~SHUTDOWN Command~); |
|---|
| 92 | int, server_save, %, w, , SAVEALL, 21, , (~SAVE everything~); |
|---|
| 93 | aisc_string, server_file, t, r, , FILENAME, 22, , (~The filename of the keys~); |
|---|
| 94 | int, server_filedate, t, , , FILEDATE, 23, , (~The filedate of server_file~); |
|---|
| 95 | int, dbversion, t, , 1, DBVERSION, 24, 4, (~Nameserver database version ~); |
|---|
| 96 | aisc_string, add_field, t, r, 1, ADD_FIELD, 25, , (~additional field used for identification ~); |
|---|
| 97 | aisc_string, add_field_default, t, r, 1, AF_DEFAULT, 26, , (~default value for add_field, if field is missing ~); |
|---|
| 98 | long, prefix_hash, t, , , , , 0, (~prefix hash table~) |
|---|
| 99 | }; |
|---|
| 100 | }; |
|---|