Shared Types ============ Callback and function pointer types used across AXL modules. These follow GLib naming conventions where applicable. Core Types ---------- .. list-table:: :header-rows: 1 :widths: 25 40 35 * - Type - Signature - Header * - ``AxlDestroyNotify`` - ``void (*)(void *data)`` - ```` * - ``AxlFunc`` - ``void (*)(void *data, void *user_data)`` - ```` * - ``AxlCompareFunc`` - ``int (*)(const void *a, const void *b)`` - ```` * - ``AxlCompareDataFunc`` - ``int (*)(const void *a, const void *b, void *user_data)`` - ```` * - ``AxlCopyFunc`` - ``void *(*)(const void *src, void *user_data)`` - ```` Hash Table Types ---------------- .. list-table:: :header-rows: 1 :widths: 30 40 30 * - Type - Signature - Header * - ``AxlHashFunc`` - ``size_t (*)(const void *key)`` - ```` * - ``AxlEqualFunc`` - ``bool (*)(const void *a, const void *b)`` - ```` * - ``AxlHashTableForeachFunc`` - ``void (*)(const void *key, void *value, void *data)`` - ```` * - ``AxlHashTableForeachRemoveFunc`` - ``bool (*)(const void *key, void *value, void *data)`` - ```` Event and Task Types -------------------- .. list-table:: :header-rows: 1 :widths: 25 40 35 * - Type - Signature - Header * - ``AxlLoopCallback`` - ``bool (*)(void *data)`` - ```` * - ``AxlKeyCallback`` - ``bool (*)(uint16_t key, void *data)`` - ```` * - ``AxlDeferCallback`` - ``void (*)(void *data)`` - ```` * - ``AxlSignalCallback`` - ``void (*)(int signal_id, void *data, void *user_data)`` - ```` * - ``AxlTaskProc`` - ``void (*)(void *arg)`` - ```` * - ``AxlTaskComplete`` - ``void (*)(void *arg, void *result)`` - ```` I/O and Network Types --------------------- .. list-table:: :header-rows: 1 :widths: 25 40 35 * - Type - Signature - Header * - ``AxlProgressFunc`` - ``void (*)(uint64_t done, uint64_t total, void *ctx)`` - ```` * - ``AxlLogHandler`` - ``void (*)(int level, const char *domain, const char *msg, void *data)`` - ```` * - ``AxlHttpHandler`` - ``int (*)(AxlHttpRequest *req, AxlHttpResponse *resp, void *ctx)`` - ```` * - ``AxlTcpCallback`` - ``void (*)(AxlTcpSocket *sock, void *data)`` - ```` * - ``AxlUdpRecvCallback`` - ``void (*)(void *buf, size_t len, void *data)`` - ```` * - ``AxlConfigApplyFunc`` - ``int (*)(void *target, const char *key, const char *value)`` - ```` Built-in Hash/Equal Functions ----------------------------- .. list-table:: :header-rows: 1 :widths: 25 45 30 * - Function - Purpose - Header * - ``axl_str_hash`` - FNV-1a hash for NUL-terminated strings - ```` * - ``axl_str_equal`` - String equality (strcmp == 0) - ```` * - ``axl_direct_hash`` - Hash a pointer/integer value directly - ```` * - ``axl_direct_equal`` - Pointer equality (a == b) - ````