a2cd402001-03-24Martin Nilsson // $Id: module.h,v 1.49 2001/03/24 01:22:13 nilsson Exp $
b1fca01996-11-12Per Hedbor #ifndef ROXEN_MODULE_H #define ROXEN_MODULE_H
55a8662000-11-20Per Hedbor /* #include "config.h" */ #include <roxen.h>
a1257f2000-07-09Per Hedbor // compat #define QUERY(var) query( #var )
b1fca01996-11-12Per Hedbor  // Like query, but for global variables.
cb9aab1999-03-27Henrik Grubbström (Grubba) #ifdef IN_ROXEN
a1257f2000-07-09Per Hedbor #define GLOBVAR(x) query( #x )
cb9aab1999-03-27Henrik Grubbström (Grubba) #else /* !IN_ROXEN */
a1257f2000-07-09Per Hedbor #define GLOBVAR(x) roxenp()->query(#x)
cb9aab1999-03-27Henrik Grubbström (Grubba) #endif /* IN_ROXEN */
b1fca01996-11-12Per Hedbor 
c8eaf12000-03-06Martin Nilsson #define CACHE(seconds) ([mapping(string:mixed)]id->misc)->cacheable=min(([mapping(string:mixed)]id->misc)->cacheable,seconds) #define NOCACHE() ([mapping(string:mixed)]id->misc)->cacheable=0
ffae402000-04-17Martin Nilsson #define TAGDOCUMENTATION mapping tagdocumentation(){return [mapping]get_value_from_file(__FILE__,"tagdoc","#define manual\n");}
d32cfe2000-03-28Martin Nilsson  #define ROXEN_MAJOR_VERSION 2
6598b52000-09-24Martin Nilsson #define ROXEN_MINOR_VERSION 2
d32cfe2000-03-28Martin Nilsson 
4f4a962000-07-04Per Hedbor  #define TYPE_STRING 1 #define TYPE_FILE 2 #define TYPE_INT 3 #define TYPE_DIR 4 #define TYPE_STRING_LIST 5 #define TYPE_MULTIPLE_STRING 5 #define TYPE_INT_LIST 6 #define TYPE_MULTIPLE_INT 6 #define TYPE_FLAG 7 #define TYPE_TOGGLE 7 #define TYPE_DIR_LIST 9 #define TYPE_FILE_LIST 10 #define TYPE_LOCATION 11 #define TYPE_TEXT_FIELD 13 #define TYPE_TEXT 13 #define TYPE_PASSWORD 14 #define TYPE_FLOAT 15 #define TYPE_MODULE 17 #define TYPE_FONT 19 #define TYPE_CUSTOM 20 #define TYPE_URL 21 #define TYPE_URL_LIST 22 #define VAR_TYPE_MASK 255 #define VAR_EXPERT 256 #define VAR_MORE 512 #define VAR_DEVELOPER 1024 #define VAR_INITIAL 2048
82f9da2000-09-16Per Hedbor #define VAR_NOT_CFIF 4096
c29b0b2000-12-08Martin Nilsson #define VAR_INVISIBLE 8192
4f4a962000-07-04Per Hedbor 
332c482000-11-02Per Hedbor #define VAR_PUBLIC 8192
4f4a962000-07-04Per Hedbor #define MOD_ALLOW 1 #define MOD_USER 2 #define MOD_DENY 3 #define MOD_PROXY_USER 4 #define MOD_ACCEPT 5 #define MOD_ACCEPT_USER 6 #define MOD_ACCEPT_PROXY_USER 7
8ab8bf2001-03-13Martin Nilsson  #define ENCODE_RXML_INT(value, type) \ (type && type != RXML.t_int ? type->encode ((value), RXML.t_int) : (value)) #define ENCODE_RXML_FLOAT(value, type) \
a2cd402001-03-24Martin Nilsson  ((value) ? (type && type != RXML.t_float ? type->encode ((value), RXML.t_float) : (value)) : RXML.nil)
f55a012001-03-14Martin Stjernholm #define ENCODE_RXML_TEXT(value, type) \
a2cd402001-03-24Martin Nilsson  ((value) ? (type && type != RXML.t_text ? type->encode ((value), RXML.t_text) : (value)) : RXML.nil)
8ab8bf2001-03-13Martin Nilsson #define ENCODE_RXML_XML(value, type) \
a2cd402001-03-24Martin Nilsson  ((value) ? (type && type != RXML.t_xml ? type->encode ((value), RXML.t_xml) : (value)) : RXML.nil)
8ab8bf2001-03-13Martin Nilsson 
b1fca01996-11-12Per Hedbor #endif