Unit libsagui
Description
Cross-platform low-level Pascal binding for the Sagui library.
Uses
- RTLConsts
- SysUtils
- StrUtils
- Math
- Classes
- Generics.Collections
- Windows
- DynLibs
- SyncObjs
Overview
Classes, Interfaces, Objects and Records
| Name | Description |
|---|---|
Record sg_str |
|
Record sg_strmap |
|
Record sg_httpauth |
|
Record sg_httpupld |
|
Record sg_httpreq |
|
Record sg_httpres |
|
Record sg_httpsrv |
|
Record sg_entrypoint |
|
Record sg_entrypoints |
|
Record sg_route |
|
Record sg_router |
|
Record sg_expr |
|
Record sg_expr_argument |
|
Record sg_expr_extension |
|
Class ESgLibNotLoaded |
|
Class ESgUnloadEvent |
|
Class TSgLibUnloadHolder |
|
Class TSgUnloadEvents |
|
Record SgLib |
Functions and Procedures
function sg_httpres_send(res: Psg_httpres; const val: Pcchar; const content_type: Pcchar; status: cuint): cint; inline; |
function sg_httpres_download(res: Psg_httpres; const filename: Pcchar; status: cuint): cint; inline; |
function sg_httpres_render(res: Psg_httpres; const filename: Pcchar; status: cuint): cint; inline; |
function sg_httpres_zsend(res: Psg_httpres; const val: Pcchar; const content_type: Pcchar; status: cuint): cint; inline; |
function sg_httpres_zdownload(res: Psg_httpres; const filename: Pcchar; status: cuint): cint; inline; |
function sg_httpres_zrender(res: Psg_httpres; const filename: Pcchar; status: cuint): cint; inline; |
function cpow(const X, Y: cdouble): cdouble; cdecl; inline; |
function cfmod(const X, Y: cdouble): cdouble; cdecl; inline; |
Types
cbool = Boolean; |
cchar = Byte; |
cdouble = Double; |
cenum = cint; |
cint = Int32; |
csize_t = NativeUInt; |
cssize_t = NativeInt; |
ctime_t = NativeInt; |
cuint = UInt32; |
cuint16_t = UInt16; |
cuint64_t = UInt64; |
cva_list = Pointer; |
Pcbool = ˆBoolean; |
Pcchar = MarshaledAString; |
Pcvoid = Pointer; |
PPcvoid = PPointer; |
PPsg_entrypoint = ˆPsg_entrypoint; |
PPsg_httpupld = ˆPsg_httpupld; |
PPsg_route = ˆPsg_route; |
PPsg_strmap = ˆPsg_strmap; |
Psg_entrypoint = ˆsg_entrypoint; |
Psg_entrypoints = ˆsg_entrypoints; |
Psg_expr = ˆsg_expr; |
Psg_expr_argument = ˆsg_expr_argument; |
Psg_expr_extension = ˆsg_expr_extension; |
Psg_httpauth = ˆsg_httpauth; |
Psg_httpreq = ˆsg_httpreq; |
Psg_httpres = ˆsg_httpres; |
Psg_httpsrv = ˆsg_httpsrv; |
Psg_httpupld = ˆsg_httpupld; |
Psg_route = ˆsg_route; |
Psg_router = ˆsg_router; |
Psg_str = ˆsg_str; |
Psg_strmap = ˆsg_strmap; |
sg_entrypoints_iter_cb = function(cls: Pcvoid; entrypoint: Psg_entrypoint): cint; cdecl; |
sg_err_cb = procedure(cls: Pcvoid; const err: Pcchar); cdecl; |
sg_expr_err_type = cenum; |
sg_expr_func = function(cls: Pcvoid; args: Psg_expr_argument; const identifier: Pcchar): cdouble; cdecl; |
sg_fmod_func = function(const x: cdouble; const y: cdouble): cdouble; cdecl; |
sg_free_cb = procedure(handle: Pcvoid); cdecl; |
sg_free_func = procedure(ptr: Pcvoid); cdecl; |
sg_httpauth_cb = function(cls: Pcvoid; auth: Psg_httpauth; req: Psg_httpreq; res: Psg_httpres): cbool; cdecl; |
sg_httpreq_cb = procedure(cls: Pcvoid; req: Psg_httpreq; res: Psg_httpres); cdecl; |
sg_httpsrv_cli_cb = procedure(cls: Pcvoid; const client: Pcvoid; closed: Pcbool); cdecl; |
sg_httpuplds_iter_cb = function(cls: Pcvoid; upld: Psg_httpupld): cint; cdecl; |
sg_httpupld_cb = function(cls: Pcvoid; handle: PPcvoid; const dir: Pcchar; const field: Pcchar; const name: Pcchar; const mime: Pcchar; const encoding: Pcchar): cint; cdecl; |
sg_malloc_func = function(size: csize_t): Pcvoid; cdecl; |
sg_pow_func = function(const x: cdouble; const y: cdouble): cdouble; cdecl; |
sg_read_cb = function(handle: Pcvoid; offset: cuint64_t; buf: Pcchar; size: csize_t): cssize_t; cdecl; |
sg_realloc_func = function(ptr: Pcvoid; size: csize_t): Pcvoid; cdecl; |
sg_router_dispatch_cb = function(cls: Pcvoid; const path: Pcchar; route: Psg_route): cint; cdecl; |
sg_router_match_cb = function(cls: Pcvoid; route: Psg_route): cint; cdecl; |
sg_routes_iter_cb = function(cls: Pcvoid; route: Psg_route): cint; cdecl; |
sg_route_cb = procedure(cls: Pcvoid; route: Psg_route); cdecl; |
sg_save_as_cb = function(handle: Pcvoid; const path: Pcchar; overwritten: cbool): cint; cdecl; |
sg_save_cb = function(handle: Pcvoid; overwritten: cbool): cint; cdecl; |
sg_segments_iter_cb = function(cls: Pcvoid; index: cuint; const segment: Pcchar): cint; cdecl; |
sg_strmap_iter_cb = function(cls: Pcvoid; pair: Psg_strmap): cint; cdecl; |
sg_strmap_sort_cb = function(cls: Pcvoid; pair_a: Psg_strmap; pair_b: Psg_strmap): cint; cdecl; |
sg_vars_iter_cb = function(cls: Pcvoid; const name: Pcchar; const val: Pcchar): cint; cdecl; |
sg_write_cb = function(handle: Pcvoid; offset: cuint64_t; const buf: Pcchar; size: csize_t): cssize_t; cdecl; |
Constants
Variables
sg_version: function: cuint; cdecl; |
sg_version_str: function: Pcchar; cdecl; |
sg_mm_set: function(malloc_func: sg_malloc_func; realloc_func: sg_realloc_func; free_func: sg_free_func): cint; cdecl; |
sg_malloc: function(size: csize_t): Pcvoid; cdecl; |
sg_alloc: function(size: csize_t): Pcvoid; cdecl; |
sg_realloc: function(ptr: Pcvoid; size: csize_t): Pcvoid; cdecl; |
sg_free: procedure(ptr: Pcvoid); cdecl; |
sg_math_set: function(pow_func: sg_pow_func; fmod_func: sg_fmod_func): cint; cdecl; |
sg_strerror: function(errnum: cint; errmsg: Pcchar; errlen: csize_t): Pcchar; cdecl; |
sg_is_post: function(const method: Pcchar): cbool; cdecl; |
sg_extract_entrypoint: function(const path: Pcchar): Pcchar; cdecl; |
sg_tmpdir: function: Pcchar; cdecl; |
sg_eor: function(err: cbool): cssize_t; cdecl; |
sg_ip: function(const socket: Pcvoid; buf: Pcchar; size: csize_t): cint; cdecl; |
sg_str_new: function: Psg_str; cdecl; |
sg_str_free: procedure(str: Psg_str); cdecl; |
sg_str_write: function(str: Psg_str; const val: Pcchar; len: csize_t): cint; cdecl; |
sg_str_printf_va: function(str: Psg_str; const fmt: Pcchar; ap: cva_list): cint; cdecl; |
sg_str_printf: function(str: Psg_str; const fmt: Pcchar): cint; cdecl varargs; |
sg_str_content: function(str: Psg_str): Pcchar; cdecl; |
sg_str_length: function(str: Psg_str): csize_t; cdecl; |
sg_str_clear: function(str: Psg_str): cint; cdecl; |
sg_strmap_name: function(pair: Psg_strmap): Pcchar; cdecl; |
sg_strmap_val: function(pair: Psg_strmap): Pcchar; cdecl; |
sg_strmap_add: function(map: PPsg_strmap; const name: Pcchar; const val: Pcchar): cint; cdecl; |
sg_strmap_set: function(map: PPsg_strmap; const name: Pcchar; const val: Pcchar): cint; cdecl; |
sg_strmap_find: function(map: Psg_strmap; const name: Pcchar; pair: PPsg_strmap): cint; cdecl; |
sg_strmap_get: function(map: Psg_strmap; const name: Pcchar): Pcchar; cdecl; |
sg_strmap_rm: function(map: PPsg_strmap; const name: Pcchar): cint; cdecl; |
sg_strmap_iter: function(map: Psg_strmap; cb: sg_strmap_iter_cb; cls: Pcvoid): cint; cdecl; |
sg_strmap_sort: function(map: PPsg_strmap; cb: sg_strmap_sort_cb; cls: Pcvoid): cint; cdecl; |
sg_strmap_count: function(map: Psg_strmap): cuint; cdecl; |
sg_strmap_next: function(next: PPsg_strmap): cint; cdecl; |
sg_strmap_cleanup: procedure(map: PPsg_strmap); cdecl; |
sg_httpauth_set_realm: function(auth: Psg_httpauth; const realm: Pcchar): cint; cdecl; |
sg_httpauth_realm: function(auth: Psg_httpauth): pcchar; cdecl; |
sg_httpauth_deny2: function(auth: Psg_httpauth; const reason: Pcchar; const content_type: Pcchar; status: cuint): cint; cdecl; |
sg_httpauth_deny: function(auth: Psg_httpauth; const reason: Pcchar; const content_type: Pcchar): cint; cdecl; |
sg_httpauth_cancel: function(auth: Psg_httpauth): cint; cdecl; |
sg_httpauth_usr: function(auth: Psg_httpauth): Pcchar; cdecl; |
sg_httpauth_pwd: function(auth: Psg_httpauth): Pcchar; cdecl; |
sg_httpuplds_iter: function(uplds: Psg_httpupld; cb: sg_httpuplds_iter_cb; cls: Pcvoid): cint; cdecl; |
sg_httpuplds_next: function(upld: PPsg_httpupld): cint; cdecl; |
sg_httpuplds_count: function(uplds: Psg_httpupld): cuint; cdecl; |
sg_httpupld_handle: function(uplds: Psg_httpupld): Pcvoid; cdecl; |
sg_httpupld_dir: function(uplds: Psg_httpupld): Pcchar; cdecl; |
sg_httpupld_field: function(uplds: Psg_httpupld): Pcchar; cdecl; |
sg_httpupld_name: function(uplds: Psg_httpupld): Pcchar; cdecl; |
sg_httpupld_mime: function(uplds: Psg_httpupld): Pcchar; cdecl; |
sg_httpupld_encoding: function(uplds: Psg_httpupld): Pcchar; cdecl; |
sg_httpupld_size: function(uplds: Psg_httpupld): cuint64_t; cdecl; |
sg_httpupld_save: function(upld: Psg_httpupld; overwritten: cbool): cint; cdecl; |
sg_httpupld_save_as: function(upld: Psg_httpupld; const path: Pcchar; overwritten: cbool): cint; cdecl; |
sg_httpreq_srv: function(req: Psg_httpreq): Psg_httpsrv; cdecl; |
sg_httpreq_headers: function(req: Psg_httpreq): PPsg_strmap; cdecl; |
sg_httpreq_cookies: function(req: Psg_httpreq): PPsg_strmap; cdecl; |
sg_httpreq_params: function(req: Psg_httpreq): PPsg_strmap; cdecl; |
sg_httpreq_fields: function(req: Psg_httpreq): PPsg_strmap; cdecl; |
sg_httpreq_version: function(req: Psg_httpreq): Pcchar; cdecl; |
sg_httpreq_method: function(req: Psg_httpreq): Pcchar; cdecl; |
sg_httpreq_path: function(req: Psg_httpreq): Pcchar; cdecl; |
sg_httpreq_payload: function(req: Psg_httpreq): Psg_str; cdecl; |
sg_httpreq_is_uploading: function(req: Psg_httpreq): cbool; cdecl; |
sg_httpreq_uploads: function(req: Psg_httpreq): Psg_httpupld; cdecl; |
sg_httpreq_client: function(req: Psg_httpreq): Pcvoid; cdecl; |
sg_httpreq_tls_session: function(req: Psg_httpreq): Pcvoid; cdecl; |
sg_httpreq_isolate: function(req: Psg_httpreq; cb: sg_httpreq_cb; cls: Pcvoid): cint; cdecl; |
sg_httpreq_set_user_data: function(req: Psg_httpreq; data: Pcvoid): cint; cdecl; |
sg_httpreq_user_data: function(req: Psg_httpreq): Pcvoid; cdecl; |
sg_httpres_headers: function(res: Psg_httpres): PPsg_strmap; cdecl; |
sg_httpres_set_cookie: function(res: Psg_httpres; const name: Pcchar; const val: Pcchar): cint; cdecl; |
sg_httpres_sendbinary: function(res: Psg_httpres; buf: Pcvoid; size: csize_t; const content_type: Pcchar; status: cuint): cint; cdecl; |
sg_httpres_sendfile2: function(res: Psg_httpres; size: cuint64_t; max_size: cuint64_t; offset: cuint64_t; const filename: Pcchar; const disposition: Pcchar; status: cuint): cint; cdecl; |
sg_httpres_sendfile: function(res: Psg_httpres; size: cuint64_t; max_size: cuint64_t; offset: cuint64_t; const filename: Pcchar; downloaded: cbool; status: cuint): cint; cdecl; |
sg_httpres_sendstream: function(res: Psg_httpres; size: cuint64_t; read_cb: sg_read_cb; handle: Pcvoid; free_cb: sg_free_cb; status: cuint): cint; cdecl; |
sg_httpres_zsendbinary2: function(res: Psg_httpres; level: cint; buf: Pcvoid; size: csize_t; const content_type: Pcchar; status: cuint): cint; cdecl; |
sg_httpres_zsendbinary: function(res: Psg_httpres; buf: Pcvoid; size: csize_t; const content_type: Pcchar; status: cuint): cint; cdecl; |
sg_httpres_zsendstream2: function(res: Psg_httpres; level: cint; size: cuint64_t; read_cb: sg_read_cb; handle: Pcvoid; free_cb: sg_free_cb; status: cuint): cint; cdecl; |
sg_httpres_zsendstream: function(res: Psg_httpres; read_cb: sg_read_cb; handle: Pcvoid; free_cb: sg_free_cb; status: cuint): cint; cdecl; |
sg_httpres_zsendfile2: function(res: Psg_httpres; level: cint; size: cuint64_t; max_size: cuint64_t; offset: cuint64_t; const filename: Pcchar; const disposition: Pcchar; status: cuint): cint; cdecl; |
sg_httpres_zsendfile: function(res: Psg_httpres; size: cuint64_t; max_size: cuint64_t; offset: cuint64_t; const filename: Pcchar; downloaded: cbool; status: cuint): cint; cdecl; |
sg_httpres_reset: function(res: Psg_httpres): cint; cdecl; |
sg_httpres_clear: function(res: Psg_httpres): cint; cdecl; |
sg_httpres_is_empty: function(res: Psg_httpres): cbool; cdecl; |
sg_httpsrv_new2: function(auth_cb: sg_httpauth_cb; req_cb: sg_httpreq_cb; err_cb: sg_err_cb; cls: Pcvoid): Psg_httpsrv; cdecl; |
sg_httpsrv_new: function(cb: sg_httpreq_cb; cls: Pcvoid): Psg_httpsrv; cdecl; |
sg_httpsrv_free: procedure(srv: Psg_httpsrv); cdecl; |
sg_httpsrv_tls_listen4: function(srv: Psg_httpsrv; const key: Pcchar; const pwd: Pcchar; const cert: Pcchar; const trust: Pcchar; const dhparams: Pcchar; const priorities: Pcchar; const hostname: Pcchar; port: cuint16_t; backlog: cuint; threaded: cbool): cbool; cdecl; |
sg_httpsrv_tls_listen3: function(srv: Psg_httpsrv; const key: Pcchar; const pwd: Pcchar; const cert: Pcchar; const trust: Pcchar; const dhparams: Pcchar; const priorities: Pcchar; port: cuint16_t; threaded: cbool): cbool; cdecl; |
sg_httpsrv_tls_listen2: function(srv: Psg_httpsrv; const key: Pcchar; const pwd: Pcchar; const cert: Pcchar; const trust: Pcchar; const dhparams: Pcchar; port: cuint16_t; threaded: cbool): cbool; cdecl; |
sg_httpsrv_tls_listen: function(srv: Psg_httpsrv; const key: Pcchar; const cert: Pcchar; port: cuint16_t; threaded: cbool): cbool; cdecl; |
sg_httpsrv_listen2: function(srv: Psg_httpsrv; hostname: Pcchar; port: cuint16_t; backlog: cuint; threaded: cbool): cbool; cdecl; |
sg_httpsrv_listen: function(srv: Psg_httpsrv; port: cuint16_t; threaded: cbool): cbool; cdecl; |
sg_httpsrv_shutdown: function(srv: Psg_httpsrv): cint; cdecl; |
sg_httpsrv_port: function(srv: Psg_httpsrv): cuint16_t; cdecl; |
sg_httpsrv_is_threaded: function(srv: Psg_httpsrv): cbool; cdecl; |
sg_httpsrv_set_cli_cb: function(srv: Psg_httpsrv; cb: sg_httpsrv_cli_cb; cls: Pcvoid): cint; cdecl; |
sg_httpsrv_set_upld_cbs: function(srv: Psg_httpsrv; cb: sg_httpupld_cb; cls: Pcvoid; write_cb: sg_write_cb; free_cb: sg_free_cb; save_cb: sg_save_cb; save_as_cb: sg_save_as_cb): cint; cdecl; |
sg_httpsrv_set_upld_dir: function(srv: Psg_httpsrv; const dir: Pcchar): cint; cdecl; |
sg_httpsrv_upld_dir: function(srv: Psg_httpsrv): Pcchar; cdecl; |
sg_httpsrv_set_post_buf_size: function(srv: Psg_httpsrv; size: csize_t): cint; cdecl; |
sg_httpsrv_post_buf_size: function(srv: Psg_httpsrv): csize_t; cdecl; |
sg_httpsrv_set_payld_limit: function(srv: Psg_httpsrv; limit: csize_t): cint; cdecl; |
sg_httpsrv_payld_limit: function(srv: Psg_httpsrv): csize_t; cdecl; |
sg_httpsrv_set_uplds_limit: function(srv: Psg_httpsrv; limit: cuint64_t): cint; cdecl; |
sg_httpsrv_uplds_limit: function(srv: Psg_httpsrv): cuint64_t; cdecl; |
sg_httpsrv_set_thr_pool_size: function(srv: Psg_httpsrv; size: cuint): cint; cdecl; |
sg_httpsrv_thr_pool_size: function(srv: Psg_httpsrv): cuint; cdecl; |
sg_httpsrv_set_con_timeout: function(srv: Psg_httpsrv; timeout: cuint): cint; cdecl; |
sg_httpsrv_con_timeout: function(srv: Psg_httpsrv): cuint; cdecl; |
sg_httpsrv_set_con_limit: function(srv: Psg_httpsrv; limit: cuint): cint; cdecl; |
sg_httpsrv_con_limit: function(srv: Psg_httpsrv): cuint; cdecl; |
sg_httpsrv_handle: function(srv: Psg_httpsrv): Pcvoid; cdecl; |
sg_entrypoint_name: function(entrypoint: Psg_entrypoint): Pcchar; cdecl; |
sg_entrypoint_set_user_data: function(entrypoint: Psg_entrypoint; user_data: Pcvoid): cint; cdecl; |
sg_entrypoint_user_data: function(entrypoint: Psg_entrypoint): Pcvoid; cdecl; |
sg_entrypoints_new: function: Psg_entrypoints; cdecl; |
sg_entrypoints_free: procedure(entrypoints: Psg_entrypoints); cdecl; |
sg_entrypoints_add: function(entrypoints: Psg_entrypoints; const path: Pcchar; user_data: Pcvoid): cint; cdecl; |
sg_entrypoints_rm: function(entrypoints: Psg_entrypoints; const path: Pcchar): cint; cdecl; |
sg_entrypoints_iter: function(entrypoints: Psg_entrypoints; cb: sg_entrypoints_iter_cb; cls: Pcvoid): cint; cdecl; |
sg_entrypoints_clear: function(entrypoints: Psg_entrypoints): cint; cdecl; |
sg_entrypoints_find: function(entrypoints: Psg_entrypoints; entrypoint: PPsg_entrypoint; const path: Pcchar): cint; cdecl; |
sg_route_handle: function(route: Psg_route): Pcvoid; cdecl; |
sg_route_match: function(route: Psg_route): Pcvoid; cdecl; |
sg_route_rawpattern: function(route: Psg_route): Pcchar; cdecl; |
sg_route_pattern: function(route: Psg_route): Pcchar; cdecl; |
sg_route_path: function(route: Psg_route): Pcchar; cdecl; |
sg_route_segments_iter: function(route: Psg_route; cb: sg_segments_iter_cb; cls: Pcvoid): cint; cdecl; |
sg_route_vars_iter: function(route: Psg_route; cb: sg_vars_iter_cb; cls: Pcvoid): cint; cdecl; |
sg_route_user_data: function(route: Psg_route): Pcvoid; cdecl; |
sg_routes_add2: function(routes: PPsg_route; route: PPsg_route; const pattern: Pcchar; errmsg: Pcchar; errlen: csize_t; cb: sg_route_cb; cls: Pcvoid): cint; cdecl; |
sg_routes_add: function(routes: Psg_route; const pattern: Pcchar; cb: sg_route_cb; cls: Pcvoid): cint; cdecl; |
sg_routes_rm: function(routes: PPsg_route; const pattern: Pcchar): cint; cdecl; |
sg_routes_iter: function(routes: Psg_route; cb: sg_routes_iter_cb; cls: Pcvoid): cint; cdecl; |
sg_routes_next: function(route: PPsg_route): cint; cdecl; |
sg_routes_count: function(routes: Psg_route): cuint; cdecl; |
sg_routes_cleanup: function(routes: PPsg_route): cint; cdecl; |
sg_router_new: function(routes: Psg_route): Psg_router; cdecl; |
sg_router_free: procedure(router: Psg_router); cdecl; |
sg_router_dispatch2: function(router: Psg_router; const path: Pcchar; user_data: Pcvoid; dispatch_cb: sg_router_dispatch_cb; cls: Pcvoid; match_cb: sg_router_match_cb): cint; cdecl; |
sg_router_dispatch: function(router: Psg_router; const path: Pcchar; user_data: Pcvoid): cint; cdecl; |
sg_expr_new: function: Psg_expr; cdecl; |
sg_expr_free: procedure(expr: Psg_expr); cdecl; |
sg_expr_compile: function(expr: Psg_expr; const str: Pcchar; len: csize_t; extensions: Psg_expr_extension): cint; cdecl; |
sg_expr_clear: function(expr: Psg_expr): cint; cdecl; |
sg_expr_eval: function(expr: Psg_expr): cdouble; cdecl; |
sg_expr_var: function(expr: Psg_expr; const name: Pcchar; len: csize_t): cdouble; cdecl; |
sg_expr_set_var: function(expr: Psg_expr; const name: Pcchar; len: csize_t; const val: cdouble): cint; cdecl; |
sg_expr_arg: function(args: Psg_expr_argument; index: cint): cdouble; cdecl; |
sg_expr_near: function(expr: Psg_expr): cint; cdecl; |
sg_expr_err: function(expr: Psg_expr): sg_expr_err_type; cdecl; |
sg_expr_strerror: function(expr: Psg_expr): Pcchar; cdecl; |
sg_expr_calc: function(const str: Pcchar; len: csize_t): cdouble; cdecl; |
Description
Functions and Procedures
function sg_httpres_send(res: Psg_httpres; const val: Pcchar; const content_type: Pcchar; status: cuint): cint; inline; |
function sg_httpres_download(res: Psg_httpres; const filename: Pcchar; status: cuint): cint; inline; |
function sg_httpres_render(res: Psg_httpres; const filename: Pcchar; status: cuint): cint; inline; |
function sg_httpres_zsend(res: Psg_httpres; const val: Pcchar; const content_type: Pcchar; status: cuint): cint; inline; |
function sg_httpres_zdownload(res: Psg_httpres; const filename: Pcchar; status: cuint): cint; inline; |
function sg_httpres_zrender(res: Psg_httpres; const filename: Pcchar; status: cuint): cint; inline; |
function cpow(const X, Y: cdouble): cdouble; cdecl; inline; |
function cfmod(const X, Y: cdouble): cdouble; cdecl; inline; |
Types
cbool = Boolean; |
cchar = Byte; |
cdouble = Double; |
cenum = cint; |
cint = Int32; |
csize_t = NativeUInt; |
cssize_t = NativeInt; |
ctime_t = NativeInt; |
cuint = UInt32; |
cuint16_t = UInt16; |
cuint64_t = UInt64; |
cva_list = Pointer; |
Pcbool = ˆBoolean; |
Pcchar = MarshaledAString; |
Pcvoid = Pointer; |
PPcvoid = PPointer; |
PPsg_entrypoint = ˆPsg_entrypoint; |
PPsg_httpupld = ˆPsg_httpupld; |
PPsg_route = ˆPsg_route; |
PPsg_strmap = ˆPsg_strmap; |
Psg_entrypoint = ˆsg_entrypoint; |
Psg_entrypoints = ˆsg_entrypoints; |
Psg_expr = ˆsg_expr; |
Psg_expr_argument = ˆsg_expr_argument; |
|
FI:O803 |
Psg_expr_extension = ˆsg_expr_extension; |
Psg_httpauth = ˆsg_httpauth; |
Psg_httpreq = ˆsg_httpreq; |
Psg_httpres = ˆsg_httpres; |
Psg_httpsrv = ˆsg_httpsrv; |
Psg_httpupld = ˆsg_httpupld; |
Psg_route = ˆsg_route; |
Psg_router = ˆsg_router; |
Psg_str = ˆsg_str; |
Psg_strmap = ˆsg_strmap; |
sg_entrypoints_iter_cb = function(cls: Pcvoid; entrypoint: Psg_entrypoint): cint; cdecl; |
sg_err_cb = procedure(cls: Pcvoid; const err: Pcchar); cdecl; |
sg_expr_err_type = cenum; |
sg_expr_func = function(cls: Pcvoid; args: Psg_expr_argument; const identifier: Pcchar): cdouble; cdecl; |
sg_fmod_func = function(const x: cdouble; const y: cdouble): cdouble; cdecl; |
sg_free_cb = procedure(handle: Pcvoid); cdecl; |
sg_free_func = procedure(ptr: Pcvoid); cdecl; |
sg_httpauth_cb = function(cls: Pcvoid; auth: Psg_httpauth; req: Psg_httpreq; res: Psg_httpres): cbool; cdecl; |
sg_httpreq_cb = procedure(cls: Pcvoid; req: Psg_httpreq; res: Psg_httpres); cdecl; |
sg_httpsrv_cli_cb = procedure(cls: Pcvoid; const client: Pcvoid; closed: Pcbool); cdecl; |
sg_httpuplds_iter_cb = function(cls: Pcvoid; upld: Psg_httpupld): cint; cdecl; |
sg_httpupld_cb = function(cls: Pcvoid; handle: PPcvoid; const dir: Pcchar; const field: Pcchar; const name: Pcchar; const mime: Pcchar; const encoding: Pcchar): cint; cdecl; |
sg_malloc_func = function(size: csize_t): Pcvoid; cdecl; |
sg_pow_func = function(const x: cdouble; const y: cdouble): cdouble; cdecl; |
sg_read_cb = function(handle: Pcvoid; offset: cuint64_t; buf: Pcchar; size: csize_t): cssize_t; cdecl; |
sg_realloc_func = function(ptr: Pcvoid; size: csize_t): Pcvoid; cdecl; |
sg_router_dispatch_cb = function(cls: Pcvoid; const path: Pcchar; route: Psg_route): cint; cdecl; |
sg_router_match_cb = function(cls: Pcvoid; route: Psg_route): cint; cdecl; |
sg_routes_iter_cb = function(cls: Pcvoid; route: Psg_route): cint; cdecl; |
sg_route_cb = procedure(cls: Pcvoid; route: Psg_route); cdecl; |
sg_save_as_cb = function(handle: Pcvoid; const path: Pcchar; overwritten: cbool): cint; cdecl; |
sg_save_cb = function(handle: Pcvoid; overwritten: cbool): cint; cdecl; |
sg_segments_iter_cb = function(cls: Pcvoid; index: cuint; const segment: Pcchar): cint; cdecl; |
sg_strmap_iter_cb = function(cls: Pcvoid; pair: Psg_strmap): cint; cdecl; |
sg_strmap_sort_cb = function(cls: Pcvoid; pair_a: Psg_strmap; pair_b: Psg_strmap): cint; cdecl; |
sg_vars_iter_cb = function(cls: Pcvoid; const name: Pcchar; const val: Pcchar): cint; cdecl; |
sg_write_cb = function(handle: Pcvoid; offset: cuint64_t; const buf: Pcchar; size: csize_t): cssize_t; cdecl; |
Constants
SG_VERSION_MAJOR = 3; |
SG_VERSION_MINOR = 5; |
SG_VERSION_PATCH = 2; |
SG_VERSION_HEX = (SG_VERSION_MAJOR shl 16) or (SG_VERSION_MINOR shl 8) or
SG_VERSION_PATCH; |
SG_VERSION_MAJOR_STR = '3'; |
|
FI:O803 |
SG_ERR_SIZE = 256; |
SG_LIB_NAME = Concat(
'libsagui-', SG_VERSION_MAJOR_STR
, '.', SharedSuffix
); |
SSgLibEmptyName = 'Empty library name.'; |
SSgLibNotLoaded = Concat('Library ''%s'' not loaded. If it is not available ',
'on the system, please download it at: https://github.com/risoflora/libsagui/releases'); |
SSgLibInvalid = 'Invalid library ''%s''.'; |
SSgLibVersion = 'Application requires Sagui library v%d.%d.%d or higher.'; |
SSgUnloadEventAlreadyRegistered = 'Unload event already registered.'; |
SG_EXPR_ERR_UNKNOWN = 0; |
SG_EXPR_ERR_UNEXPECTED_NUMBER = 1; |
|
FI:O803 |
SG_EXPR_ERR_UNEXPECTED_WORD = 2; |
|
FI:O803 |
SG_EXPR_ERR_UNEXPECTED_PARENS = 3; |
|
FI:O803 |
SG_EXPR_ERR_MISSING_OPERAND = 4; |
|
FI:O803 |
SG_EXPR_ERR_UNKNOWN_OPERATOR = 5; |
|
FI:O803 |
SG_EXPR_ERR_INVALID_FUNC_NAME = 6; |
|
FI:O803 |
SG_EXPR_ERR_BAD_PARENS = 7; |
|
FI:O803 |
SG_EXPR_ERR_TOO_FEW_FUNC_ARGS = 8; |
|
FI:O803 |
SG_EXPR_ERR_FIRST_ARG_IS_NOT_VAR = 9; |
|
FI:O803 |
SG_EXPR_ERR_BAD_VARIABLE_NAME = 10; |
|
FI:O803 |
SG_EXPR_ERR_BAD_ASSIGNMENT = 11; |
|
FI:O803 |
Variables
sg_version: function: cuint; cdecl; |
sg_version_str: function: Pcchar; cdecl; |
sg_mm_set: function(malloc_func: sg_malloc_func; realloc_func: sg_realloc_func; free_func: sg_free_func): cint; cdecl; |
sg_malloc: function(size: csize_t): Pcvoid; cdecl; |
sg_alloc: function(size: csize_t): Pcvoid; cdecl; |
sg_realloc: function(ptr: Pcvoid; size: csize_t): Pcvoid; cdecl; |
sg_free: procedure(ptr: Pcvoid); cdecl; |
sg_math_set: function(pow_func: sg_pow_func; fmod_func: sg_fmod_func): cint; cdecl; |
sg_strerror: function(errnum: cint; errmsg: Pcchar; errlen: csize_t): Pcchar; cdecl; |
sg_is_post: function(const method: Pcchar): cbool; cdecl; |
sg_extract_entrypoint: function(const path: Pcchar): Pcchar; cdecl; |
sg_tmpdir: function: Pcchar; cdecl; |
sg_eor: function(err: cbool): cssize_t; cdecl; |
sg_ip: function(const socket: Pcvoid; buf: Pcchar; size: csize_t): cint; cdecl; |
sg_str_new: function: Psg_str; cdecl; |
sg_str_free: procedure(str: Psg_str); cdecl; |
sg_str_write: function(str: Psg_str; const val: Pcchar; len: csize_t): cint; cdecl; |
sg_str_printf_va: function(str: Psg_str; const fmt: Pcchar; ap: cva_list): cint; cdecl; |
sg_str_printf: function(str: Psg_str; const fmt: Pcchar): cint; cdecl varargs; |
sg_str_content: function(str: Psg_str): Pcchar; cdecl; |
sg_str_length: function(str: Psg_str): csize_t; cdecl; |
sg_str_clear: function(str: Psg_str): cint; cdecl; |
sg_strmap_name: function(pair: Psg_strmap): Pcchar; cdecl; |
sg_strmap_val: function(pair: Psg_strmap): Pcchar; cdecl; |
sg_strmap_add: function(map: PPsg_strmap; const name: Pcchar; const val: Pcchar): cint; cdecl; |
sg_strmap_set: function(map: PPsg_strmap; const name: Pcchar; const val: Pcchar): cint; cdecl; |
sg_strmap_find: function(map: Psg_strmap; const name: Pcchar; pair: PPsg_strmap): cint; cdecl; |
sg_strmap_get: function(map: Psg_strmap; const name: Pcchar): Pcchar; cdecl; |
sg_strmap_rm: function(map: PPsg_strmap; const name: Pcchar): cint; cdecl; |
sg_strmap_iter: function(map: Psg_strmap; cb: sg_strmap_iter_cb; cls: Pcvoid): cint; cdecl; |
sg_strmap_sort: function(map: PPsg_strmap; cb: sg_strmap_sort_cb; cls: Pcvoid): cint; cdecl; |
sg_strmap_count: function(map: Psg_strmap): cuint; cdecl; |
sg_strmap_next: function(next: PPsg_strmap): cint; cdecl; |
sg_strmap_cleanup: procedure(map: PPsg_strmap); cdecl; |
sg_httpauth_set_realm: function(auth: Psg_httpauth; const realm: Pcchar): cint; cdecl; |
sg_httpauth_realm: function(auth: Psg_httpauth): pcchar; cdecl; |
sg_httpauth_deny2: function(auth: Psg_httpauth; const reason: Pcchar; const content_type: Pcchar; status: cuint): cint; cdecl; |
sg_httpauth_deny: function(auth: Psg_httpauth; const reason: Pcchar; const content_type: Pcchar): cint; cdecl; |
sg_httpauth_cancel: function(auth: Psg_httpauth): cint; cdecl; |
sg_httpauth_usr: function(auth: Psg_httpauth): Pcchar; cdecl; |
sg_httpauth_pwd: function(auth: Psg_httpauth): Pcchar; cdecl; |
sg_httpuplds_iter: function(uplds: Psg_httpupld; cb: sg_httpuplds_iter_cb; cls: Pcvoid): cint; cdecl; |
sg_httpuplds_next: function(upld: PPsg_httpupld): cint; cdecl; |
sg_httpuplds_count: function(uplds: Psg_httpupld): cuint; cdecl; |
sg_httpupld_handle: function(uplds: Psg_httpupld): Pcvoid; cdecl; |
sg_httpupld_dir: function(uplds: Psg_httpupld): Pcchar; cdecl; |
sg_httpupld_field: function(uplds: Psg_httpupld): Pcchar; cdecl; |
sg_httpupld_name: function(uplds: Psg_httpupld): Pcchar; cdecl; |
sg_httpupld_mime: function(uplds: Psg_httpupld): Pcchar; cdecl; |
sg_httpupld_encoding: function(uplds: Psg_httpupld): Pcchar; cdecl; |
sg_httpupld_size: function(uplds: Psg_httpupld): cuint64_t; cdecl; |
sg_httpupld_save: function(upld: Psg_httpupld; overwritten: cbool): cint; cdecl; |
sg_httpupld_save_as: function(upld: Psg_httpupld; const path: Pcchar; overwritten: cbool): cint; cdecl; |
sg_httpreq_srv: function(req: Psg_httpreq): Psg_httpsrv; cdecl; |
sg_httpreq_headers: function(req: Psg_httpreq): PPsg_strmap; cdecl; |
sg_httpreq_cookies: function(req: Psg_httpreq): PPsg_strmap; cdecl; |
sg_httpreq_params: function(req: Psg_httpreq): PPsg_strmap; cdecl; |
sg_httpreq_fields: function(req: Psg_httpreq): PPsg_strmap; cdecl; |
sg_httpreq_version: function(req: Psg_httpreq): Pcchar; cdecl; |
sg_httpreq_method: function(req: Psg_httpreq): Pcchar; cdecl; |
sg_httpreq_path: function(req: Psg_httpreq): Pcchar; cdecl; |
sg_httpreq_payload: function(req: Psg_httpreq): Psg_str; cdecl; |
sg_httpreq_is_uploading: function(req: Psg_httpreq): cbool; cdecl; |
sg_httpreq_uploads: function(req: Psg_httpreq): Psg_httpupld; cdecl; |
sg_httpreq_client: function(req: Psg_httpreq): Pcvoid; cdecl; |
sg_httpreq_tls_session: function(req: Psg_httpreq): Pcvoid; cdecl; |
sg_httpreq_isolate: function(req: Psg_httpreq; cb: sg_httpreq_cb; cls: Pcvoid): cint; cdecl; |
sg_httpreq_set_user_data: function(req: Psg_httpreq; data: Pcvoid): cint; cdecl; |
sg_httpreq_user_data: function(req: Psg_httpreq): Pcvoid; cdecl; |
sg_httpres_headers: function(res: Psg_httpres): PPsg_strmap; cdecl; |
sg_httpres_set_cookie: function(res: Psg_httpres; const name: Pcchar; const val: Pcchar): cint; cdecl; |
sg_httpres_sendbinary: function(res: Psg_httpres; buf: Pcvoid; size: csize_t; const content_type: Pcchar; status: cuint): cint; cdecl; |
sg_httpres_sendfile2: function(res: Psg_httpres; size: cuint64_t; max_size: cuint64_t; offset: cuint64_t; const filename: Pcchar; const disposition: Pcchar; status: cuint): cint; cdecl; |
sg_httpres_sendfile: function(res: Psg_httpres; size: cuint64_t; max_size: cuint64_t; offset: cuint64_t; const filename: Pcchar; downloaded: cbool; status: cuint): cint; cdecl; |
sg_httpres_sendstream: function(res: Psg_httpres; size: cuint64_t; read_cb: sg_read_cb; handle: Pcvoid; free_cb: sg_free_cb; status: cuint): cint; cdecl; |
sg_httpres_zsendbinary2: function(res: Psg_httpres; level: cint; buf: Pcvoid; size: csize_t; const content_type: Pcchar; status: cuint): cint; cdecl; |
sg_httpres_zsendbinary: function(res: Psg_httpres; buf: Pcvoid; size: csize_t; const content_type: Pcchar; status: cuint): cint; cdecl; |
sg_httpres_zsendstream2: function(res: Psg_httpres; level: cint; size: cuint64_t; read_cb: sg_read_cb; handle: Pcvoid; free_cb: sg_free_cb; status: cuint): cint; cdecl; |
sg_httpres_zsendstream: function(res: Psg_httpres; read_cb: sg_read_cb; handle: Pcvoid; free_cb: sg_free_cb; status: cuint): cint; cdecl; |
sg_httpres_zsendfile2: function(res: Psg_httpres; level: cint; size: cuint64_t; max_size: cuint64_t; offset: cuint64_t; const filename: Pcchar; const disposition: Pcchar; status: cuint): cint; cdecl; |
sg_httpres_zsendfile: function(res: Psg_httpres; size: cuint64_t; max_size: cuint64_t; offset: cuint64_t; const filename: Pcchar; downloaded: cbool; status: cuint): cint; cdecl; |
sg_httpres_reset: function(res: Psg_httpres): cint; cdecl; |
sg_httpres_clear: function(res: Psg_httpres): cint; cdecl; |
sg_httpres_is_empty: function(res: Psg_httpres): cbool; cdecl; |
sg_httpsrv_new2: function(auth_cb: sg_httpauth_cb; req_cb: sg_httpreq_cb; err_cb: sg_err_cb; cls: Pcvoid): Psg_httpsrv; cdecl; |
sg_httpsrv_new: function(cb: sg_httpreq_cb; cls: Pcvoid): Psg_httpsrv; cdecl; |
sg_httpsrv_free: procedure(srv: Psg_httpsrv); cdecl; |
sg_httpsrv_tls_listen4: function(srv: Psg_httpsrv; const key: Pcchar; const pwd: Pcchar; const cert: Pcchar; const trust: Pcchar; const dhparams: Pcchar; const priorities: Pcchar; const hostname: Pcchar; port: cuint16_t; backlog: cuint; threaded: cbool): cbool; cdecl; |
sg_httpsrv_tls_listen3: function(srv: Psg_httpsrv; const key: Pcchar; const pwd: Pcchar; const cert: Pcchar; const trust: Pcchar; const dhparams: Pcchar; const priorities: Pcchar; port: cuint16_t; threaded: cbool): cbool; cdecl; |
sg_httpsrv_tls_listen2: function(srv: Psg_httpsrv; const key: Pcchar; const pwd: Pcchar; const cert: Pcchar; const trust: Pcchar; const dhparams: Pcchar; port: cuint16_t; threaded: cbool): cbool; cdecl; |
sg_httpsrv_tls_listen: function(srv: Psg_httpsrv; const key: Pcchar; const cert: Pcchar; port: cuint16_t; threaded: cbool): cbool; cdecl; |
sg_httpsrv_listen2: function(srv: Psg_httpsrv; hostname: Pcchar; port: cuint16_t; backlog: cuint; threaded: cbool): cbool; cdecl; |
sg_httpsrv_listen: function(srv: Psg_httpsrv; port: cuint16_t; threaded: cbool): cbool; cdecl; |
sg_httpsrv_shutdown: function(srv: Psg_httpsrv): cint; cdecl; |
sg_httpsrv_port: function(srv: Psg_httpsrv): cuint16_t; cdecl; |
sg_httpsrv_is_threaded: function(srv: Psg_httpsrv): cbool; cdecl; |
sg_httpsrv_set_cli_cb: function(srv: Psg_httpsrv; cb: sg_httpsrv_cli_cb; cls: Pcvoid): cint; cdecl; |
sg_httpsrv_set_upld_cbs: function(srv: Psg_httpsrv; cb: sg_httpupld_cb; cls: Pcvoid; write_cb: sg_write_cb; free_cb: sg_free_cb; save_cb: sg_save_cb; save_as_cb: sg_save_as_cb): cint; cdecl; |
sg_httpsrv_set_upld_dir: function(srv: Psg_httpsrv; const dir: Pcchar): cint; cdecl; |
sg_httpsrv_upld_dir: function(srv: Psg_httpsrv): Pcchar; cdecl; |
sg_httpsrv_set_post_buf_size: function(srv: Psg_httpsrv; size: csize_t): cint; cdecl; |
sg_httpsrv_post_buf_size: function(srv: Psg_httpsrv): csize_t; cdecl; |
sg_httpsrv_set_payld_limit: function(srv: Psg_httpsrv; limit: csize_t): cint; cdecl; |
sg_httpsrv_payld_limit: function(srv: Psg_httpsrv): csize_t; cdecl; |
sg_httpsrv_set_uplds_limit: function(srv: Psg_httpsrv; limit: cuint64_t): cint; cdecl; |
sg_httpsrv_uplds_limit: function(srv: Psg_httpsrv): cuint64_t; cdecl; |
sg_httpsrv_set_thr_pool_size: function(srv: Psg_httpsrv; size: cuint): cint; cdecl; |
sg_httpsrv_thr_pool_size: function(srv: Psg_httpsrv): cuint; cdecl; |
sg_httpsrv_set_con_timeout: function(srv: Psg_httpsrv; timeout: cuint): cint; cdecl; |
sg_httpsrv_con_timeout: function(srv: Psg_httpsrv): cuint; cdecl; |
sg_httpsrv_set_con_limit: function(srv: Psg_httpsrv; limit: cuint): cint; cdecl; |
sg_httpsrv_con_limit: function(srv: Psg_httpsrv): cuint; cdecl; |
sg_httpsrv_handle: function(srv: Psg_httpsrv): Pcvoid; cdecl; |
sg_entrypoint_name: function(entrypoint: Psg_entrypoint): Pcchar; cdecl; |
sg_entrypoint_set_user_data: function(entrypoint: Psg_entrypoint; user_data: Pcvoid): cint; cdecl; |
sg_entrypoint_user_data: function(entrypoint: Psg_entrypoint): Pcvoid; cdecl; |
sg_entrypoints_new: function: Psg_entrypoints; cdecl; |
sg_entrypoints_free: procedure(entrypoints: Psg_entrypoints); cdecl; |
sg_entrypoints_add: function(entrypoints: Psg_entrypoints; const path: Pcchar; user_data: Pcvoid): cint; cdecl; |
sg_entrypoints_rm: function(entrypoints: Psg_entrypoints; const path: Pcchar): cint; cdecl; |
sg_entrypoints_iter: function(entrypoints: Psg_entrypoints; cb: sg_entrypoints_iter_cb; cls: Pcvoid): cint; cdecl; |
sg_entrypoints_clear: function(entrypoints: Psg_entrypoints): cint; cdecl; |
sg_entrypoints_find: function(entrypoints: Psg_entrypoints; entrypoint: PPsg_entrypoint; const path: Pcchar): cint; cdecl; |
sg_route_handle: function(route: Psg_route): Pcvoid; cdecl; |
sg_route_match: function(route: Psg_route): Pcvoid; cdecl; |
sg_route_rawpattern: function(route: Psg_route): Pcchar; cdecl; |
sg_route_pattern: function(route: Psg_route): Pcchar; cdecl; |
sg_route_path: function(route: Psg_route): Pcchar; cdecl; |
sg_route_segments_iter: function(route: Psg_route; cb: sg_segments_iter_cb; cls: Pcvoid): cint; cdecl; |
sg_route_vars_iter: function(route: Psg_route; cb: sg_vars_iter_cb; cls: Pcvoid): cint; cdecl; |
sg_route_user_data: function(route: Psg_route): Pcvoid; cdecl; |
sg_routes_add2: function(routes: PPsg_route; route: PPsg_route; const pattern: Pcchar; errmsg: Pcchar; errlen: csize_t; cb: sg_route_cb; cls: Pcvoid): cint; cdecl; |
sg_routes_add: function(routes: Psg_route; const pattern: Pcchar; cb: sg_route_cb; cls: Pcvoid): cint; cdecl; |
sg_routes_rm: function(routes: PPsg_route; const pattern: Pcchar): cint; cdecl; |
sg_routes_iter: function(routes: Psg_route; cb: sg_routes_iter_cb; cls: Pcvoid): cint; cdecl; |
sg_routes_next: function(route: PPsg_route): cint; cdecl; |
sg_routes_count: function(routes: Psg_route): cuint; cdecl; |
sg_routes_cleanup: function(routes: PPsg_route): cint; cdecl; |
sg_router_new: function(routes: Psg_route): Psg_router; cdecl; |
sg_router_free: procedure(router: Psg_router); cdecl; |
sg_router_dispatch2: function(router: Psg_router; const path: Pcchar; user_data: Pcvoid; dispatch_cb: sg_router_dispatch_cb; cls: Pcvoid; match_cb: sg_router_match_cb): cint; cdecl; |
sg_router_dispatch: function(router: Psg_router; const path: Pcchar; user_data: Pcvoid): cint; cdecl; |
sg_expr_new: function: Psg_expr; cdecl; |
sg_expr_free: procedure(expr: Psg_expr); cdecl; |
sg_expr_compile: function(expr: Psg_expr; const str: Pcchar; len: csize_t; extensions: Psg_expr_extension): cint; cdecl; |
sg_expr_clear: function(expr: Psg_expr): cint; cdecl; |
sg_expr_eval: function(expr: Psg_expr): cdouble; cdecl; |
sg_expr_var: function(expr: Psg_expr; const name: Pcchar; len: csize_t): cdouble; cdecl; |
sg_expr_set_var: function(expr: Psg_expr; const name: Pcchar; len: csize_t; const val: cdouble): cint; cdecl; |
sg_expr_arg: function(args: Psg_expr_argument; index: cint): cdouble; cdecl; |
sg_expr_near: function(expr: Psg_expr): cint; cdecl; |
sg_expr_err: function(expr: Psg_expr): sg_expr_err_type; cdecl; |
sg_expr_strerror: function(expr: Psg_expr): Pcchar; cdecl; |
sg_expr_calc: function(const str: Pcchar; len: csize_t): cdouble; cdecl; |
GitHub Repository
Generated by PasDoc 0.16.0.