source: tags/initial/ORS_COM/ors.aisc

Last change on this file was 2, checked in by oldcode, 23 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 9.7 KB
Line 
1PROJECT ors_server
2OBJECT_KEY ORS,                 # MAIN PREFIX
3MAX_KEY 299,                    # MAX NUMBER OF AN ATTRIBUTE
4MAX_OBJECT 6,                   # MAX DIFFERENT STRUCTURES
5MAX_STRING_LEN 1024,
6MAX_PAR_CNT 16,
7MAGIC_NUMBER 0x87a437,          #       MAGIC_NUMBER 6 HEX DIGITS
8
9SERVER_INCLUDES (~
10#include <stdio.h>
11#include <aisc.h>
12#include <aisc_com.h>~)
13INCLUDE_INCLUDES (~$$(#FILE aisc_include.header)~)
14
15DATA {
16
17# ********************************* USER DATA *******************************************
18
19# ******************************* PRIVAT STRUCTURES: DO NOT CHANGE *********************************
20
21@STRUCT, @SKEY, @SKEYC, @SDOCU;
22
23dll_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
33dll_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
44ORS_local, LOCAL,       2,      (~local communication buffer~), {
45        @TYPE,          @IDENT,         @REF,   @ACC,   @SAVE,  @KEY,                   @KEYC,  @INIT,  @DOCU;
46        dllh,           mh,             t,      ,       ,       (~~),                   0,      ,       (~Header~);
47        int,            socket,         t,      ,       ,       ,                       ,       ors_init_socket(THIS), (~the callback~),        DESTROY ors_destroy_socket(THIS);
48
49        aisc_string,    whoami,         t,      ,       ,       WHOAMI,                 10,     ,       (~ who am i ~);
50        aisc_string,    error,          t,      ,       ,       ERROR,                  11,     "",     (~ error string ~);
51        int,            use_advice,     t,      rw,     ,       USEADVICE,              13,     ,       (~ use the advice ~);
52        bytestring,     query_string,   t,      ,       ,       QUERY_STRING,           14,     ,       (~ query string ~);
53        bytestring,     search_probe,   %,      r,      ,       SEARCH_PROBE,           15,     ,       (~ f:search a probe ~);
54
55        aisc_string,    dailypw,        t,      ,       ,       DAILYPW,                20,     ,       (~ daily password ~);
56        aisc_string,    dailypw_2_userpath,%,   r,      ,       DAILYPW_2_USERPATH,     21,     ,       (~ f:return userpath ~);
57
58        aisc_string,    calc_dailypw,   %,      r,      ,       CALC_DAILYPW,           25,     ,       (~ f:calulate dailypw ~);
59
60        aisc_string,    userpath,       t,      ,       ,       USERPATH,               30,     ,       (~ user's path ~);
61        aisc_string,    username,       t,      ,       ,       USERNAME,               31,     ,       (~ user's fullname ~);
62        aisc_string,    password,       t,      ,       ,       PASSWORD,               32,     ,       (~ user's password ~);
63        aisc_string,    remote_host,    t,      ,       ,       REMOTE_HOST,            33,     ,       (~ remote host ~);
64        aisc_string,    remote_user,    t,      ,       ,       REMOTE_USER,            34,     ,       (~ remote user ~);
65        int,            debug,          t,      ,       ,       DEBUG,                  35,     ,       (~ debug mode ~);
66        int,            user_ta_id,     t,      ,       ,       USER_TA_ID,             36,     ,       (~ field transaction id ~);
67        int,            sel_user_ta_id, t,      ,       ,       SEL_USER_TA_ID,         37,     ,       (~ field transaction id ~);
68        int,            is_superuser,   t,      ,       ,       IS_SUPERUSER,           38,     ,       (~ state of user ~);
69        int,            is_author,      t,      ,       ,       IS_AUTHOR,              39,     ,       (~ state of user ~);
70
71        aisc_string,    user_own_info,  t,      ,       ,       USER_OWN_INFO,          40,     ,       (~ user's own info ~);
72        aisc_string,    user_info,      t,      ,       ,       USER_INFO,              41,     ,       (~ user's info (set by par.user) ~);
73        aisc_string,    mail_addr,      t,      ,       ,       MAIL_ADDR,              42,     ,       (~ user's mail addresses ~);
74        aisc_string,    www_home,       t,      ,       ,       WWW_HOME,               43,     ,       (~ user's www home page ~);
75        int,            max_users,      t,      ,       ,       MAX_USERS,              44,     ,       (~ user's max num of subusers ~);
76        int,            curr_users,     t,      ,       ,       CURR_USERS,             45,     ,       (~ user's current num of subusers ~);
77        int,            max_user_depth, t,      ,       ,       MAX_USER_DEPTH,         46,     ,       (~ user's max depth of own subusers ~);
78        int,            curr_user_depth, t,     ,       ,       CURR_USER_DEPTH,        47,     ,       (~ user's current depth of own subusers ~);
79       
80        aisc_string,    pub_exist_max,   t,     ,       ,       PUB_EXIST_MAX,          50,     ,       (~ max exist.pub ~);
81        aisc_string,    pub_content_max, t,     ,       ,       PUB_CONTENT_MAX,        51,     ,       (~ max content.pub. ~);
82        aisc_string,    pub_exist_def,   t,     ,       ,       PUB_EXIST_DEF,          52,     ,       (~ default e.p. ~);
83        aisc_string,    pub_content_def, t,     ,       ,       PUB_CONTENT_DEF,        53,     ,       (~ default c.p. ~);
84
85        aisc_string,    sel_user,       t,      ,       ,       SEL_USER,               60,     ,       (~ selected user's name (without path) ~);
86        aisc_string,    sel_par_userpath, t,    ,       ,       SEL_PAR_USERPATH,       61,     ,       (~ selected user's path (without name) ~);
87        aisc_string,    sel_userpath,   t,      ,       ,       SEL_USERPATH,           62,     ,       (~ s: user's path ~);
88        aisc_string,    sel_username,   t,      ,       ,       SEL_USERNAME,           63,     ,       (~ s: user's full name ~);
89        aisc_string,    sel_password,   t,      ,       ,       SEL_PASSWORD,           64,     ,       (~ s: user's password ~);
90        aisc_string,    sel_mail_addr,  t,      ,       ,       SEL_MAIL_ADDR,          65,     ,       (~ s: u's mail addresses ~);
91        aisc_string,    sel_user_own_info, t,   ,       ,       SEL_USER_OWN_INFO,      66,     ,       (~ s: u's own info ~);
92        aisc_string,    sel_user_info,  t,      ,       ,       SEL_USER_INFO,          67,     ,       (~ s: u's info (set by par.user) ~);
93        aisc_string,    sel_www_home,   t,      ,       ,       SEL_WWW_HOME,           68,     ,       (~ s: www home page ~);
94        aisc_string,    sel_pub_exist_max, t,   ,       ,       SEL_PUB_EXIST_MAX,      69,     ,       (~ s: max exist.pub ~);
95        aisc_string,    sel_pub_content_max, t, ,       ,       SEL_PUB_CONTENT_MAX,    70,     ,       (~ s: max content.pub. ~);
96        int,            sel_max_users,  t,      ,       ,       SEL_MAX_USERS,          71,     ,       (~ s: max num of subusers. ~);
97        int,            sel_curr_users, t,      ,       ,       SEL_CURR_USERS,         72,     ,       (~ s: max current of subusers. ~);
98        int,            sel_max_user_depth, t,  ,       ,       SEL_MAX_USER_DEPTH,     73,     ,       (~ s: max depth of own subusers. ~);
99        int,            sel_is_superuser, t,    ,       ,       SEL_IS_SUPERUSER,       74,     ,       (~ s: state of ~);
100        int,            sel_is_author,  t,      ,       ,       SEL_IS_AUTHOR,          75,     ,       (~ s: state of ~);
101
102        aisc_string,    work_on_user,   %,      w,      ,       WORK_ON_USER,           80,     ,       (~ f: modify preferences of user ~);
103        aisc_string,    work_on_sel_user, %,    w,      ,       WORK_ON_SEL_USER,       85,     ,       (~ f: create/mod/del sel_user ~);
104        aisc_string,    read_user_field, %,     r,      ,       READ_USER_FIELD,        90,     ,       (~ f: search user data ~);
105        aisc_string,    logout_user,    %,      w,      ,       LOGOUT_USER,            95,     ,       (~ f: logout ~);
106        aisc_string,    fieldname,      t,      ,       ,       FIELDNAME,              100,    ,       (~ field to search for ~);
107        aisc_string,    action,         t,      ,       ,       ACTION,                 101,    ,       (~ action to do (create, delete, ...) ~);
108
109        aisc_string,    os_user_list,   t,      ,       ,       OS_USER_LIST,           102,    ,       (~ list of users ~);
110        aisc_string,    list_type,      t,      ,       ,       LIST_TYPE,              103,    ,       (~ list of users ~);
111        aisc_string,    list_of_users, %,       r,      ,       LIST_OF_USERS,          110,    ,       (~ f: several user lists ~);
112        aisc_string,    get_sel_userdata,  %,   r,      ,       GET_SEL_USERDATA,       115,    ,       (~ f:get sel_user data ~);
113
114
115        int,            probe_ta_id,    t,      ,       ,       PROBE_TA_ID,            148,    ,       (~ field transaction id ~);
116        aisc_string,    probe_field_section, t, ,       ,       PROBE_FIELD_SECTION,    149,    ,       (~ fieldsection of probe data ~);
117        aisc_string,    probe_field_name, t,    ,       ,       PROBE_FIELD_NAME,       150,    ,       (~ fieldname of probe data ~);
118        bytestring,     probe_field_data, t,    ,       ,       PROBE_FIELD_DATA,       151,    ,       (~ one field of probe data ~);
119        aisc_string,    probe_id,       t,      ,       ,       PROBE_ID,               156,    ,       (~ unique id of a probe ~);
120        aisc_string,    search_any_field,  t,   ,       ,       ,                       157,    ,       (~ search field ~);
121        bytestring,     probe_data_list, t,     ,       ,       PROBE_DATA_LIST,        160,    ,       (~ NOT USED list of probe data ~);
122        int,            probe_list_type, t,     ,       ,       PROBE_LIST_TYPE,        161,    ,       (~ type of probe data list ~);
123        int,            probe_list_max_count, t, ,      ,       PROBE_LIST_MAX_COUNT,   162,    ,       (~ maximum count of items in probe list ~);
124        aisc_string,    clear_probe_fields, %,  r,      ,       CLEAR_PROBE_FIELDS,     165,    ,       (~ f: clear all probe fields in server ~);
125        aisc_string,    put_probe_field, %,     w,      ,       PUT_PROBE_FIELD,        170,    ,       (~ f: put probe field into server ~);
126        aisc_string,    work_on_probe,  %,      w,      ,       WORK_ON_PROBE,          175,    ,       (~ f: create/mod/del probe ~);
127        aisc_string,    probe_select,   %,      w,      ,       PROBE_SELECT,           180,    ,       (~ f: select probe via id~);
128        bytestring,     probe_query,    %,      r,      ,       PROBE_QUERY,            185,    ,       (~ f: query probe via fields ~);
129        bytestring,     get_probe_field,  %,    r,      ,       GET_PROBE_FIELD,        190,    ,       (~ f: get field of sel. probe ~);
130        bytestring,     get_probe_list,  %,     r,      ,       GET_PROBE_LIST,         195,    ,       (~ f: get probe data list ~);
131        aisc_string,    probe_user_transfer, %, w,      ,       PROBE_USER_TRANSFER,   200,     ,       (~ f: transfer probes from sel_userp. to string ~);
132        aisc_string,    save_probedb,  %,       w,      ,       SAVE_PROBEDB,           250,    ,       (~ f: save database ~);
133        aisc_string,    save_userdb,  %,        w,      ,       SAVE_USERDB,            255,    ,       (~ f: save database ~);
134        };
135
136OS_pdb_list, PDB_LIST,  3,      (~local communication buffer~), {
137        @TYPE,          @IDENT,         @REF,   @ACC,   @SAVE,  @KEY,                   @KEYC,  @INIT,  @DOCU;
138        dllh,           mh,             t,      ,       ,       ,                       0,      ,       (~Header~);
139        aisc_string,    section,        t,      ,       ,       ,                       ,       ,       (~ section or "" ~);
140        aisc_string,    name,           t,      ,       ,       ,                       ,       ,       (~ field name ~);
141        aisc_string,    db_name,        t,      ,       ,       ,                       ,       ,       (~ section + field as name for probedb ~);
142        aisc_string,    typ,            t,      ,       ,       ,                       ,       ,       (~ input type ~);
143        int,            width,          t,      ,       ,       ,                       ,       ,       (~ width ~);
144        int,            height,         t,      ,       ,       ,                       ,       ,       (~ height ~);
145        aisc_string,    rights,         t,      ,       ,       ,                       ,       ,       (~ RWE... ~);
146        aisc_string,    init,           t,      ,       ,       ,                       ,       ,       (~ string ~);
147        aisc_string,    label,          t,      ,       ,       ,                       ,       ,       (~ display label ~);
148        aisc_string,    help_page,      t,      ,       ,       ,                       ,       ,       (~ html help page ~);
149        aisc_string,    features,       t,      ,       ,       ,                       ,       ,       (~ feature tokens list " " ~);
150        aisc_string,            content,        t,      ,       ,       ,                       ,       ,       (~ content, read from cgi_var etc. ~);
151        };
152
153ORS_main, MAIN, 1, (~Die globalen Daten~), SAVEDIRECTION VERTICAL, {
154        @TYPE,  @IDENT,         @REF,   @ACC,   @SAVE,  @KEY,           @KEYC,  @INIT,          @DOCU;
155        t_key,  key,            t,      n,      ,       ,               ,       ,               (~Der KEY~);
156        ORS_local,loc_st,       d,      ,       ,       LOCAL,          10,     ,               (~Die Parameter~);
157        OS_pdb_list,pdb_list,   d,      ,       ,       ,               ,       ,               (~Die Liste der Datenbank Felder~);
158        int,    touched,        t,      r,      ,       TOUCHED,        19,     0,              (~ Do the database need to be saved ~);
159        long,   pwds,           t,      r,      ,       ,               ,       0,              (~ The daily pw database ~);
160    aisc_string,server_shutdown, %,      w,      ,       SHUTDOWN,       20,     ,               (~SHUTDOWN Command~);
161    int,        server_save,    %,      w,      ,       SAVEALL,        21,     ,               (~SAVE everything~);
162        aisc_string,server_file,        t,      r,      ,       FILENAME,       22,     ,               (~The filename of the keys~);
163        };
164};
Note: See TracBrowser for help on using the repository browser.