.TH "ttypt/axil-hyle.h" 3 "axil-hyle" \" -*- nroff -*- .ad l .nh .SH NAME ttypt/axil-hyle.h \- Generic Axil-Hyle HTTP bridge\&. .SH SYNOPSIS .br .PP .SS "Data Structures" .in +1c .ti -1c .RI "struct \fBaxil_hyle_partition_change_ctx_t\fP" .br .RI "Context describing one requested partition change\&. " .ti -1c .RI "struct \fBaxil_hyle_param_alias_t\fP" .br .RI "One parameter-name alias for a schema field\&. " .ti -1c .RI "struct \fBaxil_hyle_partition_routes_spec_t\fP" .br .RI "Declarative specification for partition sub-resource routes\&. " .in -1c .SS "Typedefs" .in +1c .ti -1c .RI "typedef int(* \fBaxil_hyle_item_read_filter_fn\fP) (int fd, const char *dataset_id, const char *items_path, const char *item_id, const char *username, void *user_data)" .br .RI "Per-item read authorization filter for dataset API routes\&. " .ti -1c .RI "typedef int(* \fBaxil_hyle_partition_change_fn\fP) (const \fBaxil_hyle_partition_change_ctx_t\fP *ctx)" .br .RI "Callback invoked after a partition change executes\&. " .ti -1c .RI "typedef int(* \fBaxil_hyle_access_check_fn\fP) (int fd, const char *module, const char *parent_id, const char *username, void *user_data)" .br .RI "Pluggable authorization callback for a request\&. " .in -1c .SS "Functions" .in +1c .ti -1c .RI "void \fBaxil_hyle_install_routes\fP (void)" .br .RI "Mount the standard Axil-Hyle REST CRUD routes (\fR/api/dataset/\fP\&.\&.\&.)\&. " .ti -1c .RI "void \fBaxil_hyle_set_item_read_filter\fP (\fBaxil_hyle_item_read_filter_fn\fP fn, void *user_data)" .br .RI "Register (or clear with NULL) the per-item read filter callback\&. " .ti -1c .RI "int \fBaxil_hyle_partition_execute\fP (int fd, char *body, const char *action, const \fBaxil_hyle_partition_routes_spec_t\fP *spec, const char *parent_id)" .br .RI "Execute a partition sub-resource action (no route registration)\&. " .ti -1c .RI "int \fBaxil_hyle_register_partition_routes\fP (const \fBaxil_hyle_partition_routes_spec_t\fP *spec)" .br .RI "Mount standard sub-resource routes for a partition spec\&. " .in -1c .SH "Detailed Description" .PP Generic Axil-Hyle HTTP bridge\&. Mounts standard REST CRUD endpoints (\fR/api/dataset/\fP\&.\&.\&.) for any Axil web application\&. Framework-neutral: serves JSON only, with pluggable partition routes for parent/child datasets\&. .SH "Typedef Documentation" .PP .SS "typedef int(* axil_hyle_access_check_fn) (int fd, const char *module, const char *parent_id, const char *username, void *user_data)" .PP Pluggable authorization callback for a request\&. .PP \fBParameters\fP .RS 4 \fIfd\fP Client fd\&. .br \fImodule\fP Entity module name\&. .br \fIparent_id\fP Parent item key\&. .br \fIusername\fP Authenticated username\&. .br \fIuser_data\fP Caller data\&. .RE .PP \fBReturns\fP .RS 4 Non-zero to allow, zero to deny\&. .RE .PP .SS "typedef int(* axil_hyle_item_read_filter_fn) (int fd, const char *dataset_id, const char *items_path, const char *item_id, const char *username, void *user_data)" .PP Per-item read authorization filter for dataset API routes\&. When registered via \fBaxil_hyle_set_item_read_filter()\fP, invoked for each item returned by \fRGET\fP /api/dataset/:dataset_id and \fRGET\fP /api/dataset/:dataset_id/:key\&. .PP \fBParameters\fP .RS 4 \fIfd\fP Client fd\&. .br \fIdataset_id\fP Dataset identifier, e\&.g\&. "software\&.items"\&. .br \fIitems_path\fP Filesystem base path for the dataset, or NULL\&. .br \fIitem_id\fP Item key\&. .br \fIusername\fP Authenticated username, or empty string if anonymous\&. .br \fIuser_data\fP Opaque pointer passed at registration time\&. .RE .PP \fBReturns\fP .RS 4 Non-zero to allow read access, zero to hide/deny the item\&. .RE .PP .SS "typedef int(* axil_hyle_partition_change_fn) (const \fBaxil_hyle_partition_change_ctx_t\fP *ctx)" .PP Callback invoked after a partition change executes\&. .PP \fBParameters\fP .RS 4 \fIctx\fP Change context\&. .RE .PP \fBReturns\fP .RS 4 0 on success, non-zero to signal failure\&. .RE .PP .SH "Function Documentation" .PP .SS "int axil_hyle_partition_execute (int fd, char * body, const char * action, const \fBaxil_hyle_partition_routes_spec_t\fP * spec, const char * parent_id)" .PP Execute a partition sub-resource action (no route registration)\&. .PP \fBParameters\fP .RS 4 \fIfd\fP Client fd\&. .br \fIbody\fP Request body\&. .br \fIaction\fP Action slug ("add", "remove", "replace", "update")\&. .br \fIspec\fP Partition routes specification\&. .br \fIparent_id\fP Parent item key\&. .RE .PP \fBReturns\fP .RS 4 0 on success, negative on failure\&. .RE .PP .SS "int axil_hyle_register_partition_routes (const \fBaxil_hyle_partition_routes_spec_t\fP * spec)" .PP Mount standard sub-resource routes for a partition spec\&. .PP \fBParameters\fP .RS 4 \fIspec\fP Partition routes specification\&. .RE .PP \fBReturns\fP .RS 4 0 on success, negative on failure\&. .RE .PP .SS "void axil_hyle_set_item_read_filter (\fBaxil_hyle_item_read_filter_fn\fP fn, void * user_data)" .PP Register (or clear with NULL) the per-item read filter callback\&. .PP \fBParameters\fP .RS 4 \fIfn\fP Filter callback, or NULL to disable filtering\&. .br \fIuser_data\fP Opaque user pointer forwarded to \fRfn\fP\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for axil-hyle from the source code\&.