mirror of
https://github.com/Sarsoo/csbindgen.git
synced 2024-12-22 22:46:26 +00:00
sqlite3 support(fix for nested fn)
This commit is contained in:
parent
ecaccf9f90
commit
47fd97eb37
69
csbindgen-tests/build.rs
vendored
69
csbindgen-tests/build.rs
vendored
@ -31,6 +31,12 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||||||
// .generate()?
|
// .generate()?
|
||||||
// .write_to_file("src/quiche.rs")?;
|
// .write_to_file("src/quiche.rs")?;
|
||||||
|
|
||||||
|
|
||||||
|
bindgen::Builder::default()
|
||||||
|
.header("c/sqlite3/sqlite3.h")
|
||||||
|
.generate()?
|
||||||
|
.write_to_file("src/sqlite3.rs")?;
|
||||||
|
|
||||||
// bindgen::Builder::default()
|
// bindgen::Builder::default()
|
||||||
// .header("c/bullet3/PhysicsClientC_API.h")
|
// .header("c/bullet3/PhysicsClientC_API.h")
|
||||||
// .header("c/bullet3/PhysicsClientSharedMemory_C_API.h")
|
// .header("c/bullet3/PhysicsClientSharedMemory_C_API.h")
|
||||||
@ -59,6 +65,23 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||||||
.generate_to_file("src/lz4_ffi.rs", "../dotnet-sandbox/lz4_bindgen.cs")
|
.generate_to_file("src/lz4_ffi.rs", "../dotnet-sandbox/lz4_bindgen.cs")
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
|
||||||
|
csbindgen::Builder::default()
|
||||||
|
.input_bindgen_file("src/sqlite3.rs")
|
||||||
|
.method_filter(|x| x.starts_with("sqlite3_"))
|
||||||
|
.rust_method_prefix("csbindgen_")
|
||||||
|
.rust_file_header("use super::sqlite3::*;")
|
||||||
|
// .rust_method_type_path("sqlite3")
|
||||||
|
.csharp_class_name("LibSqlite3")
|
||||||
|
.csharp_namespace("CsBindgen")
|
||||||
|
.csharp_dll_name("csbindgen_tests")
|
||||||
|
.csharp_dll_name_if("UNITY_IOS && !UNITY_EDITOR", "__Internal")
|
||||||
|
.csharp_entry_point_prefix("csbindgen_")
|
||||||
|
.csharp_method_prefix("")
|
||||||
|
.csharp_class_accessibility("public")
|
||||||
|
.generate_to_file("src/sqlite3_ffi.rs", "../dotnet-sandbox/sqlite3_bindgen.cs")
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
csbindgen::Builder::default()
|
csbindgen::Builder::default()
|
||||||
.input_extern_file("src/lib.rs")
|
.input_extern_file("src/lib.rs")
|
||||||
.csharp_class_name("NativeMethods")
|
.csharp_class_name("NativeMethods")
|
||||||
@ -67,33 +90,29 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||||||
.generate_csharp_file("../dotnet-sandbox/NativeMethods.cs")
|
.generate_csharp_file("../dotnet-sandbox/NativeMethods.cs")
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
// csbindgen::Builder::new()
|
csbindgen::Builder::new()
|
||||||
// .input_bindgen_file("src/zstd.rs")
|
.input_bindgen_file("src/zstd.rs")
|
||||||
// .method_filter(|x| x.starts_with("ZSTD_"))
|
.method_filter(|x| x.starts_with("ZSTD_"))
|
||||||
// .rust_method_prefix("csbindgen_zstd_")
|
.rust_file_header("use super::zstd::*;")
|
||||||
// .rust_file_header("use super::zstd::*;")
|
.csharp_class_name("LibZstd")
|
||||||
// .csharp_class_name("LibZstd")
|
.csharp_dll_name("libzsd")
|
||||||
// .csharp_dll_name("libzsd")
|
.generate_to_file("src/zstd_ffi.rs", "../dotnet-sandbox/zstd_bindgen.cs")?;
|
||||||
// .generate_to_file("src/zstd_ffi.rs", "../dotnet-sandbox/zstd_bindgen.cs")?;
|
|
||||||
|
|
||||||
// csbindgen::Builder::new()
|
csbindgen::Builder::new()
|
||||||
// .input_bindgen_file("src/quiche.rs")
|
.input_bindgen_file("src/quiche.rs")
|
||||||
// .method_filter(|x| x.starts_with("quiche_"))
|
.method_filter(|x| x.starts_with("quiche_"))
|
||||||
// .rust_file_header("use super::quiche::*;")
|
.rust_file_header("use super::quiche::*;")
|
||||||
// .rust_method_prefix("csbindgen_quiche_")
|
.csharp_class_name("LibQuiche")
|
||||||
// .csharp_class_name("LibQuiche")
|
.csharp_dll_name("libquiche")
|
||||||
// .csharp_dll_name("libquiche")
|
.generate_to_file("src/quiche_ffi.rs", "../dotnet-sandbox/quiche_bindgen.cs")?;
|
||||||
// .generate_to_file("src/quiche_ffi.rs", "../dotnet-sandbox/quiche_bindgen.cs")?;
|
|
||||||
|
|
||||||
// csbindgen::Builder::new()
|
csbindgen::Builder::new()
|
||||||
// .input_bindgen_file("src/bullet3.rs")
|
.input_bindgen_file("src/bullet3.rs")
|
||||||
// .method_filter(|x| x.starts_with("b3"))
|
.method_filter(|x| x.starts_with("b3"))
|
||||||
// .rust_file_header("use super::bullet3::*;")
|
.rust_file_header("use super::bullet3::*;")
|
||||||
// .rust_method_prefix("csbindgen_bullet3_")
|
.csharp_class_name("LibBullet3")
|
||||||
// .csharp_entry_point_prefix("csbindgen_bullet3_")
|
.csharp_dll_name("libbullet3")
|
||||||
// .csharp_class_name("LibBullet3")
|
.generate_to_file("src/bullet3_ffi.rs", "../dotnet-sandbox/bullet3_bindgen.cs")?;
|
||||||
// .csharp_dll_name("libbullet3")
|
|
||||||
// .generate_to_file("src/bullet3_ffi.rs", "../dotnet-sandbox/bullet3_bindgen.cs")?;
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
27668
csbindgen-tests/c/sqlite3/shell.c
vendored
Normal file
27668
csbindgen-tests/c/sqlite3/shell.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
245218
csbindgen-tests/c/sqlite3/sqlite3.c
vendored
Normal file
245218
csbindgen-tests/c/sqlite3/sqlite3.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
12970
csbindgen-tests/c/sqlite3/sqlite3.h
vendored
Normal file
12970
csbindgen-tests/c/sqlite3/sqlite3.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
709
csbindgen-tests/c/sqlite3/sqlite3ext.h
vendored
Normal file
709
csbindgen-tests/c/sqlite3/sqlite3ext.h
vendored
Normal file
@ -0,0 +1,709 @@
|
|||||||
|
/*
|
||||||
|
** 2006 June 7
|
||||||
|
**
|
||||||
|
** The author disclaims copyright to this source code. In place of
|
||||||
|
** a legal notice, here is a blessing:
|
||||||
|
**
|
||||||
|
** May you do good and not evil.
|
||||||
|
** May you find forgiveness for yourself and forgive others.
|
||||||
|
** May you share freely, never taking more than you give.
|
||||||
|
**
|
||||||
|
*************************************************************************
|
||||||
|
** This header file defines the SQLite interface for use by
|
||||||
|
** shared libraries that want to be imported as extensions into
|
||||||
|
** an SQLite instance. Shared libraries that intend to be loaded
|
||||||
|
** as extensions by SQLite should #include this file instead of
|
||||||
|
** sqlite3.h.
|
||||||
|
*/
|
||||||
|
#ifndef SQLITE3EXT_H
|
||||||
|
#define SQLITE3EXT_H
|
||||||
|
#include "sqlite3.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
** The following structure holds pointers to all of the SQLite API
|
||||||
|
** routines.
|
||||||
|
**
|
||||||
|
** WARNING: In order to maintain backwards compatibility, add new
|
||||||
|
** interfaces to the end of this structure only. If you insert new
|
||||||
|
** interfaces in the middle of this structure, then older different
|
||||||
|
** versions of SQLite will not be able to load each other's shared
|
||||||
|
** libraries!
|
||||||
|
*/
|
||||||
|
struct sqlite3_api_routines {
|
||||||
|
void * (*aggregate_context)(sqlite3_context*,int nBytes);
|
||||||
|
int (*aggregate_count)(sqlite3_context*);
|
||||||
|
int (*bind_blob)(sqlite3_stmt*,int,const void*,int n,void(*)(void*));
|
||||||
|
int (*bind_double)(sqlite3_stmt*,int,double);
|
||||||
|
int (*bind_int)(sqlite3_stmt*,int,int);
|
||||||
|
int (*bind_int64)(sqlite3_stmt*,int,sqlite_int64);
|
||||||
|
int (*bind_null)(sqlite3_stmt*,int);
|
||||||
|
int (*bind_parameter_count)(sqlite3_stmt*);
|
||||||
|
int (*bind_parameter_index)(sqlite3_stmt*,const char*zName);
|
||||||
|
const char * (*bind_parameter_name)(sqlite3_stmt*,int);
|
||||||
|
int (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*));
|
||||||
|
int (*bind_text16)(sqlite3_stmt*,int,const void*,int,void(*)(void*));
|
||||||
|
int (*bind_value)(sqlite3_stmt*,int,const sqlite3_value*);
|
||||||
|
int (*busy_handler)(sqlite3*,int(*)(void*,int),void*);
|
||||||
|
int (*busy_timeout)(sqlite3*,int ms);
|
||||||
|
int (*changes)(sqlite3*);
|
||||||
|
int (*close)(sqlite3*);
|
||||||
|
int (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,
|
||||||
|
int eTextRep,const char*));
|
||||||
|
int (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,
|
||||||
|
int eTextRep,const void*));
|
||||||
|
const void * (*column_blob)(sqlite3_stmt*,int iCol);
|
||||||
|
int (*column_bytes)(sqlite3_stmt*,int iCol);
|
||||||
|
int (*column_bytes16)(sqlite3_stmt*,int iCol);
|
||||||
|
int (*column_count)(sqlite3_stmt*pStmt);
|
||||||
|
const char * (*column_database_name)(sqlite3_stmt*,int);
|
||||||
|
const void * (*column_database_name16)(sqlite3_stmt*,int);
|
||||||
|
const char * (*column_decltype)(sqlite3_stmt*,int i);
|
||||||
|
const void * (*column_decltype16)(sqlite3_stmt*,int);
|
||||||
|
double (*column_double)(sqlite3_stmt*,int iCol);
|
||||||
|
int (*column_int)(sqlite3_stmt*,int iCol);
|
||||||
|
sqlite_int64 (*column_int64)(sqlite3_stmt*,int iCol);
|
||||||
|
const char * (*column_name)(sqlite3_stmt*,int);
|
||||||
|
const void * (*column_name16)(sqlite3_stmt*,int);
|
||||||
|
const char * (*column_origin_name)(sqlite3_stmt*,int);
|
||||||
|
const void * (*column_origin_name16)(sqlite3_stmt*,int);
|
||||||
|
const char * (*column_table_name)(sqlite3_stmt*,int);
|
||||||
|
const void * (*column_table_name16)(sqlite3_stmt*,int);
|
||||||
|
const unsigned char * (*column_text)(sqlite3_stmt*,int iCol);
|
||||||
|
const void * (*column_text16)(sqlite3_stmt*,int iCol);
|
||||||
|
int (*column_type)(sqlite3_stmt*,int iCol);
|
||||||
|
sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol);
|
||||||
|
void * (*commit_hook)(sqlite3*,int(*)(void*),void*);
|
||||||
|
int (*complete)(const char*sql);
|
||||||
|
int (*complete16)(const void*sql);
|
||||||
|
int (*create_collation)(sqlite3*,const char*,int,void*,
|
||||||
|
int(*)(void*,int,const void*,int,const void*));
|
||||||
|
int (*create_collation16)(sqlite3*,const void*,int,void*,
|
||||||
|
int(*)(void*,int,const void*,int,const void*));
|
||||||
|
int (*create_function)(sqlite3*,const char*,int,int,void*,
|
||||||
|
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
||||||
|
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
||||||
|
void (*xFinal)(sqlite3_context*));
|
||||||
|
int (*create_function16)(sqlite3*,const void*,int,int,void*,
|
||||||
|
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
||||||
|
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
||||||
|
void (*xFinal)(sqlite3_context*));
|
||||||
|
int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);
|
||||||
|
int (*data_count)(sqlite3_stmt*pStmt);
|
||||||
|
sqlite3 * (*db_handle)(sqlite3_stmt*);
|
||||||
|
int (*declare_vtab)(sqlite3*,const char*);
|
||||||
|
int (*enable_shared_cache)(int);
|
||||||
|
int (*errcode)(sqlite3*db);
|
||||||
|
const char * (*errmsg)(sqlite3*);
|
||||||
|
const void * (*errmsg16)(sqlite3*);
|
||||||
|
int (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**);
|
||||||
|
int (*expired)(sqlite3_stmt*);
|
||||||
|
int (*finalize)(sqlite3_stmt*pStmt);
|
||||||
|
void (*free)(void*);
|
||||||
|
void (*free_table)(char**result);
|
||||||
|
int (*get_autocommit)(sqlite3*);
|
||||||
|
void * (*get_auxdata)(sqlite3_context*,int);
|
||||||
|
int (*get_table)(sqlite3*,const char*,char***,int*,int*,char**);
|
||||||
|
int (*global_recover)(void);
|
||||||
|
void (*interruptx)(sqlite3*);
|
||||||
|
sqlite_int64 (*last_insert_rowid)(sqlite3*);
|
||||||
|
const char * (*libversion)(void);
|
||||||
|
int (*libversion_number)(void);
|
||||||
|
void *(*malloc)(int);
|
||||||
|
char * (*mprintf)(const char*,...);
|
||||||
|
int (*open)(const char*,sqlite3**);
|
||||||
|
int (*open16)(const void*,sqlite3**);
|
||||||
|
int (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
|
||||||
|
int (*prepare16)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
|
||||||
|
void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_uint64),void*);
|
||||||
|
void (*progress_handler)(sqlite3*,int,int(*)(void*),void*);
|
||||||
|
void *(*realloc)(void*,int);
|
||||||
|
int (*reset)(sqlite3_stmt*pStmt);
|
||||||
|
void (*result_blob)(sqlite3_context*,const void*,int,void(*)(void*));
|
||||||
|
void (*result_double)(sqlite3_context*,double);
|
||||||
|
void (*result_error)(sqlite3_context*,const char*,int);
|
||||||
|
void (*result_error16)(sqlite3_context*,const void*,int);
|
||||||
|
void (*result_int)(sqlite3_context*,int);
|
||||||
|
void (*result_int64)(sqlite3_context*,sqlite_int64);
|
||||||
|
void (*result_null)(sqlite3_context*);
|
||||||
|
void (*result_text)(sqlite3_context*,const char*,int,void(*)(void*));
|
||||||
|
void (*result_text16)(sqlite3_context*,const void*,int,void(*)(void*));
|
||||||
|
void (*result_text16be)(sqlite3_context*,const void*,int,void(*)(void*));
|
||||||
|
void (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*));
|
||||||
|
void (*result_value)(sqlite3_context*,sqlite3_value*);
|
||||||
|
void * (*rollback_hook)(sqlite3*,void(*)(void*),void*);
|
||||||
|
int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,
|
||||||
|
const char*,const char*),void*);
|
||||||
|
void (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*));
|
||||||
|
char * (*xsnprintf)(int,char*,const char*,...);
|
||||||
|
int (*step)(sqlite3_stmt*);
|
||||||
|
int (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,
|
||||||
|
char const**,char const**,int*,int*,int*);
|
||||||
|
void (*thread_cleanup)(void);
|
||||||
|
int (*total_changes)(sqlite3*);
|
||||||
|
void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);
|
||||||
|
int (*transfer_bindings)(sqlite3_stmt*,sqlite3_stmt*);
|
||||||
|
void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,
|
||||||
|
sqlite_int64),void*);
|
||||||
|
void * (*user_data)(sqlite3_context*);
|
||||||
|
const void * (*value_blob)(sqlite3_value*);
|
||||||
|
int (*value_bytes)(sqlite3_value*);
|
||||||
|
int (*value_bytes16)(sqlite3_value*);
|
||||||
|
double (*value_double)(sqlite3_value*);
|
||||||
|
int (*value_int)(sqlite3_value*);
|
||||||
|
sqlite_int64 (*value_int64)(sqlite3_value*);
|
||||||
|
int (*value_numeric_type)(sqlite3_value*);
|
||||||
|
const unsigned char * (*value_text)(sqlite3_value*);
|
||||||
|
const void * (*value_text16)(sqlite3_value*);
|
||||||
|
const void * (*value_text16be)(sqlite3_value*);
|
||||||
|
const void * (*value_text16le)(sqlite3_value*);
|
||||||
|
int (*value_type)(sqlite3_value*);
|
||||||
|
char *(*vmprintf)(const char*,va_list);
|
||||||
|
/* Added ??? */
|
||||||
|
int (*overload_function)(sqlite3*, const char *zFuncName, int nArg);
|
||||||
|
/* Added by 3.3.13 */
|
||||||
|
int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
|
||||||
|
int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
|
||||||
|
int (*clear_bindings)(sqlite3_stmt*);
|
||||||
|
/* Added by 3.4.1 */
|
||||||
|
int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,
|
||||||
|
void (*xDestroy)(void *));
|
||||||
|
/* Added by 3.5.0 */
|
||||||
|
int (*bind_zeroblob)(sqlite3_stmt*,int,int);
|
||||||
|
int (*blob_bytes)(sqlite3_blob*);
|
||||||
|
int (*blob_close)(sqlite3_blob*);
|
||||||
|
int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,
|
||||||
|
int,sqlite3_blob**);
|
||||||
|
int (*blob_read)(sqlite3_blob*,void*,int,int);
|
||||||
|
int (*blob_write)(sqlite3_blob*,const void*,int,int);
|
||||||
|
int (*create_collation_v2)(sqlite3*,const char*,int,void*,
|
||||||
|
int(*)(void*,int,const void*,int,const void*),
|
||||||
|
void(*)(void*));
|
||||||
|
int (*file_control)(sqlite3*,const char*,int,void*);
|
||||||
|
sqlite3_int64 (*memory_highwater)(int);
|
||||||
|
sqlite3_int64 (*memory_used)(void);
|
||||||
|
sqlite3_mutex *(*mutex_alloc)(int);
|
||||||
|
void (*mutex_enter)(sqlite3_mutex*);
|
||||||
|
void (*mutex_free)(sqlite3_mutex*);
|
||||||
|
void (*mutex_leave)(sqlite3_mutex*);
|
||||||
|
int (*mutex_try)(sqlite3_mutex*);
|
||||||
|
int (*open_v2)(const char*,sqlite3**,int,const char*);
|
||||||
|
int (*release_memory)(int);
|
||||||
|
void (*result_error_nomem)(sqlite3_context*);
|
||||||
|
void (*result_error_toobig)(sqlite3_context*);
|
||||||
|
int (*sleep)(int);
|
||||||
|
void (*soft_heap_limit)(int);
|
||||||
|
sqlite3_vfs *(*vfs_find)(const char*);
|
||||||
|
int (*vfs_register)(sqlite3_vfs*,int);
|
||||||
|
int (*vfs_unregister)(sqlite3_vfs*);
|
||||||
|
int (*xthreadsafe)(void);
|
||||||
|
void (*result_zeroblob)(sqlite3_context*,int);
|
||||||
|
void (*result_error_code)(sqlite3_context*,int);
|
||||||
|
int (*test_control)(int, ...);
|
||||||
|
void (*randomness)(int,void*);
|
||||||
|
sqlite3 *(*context_db_handle)(sqlite3_context*);
|
||||||
|
int (*extended_result_codes)(sqlite3*,int);
|
||||||
|
int (*limit)(sqlite3*,int,int);
|
||||||
|
sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*);
|
||||||
|
const char *(*sql)(sqlite3_stmt*);
|
||||||
|
int (*status)(int,int*,int*,int);
|
||||||
|
int (*backup_finish)(sqlite3_backup*);
|
||||||
|
sqlite3_backup *(*backup_init)(sqlite3*,const char*,sqlite3*,const char*);
|
||||||
|
int (*backup_pagecount)(sqlite3_backup*);
|
||||||
|
int (*backup_remaining)(sqlite3_backup*);
|
||||||
|
int (*backup_step)(sqlite3_backup*,int);
|
||||||
|
const char *(*compileoption_get)(int);
|
||||||
|
int (*compileoption_used)(const char*);
|
||||||
|
int (*create_function_v2)(sqlite3*,const char*,int,int,void*,
|
||||||
|
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
||||||
|
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
||||||
|
void (*xFinal)(sqlite3_context*),
|
||||||
|
void(*xDestroy)(void*));
|
||||||
|
int (*db_config)(sqlite3*,int,...);
|
||||||
|
sqlite3_mutex *(*db_mutex)(sqlite3*);
|
||||||
|
int (*db_status)(sqlite3*,int,int*,int*,int);
|
||||||
|
int (*extended_errcode)(sqlite3*);
|
||||||
|
void (*log)(int,const char*,...);
|
||||||
|
sqlite3_int64 (*soft_heap_limit64)(sqlite3_int64);
|
||||||
|
const char *(*sourceid)(void);
|
||||||
|
int (*stmt_status)(sqlite3_stmt*,int,int);
|
||||||
|
int (*strnicmp)(const char*,const char*,int);
|
||||||
|
int (*unlock_notify)(sqlite3*,void(*)(void**,int),void*);
|
||||||
|
int (*wal_autocheckpoint)(sqlite3*,int);
|
||||||
|
int (*wal_checkpoint)(sqlite3*,const char*);
|
||||||
|
void *(*wal_hook)(sqlite3*,int(*)(void*,sqlite3*,const char*,int),void*);
|
||||||
|
int (*blob_reopen)(sqlite3_blob*,sqlite3_int64);
|
||||||
|
int (*vtab_config)(sqlite3*,int op,...);
|
||||||
|
int (*vtab_on_conflict)(sqlite3*);
|
||||||
|
/* Version 3.7.16 and later */
|
||||||
|
int (*close_v2)(sqlite3*);
|
||||||
|
const char *(*db_filename)(sqlite3*,const char*);
|
||||||
|
int (*db_readonly)(sqlite3*,const char*);
|
||||||
|
int (*db_release_memory)(sqlite3*);
|
||||||
|
const char *(*errstr)(int);
|
||||||
|
int (*stmt_busy)(sqlite3_stmt*);
|
||||||
|
int (*stmt_readonly)(sqlite3_stmt*);
|
||||||
|
int (*stricmp)(const char*,const char*);
|
||||||
|
int (*uri_boolean)(const char*,const char*,int);
|
||||||
|
sqlite3_int64 (*uri_int64)(const char*,const char*,sqlite3_int64);
|
||||||
|
const char *(*uri_parameter)(const char*,const char*);
|
||||||
|
char *(*xvsnprintf)(int,char*,const char*,va_list);
|
||||||
|
int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*);
|
||||||
|
/* Version 3.8.7 and later */
|
||||||
|
int (*auto_extension)(void(*)(void));
|
||||||
|
int (*bind_blob64)(sqlite3_stmt*,int,const void*,sqlite3_uint64,
|
||||||
|
void(*)(void*));
|
||||||
|
int (*bind_text64)(sqlite3_stmt*,int,const char*,sqlite3_uint64,
|
||||||
|
void(*)(void*),unsigned char);
|
||||||
|
int (*cancel_auto_extension)(void(*)(void));
|
||||||
|
int (*load_extension)(sqlite3*,const char*,const char*,char**);
|
||||||
|
void *(*malloc64)(sqlite3_uint64);
|
||||||
|
sqlite3_uint64 (*msize)(void*);
|
||||||
|
void *(*realloc64)(void*,sqlite3_uint64);
|
||||||
|
void (*reset_auto_extension)(void);
|
||||||
|
void (*result_blob64)(sqlite3_context*,const void*,sqlite3_uint64,
|
||||||
|
void(*)(void*));
|
||||||
|
void (*result_text64)(sqlite3_context*,const char*,sqlite3_uint64,
|
||||||
|
void(*)(void*), unsigned char);
|
||||||
|
int (*strglob)(const char*,const char*);
|
||||||
|
/* Version 3.8.11 and later */
|
||||||
|
sqlite3_value *(*value_dup)(const sqlite3_value*);
|
||||||
|
void (*value_free)(sqlite3_value*);
|
||||||
|
int (*result_zeroblob64)(sqlite3_context*,sqlite3_uint64);
|
||||||
|
int (*bind_zeroblob64)(sqlite3_stmt*, int, sqlite3_uint64);
|
||||||
|
/* Version 3.9.0 and later */
|
||||||
|
unsigned int (*value_subtype)(sqlite3_value*);
|
||||||
|
void (*result_subtype)(sqlite3_context*,unsigned int);
|
||||||
|
/* Version 3.10.0 and later */
|
||||||
|
int (*status64)(int,sqlite3_int64*,sqlite3_int64*,int);
|
||||||
|
int (*strlike)(const char*,const char*,unsigned int);
|
||||||
|
int (*db_cacheflush)(sqlite3*);
|
||||||
|
/* Version 3.12.0 and later */
|
||||||
|
int (*system_errno)(sqlite3*);
|
||||||
|
/* Version 3.14.0 and later */
|
||||||
|
int (*trace_v2)(sqlite3*,unsigned,int(*)(unsigned,void*,void*,void*),void*);
|
||||||
|
char *(*expanded_sql)(sqlite3_stmt*);
|
||||||
|
/* Version 3.18.0 and later */
|
||||||
|
void (*set_last_insert_rowid)(sqlite3*,sqlite3_int64);
|
||||||
|
/* Version 3.20.0 and later */
|
||||||
|
int (*prepare_v3)(sqlite3*,const char*,int,unsigned int,
|
||||||
|
sqlite3_stmt**,const char**);
|
||||||
|
int (*prepare16_v3)(sqlite3*,const void*,int,unsigned int,
|
||||||
|
sqlite3_stmt**,const void**);
|
||||||
|
int (*bind_pointer)(sqlite3_stmt*,int,void*,const char*,void(*)(void*));
|
||||||
|
void (*result_pointer)(sqlite3_context*,void*,const char*,void(*)(void*));
|
||||||
|
void *(*value_pointer)(sqlite3_value*,const char*);
|
||||||
|
int (*vtab_nochange)(sqlite3_context*);
|
||||||
|
int (*value_nochange)(sqlite3_value*);
|
||||||
|
const char *(*vtab_collation)(sqlite3_index_info*,int);
|
||||||
|
/* Version 3.24.0 and later */
|
||||||
|
int (*keyword_count)(void);
|
||||||
|
int (*keyword_name)(int,const char**,int*);
|
||||||
|
int (*keyword_check)(const char*,int);
|
||||||
|
sqlite3_str *(*str_new)(sqlite3*);
|
||||||
|
char *(*str_finish)(sqlite3_str*);
|
||||||
|
void (*str_appendf)(sqlite3_str*, const char *zFormat, ...);
|
||||||
|
void (*str_vappendf)(sqlite3_str*, const char *zFormat, va_list);
|
||||||
|
void (*str_append)(sqlite3_str*, const char *zIn, int N);
|
||||||
|
void (*str_appendall)(sqlite3_str*, const char *zIn);
|
||||||
|
void (*str_appendchar)(sqlite3_str*, int N, char C);
|
||||||
|
void (*str_reset)(sqlite3_str*);
|
||||||
|
int (*str_errcode)(sqlite3_str*);
|
||||||
|
int (*str_length)(sqlite3_str*);
|
||||||
|
char *(*str_value)(sqlite3_str*);
|
||||||
|
/* Version 3.25.0 and later */
|
||||||
|
int (*create_window_function)(sqlite3*,const char*,int,int,void*,
|
||||||
|
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
||||||
|
void (*xFinal)(sqlite3_context*),
|
||||||
|
void (*xValue)(sqlite3_context*),
|
||||||
|
void (*xInv)(sqlite3_context*,int,sqlite3_value**),
|
||||||
|
void(*xDestroy)(void*));
|
||||||
|
/* Version 3.26.0 and later */
|
||||||
|
const char *(*normalized_sql)(sqlite3_stmt*);
|
||||||
|
/* Version 3.28.0 and later */
|
||||||
|
int (*stmt_isexplain)(sqlite3_stmt*);
|
||||||
|
int (*value_frombind)(sqlite3_value*);
|
||||||
|
/* Version 3.30.0 and later */
|
||||||
|
int (*drop_modules)(sqlite3*,const char**);
|
||||||
|
/* Version 3.31.0 and later */
|
||||||
|
sqlite3_int64 (*hard_heap_limit64)(sqlite3_int64);
|
||||||
|
const char *(*uri_key)(const char*,int);
|
||||||
|
const char *(*filename_database)(const char*);
|
||||||
|
const char *(*filename_journal)(const char*);
|
||||||
|
const char *(*filename_wal)(const char*);
|
||||||
|
/* Version 3.32.0 and later */
|
||||||
|
const char *(*create_filename)(const char*,const char*,const char*,
|
||||||
|
int,const char**);
|
||||||
|
void (*free_filename)(const char*);
|
||||||
|
sqlite3_file *(*database_file_object)(const char*);
|
||||||
|
/* Version 3.34.0 and later */
|
||||||
|
int (*txn_state)(sqlite3*,const char*);
|
||||||
|
/* Version 3.36.1 and later */
|
||||||
|
sqlite3_int64 (*changes64)(sqlite3*);
|
||||||
|
sqlite3_int64 (*total_changes64)(sqlite3*);
|
||||||
|
/* Version 3.37.0 and later */
|
||||||
|
int (*autovacuum_pages)(sqlite3*,
|
||||||
|
unsigned int(*)(void*,const char*,unsigned int,unsigned int,unsigned int),
|
||||||
|
void*, void(*)(void*));
|
||||||
|
/* Version 3.38.0 and later */
|
||||||
|
int (*error_offset)(sqlite3*);
|
||||||
|
int (*vtab_rhs_value)(sqlite3_index_info*,int,sqlite3_value**);
|
||||||
|
int (*vtab_distinct)(sqlite3_index_info*);
|
||||||
|
int (*vtab_in)(sqlite3_index_info*,int,int);
|
||||||
|
int (*vtab_in_first)(sqlite3_value*,sqlite3_value**);
|
||||||
|
int (*vtab_in_next)(sqlite3_value*,sqlite3_value**);
|
||||||
|
/* Version 3.39.0 and later */
|
||||||
|
int (*deserialize)(sqlite3*,const char*,unsigned char*,
|
||||||
|
sqlite3_int64,sqlite3_int64,unsigned);
|
||||||
|
unsigned char *(*serialize)(sqlite3*,const char *,sqlite3_int64*,
|
||||||
|
unsigned int);
|
||||||
|
const char *(*db_name)(sqlite3*,int);
|
||||||
|
/* Version 3.40.0 and later */
|
||||||
|
int (*value_encoding)(sqlite3_value*);
|
||||||
|
/* Version 3.41.0 and later */
|
||||||
|
int (*is_interrupted)(sqlite3*);
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
** This is the function signature used for all extension entry points. It
|
||||||
|
** is also defined in the file "loadext.c".
|
||||||
|
*/
|
||||||
|
typedef int (*sqlite3_loadext_entry)(
|
||||||
|
sqlite3 *db, /* Handle to the database. */
|
||||||
|
char **pzErrMsg, /* Used to set error string on failure. */
|
||||||
|
const sqlite3_api_routines *pThunk /* Extension API function pointers. */
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
** The following macros redefine the API routines so that they are
|
||||||
|
** redirected through the global sqlite3_api structure.
|
||||||
|
**
|
||||||
|
** This header file is also used by the loadext.c source file
|
||||||
|
** (part of the main SQLite library - not an extension) so that
|
||||||
|
** it can get access to the sqlite3_api_routines structure
|
||||||
|
** definition. But the main library does not want to redefine
|
||||||
|
** the API. So the redefinition macros are only valid if the
|
||||||
|
** SQLITE_CORE macros is undefined.
|
||||||
|
*/
|
||||||
|
#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
|
||||||
|
#define sqlite3_aggregate_context sqlite3_api->aggregate_context
|
||||||
|
#ifndef SQLITE_OMIT_DEPRECATED
|
||||||
|
#define sqlite3_aggregate_count sqlite3_api->aggregate_count
|
||||||
|
#endif
|
||||||
|
#define sqlite3_bind_blob sqlite3_api->bind_blob
|
||||||
|
#define sqlite3_bind_double sqlite3_api->bind_double
|
||||||
|
#define sqlite3_bind_int sqlite3_api->bind_int
|
||||||
|
#define sqlite3_bind_int64 sqlite3_api->bind_int64
|
||||||
|
#define sqlite3_bind_null sqlite3_api->bind_null
|
||||||
|
#define sqlite3_bind_parameter_count sqlite3_api->bind_parameter_count
|
||||||
|
#define sqlite3_bind_parameter_index sqlite3_api->bind_parameter_index
|
||||||
|
#define sqlite3_bind_parameter_name sqlite3_api->bind_parameter_name
|
||||||
|
#define sqlite3_bind_text sqlite3_api->bind_text
|
||||||
|
#define sqlite3_bind_text16 sqlite3_api->bind_text16
|
||||||
|
#define sqlite3_bind_value sqlite3_api->bind_value
|
||||||
|
#define sqlite3_busy_handler sqlite3_api->busy_handler
|
||||||
|
#define sqlite3_busy_timeout sqlite3_api->busy_timeout
|
||||||
|
#define sqlite3_changes sqlite3_api->changes
|
||||||
|
#define sqlite3_close sqlite3_api->close
|
||||||
|
#define sqlite3_collation_needed sqlite3_api->collation_needed
|
||||||
|
#define sqlite3_collation_needed16 sqlite3_api->collation_needed16
|
||||||
|
#define sqlite3_column_blob sqlite3_api->column_blob
|
||||||
|
#define sqlite3_column_bytes sqlite3_api->column_bytes
|
||||||
|
#define sqlite3_column_bytes16 sqlite3_api->column_bytes16
|
||||||
|
#define sqlite3_column_count sqlite3_api->column_count
|
||||||
|
#define sqlite3_column_database_name sqlite3_api->column_database_name
|
||||||
|
#define sqlite3_column_database_name16 sqlite3_api->column_database_name16
|
||||||
|
#define sqlite3_column_decltype sqlite3_api->column_decltype
|
||||||
|
#define sqlite3_column_decltype16 sqlite3_api->column_decltype16
|
||||||
|
#define sqlite3_column_double sqlite3_api->column_double
|
||||||
|
#define sqlite3_column_int sqlite3_api->column_int
|
||||||
|
#define sqlite3_column_int64 sqlite3_api->column_int64
|
||||||
|
#define sqlite3_column_name sqlite3_api->column_name
|
||||||
|
#define sqlite3_column_name16 sqlite3_api->column_name16
|
||||||
|
#define sqlite3_column_origin_name sqlite3_api->column_origin_name
|
||||||
|
#define sqlite3_column_origin_name16 sqlite3_api->column_origin_name16
|
||||||
|
#define sqlite3_column_table_name sqlite3_api->column_table_name
|
||||||
|
#define sqlite3_column_table_name16 sqlite3_api->column_table_name16
|
||||||
|
#define sqlite3_column_text sqlite3_api->column_text
|
||||||
|
#define sqlite3_column_text16 sqlite3_api->column_text16
|
||||||
|
#define sqlite3_column_type sqlite3_api->column_type
|
||||||
|
#define sqlite3_column_value sqlite3_api->column_value
|
||||||
|
#define sqlite3_commit_hook sqlite3_api->commit_hook
|
||||||
|
#define sqlite3_complete sqlite3_api->complete
|
||||||
|
#define sqlite3_complete16 sqlite3_api->complete16
|
||||||
|
#define sqlite3_create_collation sqlite3_api->create_collation
|
||||||
|
#define sqlite3_create_collation16 sqlite3_api->create_collation16
|
||||||
|
#define sqlite3_create_function sqlite3_api->create_function
|
||||||
|
#define sqlite3_create_function16 sqlite3_api->create_function16
|
||||||
|
#define sqlite3_create_module sqlite3_api->create_module
|
||||||
|
#define sqlite3_create_module_v2 sqlite3_api->create_module_v2
|
||||||
|
#define sqlite3_data_count sqlite3_api->data_count
|
||||||
|
#define sqlite3_db_handle sqlite3_api->db_handle
|
||||||
|
#define sqlite3_declare_vtab sqlite3_api->declare_vtab
|
||||||
|
#define sqlite3_enable_shared_cache sqlite3_api->enable_shared_cache
|
||||||
|
#define sqlite3_errcode sqlite3_api->errcode
|
||||||
|
#define sqlite3_errmsg sqlite3_api->errmsg
|
||||||
|
#define sqlite3_errmsg16 sqlite3_api->errmsg16
|
||||||
|
#define sqlite3_exec sqlite3_api->exec
|
||||||
|
#ifndef SQLITE_OMIT_DEPRECATED
|
||||||
|
#define sqlite3_expired sqlite3_api->expired
|
||||||
|
#endif
|
||||||
|
#define sqlite3_finalize sqlite3_api->finalize
|
||||||
|
#define sqlite3_free sqlite3_api->free
|
||||||
|
#define sqlite3_free_table sqlite3_api->free_table
|
||||||
|
#define sqlite3_get_autocommit sqlite3_api->get_autocommit
|
||||||
|
#define sqlite3_get_auxdata sqlite3_api->get_auxdata
|
||||||
|
#define sqlite3_get_table sqlite3_api->get_table
|
||||||
|
#ifndef SQLITE_OMIT_DEPRECATED
|
||||||
|
#define sqlite3_global_recover sqlite3_api->global_recover
|
||||||
|
#endif
|
||||||
|
#define sqlite3_interrupt sqlite3_api->interruptx
|
||||||
|
#define sqlite3_last_insert_rowid sqlite3_api->last_insert_rowid
|
||||||
|
#define sqlite3_libversion sqlite3_api->libversion
|
||||||
|
#define sqlite3_libversion_number sqlite3_api->libversion_number
|
||||||
|
#define sqlite3_malloc sqlite3_api->malloc
|
||||||
|
#define sqlite3_mprintf sqlite3_api->mprintf
|
||||||
|
#define sqlite3_open sqlite3_api->open
|
||||||
|
#define sqlite3_open16 sqlite3_api->open16
|
||||||
|
#define sqlite3_prepare sqlite3_api->prepare
|
||||||
|
#define sqlite3_prepare16 sqlite3_api->prepare16
|
||||||
|
#define sqlite3_prepare_v2 sqlite3_api->prepare_v2
|
||||||
|
#define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
|
||||||
|
#define sqlite3_profile sqlite3_api->profile
|
||||||
|
#define sqlite3_progress_handler sqlite3_api->progress_handler
|
||||||
|
#define sqlite3_realloc sqlite3_api->realloc
|
||||||
|
#define sqlite3_reset sqlite3_api->reset
|
||||||
|
#define sqlite3_result_blob sqlite3_api->result_blob
|
||||||
|
#define sqlite3_result_double sqlite3_api->result_double
|
||||||
|
#define sqlite3_result_error sqlite3_api->result_error
|
||||||
|
#define sqlite3_result_error16 sqlite3_api->result_error16
|
||||||
|
#define sqlite3_result_int sqlite3_api->result_int
|
||||||
|
#define sqlite3_result_int64 sqlite3_api->result_int64
|
||||||
|
#define sqlite3_result_null sqlite3_api->result_null
|
||||||
|
#define sqlite3_result_text sqlite3_api->result_text
|
||||||
|
#define sqlite3_result_text16 sqlite3_api->result_text16
|
||||||
|
#define sqlite3_result_text16be sqlite3_api->result_text16be
|
||||||
|
#define sqlite3_result_text16le sqlite3_api->result_text16le
|
||||||
|
#define sqlite3_result_value sqlite3_api->result_value
|
||||||
|
#define sqlite3_rollback_hook sqlite3_api->rollback_hook
|
||||||
|
#define sqlite3_set_authorizer sqlite3_api->set_authorizer
|
||||||
|
#define sqlite3_set_auxdata sqlite3_api->set_auxdata
|
||||||
|
#define sqlite3_snprintf sqlite3_api->xsnprintf
|
||||||
|
#define sqlite3_step sqlite3_api->step
|
||||||
|
#define sqlite3_table_column_metadata sqlite3_api->table_column_metadata
|
||||||
|
#define sqlite3_thread_cleanup sqlite3_api->thread_cleanup
|
||||||
|
#define sqlite3_total_changes sqlite3_api->total_changes
|
||||||
|
#define sqlite3_trace sqlite3_api->trace
|
||||||
|
#ifndef SQLITE_OMIT_DEPRECATED
|
||||||
|
#define sqlite3_transfer_bindings sqlite3_api->transfer_bindings
|
||||||
|
#endif
|
||||||
|
#define sqlite3_update_hook sqlite3_api->update_hook
|
||||||
|
#define sqlite3_user_data sqlite3_api->user_data
|
||||||
|
#define sqlite3_value_blob sqlite3_api->value_blob
|
||||||
|
#define sqlite3_value_bytes sqlite3_api->value_bytes
|
||||||
|
#define sqlite3_value_bytes16 sqlite3_api->value_bytes16
|
||||||
|
#define sqlite3_value_double sqlite3_api->value_double
|
||||||
|
#define sqlite3_value_int sqlite3_api->value_int
|
||||||
|
#define sqlite3_value_int64 sqlite3_api->value_int64
|
||||||
|
#define sqlite3_value_numeric_type sqlite3_api->value_numeric_type
|
||||||
|
#define sqlite3_value_text sqlite3_api->value_text
|
||||||
|
#define sqlite3_value_text16 sqlite3_api->value_text16
|
||||||
|
#define sqlite3_value_text16be sqlite3_api->value_text16be
|
||||||
|
#define sqlite3_value_text16le sqlite3_api->value_text16le
|
||||||
|
#define sqlite3_value_type sqlite3_api->value_type
|
||||||
|
#define sqlite3_vmprintf sqlite3_api->vmprintf
|
||||||
|
#define sqlite3_vsnprintf sqlite3_api->xvsnprintf
|
||||||
|
#define sqlite3_overload_function sqlite3_api->overload_function
|
||||||
|
#define sqlite3_prepare_v2 sqlite3_api->prepare_v2
|
||||||
|
#define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
|
||||||
|
#define sqlite3_clear_bindings sqlite3_api->clear_bindings
|
||||||
|
#define sqlite3_bind_zeroblob sqlite3_api->bind_zeroblob
|
||||||
|
#define sqlite3_blob_bytes sqlite3_api->blob_bytes
|
||||||
|
#define sqlite3_blob_close sqlite3_api->blob_close
|
||||||
|
#define sqlite3_blob_open sqlite3_api->blob_open
|
||||||
|
#define sqlite3_blob_read sqlite3_api->blob_read
|
||||||
|
#define sqlite3_blob_write sqlite3_api->blob_write
|
||||||
|
#define sqlite3_create_collation_v2 sqlite3_api->create_collation_v2
|
||||||
|
#define sqlite3_file_control sqlite3_api->file_control
|
||||||
|
#define sqlite3_memory_highwater sqlite3_api->memory_highwater
|
||||||
|
#define sqlite3_memory_used sqlite3_api->memory_used
|
||||||
|
#define sqlite3_mutex_alloc sqlite3_api->mutex_alloc
|
||||||
|
#define sqlite3_mutex_enter sqlite3_api->mutex_enter
|
||||||
|
#define sqlite3_mutex_free sqlite3_api->mutex_free
|
||||||
|
#define sqlite3_mutex_leave sqlite3_api->mutex_leave
|
||||||
|
#define sqlite3_mutex_try sqlite3_api->mutex_try
|
||||||
|
#define sqlite3_open_v2 sqlite3_api->open_v2
|
||||||
|
#define sqlite3_release_memory sqlite3_api->release_memory
|
||||||
|
#define sqlite3_result_error_nomem sqlite3_api->result_error_nomem
|
||||||
|
#define sqlite3_result_error_toobig sqlite3_api->result_error_toobig
|
||||||
|
#define sqlite3_sleep sqlite3_api->sleep
|
||||||
|
#define sqlite3_soft_heap_limit sqlite3_api->soft_heap_limit
|
||||||
|
#define sqlite3_vfs_find sqlite3_api->vfs_find
|
||||||
|
#define sqlite3_vfs_register sqlite3_api->vfs_register
|
||||||
|
#define sqlite3_vfs_unregister sqlite3_api->vfs_unregister
|
||||||
|
#define sqlite3_threadsafe sqlite3_api->xthreadsafe
|
||||||
|
#define sqlite3_result_zeroblob sqlite3_api->result_zeroblob
|
||||||
|
#define sqlite3_result_error_code sqlite3_api->result_error_code
|
||||||
|
#define sqlite3_test_control sqlite3_api->test_control
|
||||||
|
#define sqlite3_randomness sqlite3_api->randomness
|
||||||
|
#define sqlite3_context_db_handle sqlite3_api->context_db_handle
|
||||||
|
#define sqlite3_extended_result_codes sqlite3_api->extended_result_codes
|
||||||
|
#define sqlite3_limit sqlite3_api->limit
|
||||||
|
#define sqlite3_next_stmt sqlite3_api->next_stmt
|
||||||
|
#define sqlite3_sql sqlite3_api->sql
|
||||||
|
#define sqlite3_status sqlite3_api->status
|
||||||
|
#define sqlite3_backup_finish sqlite3_api->backup_finish
|
||||||
|
#define sqlite3_backup_init sqlite3_api->backup_init
|
||||||
|
#define sqlite3_backup_pagecount sqlite3_api->backup_pagecount
|
||||||
|
#define sqlite3_backup_remaining sqlite3_api->backup_remaining
|
||||||
|
#define sqlite3_backup_step sqlite3_api->backup_step
|
||||||
|
#define sqlite3_compileoption_get sqlite3_api->compileoption_get
|
||||||
|
#define sqlite3_compileoption_used sqlite3_api->compileoption_used
|
||||||
|
#define sqlite3_create_function_v2 sqlite3_api->create_function_v2
|
||||||
|
#define sqlite3_db_config sqlite3_api->db_config
|
||||||
|
#define sqlite3_db_mutex sqlite3_api->db_mutex
|
||||||
|
#define sqlite3_db_status sqlite3_api->db_status
|
||||||
|
#define sqlite3_extended_errcode sqlite3_api->extended_errcode
|
||||||
|
#define sqlite3_log sqlite3_api->log
|
||||||
|
#define sqlite3_soft_heap_limit64 sqlite3_api->soft_heap_limit64
|
||||||
|
#define sqlite3_sourceid sqlite3_api->sourceid
|
||||||
|
#define sqlite3_stmt_status sqlite3_api->stmt_status
|
||||||
|
#define sqlite3_strnicmp sqlite3_api->strnicmp
|
||||||
|
#define sqlite3_unlock_notify sqlite3_api->unlock_notify
|
||||||
|
#define sqlite3_wal_autocheckpoint sqlite3_api->wal_autocheckpoint
|
||||||
|
#define sqlite3_wal_checkpoint sqlite3_api->wal_checkpoint
|
||||||
|
#define sqlite3_wal_hook sqlite3_api->wal_hook
|
||||||
|
#define sqlite3_blob_reopen sqlite3_api->blob_reopen
|
||||||
|
#define sqlite3_vtab_config sqlite3_api->vtab_config
|
||||||
|
#define sqlite3_vtab_on_conflict sqlite3_api->vtab_on_conflict
|
||||||
|
/* Version 3.7.16 and later */
|
||||||
|
#define sqlite3_close_v2 sqlite3_api->close_v2
|
||||||
|
#define sqlite3_db_filename sqlite3_api->db_filename
|
||||||
|
#define sqlite3_db_readonly sqlite3_api->db_readonly
|
||||||
|
#define sqlite3_db_release_memory sqlite3_api->db_release_memory
|
||||||
|
#define sqlite3_errstr sqlite3_api->errstr
|
||||||
|
#define sqlite3_stmt_busy sqlite3_api->stmt_busy
|
||||||
|
#define sqlite3_stmt_readonly sqlite3_api->stmt_readonly
|
||||||
|
#define sqlite3_stricmp sqlite3_api->stricmp
|
||||||
|
#define sqlite3_uri_boolean sqlite3_api->uri_boolean
|
||||||
|
#define sqlite3_uri_int64 sqlite3_api->uri_int64
|
||||||
|
#define sqlite3_uri_parameter sqlite3_api->uri_parameter
|
||||||
|
#define sqlite3_uri_vsnprintf sqlite3_api->xvsnprintf
|
||||||
|
#define sqlite3_wal_checkpoint_v2 sqlite3_api->wal_checkpoint_v2
|
||||||
|
/* Version 3.8.7 and later */
|
||||||
|
#define sqlite3_auto_extension sqlite3_api->auto_extension
|
||||||
|
#define sqlite3_bind_blob64 sqlite3_api->bind_blob64
|
||||||
|
#define sqlite3_bind_text64 sqlite3_api->bind_text64
|
||||||
|
#define sqlite3_cancel_auto_extension sqlite3_api->cancel_auto_extension
|
||||||
|
#define sqlite3_load_extension sqlite3_api->load_extension
|
||||||
|
#define sqlite3_malloc64 sqlite3_api->malloc64
|
||||||
|
#define sqlite3_msize sqlite3_api->msize
|
||||||
|
#define sqlite3_realloc64 sqlite3_api->realloc64
|
||||||
|
#define sqlite3_reset_auto_extension sqlite3_api->reset_auto_extension
|
||||||
|
#define sqlite3_result_blob64 sqlite3_api->result_blob64
|
||||||
|
#define sqlite3_result_text64 sqlite3_api->result_text64
|
||||||
|
#define sqlite3_strglob sqlite3_api->strglob
|
||||||
|
/* Version 3.8.11 and later */
|
||||||
|
#define sqlite3_value_dup sqlite3_api->value_dup
|
||||||
|
#define sqlite3_value_free sqlite3_api->value_free
|
||||||
|
#define sqlite3_result_zeroblob64 sqlite3_api->result_zeroblob64
|
||||||
|
#define sqlite3_bind_zeroblob64 sqlite3_api->bind_zeroblob64
|
||||||
|
/* Version 3.9.0 and later */
|
||||||
|
#define sqlite3_value_subtype sqlite3_api->value_subtype
|
||||||
|
#define sqlite3_result_subtype sqlite3_api->result_subtype
|
||||||
|
/* Version 3.10.0 and later */
|
||||||
|
#define sqlite3_status64 sqlite3_api->status64
|
||||||
|
#define sqlite3_strlike sqlite3_api->strlike
|
||||||
|
#define sqlite3_db_cacheflush sqlite3_api->db_cacheflush
|
||||||
|
/* Version 3.12.0 and later */
|
||||||
|
#define sqlite3_system_errno sqlite3_api->system_errno
|
||||||
|
/* Version 3.14.0 and later */
|
||||||
|
#define sqlite3_trace_v2 sqlite3_api->trace_v2
|
||||||
|
#define sqlite3_expanded_sql sqlite3_api->expanded_sql
|
||||||
|
/* Version 3.18.0 and later */
|
||||||
|
#define sqlite3_set_last_insert_rowid sqlite3_api->set_last_insert_rowid
|
||||||
|
/* Version 3.20.0 and later */
|
||||||
|
#define sqlite3_prepare_v3 sqlite3_api->prepare_v3
|
||||||
|
#define sqlite3_prepare16_v3 sqlite3_api->prepare16_v3
|
||||||
|
#define sqlite3_bind_pointer sqlite3_api->bind_pointer
|
||||||
|
#define sqlite3_result_pointer sqlite3_api->result_pointer
|
||||||
|
#define sqlite3_value_pointer sqlite3_api->value_pointer
|
||||||
|
/* Version 3.22.0 and later */
|
||||||
|
#define sqlite3_vtab_nochange sqlite3_api->vtab_nochange
|
||||||
|
#define sqlite3_value_nochange sqlite3_api->value_nochange
|
||||||
|
#define sqlite3_vtab_collation sqlite3_api->vtab_collation
|
||||||
|
/* Version 3.24.0 and later */
|
||||||
|
#define sqlite3_keyword_count sqlite3_api->keyword_count
|
||||||
|
#define sqlite3_keyword_name sqlite3_api->keyword_name
|
||||||
|
#define sqlite3_keyword_check sqlite3_api->keyword_check
|
||||||
|
#define sqlite3_str_new sqlite3_api->str_new
|
||||||
|
#define sqlite3_str_finish sqlite3_api->str_finish
|
||||||
|
#define sqlite3_str_appendf sqlite3_api->str_appendf
|
||||||
|
#define sqlite3_str_vappendf sqlite3_api->str_vappendf
|
||||||
|
#define sqlite3_str_append sqlite3_api->str_append
|
||||||
|
#define sqlite3_str_appendall sqlite3_api->str_appendall
|
||||||
|
#define sqlite3_str_appendchar sqlite3_api->str_appendchar
|
||||||
|
#define sqlite3_str_reset sqlite3_api->str_reset
|
||||||
|
#define sqlite3_str_errcode sqlite3_api->str_errcode
|
||||||
|
#define sqlite3_str_length sqlite3_api->str_length
|
||||||
|
#define sqlite3_str_value sqlite3_api->str_value
|
||||||
|
/* Version 3.25.0 and later */
|
||||||
|
#define sqlite3_create_window_function sqlite3_api->create_window_function
|
||||||
|
/* Version 3.26.0 and later */
|
||||||
|
#define sqlite3_normalized_sql sqlite3_api->normalized_sql
|
||||||
|
/* Version 3.28.0 and later */
|
||||||
|
#define sqlite3_stmt_isexplain sqlite3_api->stmt_isexplain
|
||||||
|
#define sqlite3_value_frombind sqlite3_api->value_frombind
|
||||||
|
/* Version 3.30.0 and later */
|
||||||
|
#define sqlite3_drop_modules sqlite3_api->drop_modules
|
||||||
|
/* Version 3.31.0 and later */
|
||||||
|
#define sqlite3_hard_heap_limit64 sqlite3_api->hard_heap_limit64
|
||||||
|
#define sqlite3_uri_key sqlite3_api->uri_key
|
||||||
|
#define sqlite3_filename_database sqlite3_api->filename_database
|
||||||
|
#define sqlite3_filename_journal sqlite3_api->filename_journal
|
||||||
|
#define sqlite3_filename_wal sqlite3_api->filename_wal
|
||||||
|
/* Version 3.32.0 and later */
|
||||||
|
#define sqlite3_create_filename sqlite3_api->create_filename
|
||||||
|
#define sqlite3_free_filename sqlite3_api->free_filename
|
||||||
|
#define sqlite3_database_file_object sqlite3_api->database_file_object
|
||||||
|
/* Version 3.34.0 and later */
|
||||||
|
#define sqlite3_txn_state sqlite3_api->txn_state
|
||||||
|
/* Version 3.36.1 and later */
|
||||||
|
#define sqlite3_changes64 sqlite3_api->changes64
|
||||||
|
#define sqlite3_total_changes64 sqlite3_api->total_changes64
|
||||||
|
/* Version 3.37.0 and later */
|
||||||
|
#define sqlite3_autovacuum_pages sqlite3_api->autovacuum_pages
|
||||||
|
/* Version 3.38.0 and later */
|
||||||
|
#define sqlite3_error_offset sqlite3_api->error_offset
|
||||||
|
#define sqlite3_vtab_rhs_value sqlite3_api->vtab_rhs_value
|
||||||
|
#define sqlite3_vtab_distinct sqlite3_api->vtab_distinct
|
||||||
|
#define sqlite3_vtab_in sqlite3_api->vtab_in
|
||||||
|
#define sqlite3_vtab_in_first sqlite3_api->vtab_in_first
|
||||||
|
#define sqlite3_vtab_in_next sqlite3_api->vtab_in_next
|
||||||
|
/* Version 3.39.0 and later */
|
||||||
|
#ifndef SQLITE_OMIT_DESERIALIZE
|
||||||
|
#define sqlite3_deserialize sqlite3_api->deserialize
|
||||||
|
#define sqlite3_serialize sqlite3_api->serialize
|
||||||
|
#endif
|
||||||
|
#define sqlite3_db_name sqlite3_api->db_name
|
||||||
|
/* Version 3.40.0 and later */
|
||||||
|
#define sqlite3_value_encoding sqlite3_api->value_encoding
|
||||||
|
/* Version 3.41.0 and later */
|
||||||
|
#define sqlite3_is_interrupted sqlite3_api->is_interrupted
|
||||||
|
#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
|
||||||
|
|
||||||
|
#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
|
||||||
|
/* This case when the file really is being compiled as a loadable
|
||||||
|
** extension */
|
||||||
|
# define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api=0;
|
||||||
|
# define SQLITE_EXTENSION_INIT2(v) sqlite3_api=v;
|
||||||
|
# define SQLITE_EXTENSION_INIT3 \
|
||||||
|
extern const sqlite3_api_routines *sqlite3_api;
|
||||||
|
#else
|
||||||
|
/* This case when the file is being statically linked into the
|
||||||
|
** application */
|
||||||
|
# define SQLITE_EXTENSION_INIT1 /*no-op*/
|
||||||
|
# define SQLITE_EXTENSION_INIT2(v) (void)v; /* unused parameter */
|
||||||
|
# define SQLITE_EXTENSION_INIT3 /*no-op*/
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* SQLITE3EXT_H */
|
878
csbindgen-tests/src/bullet3_ffi.rs
vendored
878
csbindgen-tests/src/bullet3_ffi.rs
vendored
File diff suppressed because it is too large
Load Diff
35
csbindgen-tests/src/lib.rs
vendored
35
csbindgen-tests/src/lib.rs
vendored
@ -14,6 +14,17 @@ mod lz4;
|
|||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
mod lz4_ffi;
|
mod lz4_ffi;
|
||||||
|
|
||||||
|
// #[allow(dead_code)]
|
||||||
|
// #[allow(non_snake_case)]
|
||||||
|
// #[allow(non_camel_case_types)]
|
||||||
|
// #[allow(non_upper_case_globals)]
|
||||||
|
// mod sqlite3;
|
||||||
|
|
||||||
|
// #[allow(dead_code)]
|
||||||
|
// #[allow(non_snake_case)]
|
||||||
|
// #[allow(non_camel_case_types)]
|
||||||
|
// mod sqlite3_ffi;
|
||||||
|
|
||||||
// #[allow(dead_code)]
|
// #[allow(dead_code)]
|
||||||
// #[allow(non_snake_case)]
|
// #[allow(non_snake_case)]
|
||||||
// #[allow(non_camel_case_types)]
|
// #[allow(non_camel_case_types)]
|
||||||
@ -47,6 +58,22 @@ mod lz4_ffi;
|
|||||||
// #[allow(non_camel_case_types)]
|
// #[allow(non_camel_case_types)]
|
||||||
// mod zstd_ffi;
|
// mod zstd_ffi;
|
||||||
|
|
||||||
|
#[no_mangle]
|
||||||
|
pub extern "C" fn nest_test(
|
||||||
|
_f: ::std::option::Option<
|
||||||
|
unsafe extern "C" fn(
|
||||||
|
pxFunc: *mut ::std::option::Option<
|
||||||
|
unsafe extern "C" fn(
|
||||||
|
arg2: ::std::os::raw::c_int,
|
||||||
|
),
|
||||||
|
>,
|
||||||
|
) -> ::std::os::raw::c_int,
|
||||||
|
>
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
pub type LONG_PTR = ::std::os::raw::c_longlong;
|
pub type LONG_PTR = ::std::os::raw::c_longlong;
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
@ -83,7 +110,6 @@ pub unsafe extern "C" fn csharp_to_rust_utf8(utf8_str: *const u8, utf8_len: i32)
|
|||||||
println!("{}", str);
|
println!("{}", str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csharp_to_rust_bytes(bytes: *const u8, len: i32) {
|
pub unsafe extern "C" fn csharp_to_rust_bytes(bytes: *const u8, len: i32) {
|
||||||
let slice = std::slice::from_raw_parts(bytes, len as usize);
|
let slice = std::slice::from_raw_parts(bytes, len as usize);
|
||||||
@ -91,9 +117,6 @@ pub unsafe extern "C" fn csharp_to_rust_bytes(bytes: *const u8, len: i32) {
|
|||||||
println!("{:?}", vec);
|
println!("{:?}", vec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn callback_test(cb: extern "C" fn(a: i32) -> i32) -> i32 {
|
pub extern "C" fn callback_test(cb: extern "C" fn(a: i32) -> i32) -> i32 {
|
||||||
cb(100)
|
cb(100)
|
||||||
@ -350,9 +373,9 @@ fn build_test() {
|
|||||||
|
|
||||||
csbindgen::Builder::default()
|
csbindgen::Builder::default()
|
||||||
.input_extern_file("csbindgen-tests/src/lib.rs")
|
.input_extern_file("csbindgen-tests/src/lib.rs")
|
||||||
.csharp_class_name("LibRust")
|
.csharp_class_name("NativeMethods")
|
||||||
.csharp_dll_name("csbindgen_tests")
|
.csharp_dll_name("csbindgen_tests")
|
||||||
.generate_csharp_file("dotnet-sandbox/method_call.cs")
|
.generate_csharp_file("dotnet-sandbox/NativeMethods.cs")
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
252
csbindgen-tests/src/quiche_ffi.rs
vendored
252
csbindgen-tests/src/quiche_ffi.rs
vendored
File diff suppressed because it is too large
Load Diff
5293
csbindgen-tests/src/sqlite3.rs
vendored
Normal file
5293
csbindgen-tests/src/sqlite3.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3609
csbindgen-tests/src/sqlite3_ffi.rs
vendored
Normal file
3609
csbindgen-tests/src/sqlite3_ffi.rs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
132
csbindgen-tests/src/zstd_ffi.rs
vendored
132
csbindgen-tests/src/zstd_ffi.rs
vendored
@ -7,7 +7,7 @@ use super::zstd::*;
|
|||||||
|
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_versionNumber(
|
pub unsafe extern "C" fn csbindgen_ZSTD_versionNumber(
|
||||||
|
|
||||||
) -> c_uint
|
) -> c_uint
|
||||||
{
|
{
|
||||||
@ -17,7 +17,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_versionNumber(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_versionString(
|
pub unsafe extern "C" fn csbindgen_ZSTD_versionString(
|
||||||
|
|
||||||
) -> *const c_char
|
) -> *const c_char
|
||||||
{
|
{
|
||||||
@ -27,7 +27,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_versionString(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_compress(
|
pub unsafe extern "C" fn csbindgen_ZSTD_compress(
|
||||||
dst: *mut c_void,
|
dst: *mut c_void,
|
||||||
dstCapacity: usize,
|
dstCapacity: usize,
|
||||||
src: *const c_void,
|
src: *const c_void,
|
||||||
@ -45,7 +45,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_compress(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_decompress(
|
pub unsafe extern "C" fn csbindgen_ZSTD_decompress(
|
||||||
dst: *mut c_void,
|
dst: *mut c_void,
|
||||||
dstCapacity: usize,
|
dstCapacity: usize,
|
||||||
src: *const c_void,
|
src: *const c_void,
|
||||||
@ -61,7 +61,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_decompress(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_getFrameContentSize(
|
pub unsafe extern "C" fn csbindgen_ZSTD_getFrameContentSize(
|
||||||
src: *const c_void,
|
src: *const c_void,
|
||||||
srcSize: usize
|
srcSize: usize
|
||||||
) -> c_ulonglong
|
) -> c_ulonglong
|
||||||
@ -73,7 +73,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_getFrameContentSize(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_getDecompressedSize(
|
pub unsafe extern "C" fn csbindgen_ZSTD_getDecompressedSize(
|
||||||
src: *const c_void,
|
src: *const c_void,
|
||||||
srcSize: usize
|
srcSize: usize
|
||||||
) -> c_ulonglong
|
) -> c_ulonglong
|
||||||
@ -85,7 +85,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_getDecompressedSize(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_findFrameCompressedSize(
|
pub unsafe extern "C" fn csbindgen_ZSTD_findFrameCompressedSize(
|
||||||
src: *const c_void,
|
src: *const c_void,
|
||||||
srcSize: usize
|
srcSize: usize
|
||||||
) -> usize
|
) -> usize
|
||||||
@ -97,7 +97,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_findFrameCompressedSize(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_compressBound(
|
pub unsafe extern "C" fn csbindgen_ZSTD_compressBound(
|
||||||
srcSize: usize
|
srcSize: usize
|
||||||
) -> usize
|
) -> usize
|
||||||
{
|
{
|
||||||
@ -107,7 +107,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_compressBound(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_isError(
|
pub unsafe extern "C" fn csbindgen_ZSTD_isError(
|
||||||
code: usize
|
code: usize
|
||||||
) -> c_uint
|
) -> c_uint
|
||||||
{
|
{
|
||||||
@ -117,7 +117,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_isError(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_getErrorName(
|
pub unsafe extern "C" fn csbindgen_ZSTD_getErrorName(
|
||||||
code: usize
|
code: usize
|
||||||
) -> *const c_char
|
) -> *const c_char
|
||||||
{
|
{
|
||||||
@ -127,7 +127,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_getErrorName(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_minCLevel(
|
pub unsafe extern "C" fn csbindgen_ZSTD_minCLevel(
|
||||||
|
|
||||||
) -> c_int
|
) -> c_int
|
||||||
{
|
{
|
||||||
@ -137,7 +137,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_minCLevel(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_maxCLevel(
|
pub unsafe extern "C" fn csbindgen_ZSTD_maxCLevel(
|
||||||
|
|
||||||
) -> c_int
|
) -> c_int
|
||||||
{
|
{
|
||||||
@ -147,7 +147,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_maxCLevel(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_defaultCLevel(
|
pub unsafe extern "C" fn csbindgen_ZSTD_defaultCLevel(
|
||||||
|
|
||||||
) -> c_int
|
) -> c_int
|
||||||
{
|
{
|
||||||
@ -157,7 +157,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_defaultCLevel(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_createCCtx(
|
pub unsafe extern "C" fn csbindgen_ZSTD_createCCtx(
|
||||||
|
|
||||||
) -> *mut ZSTD_CCtx
|
) -> *mut ZSTD_CCtx
|
||||||
{
|
{
|
||||||
@ -167,7 +167,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_createCCtx(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_freeCCtx(
|
pub unsafe extern "C" fn csbindgen_ZSTD_freeCCtx(
|
||||||
cctx: *mut ZSTD_CCtx
|
cctx: *mut ZSTD_CCtx
|
||||||
) -> usize
|
) -> usize
|
||||||
{
|
{
|
||||||
@ -177,7 +177,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_freeCCtx(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_compressCCtx(
|
pub unsafe extern "C" fn csbindgen_ZSTD_compressCCtx(
|
||||||
cctx: *mut ZSTD_CCtx,
|
cctx: *mut ZSTD_CCtx,
|
||||||
dst: *mut c_void,
|
dst: *mut c_void,
|
||||||
dstCapacity: usize,
|
dstCapacity: usize,
|
||||||
@ -197,7 +197,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_compressCCtx(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_createDCtx(
|
pub unsafe extern "C" fn csbindgen_ZSTD_createDCtx(
|
||||||
|
|
||||||
) -> *mut ZSTD_DCtx
|
) -> *mut ZSTD_DCtx
|
||||||
{
|
{
|
||||||
@ -207,7 +207,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_createDCtx(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_freeDCtx(
|
pub unsafe extern "C" fn csbindgen_ZSTD_freeDCtx(
|
||||||
dctx: *mut ZSTD_DCtx
|
dctx: *mut ZSTD_DCtx
|
||||||
) -> usize
|
) -> usize
|
||||||
{
|
{
|
||||||
@ -217,7 +217,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_freeDCtx(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_decompressDCtx(
|
pub unsafe extern "C" fn csbindgen_ZSTD_decompressDCtx(
|
||||||
dctx: *mut ZSTD_DCtx,
|
dctx: *mut ZSTD_DCtx,
|
||||||
dst: *mut c_void,
|
dst: *mut c_void,
|
||||||
dstCapacity: usize,
|
dstCapacity: usize,
|
||||||
@ -235,7 +235,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_decompressDCtx(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_cParam_getBounds(
|
pub unsafe extern "C" fn csbindgen_ZSTD_cParam_getBounds(
|
||||||
cParam: ZSTD_cParameter
|
cParam: ZSTD_cParameter
|
||||||
) -> ZSTD_bounds
|
) -> ZSTD_bounds
|
||||||
{
|
{
|
||||||
@ -245,7 +245,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_cParam_getBounds(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_CCtx_setParameter(
|
pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_setParameter(
|
||||||
cctx: *mut ZSTD_CCtx,
|
cctx: *mut ZSTD_CCtx,
|
||||||
param: ZSTD_cParameter,
|
param: ZSTD_cParameter,
|
||||||
value: c_int
|
value: c_int
|
||||||
@ -259,7 +259,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_CCtx_setParameter(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_CCtx_setPledgedSrcSize(
|
pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_setPledgedSrcSize(
|
||||||
cctx: *mut ZSTD_CCtx,
|
cctx: *mut ZSTD_CCtx,
|
||||||
pledgedSrcSize: c_ulonglong
|
pledgedSrcSize: c_ulonglong
|
||||||
) -> usize
|
) -> usize
|
||||||
@ -271,7 +271,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_CCtx_setPledgedSrcSize(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_CCtx_reset(
|
pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_reset(
|
||||||
cctx: *mut ZSTD_CCtx,
|
cctx: *mut ZSTD_CCtx,
|
||||||
reset: ZSTD_ResetDirective
|
reset: ZSTD_ResetDirective
|
||||||
) -> usize
|
) -> usize
|
||||||
@ -283,7 +283,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_CCtx_reset(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_compress2(
|
pub unsafe extern "C" fn csbindgen_ZSTD_compress2(
|
||||||
cctx: *mut ZSTD_CCtx,
|
cctx: *mut ZSTD_CCtx,
|
||||||
dst: *mut c_void,
|
dst: *mut c_void,
|
||||||
dstCapacity: usize,
|
dstCapacity: usize,
|
||||||
@ -301,7 +301,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_compress2(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_dParam_getBounds(
|
pub unsafe extern "C" fn csbindgen_ZSTD_dParam_getBounds(
|
||||||
dParam: ZSTD_dParameter
|
dParam: ZSTD_dParameter
|
||||||
) -> ZSTD_bounds
|
) -> ZSTD_bounds
|
||||||
{
|
{
|
||||||
@ -311,7 +311,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_dParam_getBounds(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_DCtx_setParameter(
|
pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_setParameter(
|
||||||
dctx: *mut ZSTD_DCtx,
|
dctx: *mut ZSTD_DCtx,
|
||||||
param: ZSTD_dParameter,
|
param: ZSTD_dParameter,
|
||||||
value: c_int
|
value: c_int
|
||||||
@ -325,7 +325,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_DCtx_setParameter(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_DCtx_reset(
|
pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_reset(
|
||||||
dctx: *mut ZSTD_DCtx,
|
dctx: *mut ZSTD_DCtx,
|
||||||
reset: ZSTD_ResetDirective
|
reset: ZSTD_ResetDirective
|
||||||
) -> usize
|
) -> usize
|
||||||
@ -337,7 +337,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_DCtx_reset(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_createCStream(
|
pub unsafe extern "C" fn csbindgen_ZSTD_createCStream(
|
||||||
|
|
||||||
) -> *mut ZSTD_CStream
|
) -> *mut ZSTD_CStream
|
||||||
{
|
{
|
||||||
@ -347,7 +347,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_createCStream(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_freeCStream(
|
pub unsafe extern "C" fn csbindgen_ZSTD_freeCStream(
|
||||||
zcs: *mut ZSTD_CStream
|
zcs: *mut ZSTD_CStream
|
||||||
) -> usize
|
) -> usize
|
||||||
{
|
{
|
||||||
@ -357,7 +357,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_freeCStream(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_compressStream2(
|
pub unsafe extern "C" fn csbindgen_ZSTD_compressStream2(
|
||||||
cctx: *mut ZSTD_CCtx,
|
cctx: *mut ZSTD_CCtx,
|
||||||
output: *mut ZSTD_outBuffer,
|
output: *mut ZSTD_outBuffer,
|
||||||
input: *mut ZSTD_inBuffer,
|
input: *mut ZSTD_inBuffer,
|
||||||
@ -373,7 +373,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_compressStream2(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_CStreamInSize(
|
pub unsafe extern "C" fn csbindgen_ZSTD_CStreamInSize(
|
||||||
|
|
||||||
) -> usize
|
) -> usize
|
||||||
{
|
{
|
||||||
@ -383,7 +383,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_CStreamInSize(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_CStreamOutSize(
|
pub unsafe extern "C" fn csbindgen_ZSTD_CStreamOutSize(
|
||||||
|
|
||||||
) -> usize
|
) -> usize
|
||||||
{
|
{
|
||||||
@ -393,7 +393,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_CStreamOutSize(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_initCStream(
|
pub unsafe extern "C" fn csbindgen_ZSTD_initCStream(
|
||||||
zcs: *mut ZSTD_CStream,
|
zcs: *mut ZSTD_CStream,
|
||||||
compressionLevel: c_int
|
compressionLevel: c_int
|
||||||
) -> usize
|
) -> usize
|
||||||
@ -405,7 +405,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_initCStream(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_compressStream(
|
pub unsafe extern "C" fn csbindgen_ZSTD_compressStream(
|
||||||
zcs: *mut ZSTD_CStream,
|
zcs: *mut ZSTD_CStream,
|
||||||
output: *mut ZSTD_outBuffer,
|
output: *mut ZSTD_outBuffer,
|
||||||
input: *mut ZSTD_inBuffer
|
input: *mut ZSTD_inBuffer
|
||||||
@ -419,7 +419,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_compressStream(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_flushStream(
|
pub unsafe extern "C" fn csbindgen_ZSTD_flushStream(
|
||||||
zcs: *mut ZSTD_CStream,
|
zcs: *mut ZSTD_CStream,
|
||||||
output: *mut ZSTD_outBuffer
|
output: *mut ZSTD_outBuffer
|
||||||
) -> usize
|
) -> usize
|
||||||
@ -431,7 +431,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_flushStream(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_endStream(
|
pub unsafe extern "C" fn csbindgen_ZSTD_endStream(
|
||||||
zcs: *mut ZSTD_CStream,
|
zcs: *mut ZSTD_CStream,
|
||||||
output: *mut ZSTD_outBuffer
|
output: *mut ZSTD_outBuffer
|
||||||
) -> usize
|
) -> usize
|
||||||
@ -443,7 +443,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_endStream(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_createDStream(
|
pub unsafe extern "C" fn csbindgen_ZSTD_createDStream(
|
||||||
|
|
||||||
) -> *mut ZSTD_DStream
|
) -> *mut ZSTD_DStream
|
||||||
{
|
{
|
||||||
@ -453,7 +453,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_createDStream(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_freeDStream(
|
pub unsafe extern "C" fn csbindgen_ZSTD_freeDStream(
|
||||||
zds: *mut ZSTD_DStream
|
zds: *mut ZSTD_DStream
|
||||||
) -> usize
|
) -> usize
|
||||||
{
|
{
|
||||||
@ -463,7 +463,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_freeDStream(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_initDStream(
|
pub unsafe extern "C" fn csbindgen_ZSTD_initDStream(
|
||||||
zds: *mut ZSTD_DStream
|
zds: *mut ZSTD_DStream
|
||||||
) -> usize
|
) -> usize
|
||||||
{
|
{
|
||||||
@ -473,7 +473,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_initDStream(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_decompressStream(
|
pub unsafe extern "C" fn csbindgen_ZSTD_decompressStream(
|
||||||
zds: *mut ZSTD_DStream,
|
zds: *mut ZSTD_DStream,
|
||||||
output: *mut ZSTD_outBuffer,
|
output: *mut ZSTD_outBuffer,
|
||||||
input: *mut ZSTD_inBuffer
|
input: *mut ZSTD_inBuffer
|
||||||
@ -487,7 +487,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_decompressStream(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_DStreamInSize(
|
pub unsafe extern "C" fn csbindgen_ZSTD_DStreamInSize(
|
||||||
|
|
||||||
) -> usize
|
) -> usize
|
||||||
{
|
{
|
||||||
@ -497,7 +497,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_DStreamInSize(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_DStreamOutSize(
|
pub unsafe extern "C" fn csbindgen_ZSTD_DStreamOutSize(
|
||||||
|
|
||||||
) -> usize
|
) -> usize
|
||||||
{
|
{
|
||||||
@ -507,7 +507,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_DStreamOutSize(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_compress_usingDict(
|
pub unsafe extern "C" fn csbindgen_ZSTD_compress_usingDict(
|
||||||
ctx: *mut ZSTD_CCtx,
|
ctx: *mut ZSTD_CCtx,
|
||||||
dst: *mut c_void,
|
dst: *mut c_void,
|
||||||
dstCapacity: usize,
|
dstCapacity: usize,
|
||||||
@ -531,7 +531,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_compress_usingDict(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_decompress_usingDict(
|
pub unsafe extern "C" fn csbindgen_ZSTD_decompress_usingDict(
|
||||||
dctx: *mut ZSTD_DCtx,
|
dctx: *mut ZSTD_DCtx,
|
||||||
dst: *mut c_void,
|
dst: *mut c_void,
|
||||||
dstCapacity: usize,
|
dstCapacity: usize,
|
||||||
@ -553,7 +553,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_decompress_usingDict(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_createCDict(
|
pub unsafe extern "C" fn csbindgen_ZSTD_createCDict(
|
||||||
dictBuffer: *const c_void,
|
dictBuffer: *const c_void,
|
||||||
dictSize: usize,
|
dictSize: usize,
|
||||||
compressionLevel: c_int
|
compressionLevel: c_int
|
||||||
@ -567,7 +567,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_createCDict(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_freeCDict(
|
pub unsafe extern "C" fn csbindgen_ZSTD_freeCDict(
|
||||||
CDict: *mut ZSTD_CDict
|
CDict: *mut ZSTD_CDict
|
||||||
) -> usize
|
) -> usize
|
||||||
{
|
{
|
||||||
@ -577,7 +577,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_freeCDict(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_compress_usingCDict(
|
pub unsafe extern "C" fn csbindgen_ZSTD_compress_usingCDict(
|
||||||
cctx: *mut ZSTD_CCtx,
|
cctx: *mut ZSTD_CCtx,
|
||||||
dst: *mut c_void,
|
dst: *mut c_void,
|
||||||
dstCapacity: usize,
|
dstCapacity: usize,
|
||||||
@ -597,7 +597,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_compress_usingCDict(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_createDDict(
|
pub unsafe extern "C" fn csbindgen_ZSTD_createDDict(
|
||||||
dictBuffer: *const c_void,
|
dictBuffer: *const c_void,
|
||||||
dictSize: usize
|
dictSize: usize
|
||||||
) -> *mut ZSTD_DDict
|
) -> *mut ZSTD_DDict
|
||||||
@ -609,7 +609,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_createDDict(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_freeDDict(
|
pub unsafe extern "C" fn csbindgen_ZSTD_freeDDict(
|
||||||
ddict: *mut ZSTD_DDict
|
ddict: *mut ZSTD_DDict
|
||||||
) -> usize
|
) -> usize
|
||||||
{
|
{
|
||||||
@ -619,7 +619,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_freeDDict(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_decompress_usingDDict(
|
pub unsafe extern "C" fn csbindgen_ZSTD_decompress_usingDDict(
|
||||||
dctx: *mut ZSTD_DCtx,
|
dctx: *mut ZSTD_DCtx,
|
||||||
dst: *mut c_void,
|
dst: *mut c_void,
|
||||||
dstCapacity: usize,
|
dstCapacity: usize,
|
||||||
@ -639,7 +639,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_decompress_usingDDict(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_getDictID_fromDict(
|
pub unsafe extern "C" fn csbindgen_ZSTD_getDictID_fromDict(
|
||||||
dict: *const c_void,
|
dict: *const c_void,
|
||||||
dictSize: usize
|
dictSize: usize
|
||||||
) -> c_uint
|
) -> c_uint
|
||||||
@ -651,7 +651,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_getDictID_fromDict(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_getDictID_fromCDict(
|
pub unsafe extern "C" fn csbindgen_ZSTD_getDictID_fromCDict(
|
||||||
cdict: *const ZSTD_CDict
|
cdict: *const ZSTD_CDict
|
||||||
) -> c_uint
|
) -> c_uint
|
||||||
{
|
{
|
||||||
@ -661,7 +661,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_getDictID_fromCDict(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_getDictID_fromDDict(
|
pub unsafe extern "C" fn csbindgen_ZSTD_getDictID_fromDDict(
|
||||||
ddict: *const ZSTD_DDict
|
ddict: *const ZSTD_DDict
|
||||||
) -> c_uint
|
) -> c_uint
|
||||||
{
|
{
|
||||||
@ -671,7 +671,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_getDictID_fromDDict(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_getDictID_fromFrame(
|
pub unsafe extern "C" fn csbindgen_ZSTD_getDictID_fromFrame(
|
||||||
src: *const c_void,
|
src: *const c_void,
|
||||||
srcSize: usize
|
srcSize: usize
|
||||||
) -> c_uint
|
) -> c_uint
|
||||||
@ -683,7 +683,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_getDictID_fromFrame(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_CCtx_loadDictionary(
|
pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_loadDictionary(
|
||||||
cctx: *mut ZSTD_CCtx,
|
cctx: *mut ZSTD_CCtx,
|
||||||
dict: *const c_void,
|
dict: *const c_void,
|
||||||
dictSize: usize
|
dictSize: usize
|
||||||
@ -697,7 +697,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_CCtx_loadDictionary(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_CCtx_refCDict(
|
pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_refCDict(
|
||||||
cctx: *mut ZSTD_CCtx,
|
cctx: *mut ZSTD_CCtx,
|
||||||
cdict: *const ZSTD_CDict
|
cdict: *const ZSTD_CDict
|
||||||
) -> usize
|
) -> usize
|
||||||
@ -709,7 +709,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_CCtx_refCDict(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_CCtx_refPrefix(
|
pub unsafe extern "C" fn csbindgen_ZSTD_CCtx_refPrefix(
|
||||||
cctx: *mut ZSTD_CCtx,
|
cctx: *mut ZSTD_CCtx,
|
||||||
prefix: *const c_void,
|
prefix: *const c_void,
|
||||||
prefixSize: usize
|
prefixSize: usize
|
||||||
@ -723,7 +723,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_CCtx_refPrefix(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_DCtx_loadDictionary(
|
pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_loadDictionary(
|
||||||
dctx: *mut ZSTD_DCtx,
|
dctx: *mut ZSTD_DCtx,
|
||||||
dict: *const c_void,
|
dict: *const c_void,
|
||||||
dictSize: usize
|
dictSize: usize
|
||||||
@ -737,7 +737,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_DCtx_loadDictionary(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_DCtx_refDDict(
|
pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_refDDict(
|
||||||
dctx: *mut ZSTD_DCtx,
|
dctx: *mut ZSTD_DCtx,
|
||||||
ddict: *const ZSTD_DDict
|
ddict: *const ZSTD_DDict
|
||||||
) -> usize
|
) -> usize
|
||||||
@ -749,7 +749,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_DCtx_refDDict(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_DCtx_refPrefix(
|
pub unsafe extern "C" fn csbindgen_ZSTD_DCtx_refPrefix(
|
||||||
dctx: *mut ZSTD_DCtx,
|
dctx: *mut ZSTD_DCtx,
|
||||||
prefix: *const c_void,
|
prefix: *const c_void,
|
||||||
prefixSize: usize
|
prefixSize: usize
|
||||||
@ -763,7 +763,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_DCtx_refPrefix(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_sizeof_CCtx(
|
pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_CCtx(
|
||||||
cctx: *const ZSTD_CCtx
|
cctx: *const ZSTD_CCtx
|
||||||
) -> usize
|
) -> usize
|
||||||
{
|
{
|
||||||
@ -773,7 +773,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_sizeof_CCtx(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_sizeof_DCtx(
|
pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_DCtx(
|
||||||
dctx: *const ZSTD_DCtx
|
dctx: *const ZSTD_DCtx
|
||||||
) -> usize
|
) -> usize
|
||||||
{
|
{
|
||||||
@ -783,7 +783,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_sizeof_DCtx(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_sizeof_CStream(
|
pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_CStream(
|
||||||
zcs: *const ZSTD_CStream
|
zcs: *const ZSTD_CStream
|
||||||
) -> usize
|
) -> usize
|
||||||
{
|
{
|
||||||
@ -793,7 +793,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_sizeof_CStream(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_sizeof_DStream(
|
pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_DStream(
|
||||||
zds: *const ZSTD_DStream
|
zds: *const ZSTD_DStream
|
||||||
) -> usize
|
) -> usize
|
||||||
{
|
{
|
||||||
@ -803,7 +803,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_sizeof_DStream(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_sizeof_CDict(
|
pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_CDict(
|
||||||
cdict: *const ZSTD_CDict
|
cdict: *const ZSTD_CDict
|
||||||
) -> usize
|
) -> usize
|
||||||
{
|
{
|
||||||
@ -813,7 +813,7 @@ pub unsafe extern "C" fn csbindgen_zstd_ZSTD_sizeof_CDict(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn csbindgen_zstd_ZSTD_sizeof_DDict(
|
pub unsafe extern "C" fn csbindgen_ZSTD_sizeof_DDict(
|
||||||
ddict: *const ZSTD_DDict
|
ddict: *const ZSTD_DDict
|
||||||
) -> usize
|
) -> usize
|
||||||
{
|
{
|
||||||
|
@ -24,7 +24,7 @@ impl AliasMap {
|
|||||||
Some(x) => {
|
Some(x) => {
|
||||||
if let Some(x2) = self.get_mapped_value(&x.type_name) {
|
if let Some(x2) = self.get_mapped_value(&x.type_name) {
|
||||||
// currently multiple pointer alias not supported, only one layer.
|
// currently multiple pointer alias not supported, only one layer.
|
||||||
if let TypeKind::Pointer(_) = &x.type_kind {
|
if let TypeKind::Pointer(_, _) = &x.type_kind {
|
||||||
return Some(RustType {
|
return Some(RustType {
|
||||||
type_name: x2.type_name,
|
type_name: x2.type_name,
|
||||||
type_kind: x.type_kind.clone(),
|
type_kind: x.type_kind.clone(),
|
||||||
|
@ -6,6 +6,7 @@ mod parser;
|
|||||||
mod type_meta;
|
mod type_meta;
|
||||||
mod util;
|
mod util;
|
||||||
|
|
||||||
|
use alias_map::AliasMap;
|
||||||
pub use builder::Builder;
|
pub use builder::Builder;
|
||||||
|
|
||||||
use builder::BindgenOptions;
|
use builder::BindgenOptions;
|
||||||
@ -13,6 +14,7 @@ use emitter::*;
|
|||||||
use field_map::FieldMap;
|
use field_map::FieldMap;
|
||||||
use parser::*;
|
use parser::*;
|
||||||
use std::{collections::HashSet, error::Error};
|
use std::{collections::HashSet, error::Error};
|
||||||
|
use type_meta::RustType;
|
||||||
|
|
||||||
enum GenerateKind {
|
enum GenerateKind {
|
||||||
InputBindgen,
|
InputBindgen,
|
||||||
@ -44,12 +46,10 @@ pub(crate) fn generate(
|
|||||||
for method in &methods {
|
for method in &methods {
|
||||||
// add to using_types with normalize
|
// add to using_types with normalize
|
||||||
if let Some(x) = &method.return_type {
|
if let Some(x) = &method.return_type {
|
||||||
let normalized = aliases.normalize(&x.type_name);
|
collect_using_types(&mut using_types, &aliases, x);
|
||||||
using_types.insert(normalized.clone());
|
|
||||||
}
|
}
|
||||||
for p in &method.parameters {
|
for p in &method.parameters {
|
||||||
let normalized = aliases.normalize(&p.rust_type.type_name);
|
collect_using_types(&mut using_types, &aliases, &p.rust_type);
|
||||||
using_types.insert(normalized);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,8 +57,12 @@ pub(crate) fn generate(
|
|||||||
for struct_type in &structs {
|
for struct_type in &structs {
|
||||||
for field in &struct_type.fields {
|
for field in &struct_type.fields {
|
||||||
let struct_type_normalized = aliases.normalize(&struct_type.struct_name);
|
let struct_type_normalized = aliases.normalize(&struct_type.struct_name);
|
||||||
let field_type_normalized = aliases.normalize(&field.rust_type.type_name);
|
collect_field_types(
|
||||||
field_map.insert(&struct_type_normalized, &field_type_normalized);
|
&mut field_map,
|
||||||
|
&aliases,
|
||||||
|
&struct_type_normalized,
|
||||||
|
&field.rust_type,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,6 +79,47 @@ pub(crate) fn generate(
|
|||||||
Ok((rust, csharp))
|
Ok((rust, csharp))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn collect_using_types(
|
||||||
|
using_types: &mut HashSet<String>,
|
||||||
|
aliases: &AliasMap,
|
||||||
|
rust_type: &RustType,
|
||||||
|
) {
|
||||||
|
if let type_meta::TypeKind::Option(o) = &rust_type.type_kind {
|
||||||
|
collect_using_types(using_types, aliases, o);
|
||||||
|
} else if let type_meta::TypeKind::Function(parameters, return_type) = &rust_type.type_kind {
|
||||||
|
if let Some(x) = &return_type {
|
||||||
|
collect_using_types(using_types, aliases, x);
|
||||||
|
}
|
||||||
|
for p in parameters {
|
||||||
|
collect_using_types(using_types, aliases, &p.rust_type);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let normalized = aliases.normalize(&rust_type.type_name);
|
||||||
|
using_types.insert(normalized.clone());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn collect_field_types(
|
||||||
|
field_map: &mut FieldMap,
|
||||||
|
aliases: &AliasMap,
|
||||||
|
struct_type_normalized: &String,
|
||||||
|
rust_type: &RustType,
|
||||||
|
) {
|
||||||
|
if let type_meta::TypeKind::Option(o) = &rust_type.type_kind {
|
||||||
|
collect_field_types(field_map, aliases, struct_type_normalized, o);
|
||||||
|
} else if let type_meta::TypeKind::Function(parameters, return_type) = &rust_type.type_kind {
|
||||||
|
if let Some(x) = &return_type {
|
||||||
|
collect_field_types(field_map, aliases, struct_type_normalized, x);
|
||||||
|
}
|
||||||
|
for p in parameters {
|
||||||
|
collect_field_types(field_map, aliases, struct_type_normalized, &p.rust_type);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let normalized = aliases.normalize(&rust_type.type_name);
|
||||||
|
field_map.insert(struct_type_normalized, &normalized);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// #[test]
|
// #[test]
|
||||||
// fn test() {
|
// fn test() {
|
||||||
// let path = std::env::current_dir().unwrap();
|
// let path = std::env::current_dir().unwrap();
|
||||||
|
@ -263,11 +263,14 @@ fn parse_type(t: &syn::Type) -> RustType {
|
|||||||
if let syn::Type::Path(path) = &*t.elem {
|
if let syn::Type::Path(path) = &*t.elem {
|
||||||
return RustType {
|
return RustType {
|
||||||
type_name: path.path.segments.last().unwrap().ident.to_string(),
|
type_name: path.path.segments.last().unwrap().ident.to_string(),
|
||||||
type_kind: TypeKind::Pointer(if has_const {
|
type_kind: TypeKind::Pointer(
|
||||||
PointerType::ConstPointer
|
if has_const {
|
||||||
} else {
|
PointerType::ConstPointer
|
||||||
PointerType::MutPointer
|
} else {
|
||||||
}),
|
PointerType::MutPointer
|
||||||
|
},
|
||||||
|
Box::new(parse_type_path(path)),
|
||||||
|
),
|
||||||
};
|
};
|
||||||
} else if let syn::Type::Ptr(t) = &*t.elem {
|
} else if let syn::Type::Ptr(t) = &*t.elem {
|
||||||
if let syn::Type::Path(path) = &*t.elem {
|
if let syn::Type::Path(path) = &*t.elem {
|
||||||
@ -282,30 +285,13 @@ fn parse_type(t: &syn::Type) -> RustType {
|
|||||||
|
|
||||||
return RustType {
|
return RustType {
|
||||||
type_name: path.path.segments.last().unwrap().ident.to_string(),
|
type_name: path.path.segments.last().unwrap().ident.to_string(),
|
||||||
type_kind: TypeKind::Pointer(pointer_type),
|
type_kind: TypeKind::Pointer(pointer_type, Box::new(parse_type_path(path))),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
syn::Type::Path(t) => {
|
syn::Type::Path(t) => {
|
||||||
let last_segment = t.path.segments.last().unwrap();
|
return parse_type_path(t);
|
||||||
if let syn::PathArguments::AngleBracketed(x) = &last_segment.arguments {
|
|
||||||
// generics, only supports Option<> for null function pointer
|
|
||||||
if last_segment.ident == "Option" {
|
|
||||||
if let Some(syn::GenericArgument::Type(t)) = x.args.first() {
|
|
||||||
let rust_type = parse_type(t);
|
|
||||||
return RustType {
|
|
||||||
type_name: "Option".to_string(),
|
|
||||||
type_kind: TypeKind::Option(Box::new(rust_type)),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return RustType {
|
|
||||||
type_name: last_segment.ident.to_string(),
|
|
||||||
type_kind: TypeKind::Normal,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
syn::Type::Array(t) => {
|
syn::Type::Array(t) => {
|
||||||
let mut digits = "".to_string();
|
let mut digits = "".to_string();
|
||||||
@ -362,3 +348,24 @@ fn parse_type(t: &syn::Type) -> RustType {
|
|||||||
type_kind: TypeKind::Normal,
|
type_kind: TypeKind::Normal,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn parse_type_path(t: &syn::TypePath) -> RustType {
|
||||||
|
let last_segment = t.path.segments.last().unwrap();
|
||||||
|
if let syn::PathArguments::AngleBracketed(x) = &last_segment.arguments {
|
||||||
|
// generics, only supports Option<> for null function pointer
|
||||||
|
if last_segment.ident == "Option" {
|
||||||
|
if let Some(syn::GenericArgument::Type(t)) = x.args.first() {
|
||||||
|
let rust_type = parse_type(t);
|
||||||
|
return RustType {
|
||||||
|
type_name: "Option".to_string(),
|
||||||
|
type_kind: TypeKind::Option(Box::new(rust_type)),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return RustType {
|
||||||
|
type_name: last_segment.ident.to_string(),
|
||||||
|
type_kind: TypeKind::Normal,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
@ -65,7 +65,7 @@ pub struct RustType {
|
|||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum TypeKind {
|
pub enum TypeKind {
|
||||||
Normal,
|
Normal,
|
||||||
Pointer(PointerType),
|
Pointer(PointerType, Box<RustType>),
|
||||||
FixedArray(String, Option<PointerType>), // digits
|
FixedArray(String, Option<PointerType>), // digits
|
||||||
Function(Vec<Parameter>, Option<Box<RustType>>), // parameter, return
|
Function(Vec<Parameter>, Option<Box<RustType>>), // parameter, return
|
||||||
Option(Box<RustType>),
|
Option(Box<RustType>),
|
||||||
@ -128,10 +128,10 @@ impl RustType {
|
|||||||
Normal => {
|
Normal => {
|
||||||
emit_type_name(&mut sb);
|
emit_type_name(&mut sb);
|
||||||
}
|
}
|
||||||
Pointer(p) => {
|
Pointer(p, inner) => {
|
||||||
emit_pointer(&mut sb, p);
|
emit_pointer(&mut sb, p);
|
||||||
sb.push(' ');
|
sb.push(' ');
|
||||||
emit_type_name(&mut sb);
|
sb.push_str(inner.to_rust_string(type_path).as_str());
|
||||||
}
|
}
|
||||||
FixedArray(digits, pointer) => {
|
FixedArray(digits, pointer) => {
|
||||||
if let Some(p) = pointer {
|
if let Some(p) = pointer {
|
||||||
@ -231,13 +231,20 @@ impl RustType {
|
|||||||
None => (self.clone(), false),
|
None => (self.clone(), false),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// if alias if Option, unwrap.
|
||||||
|
let type_csharp_string = if use_alias {
|
||||||
|
use_type.to_csharp_string(options, alias_map, emit_from_struct, method_name, parameter_name)
|
||||||
|
} else {
|
||||||
|
convert_type_name(use_type.type_name.as_str()).to_string()
|
||||||
|
};
|
||||||
|
|
||||||
let mut sb = String::new();
|
let mut sb = String::new();
|
||||||
|
|
||||||
match &self.type_kind {
|
match &self.type_kind {
|
||||||
TypeKind::FixedArray(_, _) => {
|
TypeKind::FixedArray(_, _) => {
|
||||||
sb.push_str("fixed ");
|
sb.push_str("fixed ");
|
||||||
|
|
||||||
let type_name = convert_type_name(use_type.type_name.as_str());
|
let type_name = type_csharp_string.as_str();
|
||||||
let type_name = match type_name {
|
let type_name = match type_name {
|
||||||
// C# fixed allow types
|
// C# fixed allow types
|
||||||
"bool" | "byte" | "short" | "int" | "long" | "char" | "sbyte" | "ushort"
|
"bool" | "byte" | "short" | "int" | "long" | "char" | "sbyte" | "ushort"
|
||||||
@ -297,11 +304,31 @@ impl RustType {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
sb.push_str(convert_type_name(use_type.type_name.as_str()));
|
fn emit_pointer(
|
||||||
|
sb: &mut String,
|
||||||
if use_alias {
|
rust_type: &RustType,
|
||||||
|
options: &BindgenOptions,
|
||||||
|
alias_map: &AliasMap,
|
||||||
|
emit_from_struct: bool,
|
||||||
|
method_name: &String,
|
||||||
|
parameter_name: &String,
|
||||||
|
emit_inner: bool,
|
||||||
|
) -> bool {
|
||||||
use PointerType::*;
|
use PointerType::*;
|
||||||
if let TypeKind::Pointer(p) = &use_type.type_kind {
|
if let TypeKind::Pointer(p, inner) = &rust_type.type_kind {
|
||||||
|
if emit_inner {
|
||||||
|
sb.push_str(
|
||||||
|
&inner
|
||||||
|
.to_csharp_string(
|
||||||
|
options,
|
||||||
|
alias_map,
|
||||||
|
emit_from_struct,
|
||||||
|
method_name,
|
||||||
|
parameter_name,
|
||||||
|
)
|
||||||
|
.as_str(),
|
||||||
|
);
|
||||||
|
}
|
||||||
match p {
|
match p {
|
||||||
MutPointer | ConstPointer => {
|
MutPointer | ConstPointer => {
|
||||||
sb.push('*');
|
sb.push('*');
|
||||||
@ -313,21 +340,41 @@ impl RustType {
|
|||||||
sb.push_str("**");
|
sb.push_str("**");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
if let TypeKind::Pointer(p) = &self.type_kind {
|
let mut emit_inner = true;
|
||||||
use PointerType::*;
|
if use_alias {
|
||||||
match p {
|
if !emit_pointer(
|
||||||
MutPointer | ConstPointer => {
|
&mut sb,
|
||||||
sb.push('*');
|
&use_type,
|
||||||
}
|
options,
|
||||||
MutPointerPointer
|
alias_map,
|
||||||
| ConstPointerPointer
|
emit_from_struct,
|
||||||
| MutConstPointerPointer
|
method_name,
|
||||||
| ConstMutPointerPointer => {
|
parameter_name,
|
||||||
sb.push_str("**");
|
emit_inner,
|
||||||
}
|
) {
|
||||||
|
sb.push_str(type_csharp_string.as_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
emit_inner = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if !emit_pointer(
|
||||||
|
&mut sb,
|
||||||
|
&self,
|
||||||
|
options,
|
||||||
|
alias_map,
|
||||||
|
emit_from_struct,
|
||||||
|
method_name,
|
||||||
|
parameter_name,
|
||||||
|
emit_inner,
|
||||||
|
) {
|
||||||
|
if emit_inner {
|
||||||
|
sb.push_str(type_csharp_string.as_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
3
dotnet-sandbox/NativeMethods.cs
vendored
3
dotnet-sandbox/NativeMethods.cs
vendored
@ -12,6 +12,9 @@ namespace CsBindgen
|
|||||||
{
|
{
|
||||||
const string __DllName = "csbindgen_tests";
|
const string __DllName = "csbindgen_tests";
|
||||||
|
|
||||||
|
[DllImport(__DllName, EntryPoint = "nest_test", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
|
public static extern void nest_test(delegate* unmanaged[Cdecl]<delegate* unmanaged[Cdecl]<int, void>*, int> _f);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "alias_test1", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
[DllImport(__DllName, EntryPoint = "alias_test1", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void alias_test1(long* _a);
|
public static extern void alias_test1(long* _a);
|
||||||
|
|
||||||
|
878
dotnet-sandbox/bullet3_bindgen.cs
vendored
878
dotnet-sandbox/bullet3_bindgen.cs
vendored
File diff suppressed because it is too large
Load Diff
252
dotnet-sandbox/quiche_bindgen.cs
vendored
252
dotnet-sandbox/quiche_bindgen.cs
vendored
@ -12,400 +12,400 @@ namespace CsBindgen
|
|||||||
{
|
{
|
||||||
const string __DllName = "libquiche";
|
const string __DllName = "libquiche";
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_version", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_version", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern byte* quiche_version();
|
public static extern byte* quiche_version();
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_enable_debug_logging", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_enable_debug_logging", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_enable_debug_logging(delegate* unmanaged[Cdecl]<byte*, void*, void> cb, void* argp);
|
public static extern int quiche_enable_debug_logging(delegate* unmanaged[Cdecl]<byte*, void*, void> cb, void* argp);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_new", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_new", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern quiche_config* quiche_config_new(uint version);
|
public static extern quiche_config* quiche_config_new(uint version);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_load_cert_chain_from_pem_file", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_load_cert_chain_from_pem_file", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_config_load_cert_chain_from_pem_file(quiche_config* config, byte* path);
|
public static extern int quiche_config_load_cert_chain_from_pem_file(quiche_config* config, byte* path);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_load_priv_key_from_pem_file", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_load_priv_key_from_pem_file", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_config_load_priv_key_from_pem_file(quiche_config* config, byte* path);
|
public static extern int quiche_config_load_priv_key_from_pem_file(quiche_config* config, byte* path);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_load_verify_locations_from_file", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_load_verify_locations_from_file", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_config_load_verify_locations_from_file(quiche_config* config, byte* path);
|
public static extern int quiche_config_load_verify_locations_from_file(quiche_config* config, byte* path);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_load_verify_locations_from_directory", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_load_verify_locations_from_directory", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_config_load_verify_locations_from_directory(quiche_config* config, byte* path);
|
public static extern int quiche_config_load_verify_locations_from_directory(quiche_config* config, byte* path);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_verify_peer", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_verify_peer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_verify_peer(quiche_config* config, [MarshalAs(UnmanagedType.U1)] bool v);
|
public static extern void quiche_config_verify_peer(quiche_config* config, [MarshalAs(UnmanagedType.U1)] bool v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_grease", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_grease", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_grease(quiche_config* config, [MarshalAs(UnmanagedType.U1)] bool v);
|
public static extern void quiche_config_grease(quiche_config* config, [MarshalAs(UnmanagedType.U1)] bool v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_log_keys", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_log_keys", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_log_keys(quiche_config* config);
|
public static extern void quiche_config_log_keys(quiche_config* config);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_enable_early_data", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_enable_early_data", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_enable_early_data(quiche_config* config);
|
public static extern void quiche_config_enable_early_data(quiche_config* config);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_set_application_protos", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_set_application_protos", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_config_set_application_protos(quiche_config* config, byte* protos, nuint protos_len);
|
public static extern int quiche_config_set_application_protos(quiche_config* config, byte* protos, nuint protos_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_set_max_idle_timeout", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_set_max_idle_timeout", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_set_max_idle_timeout(quiche_config* config, ulong v);
|
public static extern void quiche_config_set_max_idle_timeout(quiche_config* config, ulong v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_set_max_recv_udp_payload_size", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_set_max_recv_udp_payload_size", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_set_max_recv_udp_payload_size(quiche_config* config, nuint v);
|
public static extern void quiche_config_set_max_recv_udp_payload_size(quiche_config* config, nuint v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_set_max_send_udp_payload_size", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_set_max_send_udp_payload_size", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_set_max_send_udp_payload_size(quiche_config* config, nuint v);
|
public static extern void quiche_config_set_max_send_udp_payload_size(quiche_config* config, nuint v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_set_initial_max_data", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_set_initial_max_data", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_set_initial_max_data(quiche_config* config, ulong v);
|
public static extern void quiche_config_set_initial_max_data(quiche_config* config, ulong v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_set_initial_max_stream_data_bidi_local", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_set_initial_max_stream_data_bidi_local", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_set_initial_max_stream_data_bidi_local(quiche_config* config, ulong v);
|
public static extern void quiche_config_set_initial_max_stream_data_bidi_local(quiche_config* config, ulong v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_set_initial_max_stream_data_bidi_remote", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_set_initial_max_stream_data_bidi_remote", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_set_initial_max_stream_data_bidi_remote(quiche_config* config, ulong v);
|
public static extern void quiche_config_set_initial_max_stream_data_bidi_remote(quiche_config* config, ulong v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_set_initial_max_stream_data_uni", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_set_initial_max_stream_data_uni", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_set_initial_max_stream_data_uni(quiche_config* config, ulong v);
|
public static extern void quiche_config_set_initial_max_stream_data_uni(quiche_config* config, ulong v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_set_initial_max_streams_bidi", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_set_initial_max_streams_bidi", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_set_initial_max_streams_bidi(quiche_config* config, ulong v);
|
public static extern void quiche_config_set_initial_max_streams_bidi(quiche_config* config, ulong v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_set_initial_max_streams_uni", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_set_initial_max_streams_uni", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_set_initial_max_streams_uni(quiche_config* config, ulong v);
|
public static extern void quiche_config_set_initial_max_streams_uni(quiche_config* config, ulong v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_set_ack_delay_exponent", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_set_ack_delay_exponent", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_set_ack_delay_exponent(quiche_config* config, ulong v);
|
public static extern void quiche_config_set_ack_delay_exponent(quiche_config* config, ulong v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_set_max_ack_delay", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_set_max_ack_delay", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_set_max_ack_delay(quiche_config* config, ulong v);
|
public static extern void quiche_config_set_max_ack_delay(quiche_config* config, ulong v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_set_disable_active_migration", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_set_disable_active_migration", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_set_disable_active_migration(quiche_config* config, [MarshalAs(UnmanagedType.U1)] bool v);
|
public static extern void quiche_config_set_disable_active_migration(quiche_config* config, [MarshalAs(UnmanagedType.U1)] bool v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_set_cc_algorithm", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_set_cc_algorithm", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_set_cc_algorithm(quiche_config* config, int algo);
|
public static extern void quiche_config_set_cc_algorithm(quiche_config* config, int algo);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_enable_hystart", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_enable_hystart", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_enable_hystart(quiche_config* config, [MarshalAs(UnmanagedType.U1)] bool v);
|
public static extern void quiche_config_enable_hystart(quiche_config* config, [MarshalAs(UnmanagedType.U1)] bool v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_enable_pacing", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_enable_pacing", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_enable_pacing(quiche_config* config, [MarshalAs(UnmanagedType.U1)] bool v);
|
public static extern void quiche_config_enable_pacing(quiche_config* config, [MarshalAs(UnmanagedType.U1)] bool v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_enable_dgram", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_enable_dgram", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_enable_dgram(quiche_config* config, [MarshalAs(UnmanagedType.U1)] bool enabled, nuint recv_queue_len, nuint send_queue_len);
|
public static extern void quiche_config_enable_dgram(quiche_config* config, [MarshalAs(UnmanagedType.U1)] bool enabled, nuint recv_queue_len, nuint send_queue_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_set_max_connection_window", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_set_max_connection_window", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_set_max_connection_window(quiche_config* config, ulong v);
|
public static extern void quiche_config_set_max_connection_window(quiche_config* config, ulong v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_set_max_stream_window", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_set_max_stream_window", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_set_max_stream_window(quiche_config* config, ulong v);
|
public static extern void quiche_config_set_max_stream_window(quiche_config* config, ulong v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_set_active_connection_id_limit", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_set_active_connection_id_limit", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_set_active_connection_id_limit(quiche_config* config, ulong v);
|
public static extern void quiche_config_set_active_connection_id_limit(quiche_config* config, ulong v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_set_stateless_reset_token", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_set_stateless_reset_token", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_set_stateless_reset_token(quiche_config* config, byte* v);
|
public static extern void quiche_config_set_stateless_reset_token(quiche_config* config, byte* v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_config_free", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_config_free", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_config_free(quiche_config* config);
|
public static extern void quiche_config_free(quiche_config* config);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_header_info", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_header_info", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_header_info(byte* buf, nuint buf_len, nuint dcil, uint* version, byte* type_, byte* scid, nuint* scid_len, byte* dcid, nuint* dcid_len, byte* token, nuint* token_len);
|
public static extern int quiche_header_info(byte* buf, nuint buf_len, nuint dcil, uint* version, byte* type_, byte* scid, nuint* scid_len, byte* dcid, nuint* dcid_len, byte* token, nuint* token_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_accept", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_accept", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern quiche_conn* quiche_accept(byte* scid, nuint scid_len, byte* odcid, nuint odcid_len, sockaddr* local, nuint local_len, sockaddr* peer, nuint peer_len, quiche_config* config);
|
public static extern quiche_conn* quiche_accept(byte* scid, nuint scid_len, byte* odcid, nuint odcid_len, sockaddr* local, nuint local_len, sockaddr* peer, nuint peer_len, quiche_config* config);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_connect", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_connect", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern quiche_conn* quiche_connect(byte* server_name, byte* scid, nuint scid_len, sockaddr* local, nuint local_len, sockaddr* peer, nuint peer_len, quiche_config* config);
|
public static extern quiche_conn* quiche_connect(byte* server_name, byte* scid, nuint scid_len, sockaddr* local, nuint local_len, sockaddr* peer, nuint peer_len, quiche_config* config);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_negotiate_version", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_negotiate_version", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_negotiate_version(byte* scid, nuint scid_len, byte* dcid, nuint dcid_len, byte* @out, nuint out_len);
|
public static extern long quiche_negotiate_version(byte* scid, nuint scid_len, byte* dcid, nuint dcid_len, byte* @out, nuint out_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_retry", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_retry", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_retry(byte* scid, nuint scid_len, byte* dcid, nuint dcid_len, byte* new_scid, nuint new_scid_len, byte* token, nuint token_len, uint version, byte* @out, nuint out_len);
|
public static extern long quiche_retry(byte* scid, nuint scid_len, byte* dcid, nuint dcid_len, byte* new_scid, nuint new_scid_len, byte* token, nuint token_len, uint version, byte* @out, nuint out_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_version_is_supported", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_version_is_supported", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: MarshalAs(UnmanagedType.U1)]
|
[return: MarshalAs(UnmanagedType.U1)]
|
||||||
public static extern bool quiche_version_is_supported(uint version);
|
public static extern bool quiche_version_is_supported(uint version);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_new_with_tls", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_new_with_tls", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern quiche_conn* quiche_conn_new_with_tls(byte* scid, nuint scid_len, byte* odcid, nuint odcid_len, sockaddr* local, nuint local_len, sockaddr* peer, nuint peer_len, quiche_config* config, void* ssl, [MarshalAs(UnmanagedType.U1)] bool is_server);
|
public static extern quiche_conn* quiche_conn_new_with_tls(byte* scid, nuint scid_len, byte* odcid, nuint odcid_len, sockaddr* local, nuint local_len, sockaddr* peer, nuint peer_len, quiche_config* config, void* ssl, [MarshalAs(UnmanagedType.U1)] bool is_server);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_set_keylog_path", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_set_keylog_path", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: MarshalAs(UnmanagedType.U1)]
|
[return: MarshalAs(UnmanagedType.U1)]
|
||||||
public static extern bool quiche_conn_set_keylog_path(quiche_conn* conn, byte* path);
|
public static extern bool quiche_conn_set_keylog_path(quiche_conn* conn, byte* path);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_set_keylog_fd", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_set_keylog_fd", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_conn_set_keylog_fd(quiche_conn* conn, int fd);
|
public static extern void quiche_conn_set_keylog_fd(quiche_conn* conn, int fd);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_set_qlog_path", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_set_qlog_path", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: MarshalAs(UnmanagedType.U1)]
|
[return: MarshalAs(UnmanagedType.U1)]
|
||||||
public static extern bool quiche_conn_set_qlog_path(quiche_conn* conn, byte* path, byte* log_title, byte* log_desc);
|
public static extern bool quiche_conn_set_qlog_path(quiche_conn* conn, byte* path, byte* log_title, byte* log_desc);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_set_qlog_fd", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_set_qlog_fd", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_conn_set_qlog_fd(quiche_conn* conn, int fd, byte* log_title, byte* log_desc);
|
public static extern void quiche_conn_set_qlog_fd(quiche_conn* conn, int fd, byte* log_title, byte* log_desc);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_set_session", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_set_session", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_conn_set_session(quiche_conn* conn, byte* buf, nuint buf_len);
|
public static extern int quiche_conn_set_session(quiche_conn* conn, byte* buf, nuint buf_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_recv", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_recv", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_conn_recv(quiche_conn* conn, byte* buf, nuint buf_len, quiche_recv_info* info);
|
public static extern long quiche_conn_recv(quiche_conn* conn, byte* buf, nuint buf_len, quiche_recv_info* info);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_send", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_send", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_conn_send(quiche_conn* conn, byte* @out, nuint out_len, quiche_send_info* out_info);
|
public static extern long quiche_conn_send(quiche_conn* conn, byte* @out, nuint out_len, quiche_send_info* out_info);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_send_quantum", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_send_quantum", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint quiche_conn_send_quantum(quiche_conn* conn);
|
public static extern nuint quiche_conn_send_quantum(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_recv", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_recv", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_conn_stream_recv(quiche_conn* conn, ulong stream_id, byte* @out, nuint buf_len, bool* fin);
|
public static extern long quiche_conn_stream_recv(quiche_conn* conn, ulong stream_id, byte* @out, nuint buf_len, bool* fin);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_send", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_send", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_conn_stream_send(quiche_conn* conn, ulong stream_id, byte* buf, nuint buf_len, [MarshalAs(UnmanagedType.U1)] bool fin);
|
public static extern long quiche_conn_stream_send(quiche_conn* conn, ulong stream_id, byte* buf, nuint buf_len, [MarshalAs(UnmanagedType.U1)] bool fin);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_priority", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_priority", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_conn_stream_priority(quiche_conn* conn, ulong stream_id, byte urgency, [MarshalAs(UnmanagedType.U1)] bool incremental);
|
public static extern int quiche_conn_stream_priority(quiche_conn* conn, ulong stream_id, byte urgency, [MarshalAs(UnmanagedType.U1)] bool incremental);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_shutdown", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_shutdown", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_conn_stream_shutdown(quiche_conn* conn, ulong stream_id, int direction, ulong err);
|
public static extern int quiche_conn_stream_shutdown(quiche_conn* conn, ulong stream_id, int direction, ulong err);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_capacity", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_capacity", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_conn_stream_capacity(quiche_conn* conn, ulong stream_id);
|
public static extern long quiche_conn_stream_capacity(quiche_conn* conn, ulong stream_id);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_readable", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_readable", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: MarshalAs(UnmanagedType.U1)]
|
[return: MarshalAs(UnmanagedType.U1)]
|
||||||
public static extern bool quiche_conn_stream_readable(quiche_conn* conn, ulong stream_id);
|
public static extern bool quiche_conn_stream_readable(quiche_conn* conn, ulong stream_id);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_readable_next", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_readable_next", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_conn_stream_readable_next(quiche_conn* conn);
|
public static extern long quiche_conn_stream_readable_next(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_writable", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_writable", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_conn_stream_writable(quiche_conn* conn, ulong stream_id, nuint len);
|
public static extern int quiche_conn_stream_writable(quiche_conn* conn, ulong stream_id, nuint len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_writable_next", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_writable_next", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_conn_stream_writable_next(quiche_conn* conn);
|
public static extern long quiche_conn_stream_writable_next(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_finished", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_finished", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: MarshalAs(UnmanagedType.U1)]
|
[return: MarshalAs(UnmanagedType.U1)]
|
||||||
public static extern bool quiche_conn_stream_finished(quiche_conn* conn, ulong stream_id);
|
public static extern bool quiche_conn_stream_finished(quiche_conn* conn, ulong stream_id);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_readable", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_readable", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern quiche_stream_iter* quiche_conn_readable(quiche_conn* conn);
|
public static extern quiche_stream_iter* quiche_conn_readable(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_writable", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_writable", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern quiche_stream_iter* quiche_conn_writable(quiche_conn* conn);
|
public static extern quiche_stream_iter* quiche_conn_writable(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_max_send_udp_payload_size", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_max_send_udp_payload_size", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint quiche_conn_max_send_udp_payload_size(quiche_conn* conn);
|
public static extern nuint quiche_conn_max_send_udp_payload_size(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_timeout_as_nanos", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_timeout_as_nanos", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern ulong quiche_conn_timeout_as_nanos(quiche_conn* conn);
|
public static extern ulong quiche_conn_timeout_as_nanos(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_timeout_as_millis", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_timeout_as_millis", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern ulong quiche_conn_timeout_as_millis(quiche_conn* conn);
|
public static extern ulong quiche_conn_timeout_as_millis(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_on_timeout", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_on_timeout", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_conn_on_timeout(quiche_conn* conn);
|
public static extern void quiche_conn_on_timeout(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_close", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_close", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_conn_close(quiche_conn* conn, [MarshalAs(UnmanagedType.U1)] bool app, ulong err, byte* reason, nuint reason_len);
|
public static extern int quiche_conn_close(quiche_conn* conn, [MarshalAs(UnmanagedType.U1)] bool app, ulong err, byte* reason, nuint reason_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_trace_id", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_trace_id", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_conn_trace_id(quiche_conn* conn, byte** @out, nuint* out_len);
|
public static extern void quiche_conn_trace_id(quiche_conn* conn, byte** @out, nuint* out_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_source_id", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_source_id", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_conn_source_id(quiche_conn* conn, byte** @out, nuint* out_len);
|
public static extern void quiche_conn_source_id(quiche_conn* conn, byte** @out, nuint* out_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_destination_id", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_destination_id", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_conn_destination_id(quiche_conn* conn, byte** @out, nuint* out_len);
|
public static extern void quiche_conn_destination_id(quiche_conn* conn, byte** @out, nuint* out_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_application_proto", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_application_proto", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_conn_application_proto(quiche_conn* conn, byte** @out, nuint* out_len);
|
public static extern void quiche_conn_application_proto(quiche_conn* conn, byte** @out, nuint* out_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_peer_cert", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_peer_cert", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_conn_peer_cert(quiche_conn* conn, byte** @out, nuint* out_len);
|
public static extern void quiche_conn_peer_cert(quiche_conn* conn, byte** @out, nuint* out_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_session", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_session", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_conn_session(quiche_conn* conn, byte** @out, nuint* out_len);
|
public static extern void quiche_conn_session(quiche_conn* conn, byte** @out, nuint* out_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_is_established", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_is_established", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: MarshalAs(UnmanagedType.U1)]
|
[return: MarshalAs(UnmanagedType.U1)]
|
||||||
public static extern bool quiche_conn_is_established(quiche_conn* conn);
|
public static extern bool quiche_conn_is_established(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_is_in_early_data", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_is_in_early_data", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: MarshalAs(UnmanagedType.U1)]
|
[return: MarshalAs(UnmanagedType.U1)]
|
||||||
public static extern bool quiche_conn_is_in_early_data(quiche_conn* conn);
|
public static extern bool quiche_conn_is_in_early_data(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_is_readable", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_is_readable", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: MarshalAs(UnmanagedType.U1)]
|
[return: MarshalAs(UnmanagedType.U1)]
|
||||||
public static extern bool quiche_conn_is_readable(quiche_conn* conn);
|
public static extern bool quiche_conn_is_readable(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_is_draining", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_is_draining", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: MarshalAs(UnmanagedType.U1)]
|
[return: MarshalAs(UnmanagedType.U1)]
|
||||||
public static extern bool quiche_conn_is_draining(quiche_conn* conn);
|
public static extern bool quiche_conn_is_draining(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_peer_streams_left_bidi", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_peer_streams_left_bidi", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern ulong quiche_conn_peer_streams_left_bidi(quiche_conn* conn);
|
public static extern ulong quiche_conn_peer_streams_left_bidi(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_peer_streams_left_uni", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_peer_streams_left_uni", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern ulong quiche_conn_peer_streams_left_uni(quiche_conn* conn);
|
public static extern ulong quiche_conn_peer_streams_left_uni(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_is_closed", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_is_closed", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: MarshalAs(UnmanagedType.U1)]
|
[return: MarshalAs(UnmanagedType.U1)]
|
||||||
public static extern bool quiche_conn_is_closed(quiche_conn* conn);
|
public static extern bool quiche_conn_is_closed(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_is_timed_out", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_is_timed_out", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: MarshalAs(UnmanagedType.U1)]
|
[return: MarshalAs(UnmanagedType.U1)]
|
||||||
public static extern bool quiche_conn_is_timed_out(quiche_conn* conn);
|
public static extern bool quiche_conn_is_timed_out(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_peer_error", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_peer_error", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: MarshalAs(UnmanagedType.U1)]
|
[return: MarshalAs(UnmanagedType.U1)]
|
||||||
public static extern bool quiche_conn_peer_error(quiche_conn* conn, bool* is_app, ulong* error_code, byte** reason, nuint* reason_len);
|
public static extern bool quiche_conn_peer_error(quiche_conn* conn, bool* is_app, ulong* error_code, byte** reason, nuint* reason_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_local_error", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_local_error", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: MarshalAs(UnmanagedType.U1)]
|
[return: MarshalAs(UnmanagedType.U1)]
|
||||||
public static extern bool quiche_conn_local_error(quiche_conn* conn, bool* is_app, ulong* error_code, byte** reason, nuint* reason_len);
|
public static extern bool quiche_conn_local_error(quiche_conn* conn, bool* is_app, ulong* error_code, byte** reason, nuint* reason_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_init_application_data", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_init_application_data", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_conn_stream_init_application_data(quiche_conn* conn, ulong stream_id, void* data);
|
public static extern int quiche_conn_stream_init_application_data(quiche_conn* conn, ulong stream_id, void* data);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_application_data", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_stream_application_data", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void* quiche_conn_stream_application_data(quiche_conn* conn, ulong stream_id);
|
public static extern void* quiche_conn_stream_application_data(quiche_conn* conn, ulong stream_id);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_stream_iter_next", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_stream_iter_next", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: MarshalAs(UnmanagedType.U1)]
|
[return: MarshalAs(UnmanagedType.U1)]
|
||||||
public static extern bool quiche_stream_iter_next(quiche_stream_iter* iter, ulong* stream_id);
|
public static extern bool quiche_stream_iter_next(quiche_stream_iter* iter, ulong* stream_id);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_stream_iter_free", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_stream_iter_free", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_stream_iter_free(quiche_stream_iter* iter);
|
public static extern void quiche_stream_iter_free(quiche_stream_iter* iter);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_stats", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_stats", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_conn_stats(quiche_conn* conn, quiche_stats* @out);
|
public static extern void quiche_conn_stats(quiche_conn* conn, quiche_stats* @out);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_path_stats", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_path_stats", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_conn_path_stats(quiche_conn* conn, nuint idx, quiche_path_stats* @out);
|
public static extern int quiche_conn_path_stats(quiche_conn* conn, nuint idx, quiche_path_stats* @out);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_dgram_max_writable_len", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_dgram_max_writable_len", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_conn_dgram_max_writable_len(quiche_conn* conn);
|
public static extern long quiche_conn_dgram_max_writable_len(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_dgram_recv_front_len", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_dgram_recv_front_len", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_conn_dgram_recv_front_len(quiche_conn* conn);
|
public static extern long quiche_conn_dgram_recv_front_len(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_dgram_recv_queue_len", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_dgram_recv_queue_len", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_conn_dgram_recv_queue_len(quiche_conn* conn);
|
public static extern long quiche_conn_dgram_recv_queue_len(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_dgram_recv_queue_byte_size", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_dgram_recv_queue_byte_size", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_conn_dgram_recv_queue_byte_size(quiche_conn* conn);
|
public static extern long quiche_conn_dgram_recv_queue_byte_size(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_dgram_send_queue_len", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_dgram_send_queue_len", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_conn_dgram_send_queue_len(quiche_conn* conn);
|
public static extern long quiche_conn_dgram_send_queue_len(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_dgram_send_queue_byte_size", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_dgram_send_queue_byte_size", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_conn_dgram_send_queue_byte_size(quiche_conn* conn);
|
public static extern long quiche_conn_dgram_send_queue_byte_size(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_dgram_recv", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_dgram_recv", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_conn_dgram_recv(quiche_conn* conn, byte* buf, nuint buf_len);
|
public static extern long quiche_conn_dgram_recv(quiche_conn* conn, byte* buf, nuint buf_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_dgram_send", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_dgram_send", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_conn_dgram_send(quiche_conn* conn, byte* buf, nuint buf_len);
|
public static extern long quiche_conn_dgram_send(quiche_conn* conn, byte* buf, nuint buf_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_dgram_purge_outgoing", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_dgram_purge_outgoing", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_conn_dgram_purge_outgoing(quiche_conn* conn, delegate* unmanaged[Cdecl]<byte*, nuint, bool> f);
|
public static extern void quiche_conn_dgram_purge_outgoing(quiche_conn* conn, delegate* unmanaged[Cdecl]<byte*, nuint, bool> f);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_send_ack_eliciting", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_send_ack_eliciting", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_conn_send_ack_eliciting(quiche_conn* conn);
|
public static extern long quiche_conn_send_ack_eliciting(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_send_ack_eliciting_on_path", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_send_ack_eliciting_on_path", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_conn_send_ack_eliciting_on_path(quiche_conn* conn, sockaddr* local, nuint local_len, sockaddr* peer, nuint peer_len);
|
public static extern long quiche_conn_send_ack_eliciting_on_path(quiche_conn* conn, sockaddr* local, nuint local_len, sockaddr* peer, nuint peer_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_conn_free", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_conn_free", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_conn_free(quiche_conn* conn);
|
public static extern void quiche_conn_free(quiche_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_config_new", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_config_new", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern quiche_h3_config* quiche_h3_config_new();
|
public static extern quiche_h3_config* quiche_h3_config_new();
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_config_set_max_field_section_size", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_config_set_max_field_section_size", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_h3_config_set_max_field_section_size(quiche_h3_config* config, ulong v);
|
public static extern void quiche_h3_config_set_max_field_section_size(quiche_h3_config* config, ulong v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_config_set_qpack_max_table_capacity", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_config_set_qpack_max_table_capacity", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_h3_config_set_qpack_max_table_capacity(quiche_h3_config* config, ulong v);
|
public static extern void quiche_h3_config_set_qpack_max_table_capacity(quiche_h3_config* config, ulong v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_config_set_qpack_blocked_streams", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_config_set_qpack_blocked_streams", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_h3_config_set_qpack_blocked_streams(quiche_h3_config* config, ulong v);
|
public static extern void quiche_h3_config_set_qpack_blocked_streams(quiche_h3_config* config, ulong v);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_config_enable_extended_connect", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_config_enable_extended_connect", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_h3_config_enable_extended_connect(quiche_h3_config* config, [MarshalAs(UnmanagedType.U1)] bool enabled);
|
public static extern void quiche_h3_config_enable_extended_connect(quiche_h3_config* config, [MarshalAs(UnmanagedType.U1)] bool enabled);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_config_free", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_config_free", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_h3_config_free(quiche_h3_config* config);
|
public static extern void quiche_h3_config_free(quiche_h3_config* config);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_accept", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_accept", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern quiche_h3_conn* quiche_h3_accept(quiche_conn* quiche_conn, quiche_h3_config* config);
|
public static extern quiche_h3_conn* quiche_h3_accept(quiche_conn* quiche_conn, quiche_h3_config* config);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_conn_new_with_transport", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_conn_new_with_transport", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern quiche_h3_conn* quiche_h3_conn_new_with_transport(quiche_conn* quiche_conn, quiche_h3_config* config);
|
public static extern quiche_h3_conn* quiche_h3_conn_new_with_transport(quiche_conn* quiche_conn, quiche_h3_config* config);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_conn_poll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_conn_poll", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_h3_conn_poll(quiche_h3_conn* conn, quiche_conn* quic_conn, quiche_h3_event** ev);
|
public static extern long quiche_h3_conn_poll(quiche_h3_conn* conn, quiche_conn* quic_conn, quiche_h3_event** ev);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_event_type", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_event_type", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_h3_event_type(quiche_h3_event* ev);
|
public static extern int quiche_h3_event_type(quiche_h3_event* ev);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_event_for_each_header", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_event_for_each_header", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_h3_event_for_each_header(quiche_h3_event* ev, delegate* unmanaged[Cdecl]<byte*, nuint, byte*, nuint, void*, int> cb, void* argp);
|
public static extern int quiche_h3_event_for_each_header(quiche_h3_event* ev, delegate* unmanaged[Cdecl]<byte*, nuint, byte*, nuint, void*, int> cb, void* argp);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_for_each_setting", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_for_each_setting", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_h3_for_each_setting(quiche_h3_conn* conn, delegate* unmanaged[Cdecl]<ulong, ulong, void*, int> cb, void* argp);
|
public static extern int quiche_h3_for_each_setting(quiche_h3_conn* conn, delegate* unmanaged[Cdecl]<ulong, ulong, void*, int> cb, void* argp);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_event_headers_has_body", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_event_headers_has_body", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: MarshalAs(UnmanagedType.U1)]
|
[return: MarshalAs(UnmanagedType.U1)]
|
||||||
public static extern bool quiche_h3_event_headers_has_body(quiche_h3_event* ev);
|
public static extern bool quiche_h3_event_headers_has_body(quiche_h3_event* ev);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_extended_connect_enabled_by_peer", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_extended_connect_enabled_by_peer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: MarshalAs(UnmanagedType.U1)]
|
[return: MarshalAs(UnmanagedType.U1)]
|
||||||
public static extern bool quiche_h3_extended_connect_enabled_by_peer(quiche_h3_conn* conn);
|
public static extern bool quiche_h3_extended_connect_enabled_by_peer(quiche_h3_conn* conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_event_free", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_event_free", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_h3_event_free(quiche_h3_event* ev);
|
public static extern void quiche_h3_event_free(quiche_h3_event* ev);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_send_request", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_send_request", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_h3_send_request(quiche_h3_conn* conn, quiche_conn* quic_conn, quiche_h3_header* headers, nuint headers_len, [MarshalAs(UnmanagedType.U1)] bool fin);
|
public static extern long quiche_h3_send_request(quiche_h3_conn* conn, quiche_conn* quic_conn, quiche_h3_header* headers, nuint headers_len, [MarshalAs(UnmanagedType.U1)] bool fin);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_send_response", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_send_response", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_h3_send_response(quiche_h3_conn* conn, quiche_conn* quic_conn, ulong stream_id, quiche_h3_header* headers, nuint headers_len, [MarshalAs(UnmanagedType.U1)] bool fin);
|
public static extern int quiche_h3_send_response(quiche_h3_conn* conn, quiche_conn* quic_conn, ulong stream_id, quiche_h3_header* headers, nuint headers_len, [MarshalAs(UnmanagedType.U1)] bool fin);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_send_response_with_priority", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_send_response_with_priority", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_h3_send_response_with_priority(quiche_h3_conn* conn, quiche_conn* quic_conn, ulong stream_id, quiche_h3_header* headers, nuint headers_len, quiche_h3_priority* priority, [MarshalAs(UnmanagedType.U1)] bool fin);
|
public static extern int quiche_h3_send_response_with_priority(quiche_h3_conn* conn, quiche_conn* quic_conn, ulong stream_id, quiche_h3_header* headers, nuint headers_len, quiche_h3_priority* priority, [MarshalAs(UnmanagedType.U1)] bool fin);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_send_body", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_send_body", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_h3_send_body(quiche_h3_conn* conn, quiche_conn* quic_conn, ulong stream_id, byte* body, nuint body_len, [MarshalAs(UnmanagedType.U1)] bool fin);
|
public static extern long quiche_h3_send_body(quiche_h3_conn* conn, quiche_conn* quic_conn, ulong stream_id, byte* body, nuint body_len, [MarshalAs(UnmanagedType.U1)] bool fin);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_recv_body", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_recv_body", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_h3_recv_body(quiche_h3_conn* conn, quiche_conn* quic_conn, ulong stream_id, byte* @out, nuint out_len);
|
public static extern long quiche_h3_recv_body(quiche_h3_conn* conn, quiche_conn* quic_conn, ulong stream_id, byte* @out, nuint out_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_parse_extensible_priority", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_parse_extensible_priority", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_h3_parse_extensible_priority(byte* priority, nuint priority_len, quiche_h3_priority* parsed);
|
public static extern int quiche_h3_parse_extensible_priority(byte* priority, nuint priority_len, quiche_h3_priority* parsed);
|
||||||
|
|
||||||
/// <summary>Sends a PRIORITY_UPDATE frame on the control stream with specified request stream ID and priority.</summary>
|
/// <summary>Sends a PRIORITY_UPDATE frame on the control stream with specified request stream ID and priority.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_send_priority_update_for_request", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_send_priority_update_for_request", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_h3_send_priority_update_for_request(quiche_h3_conn* conn, quiche_conn* quic_conn, ulong stream_id, quiche_h3_priority* priority);
|
public static extern int quiche_h3_send_priority_update_for_request(quiche_h3_conn* conn, quiche_conn* quic_conn, ulong stream_id, quiche_h3_priority* priority);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_take_last_priority_update", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_take_last_priority_update", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int quiche_h3_take_last_priority_update(quiche_h3_conn* conn, ulong prioritized_element_id, delegate* unmanaged[Cdecl]<byte*, ulong, void*, int> cb, void* argp);
|
public static extern int quiche_h3_take_last_priority_update(quiche_h3_conn* conn, ulong prioritized_element_id, delegate* unmanaged[Cdecl]<byte*, ulong, void*, int> cb, void* argp);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_dgram_enabled_by_peer", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_dgram_enabled_by_peer", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
[return: MarshalAs(UnmanagedType.U1)]
|
[return: MarshalAs(UnmanagedType.U1)]
|
||||||
public static extern bool quiche_h3_dgram_enabled_by_peer(quiche_h3_conn* conn, quiche_conn* quic_conn);
|
public static extern bool quiche_h3_dgram_enabled_by_peer(quiche_h3_conn* conn, quiche_conn* quic_conn);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_send_dgram", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_send_dgram", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_h3_send_dgram(quiche_h3_conn* conn, quiche_conn* quic_conn, ulong flow_id, byte* data, nuint data_len);
|
public static extern long quiche_h3_send_dgram(quiche_h3_conn* conn, quiche_conn* quic_conn, ulong flow_id, byte* data, nuint data_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_recv_dgram", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_recv_dgram", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern long quiche_h3_recv_dgram(quiche_h3_conn* conn, quiche_conn* quic_conn, ulong* flow_id, nuint* flow_id_len, byte* @out, nuint out_len);
|
public static extern long quiche_h3_recv_dgram(quiche_h3_conn* conn, quiche_conn* quic_conn, ulong* flow_id, nuint* flow_id_len, byte* @out, nuint out_len);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "quiche_h3_conn_free", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "quiche_h3_conn_free", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern void quiche_h3_conn_free(quiche_h3_conn* conn);
|
public static extern void quiche_h3_conn_free(quiche_h3_conn* conn);
|
||||||
|
|
||||||
|
|
||||||
|
1113
dotnet-sandbox/sqlite3_bindgen.cs
vendored
Normal file
1113
dotnet-sandbox/sqlite3_bindgen.cs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
132
dotnet-sandbox/zstd_bindgen.cs
vendored
132
dotnet-sandbox/zstd_bindgen.cs
vendored
@ -13,243 +13,243 @@ namespace CsBindgen
|
|||||||
const string __DllName = "libzsd";
|
const string __DllName = "libzsd";
|
||||||
|
|
||||||
/// <summary>ZSTD_versionNumber() : Return runtime library version, the value is (MAJOR*100*100 + MINOR*100 + RELEASE).</summary>
|
/// <summary>ZSTD_versionNumber() : Return runtime library version, the value is (MAJOR*100*100 + MINOR*100 + RELEASE).</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_versionNumber", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_versionNumber", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern uint ZSTD_versionNumber();
|
public static extern uint ZSTD_versionNumber();
|
||||||
|
|
||||||
/// <summary>ZSTD_versionString() : Return runtime library version, like \"1.4.5\". Requires v1.3.0+.</summary>
|
/// <summary>ZSTD_versionString() : Return runtime library version, like \"1.4.5\". Requires v1.3.0+.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_versionString", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_versionString", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern byte* ZSTD_versionString();
|
public static extern byte* ZSTD_versionString();
|
||||||
|
|
||||||
/// <summary>Simple API//*! ZSTD_compress() : Compresses `src` content as a single zstd compressed frame into already allocated `dst`. Hint : compression runs faster if `dstCapacity` >= `ZSTD_compressBound(srcSize)`. @return : compressed size written into `dst` (<= `dstCapacity), or an error code if it fails (which can be tested using ZSTD_isError()).</summary>
|
/// <summary>Simple API//*! ZSTD_compress() : Compresses `src` content as a single zstd compressed frame into already allocated `dst`. Hint : compression runs faster if `dstCapacity` >= `ZSTD_compressBound(srcSize)`. @return : compressed size written into `dst` (<= `dstCapacity), or an error code if it fails (which can be tested using ZSTD_isError()).</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_compress", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_compress", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_compress(void* dst, nuint dstCapacity, void* src, nuint srcSize, int compressionLevel);
|
public static extern nuint ZSTD_compress(void* dst, nuint dstCapacity, void* src, nuint srcSize, int compressionLevel);
|
||||||
|
|
||||||
/// <summary>ZSTD_decompress() : `compressedSize` : must be the _exact_ size of some number of compressed and/or skippable frames. `dstCapacity` is an upper bound of originalSize to regenerate. If user cannot imply a maximum upper bound, it's better to use streaming mode to decompress data. @return : the number of bytes decompressed into `dst` (<= `dstCapacity`), or an errorCode if it fails (which can be tested using ZSTD_isError()).</summary>
|
/// <summary>ZSTD_decompress() : `compressedSize` : must be the _exact_ size of some number of compressed and/or skippable frames. `dstCapacity` is an upper bound of originalSize to regenerate. If user cannot imply a maximum upper bound, it's better to use streaming mode to decompress data. @return : the number of bytes decompressed into `dst` (<= `dstCapacity`), or an errorCode if it fails (which can be tested using ZSTD_isError()).</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_decompress", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_decompress", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_decompress(void* dst, nuint dstCapacity, void* src, nuint compressedSize);
|
public static extern nuint ZSTD_decompress(void* dst, nuint dstCapacity, void* src, nuint compressedSize);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_getFrameContentSize", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_getFrameContentSize", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern ulong ZSTD_getFrameContentSize(void* src, nuint srcSize);
|
public static extern ulong ZSTD_getFrameContentSize(void* src, nuint srcSize);
|
||||||
|
|
||||||
/// <summary>ZSTD_getDecompressedSize() : NOTE: This function is now obsolete, in favor of ZSTD_getFrameContentSize(). Both functions work the same way, but ZSTD_getDecompressedSize() blends \"empty\", \"unknown\" and \"error\" results to the same return value (0), while ZSTD_getFrameContentSize() gives them separate return values. @return : decompressed size of `src` frame content _if known and not empty_, 0 otherwise.</summary>
|
/// <summary>ZSTD_getDecompressedSize() : NOTE: This function is now obsolete, in favor of ZSTD_getFrameContentSize(). Both functions work the same way, but ZSTD_getDecompressedSize() blends \"empty\", \"unknown\" and \"error\" results to the same return value (0), while ZSTD_getFrameContentSize() gives them separate return values. @return : decompressed size of `src` frame content _if known and not empty_, 0 otherwise.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_getDecompressedSize", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_getDecompressedSize", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern ulong ZSTD_getDecompressedSize(void* src, nuint srcSize);
|
public static extern ulong ZSTD_getDecompressedSize(void* src, nuint srcSize);
|
||||||
|
|
||||||
/// <summary>ZSTD_findFrameCompressedSize() : Requires v1.4.0+ `src` should point to the start of a ZSTD frame or skippable frame. `srcSize` must be >= first frame size @return : the compressed size of the first frame starting at `src`, suitable to pass as `srcSize` to `ZSTD_decompress` or similar, or an error code if input is invalid</summary>
|
/// <summary>ZSTD_findFrameCompressedSize() : Requires v1.4.0+ `src` should point to the start of a ZSTD frame or skippable frame. `srcSize` must be >= first frame size @return : the compressed size of the first frame starting at `src`, suitable to pass as `srcSize` to `ZSTD_decompress` or similar, or an error code if input is invalid</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_findFrameCompressedSize", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_findFrameCompressedSize", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_findFrameCompressedSize(void* src, nuint srcSize);
|
public static extern nuint ZSTD_findFrameCompressedSize(void* src, nuint srcSize);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_compressBound", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_compressBound", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_compressBound(nuint srcSize);
|
public static extern nuint ZSTD_compressBound(nuint srcSize);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_isError", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_isError", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern uint ZSTD_isError(nuint code);
|
public static extern uint ZSTD_isError(nuint code);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_getErrorName", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_getErrorName", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern byte* ZSTD_getErrorName(nuint code);
|
public static extern byte* ZSTD_getErrorName(nuint code);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_minCLevel", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_minCLevel", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int ZSTD_minCLevel();
|
public static extern int ZSTD_minCLevel();
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_maxCLevel", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_maxCLevel", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int ZSTD_maxCLevel();
|
public static extern int ZSTD_maxCLevel();
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_defaultCLevel", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_defaultCLevel", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern int ZSTD_defaultCLevel();
|
public static extern int ZSTD_defaultCLevel();
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_createCCtx", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_createCCtx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern ZSTD_CCtx_s* ZSTD_createCCtx();
|
public static extern ZSTD_CCtx_s* ZSTD_createCCtx();
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_freeCCtx", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_freeCCtx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_freeCCtx(ZSTD_CCtx_s* cctx);
|
public static extern nuint ZSTD_freeCCtx(ZSTD_CCtx_s* cctx);
|
||||||
|
|
||||||
/// <summary>ZSTD_compressCCtx() : Same as ZSTD_compress(), using an explicit ZSTD_CCtx. Important : in order to behave similarly to `ZSTD_compress()`, this function compresses at requested compression level, __ignoring any other parameter__ . If any advanced parameter was set using the advanced API, they will all be reset. Only `compressionLevel` remains.</summary>
|
/// <summary>ZSTD_compressCCtx() : Same as ZSTD_compress(), using an explicit ZSTD_CCtx. Important : in order to behave similarly to `ZSTD_compress()`, this function compresses at requested compression level, __ignoring any other parameter__ . If any advanced parameter was set using the advanced API, they will all be reset. Only `compressionLevel` remains.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_compressCCtx", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_compressCCtx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_compressCCtx(ZSTD_CCtx_s* cctx, void* dst, nuint dstCapacity, void* src, nuint srcSize, int compressionLevel);
|
public static extern nuint ZSTD_compressCCtx(ZSTD_CCtx_s* cctx, void* dst, nuint dstCapacity, void* src, nuint srcSize, int compressionLevel);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_createDCtx", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_createDCtx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern ZSTD_DCtx_s* ZSTD_createDCtx();
|
public static extern ZSTD_DCtx_s* ZSTD_createDCtx();
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_freeDCtx", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_freeDCtx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_freeDCtx(ZSTD_DCtx_s* dctx);
|
public static extern nuint ZSTD_freeDCtx(ZSTD_DCtx_s* dctx);
|
||||||
|
|
||||||
/// <summary>ZSTD_decompressDCtx() : Same as ZSTD_decompress(), requires an allocated ZSTD_DCtx. Compatible with sticky parameters.</summary>
|
/// <summary>ZSTD_decompressDCtx() : Same as ZSTD_decompress(), requires an allocated ZSTD_DCtx. Compatible with sticky parameters.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_decompressDCtx", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_decompressDCtx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_decompressDCtx(ZSTD_DCtx_s* dctx, void* dst, nuint dstCapacity, void* src, nuint srcSize);
|
public static extern nuint ZSTD_decompressDCtx(ZSTD_DCtx_s* dctx, void* dst, nuint dstCapacity, void* src, nuint srcSize);
|
||||||
|
|
||||||
/// <summary>ZSTD_cParam_getBounds() : All parameters must belong to an interval with lower and upper bounds, otherwise they will either trigger an error or be automatically clamped. @return : a structure, ZSTD_bounds, which contains - an error status field, which must be tested using ZSTD_isError() - lower and upper bounds, both inclusive</summary>
|
/// <summary>ZSTD_cParam_getBounds() : All parameters must belong to an interval with lower and upper bounds, otherwise they will either trigger an error or be automatically clamped. @return : a structure, ZSTD_bounds, which contains - an error status field, which must be tested using ZSTD_isError() - lower and upper bounds, both inclusive</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_cParam_getBounds", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_cParam_getBounds", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern ZSTD_bounds ZSTD_cParam_getBounds(int cParam);
|
public static extern ZSTD_bounds ZSTD_cParam_getBounds(int cParam);
|
||||||
|
|
||||||
/// <summary>ZSTD_CCtx_setParameter() : Set one compression parameter, selected by enum ZSTD_cParameter. All parameters have valid bounds. Bounds can be queried using ZSTD_cParam_getBounds(). Providing a value beyond bound will either clamp it, or trigger an error (depending on parameter). Setting a parameter is generally only possible during frame initialization (before starting compression). Exception : when using multi-threading mode (nbWorkers >= 1), the following parameters can be updated _during_ compression (within same frame): => compressionLevel, hashLog, chainLog, searchLog, minMatch, targetLength and strategy. new parameters will be active for next job only (after a flush()). @return : an error code (which can be tested using ZSTD_isError()).</summary>
|
/// <summary>ZSTD_CCtx_setParameter() : Set one compression parameter, selected by enum ZSTD_cParameter. All parameters have valid bounds. Bounds can be queried using ZSTD_cParam_getBounds(). Providing a value beyond bound will either clamp it, or trigger an error (depending on parameter). Setting a parameter is generally only possible during frame initialization (before starting compression). Exception : when using multi-threading mode (nbWorkers >= 1), the following parameters can be updated _during_ compression (within same frame): => compressionLevel, hashLog, chainLog, searchLog, minMatch, targetLength and strategy. new parameters will be active for next job only (after a flush()). @return : an error code (which can be tested using ZSTD_isError()).</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_CCtx_setParameter", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_CCtx_setParameter", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_CCtx_setParameter(ZSTD_CCtx_s* cctx, int param, int value);
|
public static extern nuint ZSTD_CCtx_setParameter(ZSTD_CCtx_s* cctx, int param, int value);
|
||||||
|
|
||||||
/// <summary>ZSTD_CCtx_setPledgedSrcSize() : Total input data size to be compressed as a single frame. Value will be written in frame header, unless if explicitly forbidden using ZSTD_c_contentSizeFlag. This value will also be controlled at end of frame, and trigger an error if not respected. @result : 0, or an error code (which can be tested with ZSTD_isError()). Note 1 : pledgedSrcSize==0 actually means zero, aka an empty frame. In order to mean \"unknown content size\", pass constant ZSTD_CONTENTSIZE_UNKNOWN. ZSTD_CONTENTSIZE_UNKNOWN is default value for any new frame. Note 2 : pledgedSrcSize is only valid once, for the next frame. It's discarded at the end of the frame, and replaced by ZSTD_CONTENTSIZE_UNKNOWN. Note 3 : Whenever all input data is provided and consumed in a single round, for example with ZSTD_compress2(), or invoking immediately ZSTD_compressStream2(,,,ZSTD_e_end), this value is automatically overridden by srcSize instead.</summary>
|
/// <summary>ZSTD_CCtx_setPledgedSrcSize() : Total input data size to be compressed as a single frame. Value will be written in frame header, unless if explicitly forbidden using ZSTD_c_contentSizeFlag. This value will also be controlled at end of frame, and trigger an error if not respected. @result : 0, or an error code (which can be tested with ZSTD_isError()). Note 1 : pledgedSrcSize==0 actually means zero, aka an empty frame. In order to mean \"unknown content size\", pass constant ZSTD_CONTENTSIZE_UNKNOWN. ZSTD_CONTENTSIZE_UNKNOWN is default value for any new frame. Note 2 : pledgedSrcSize is only valid once, for the next frame. It's discarded at the end of the frame, and replaced by ZSTD_CONTENTSIZE_UNKNOWN. Note 3 : Whenever all input data is provided and consumed in a single round, for example with ZSTD_compress2(), or invoking immediately ZSTD_compressStream2(,,,ZSTD_e_end), this value is automatically overridden by srcSize instead.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_CCtx_setPledgedSrcSize", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_CCtx_setPledgedSrcSize", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_CCtx_setPledgedSrcSize(ZSTD_CCtx_s* cctx, ulong pledgedSrcSize);
|
public static extern nuint ZSTD_CCtx_setPledgedSrcSize(ZSTD_CCtx_s* cctx, ulong pledgedSrcSize);
|
||||||
|
|
||||||
/// <summary>ZSTD_CCtx_reset() : There are 2 different things that can be reset, independently or jointly : - The session : will stop compressing current frame, and make CCtx ready to start a new one. Useful after an error, or to interrupt any ongoing compression. Any internal data not yet flushed is cancelled. Compression parameters and dictionary remain unchanged. They will be used to compress next frame. Resetting session never fails. - The parameters : changes all parameters back to \"default\". This also removes any reference to any dictionary or external sequence producer. Parameters can only be changed between 2 sessions (i.e. no compression is currently ongoing) otherwise the reset fails, and function returns an error value (which can be tested using ZSTD_isError()) - Both : similar to resetting the session, followed by resetting parameters.</summary>
|
/// <summary>ZSTD_CCtx_reset() : There are 2 different things that can be reset, independently or jointly : - The session : will stop compressing current frame, and make CCtx ready to start a new one. Useful after an error, or to interrupt any ongoing compression. Any internal data not yet flushed is cancelled. Compression parameters and dictionary remain unchanged. They will be used to compress next frame. Resetting session never fails. - The parameters : changes all parameters back to \"default\". This also removes any reference to any dictionary or external sequence producer. Parameters can only be changed between 2 sessions (i.e. no compression is currently ongoing) otherwise the reset fails, and function returns an error value (which can be tested using ZSTD_isError()) - Both : similar to resetting the session, followed by resetting parameters.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_CCtx_reset", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_CCtx_reset", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_CCtx_reset(ZSTD_CCtx_s* cctx, int reset);
|
public static extern nuint ZSTD_CCtx_reset(ZSTD_CCtx_s* cctx, int reset);
|
||||||
|
|
||||||
/// <summary>ZSTD_compress2() : Behave the same as ZSTD_compressCCtx(), but compression parameters are set using the advanced API. ZSTD_compress2() always starts a new frame. Should cctx hold data from a previously unfinished frame, everything about it is forgotten. - Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_set*() - The function is always blocking, returns when compression is completed. Hint : compression runs faster if `dstCapacity` >= `ZSTD_compressBound(srcSize)`. @return : compressed size written into `dst` (<= `dstCapacity), or an error code if it fails (which can be tested using ZSTD_isError()).</summary>
|
/// <summary>ZSTD_compress2() : Behave the same as ZSTD_compressCCtx(), but compression parameters are set using the advanced API. ZSTD_compress2() always starts a new frame. Should cctx hold data from a previously unfinished frame, everything about it is forgotten. - Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_set*() - The function is always blocking, returns when compression is completed. Hint : compression runs faster if `dstCapacity` >= `ZSTD_compressBound(srcSize)`. @return : compressed size written into `dst` (<= `dstCapacity), or an error code if it fails (which can be tested using ZSTD_isError()).</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_compress2", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_compress2", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_compress2(ZSTD_CCtx_s* cctx, void* dst, nuint dstCapacity, void* src, nuint srcSize);
|
public static extern nuint ZSTD_compress2(ZSTD_CCtx_s* cctx, void* dst, nuint dstCapacity, void* src, nuint srcSize);
|
||||||
|
|
||||||
/// <summary>ZSTD_dParam_getBounds() : All parameters must belong to an interval with lower and upper bounds, otherwise they will either trigger an error or be automatically clamped. @return : a structure, ZSTD_bounds, which contains - an error status field, which must be tested using ZSTD_isError() - both lower and upper bounds, inclusive</summary>
|
/// <summary>ZSTD_dParam_getBounds() : All parameters must belong to an interval with lower and upper bounds, otherwise they will either trigger an error or be automatically clamped. @return : a structure, ZSTD_bounds, which contains - an error status field, which must be tested using ZSTD_isError() - both lower and upper bounds, inclusive</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_dParam_getBounds", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_dParam_getBounds", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern ZSTD_bounds ZSTD_dParam_getBounds(int dParam);
|
public static extern ZSTD_bounds ZSTD_dParam_getBounds(int dParam);
|
||||||
|
|
||||||
/// <summary>ZSTD_DCtx_setParameter() : Set one compression parameter, selected by enum ZSTD_dParameter. All parameters have valid bounds. Bounds can be queried using ZSTD_dParam_getBounds(). Providing a value beyond bound will either clamp it, or trigger an error (depending on parameter). Setting a parameter is only possible during frame initialization (before starting decompression). @return : 0, or an error code (which can be tested using ZSTD_isError()).</summary>
|
/// <summary>ZSTD_DCtx_setParameter() : Set one compression parameter, selected by enum ZSTD_dParameter. All parameters have valid bounds. Bounds can be queried using ZSTD_dParam_getBounds(). Providing a value beyond bound will either clamp it, or trigger an error (depending on parameter). Setting a parameter is only possible during frame initialization (before starting decompression). @return : 0, or an error code (which can be tested using ZSTD_isError()).</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_DCtx_setParameter", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_DCtx_setParameter", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_DCtx_setParameter(ZSTD_DCtx_s* dctx, int param, int value);
|
public static extern nuint ZSTD_DCtx_setParameter(ZSTD_DCtx_s* dctx, int param, int value);
|
||||||
|
|
||||||
/// <summary>ZSTD_DCtx_reset() : Return a DCtx to clean state. Session and parameters can be reset jointly or separately. Parameters can only be reset when no active frame is being decompressed. @return : 0, or an error code, which can be tested with ZSTD_isError()</summary>
|
/// <summary>ZSTD_DCtx_reset() : Return a DCtx to clean state. Session and parameters can be reset jointly or separately. Parameters can only be reset when no active frame is being decompressed. @return : 0, or an error code, which can be tested with ZSTD_isError()</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_DCtx_reset", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_DCtx_reset", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_DCtx_reset(ZSTD_DCtx_s* dctx, int reset);
|
public static extern nuint ZSTD_DCtx_reset(ZSTD_DCtx_s* dctx, int reset);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_createCStream", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_createCStream", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern ZSTD_CCtx_s* ZSTD_createCStream();
|
public static extern ZSTD_CCtx_s* ZSTD_createCStream();
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_freeCStream", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_freeCStream", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_freeCStream(ZSTD_CCtx_s* zcs);
|
public static extern nuint ZSTD_freeCStream(ZSTD_CCtx_s* zcs);
|
||||||
|
|
||||||
/// <summary>ZSTD_compressStream2() : Requires v1.4.0+ Behaves about the same as ZSTD_compressStream, with additional control on end directive. - Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_set*() - Compression parameters cannot be changed once compression is started (save a list of exceptions in multi-threading mode) - output->pos must be <= dstCapacity, input->pos must be <= srcSize - output->pos and input->pos will be updated. They are guaranteed to remain below their respective limit. - endOp must be a valid directive - When nbWorkers==0 (default), function is blocking : it completes its job before returning to caller. - When nbWorkers>=1, function is non-blocking : it copies a portion of input, distributes jobs to internal worker threads, flush to output whatever is available, and then immediately returns, just indicating that there is some data remaining to be flushed. The function nonetheless guarantees forward progress : it will return only after it reads or write at least 1+ byte. - Exception : if the first call requests a ZSTD_e_end directive and provides enough dstCapacity, the function delegates to ZSTD_compress2() which is always blocking. - @return provides a minimum amount of data remaining to be flushed from internal buffers or an error code, which can be tested using ZSTD_isError(). if @return != 0, flush is not fully completed, there is still some data left within internal buffers. This is useful for ZSTD_e_flush, since in this case more flushes are necessary to empty all buffers. For ZSTD_e_end, @return == 0 when internal buffers are fully flushed and frame is completed. - after a ZSTD_e_end directive, if internal buffer is not fully flushed (@return != 0), only ZSTD_e_end or ZSTD_e_flush operations are allowed. Before starting a new compression job, or changing compression parameters, it is required to fully flush internal buffers.</summary>
|
/// <summary>ZSTD_compressStream2() : Requires v1.4.0+ Behaves about the same as ZSTD_compressStream, with additional control on end directive. - Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_set*() - Compression parameters cannot be changed once compression is started (save a list of exceptions in multi-threading mode) - output->pos must be <= dstCapacity, input->pos must be <= srcSize - output->pos and input->pos will be updated. They are guaranteed to remain below their respective limit. - endOp must be a valid directive - When nbWorkers==0 (default), function is blocking : it completes its job before returning to caller. - When nbWorkers>=1, function is non-blocking : it copies a portion of input, distributes jobs to internal worker threads, flush to output whatever is available, and then immediately returns, just indicating that there is some data remaining to be flushed. The function nonetheless guarantees forward progress : it will return only after it reads or write at least 1+ byte. - Exception : if the first call requests a ZSTD_e_end directive and provides enough dstCapacity, the function delegates to ZSTD_compress2() which is always blocking. - @return provides a minimum amount of data remaining to be flushed from internal buffers or an error code, which can be tested using ZSTD_isError(). if @return != 0, flush is not fully completed, there is still some data left within internal buffers. This is useful for ZSTD_e_flush, since in this case more flushes are necessary to empty all buffers. For ZSTD_e_end, @return == 0 when internal buffers are fully flushed and frame is completed. - after a ZSTD_e_end directive, if internal buffer is not fully flushed (@return != 0), only ZSTD_e_end or ZSTD_e_flush operations are allowed. Before starting a new compression job, or changing compression parameters, it is required to fully flush internal buffers.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_compressStream2", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_compressStream2", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_compressStream2(ZSTD_CCtx_s* cctx, ZSTD_outBuffer_s* output, ZSTD_inBuffer_s* input, int endOp);
|
public static extern nuint ZSTD_compressStream2(ZSTD_CCtx_s* cctx, ZSTD_outBuffer_s* output, ZSTD_inBuffer_s* input, int endOp);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_CStreamInSize", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_CStreamInSize", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_CStreamInSize();
|
public static extern nuint ZSTD_CStreamInSize();
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_CStreamOutSize", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_CStreamOutSize", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_CStreamOutSize();
|
public static extern nuint ZSTD_CStreamOutSize();
|
||||||
|
|
||||||
/// <summary>Equivalent to: ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); ZSTD_CCtx_refCDict(zcs, NULL); // clear the dictionary (if any) ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel); Note that ZSTD_initCStream() clears any previously set dictionary. Use the new API to compress with a dictionary.</summary>
|
/// <summary>Equivalent to: ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); ZSTD_CCtx_refCDict(zcs, NULL); // clear the dictionary (if any) ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel); Note that ZSTD_initCStream() clears any previously set dictionary. Use the new API to compress with a dictionary.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_initCStream", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_initCStream", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_initCStream(ZSTD_CCtx_s* zcs, int compressionLevel);
|
public static extern nuint ZSTD_initCStream(ZSTD_CCtx_s* zcs, int compressionLevel);
|
||||||
|
|
||||||
/// <summary>Alternative for ZSTD_compressStream2(zcs, output, input, ZSTD_e_continue). NOTE: The return value is different. ZSTD_compressStream() returns a hint for the next read size (if non-zero and not an error). ZSTD_compressStream2() returns the minimum nb of bytes left to flush (if non-zero and not an error).</summary>
|
/// <summary>Alternative for ZSTD_compressStream2(zcs, output, input, ZSTD_e_continue). NOTE: The return value is different. ZSTD_compressStream() returns a hint for the next read size (if non-zero and not an error). ZSTD_compressStream2() returns the minimum nb of bytes left to flush (if non-zero and not an error).</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_compressStream", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_compressStream", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_compressStream(ZSTD_CCtx_s* zcs, ZSTD_outBuffer_s* output, ZSTD_inBuffer_s* input);
|
public static extern nuint ZSTD_compressStream(ZSTD_CCtx_s* zcs, ZSTD_outBuffer_s* output, ZSTD_inBuffer_s* input);
|
||||||
|
|
||||||
/// <summary>Equivalent to ZSTD_compressStream2(zcs, output, &emptyInput, ZSTD_e_flush).</summary>
|
/// <summary>Equivalent to ZSTD_compressStream2(zcs, output, &emptyInput, ZSTD_e_flush).</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_flushStream", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_flushStream", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_flushStream(ZSTD_CCtx_s* zcs, ZSTD_outBuffer_s* output);
|
public static extern nuint ZSTD_flushStream(ZSTD_CCtx_s* zcs, ZSTD_outBuffer_s* output);
|
||||||
|
|
||||||
/// <summary>Equivalent to ZSTD_compressStream2(zcs, output, &emptyInput, ZSTD_e_end).</summary>
|
/// <summary>Equivalent to ZSTD_compressStream2(zcs, output, &emptyInput, ZSTD_e_end).</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_endStream", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_endStream", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_endStream(ZSTD_CCtx_s* zcs, ZSTD_outBuffer_s* output);
|
public static extern nuint ZSTD_endStream(ZSTD_CCtx_s* zcs, ZSTD_outBuffer_s* output);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_createDStream", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_createDStream", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern ZSTD_DCtx_s* ZSTD_createDStream();
|
public static extern ZSTD_DCtx_s* ZSTD_createDStream();
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_freeDStream", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_freeDStream", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_freeDStream(ZSTD_DCtx_s* zds);
|
public static extern nuint ZSTD_freeDStream(ZSTD_DCtx_s* zds);
|
||||||
|
|
||||||
/// <summary>ZSTD_initDStream() : Initialize/reset DStream state for new decompression operation. Call before new decompression operation using same DStream. Note : This function is redundant with the advanced API and equivalent to: ZSTD_DCtx_reset(zds, ZSTD_reset_session_only); ZSTD_DCtx_refDDict(zds, NULL);</summary>
|
/// <summary>ZSTD_initDStream() : Initialize/reset DStream state for new decompression operation. Call before new decompression operation using same DStream. Note : This function is redundant with the advanced API and equivalent to: ZSTD_DCtx_reset(zds, ZSTD_reset_session_only); ZSTD_DCtx_refDDict(zds, NULL);</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_initDStream", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_initDStream", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_initDStream(ZSTD_DCtx_s* zds);
|
public static extern nuint ZSTD_initDStream(ZSTD_DCtx_s* zds);
|
||||||
|
|
||||||
/// <summary>ZSTD_decompressStream() : Streaming decompression function. Call repetitively to consume full input updating it as necessary. Function will update both input and output `pos` fields exposing current state via these fields: - `input.pos < input.size`, some input remaining and caller should provide remaining input on the next call. - `output.pos < output.size`, decoder finished and flushed all remaining buffers. - `output.pos == output.size`, potentially uncflushed data present in the internal buffers, call ZSTD_decompressStream() again to flush remaining data to output. Note : with no additional input, amount of data flushed <= ZSTD_BLOCKSIZE_MAX. @return : 0 when a frame is completely decoded and fully flushed, or an error code, which can be tested using ZSTD_isError(), or any other value > 0, which means there is some decoding or flushing to do to complete current frame.</summary>
|
/// <summary>ZSTD_decompressStream() : Streaming decompression function. Call repetitively to consume full input updating it as necessary. Function will update both input and output `pos` fields exposing current state via these fields: - `input.pos < input.size`, some input remaining and caller should provide remaining input on the next call. - `output.pos < output.size`, decoder finished and flushed all remaining buffers. - `output.pos == output.size`, potentially uncflushed data present in the internal buffers, call ZSTD_decompressStream() again to flush remaining data to output. Note : with no additional input, amount of data flushed <= ZSTD_BLOCKSIZE_MAX. @return : 0 when a frame is completely decoded and fully flushed, or an error code, which can be tested using ZSTD_isError(), or any other value > 0, which means there is some decoding or flushing to do to complete current frame.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_decompressStream", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_decompressStream", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_decompressStream(ZSTD_DCtx_s* zds, ZSTD_outBuffer_s* output, ZSTD_inBuffer_s* input);
|
public static extern nuint ZSTD_decompressStream(ZSTD_DCtx_s* zds, ZSTD_outBuffer_s* output, ZSTD_inBuffer_s* input);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_DStreamInSize", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_DStreamInSize", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_DStreamInSize();
|
public static extern nuint ZSTD_DStreamInSize();
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_DStreamOutSize", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_DStreamOutSize", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_DStreamOutSize();
|
public static extern nuint ZSTD_DStreamOutSize();
|
||||||
|
|
||||||
/// <summary>Simple dictionary API//*! ZSTD_compress_usingDict() : Compression at an explicit compression level using a Dictionary. A dictionary can be any arbitrary data segment (also called a prefix), or a buffer with specified information (see zdict.h). Note : This function loads the dictionary, resulting in significant startup delay. It's intended for a dictionary used only once. Note 2 : When `dict == NULL || dictSize < 8` no dictionary is used.</summary>
|
/// <summary>Simple dictionary API//*! ZSTD_compress_usingDict() : Compression at an explicit compression level using a Dictionary. A dictionary can be any arbitrary data segment (also called a prefix), or a buffer with specified information (see zdict.h). Note : This function loads the dictionary, resulting in significant startup delay. It's intended for a dictionary used only once. Note 2 : When `dict == NULL || dictSize < 8` no dictionary is used.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_compress_usingDict", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_compress_usingDict", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_compress_usingDict(ZSTD_CCtx_s* ctx, void* dst, nuint dstCapacity, void* src, nuint srcSize, void* dict, nuint dictSize, int compressionLevel);
|
public static extern nuint ZSTD_compress_usingDict(ZSTD_CCtx_s* ctx, void* dst, nuint dstCapacity, void* src, nuint srcSize, void* dict, nuint dictSize, int compressionLevel);
|
||||||
|
|
||||||
/// <summary>ZSTD_decompress_usingDict() : Decompression using a known Dictionary. Dictionary must be identical to the one used during compression. Note : This function loads the dictionary, resulting in significant startup delay. It's intended for a dictionary used only once. Note : When `dict == NULL || dictSize < 8` no dictionary is used.</summary>
|
/// <summary>ZSTD_decompress_usingDict() : Decompression using a known Dictionary. Dictionary must be identical to the one used during compression. Note : This function loads the dictionary, resulting in significant startup delay. It's intended for a dictionary used only once. Note : When `dict == NULL || dictSize < 8` no dictionary is used.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_decompress_usingDict", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_decompress_usingDict", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_decompress_usingDict(ZSTD_DCtx_s* dctx, void* dst, nuint dstCapacity, void* src, nuint srcSize, void* dict, nuint dictSize);
|
public static extern nuint ZSTD_decompress_usingDict(ZSTD_DCtx_s* dctx, void* dst, nuint dstCapacity, void* src, nuint srcSize, void* dict, nuint dictSize);
|
||||||
|
|
||||||
/// <summary>ZSTD_createCDict() : When compressing multiple messages or blocks using the same dictionary, it's recommended to digest the dictionary only once, since it's a costly operation. ZSTD_createCDict() will create a state from digesting a dictionary. The resulting state can be used for future compression operations with very limited startup cost. ZSTD_CDict can be created once and shared by multiple threads concurrently, since its usage is read-only. @dictBuffer can be released after ZSTD_CDict creation, because its content is copied within CDict. Note 1 : Consider experimental function `ZSTD_createCDict_byReference()` if you prefer to not duplicate @dictBuffer content. Note 2 : A ZSTD_CDict can be created from an empty @dictBuffer, in which case the only thing that it transports is the @compressionLevel. This can be useful in a pipeline featuring ZSTD_compress_usingCDict() exclusively, expecting a ZSTD_CDict parameter with any data, including those without a known dictionary.</summary>
|
/// <summary>ZSTD_createCDict() : When compressing multiple messages or blocks using the same dictionary, it's recommended to digest the dictionary only once, since it's a costly operation. ZSTD_createCDict() will create a state from digesting a dictionary. The resulting state can be used for future compression operations with very limited startup cost. ZSTD_CDict can be created once and shared by multiple threads concurrently, since its usage is read-only. @dictBuffer can be released after ZSTD_CDict creation, because its content is copied within CDict. Note 1 : Consider experimental function `ZSTD_createCDict_byReference()` if you prefer to not duplicate @dictBuffer content. Note 2 : A ZSTD_CDict can be created from an empty @dictBuffer, in which case the only thing that it transports is the @compressionLevel. This can be useful in a pipeline featuring ZSTD_compress_usingCDict() exclusively, expecting a ZSTD_CDict parameter with any data, including those without a known dictionary.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_createCDict", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_createCDict", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern ZSTD_CDict_s* ZSTD_createCDict(void* dictBuffer, nuint dictSize, int compressionLevel);
|
public static extern ZSTD_CDict_s* ZSTD_createCDict(void* dictBuffer, nuint dictSize, int compressionLevel);
|
||||||
|
|
||||||
/// <summary>ZSTD_freeCDict() : Function frees memory allocated by ZSTD_createCDict(). If a NULL pointer is passed, no operation is performed.</summary>
|
/// <summary>ZSTD_freeCDict() : Function frees memory allocated by ZSTD_createCDict(). If a NULL pointer is passed, no operation is performed.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_freeCDict", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_freeCDict", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_freeCDict(ZSTD_CDict_s* CDict);
|
public static extern nuint ZSTD_freeCDict(ZSTD_CDict_s* CDict);
|
||||||
|
|
||||||
/// <summary>ZSTD_compress_usingCDict() : Compression using a digested Dictionary. Recommended when same dictionary is used multiple times. Note : compression level is _decided at dictionary creation time_, and frame parameters are hardcoded (dictID=yes, contentSize=yes, checksum=no)</summary>
|
/// <summary>ZSTD_compress_usingCDict() : Compression using a digested Dictionary. Recommended when same dictionary is used multiple times. Note : compression level is _decided at dictionary creation time_, and frame parameters are hardcoded (dictID=yes, contentSize=yes, checksum=no)</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_compress_usingCDict", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_compress_usingCDict", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_compress_usingCDict(ZSTD_CCtx_s* cctx, void* dst, nuint dstCapacity, void* src, nuint srcSize, ZSTD_CDict_s* cdict);
|
public static extern nuint ZSTD_compress_usingCDict(ZSTD_CCtx_s* cctx, void* dst, nuint dstCapacity, void* src, nuint srcSize, ZSTD_CDict_s* cdict);
|
||||||
|
|
||||||
/// <summary>ZSTD_createDDict() : Create a digested dictionary, ready to start decompression operation without startup delay. dictBuffer can be released after DDict creation, as its content is copied inside DDict.</summary>
|
/// <summary>ZSTD_createDDict() : Create a digested dictionary, ready to start decompression operation without startup delay. dictBuffer can be released after DDict creation, as its content is copied inside DDict.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_createDDict", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_createDDict", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern ZSTD_DDict_s* ZSTD_createDDict(void* dictBuffer, nuint dictSize);
|
public static extern ZSTD_DDict_s* ZSTD_createDDict(void* dictBuffer, nuint dictSize);
|
||||||
|
|
||||||
/// <summary>ZSTD_freeDDict() : Function frees memory allocated with ZSTD_createDDict() If a NULL pointer is passed, no operation is performed.</summary>
|
/// <summary>ZSTD_freeDDict() : Function frees memory allocated with ZSTD_createDDict() If a NULL pointer is passed, no operation is performed.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_freeDDict", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_freeDDict", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_freeDDict(ZSTD_DDict_s* ddict);
|
public static extern nuint ZSTD_freeDDict(ZSTD_DDict_s* ddict);
|
||||||
|
|
||||||
/// <summary>ZSTD_decompress_usingDDict() : Decompression using a digested Dictionary. Recommended when same dictionary is used multiple times.</summary>
|
/// <summary>ZSTD_decompress_usingDDict() : Decompression using a digested Dictionary. Recommended when same dictionary is used multiple times.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_decompress_usingDDict", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_decompress_usingDDict", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_decompress_usingDDict(ZSTD_DCtx_s* dctx, void* dst, nuint dstCapacity, void* src, nuint srcSize, ZSTD_DDict_s* ddict);
|
public static extern nuint ZSTD_decompress_usingDDict(ZSTD_DCtx_s* dctx, void* dst, nuint dstCapacity, void* src, nuint srcSize, ZSTD_DDict_s* ddict);
|
||||||
|
|
||||||
/// <summary>ZSTD_getDictID_fromDict() : Requires v1.4.0+ Provides the dictID stored within dictionary. if @return == 0, the dictionary is not conformant with Zstandard specification. It can still be loaded, but as a content-only dictionary.</summary>
|
/// <summary>ZSTD_getDictID_fromDict() : Requires v1.4.0+ Provides the dictID stored within dictionary. if @return == 0, the dictionary is not conformant with Zstandard specification. It can still be loaded, but as a content-only dictionary.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_getDictID_fromDict", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_getDictID_fromDict", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern uint ZSTD_getDictID_fromDict(void* dict, nuint dictSize);
|
public static extern uint ZSTD_getDictID_fromDict(void* dict, nuint dictSize);
|
||||||
|
|
||||||
/// <summary>ZSTD_getDictID_fromCDict() : Requires v1.5.0+ Provides the dictID of the dictionary loaded into `cdict`. If @return == 0, the dictionary is not conformant to Zstandard specification, or empty. Non-conformant dictionaries can still be loaded, but as content-only dictionaries.</summary>
|
/// <summary>ZSTD_getDictID_fromCDict() : Requires v1.5.0+ Provides the dictID of the dictionary loaded into `cdict`. If @return == 0, the dictionary is not conformant to Zstandard specification, or empty. Non-conformant dictionaries can still be loaded, but as content-only dictionaries.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_getDictID_fromCDict", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_getDictID_fromCDict", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern uint ZSTD_getDictID_fromCDict(ZSTD_CDict_s* cdict);
|
public static extern uint ZSTD_getDictID_fromCDict(ZSTD_CDict_s* cdict);
|
||||||
|
|
||||||
/// <summary>ZSTD_getDictID_fromDDict() : Requires v1.4.0+ Provides the dictID of the dictionary loaded into `ddict`. If @return == 0, the dictionary is not conformant to Zstandard specification, or empty. Non-conformant dictionaries can still be loaded, but as content-only dictionaries.</summary>
|
/// <summary>ZSTD_getDictID_fromDDict() : Requires v1.4.0+ Provides the dictID of the dictionary loaded into `ddict`. If @return == 0, the dictionary is not conformant to Zstandard specification, or empty. Non-conformant dictionaries can still be loaded, but as content-only dictionaries.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_getDictID_fromDDict", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_getDictID_fromDDict", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern uint ZSTD_getDictID_fromDDict(ZSTD_DDict_s* ddict);
|
public static extern uint ZSTD_getDictID_fromDDict(ZSTD_DDict_s* ddict);
|
||||||
|
|
||||||
/// <summary>ZSTD_getDictID_fromFrame() : Requires v1.4.0+ Provides the dictID required to decompressed the frame stored within `src`. If @return == 0, the dictID could not be decoded. This could for one of the following reasons : - The frame does not require a dictionary to be decoded (most common case). - The frame was built with dictID intentionally removed. Whatever dictionary is necessary is a hidden piece of information. Note : this use case also happens when using a non-conformant dictionary. - `srcSize` is too small, and as a result, the frame header could not be decoded (only possible if `srcSize < ZSTD_FRAMEHEADERSIZE_MAX`). - This is not a Zstandard frame. When identifying the exact failure cause, it's possible to use ZSTD_getFrameHeader(), which will provide a more precise error code.</summary>
|
/// <summary>ZSTD_getDictID_fromFrame() : Requires v1.4.0+ Provides the dictID required to decompressed the frame stored within `src`. If @return == 0, the dictID could not be decoded. This could for one of the following reasons : - The frame does not require a dictionary to be decoded (most common case). - The frame was built with dictID intentionally removed. Whatever dictionary is necessary is a hidden piece of information. Note : this use case also happens when using a non-conformant dictionary. - `srcSize` is too small, and as a result, the frame header could not be decoded (only possible if `srcSize < ZSTD_FRAMEHEADERSIZE_MAX`). - This is not a Zstandard frame. When identifying the exact failure cause, it's possible to use ZSTD_getFrameHeader(), which will provide a more precise error code.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_getDictID_fromFrame", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_getDictID_fromFrame", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern uint ZSTD_getDictID_fromFrame(void* src, nuint srcSize);
|
public static extern uint ZSTD_getDictID_fromFrame(void* src, nuint srcSize);
|
||||||
|
|
||||||
/// <summary>ZSTD_CCtx_loadDictionary() : Requires v1.4.0+ Create an internal CDict from `dict` buffer. Decompression will have to use same dictionary. @result : 0, or an error code (which can be tested with ZSTD_isError()). Special: Loading a NULL (or 0-size) dictionary invalidates previous dictionary, meaning \"return to no-dictionary mode\". Note 1 : Dictionary is sticky, it will be used for all future compressed frames, until parameters are reset, a new dictionary is loaded, or the dictionary is explicitly invalidated by loading a NULL dictionary. Note 2 : Loading a dictionary involves building tables. It's also a CPU consuming operation, with non-negligible impact on latency. Tables are dependent on compression parameters, and for this reason, compression parameters can no longer be changed after loading a dictionary. Note 3 :`dict` content will be copied internally. Use experimental ZSTD_CCtx_loadDictionary_byReference() to reference content instead. In such a case, dictionary buffer must outlive its users. Note 4 : Use ZSTD_CCtx_loadDictionary_advanced() to precisely select how dictionary content must be interpreted.</summary>
|
/// <summary>ZSTD_CCtx_loadDictionary() : Requires v1.4.0+ Create an internal CDict from `dict` buffer. Decompression will have to use same dictionary. @result : 0, or an error code (which can be tested with ZSTD_isError()). Special: Loading a NULL (or 0-size) dictionary invalidates previous dictionary, meaning \"return to no-dictionary mode\". Note 1 : Dictionary is sticky, it will be used for all future compressed frames, until parameters are reset, a new dictionary is loaded, or the dictionary is explicitly invalidated by loading a NULL dictionary. Note 2 : Loading a dictionary involves building tables. It's also a CPU consuming operation, with non-negligible impact on latency. Tables are dependent on compression parameters, and for this reason, compression parameters can no longer be changed after loading a dictionary. Note 3 :`dict` content will be copied internally. Use experimental ZSTD_CCtx_loadDictionary_byReference() to reference content instead. In such a case, dictionary buffer must outlive its users. Note 4 : Use ZSTD_CCtx_loadDictionary_advanced() to precisely select how dictionary content must be interpreted.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_CCtx_loadDictionary", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_CCtx_loadDictionary", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_CCtx_loadDictionary(ZSTD_CCtx_s* cctx, void* dict, nuint dictSize);
|
public static extern nuint ZSTD_CCtx_loadDictionary(ZSTD_CCtx_s* cctx, void* dict, nuint dictSize);
|
||||||
|
|
||||||
/// <summary>ZSTD_CCtx_refCDict() : Requires v1.4.0+ Reference a prepared dictionary, to be used for all future compressed frames. Note that compression parameters are enforced from within CDict, and supersede any compression parameter previously set within CCtx. The parameters ignored are labelled as \"superseded-by-cdict\" in the ZSTD_cParameter enum docs. The ignored parameters will be used again if the CCtx is returned to no-dictionary mode. The dictionary will remain valid for future compressed frames using same CCtx. @result : 0, or an error code (which can be tested with ZSTD_isError()). Special : Referencing a NULL CDict means \"return to no-dictionary mode\". Note 1 : Currently, only one dictionary can be managed. Referencing a new dictionary effectively \"discards\" any previous one. Note 2 : CDict is just referenced, its lifetime must outlive its usage within CCtx.</summary>
|
/// <summary>ZSTD_CCtx_refCDict() : Requires v1.4.0+ Reference a prepared dictionary, to be used for all future compressed frames. Note that compression parameters are enforced from within CDict, and supersede any compression parameter previously set within CCtx. The parameters ignored are labelled as \"superseded-by-cdict\" in the ZSTD_cParameter enum docs. The ignored parameters will be used again if the CCtx is returned to no-dictionary mode. The dictionary will remain valid for future compressed frames using same CCtx. @result : 0, or an error code (which can be tested with ZSTD_isError()). Special : Referencing a NULL CDict means \"return to no-dictionary mode\". Note 1 : Currently, only one dictionary can be managed. Referencing a new dictionary effectively \"discards\" any previous one. Note 2 : CDict is just referenced, its lifetime must outlive its usage within CCtx.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_CCtx_refCDict", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_CCtx_refCDict", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_CCtx_refCDict(ZSTD_CCtx_s* cctx, ZSTD_CDict_s* cdict);
|
public static extern nuint ZSTD_CCtx_refCDict(ZSTD_CCtx_s* cctx, ZSTD_CDict_s* cdict);
|
||||||
|
|
||||||
/// <summary>ZSTD_CCtx_refPrefix() : Requires v1.4.0+ Reference a prefix (single-usage dictionary) for next compressed frame. A prefix is **only used once**. Tables are discarded at end of frame (ZSTD_e_end). Decompression will need same prefix to properly regenerate data. Compressing with a prefix is similar in outcome as performing a diff and compressing it, but performs much faster, especially during decompression (compression speed is tunable with compression level). @result : 0, or an error code (which can be tested with ZSTD_isError()). Special: Adding any prefix (including NULL) invalidates any previous prefix or dictionary Note 1 : Prefix buffer is referenced. It **must** outlive compression. Its content must remain unmodified during compression. Note 2 : If the intention is to diff some large src data blob with some prior version of itself, ensure that the window size is large enough to contain the entire source. See ZSTD_c_windowLog. Note 3 : Referencing a prefix involves building tables, which are dependent on compression parameters. It's a CPU consuming operation, with non-negligible impact on latency. If there is a need to use the same prefix multiple times, consider loadDictionary instead. Note 4 : By default, the prefix is interpreted as raw content (ZSTD_dct_rawContent). Use experimental ZSTD_CCtx_refPrefix_advanced() to alter dictionary interpretation.</summary>
|
/// <summary>ZSTD_CCtx_refPrefix() : Requires v1.4.0+ Reference a prefix (single-usage dictionary) for next compressed frame. A prefix is **only used once**. Tables are discarded at end of frame (ZSTD_e_end). Decompression will need same prefix to properly regenerate data. Compressing with a prefix is similar in outcome as performing a diff and compressing it, but performs much faster, especially during decompression (compression speed is tunable with compression level). @result : 0, or an error code (which can be tested with ZSTD_isError()). Special: Adding any prefix (including NULL) invalidates any previous prefix or dictionary Note 1 : Prefix buffer is referenced. It **must** outlive compression. Its content must remain unmodified during compression. Note 2 : If the intention is to diff some large src data blob with some prior version of itself, ensure that the window size is large enough to contain the entire source. See ZSTD_c_windowLog. Note 3 : Referencing a prefix involves building tables, which are dependent on compression parameters. It's a CPU consuming operation, with non-negligible impact on latency. If there is a need to use the same prefix multiple times, consider loadDictionary instead. Note 4 : By default, the prefix is interpreted as raw content (ZSTD_dct_rawContent). Use experimental ZSTD_CCtx_refPrefix_advanced() to alter dictionary interpretation.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_CCtx_refPrefix", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_CCtx_refPrefix", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_CCtx_refPrefix(ZSTD_CCtx_s* cctx, void* prefix, nuint prefixSize);
|
public static extern nuint ZSTD_CCtx_refPrefix(ZSTD_CCtx_s* cctx, void* prefix, nuint prefixSize);
|
||||||
|
|
||||||
/// <summary>ZSTD_DCtx_loadDictionary() : Requires v1.4.0+ Create an internal DDict from dict buffer, to be used to decompress all future frames. The dictionary remains valid for all future frames, until explicitly invalidated, or a new dictionary is loaded. @result : 0, or an error code (which can be tested with ZSTD_isError()). Special : Adding a NULL (or 0-size) dictionary invalidates any previous dictionary, meaning \"return to no-dictionary mode\". Note 1 : Loading a dictionary involves building tables, which has a non-negligible impact on CPU usage and latency. It's recommended to \"load once, use many times\", to amortize the cost Note 2 :`dict` content will be copied internally, so `dict` can be released after loading. Use ZSTD_DCtx_loadDictionary_byReference() to reference dictionary content instead. Note 3 : Use ZSTD_DCtx_loadDictionary_advanced() to take control of how dictionary content is loaded and interpreted.</summary>
|
/// <summary>ZSTD_DCtx_loadDictionary() : Requires v1.4.0+ Create an internal DDict from dict buffer, to be used to decompress all future frames. The dictionary remains valid for all future frames, until explicitly invalidated, or a new dictionary is loaded. @result : 0, or an error code (which can be tested with ZSTD_isError()). Special : Adding a NULL (or 0-size) dictionary invalidates any previous dictionary, meaning \"return to no-dictionary mode\". Note 1 : Loading a dictionary involves building tables, which has a non-negligible impact on CPU usage and latency. It's recommended to \"load once, use many times\", to amortize the cost Note 2 :`dict` content will be copied internally, so `dict` can be released after loading. Use ZSTD_DCtx_loadDictionary_byReference() to reference dictionary content instead. Note 3 : Use ZSTD_DCtx_loadDictionary_advanced() to take control of how dictionary content is loaded and interpreted.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_DCtx_loadDictionary", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_DCtx_loadDictionary", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_DCtx_loadDictionary(ZSTD_DCtx_s* dctx, void* dict, nuint dictSize);
|
public static extern nuint ZSTD_DCtx_loadDictionary(ZSTD_DCtx_s* dctx, void* dict, nuint dictSize);
|
||||||
|
|
||||||
/// <summary>ZSTD_DCtx_refDDict() : Requires v1.4.0+ Reference a prepared dictionary, to be used to decompress next frames. The dictionary remains active for decompression of future frames using same DCtx. If called with ZSTD_d_refMultipleDDicts enabled, repeated calls of this function will store the DDict references in a table, and the DDict used for decompression will be determined at decompression time, as per the dict ID in the frame. The memory for the table is allocated on the first call to refDDict, and can be freed with ZSTD_freeDCtx(). If called with ZSTD_d_refMultipleDDicts disabled (the default), only one dictionary will be managed, and referencing a dictionary effectively \"discards\" any previous one. @result : 0, or an error code (which can be tested with ZSTD_isError()). Special: referencing a NULL DDict means \"return to no-dictionary mode\". Note 2 : DDict is just referenced, its lifetime must outlive its usage from DCtx.</summary>
|
/// <summary>ZSTD_DCtx_refDDict() : Requires v1.4.0+ Reference a prepared dictionary, to be used to decompress next frames. The dictionary remains active for decompression of future frames using same DCtx. If called with ZSTD_d_refMultipleDDicts enabled, repeated calls of this function will store the DDict references in a table, and the DDict used for decompression will be determined at decompression time, as per the dict ID in the frame. The memory for the table is allocated on the first call to refDDict, and can be freed with ZSTD_freeDCtx(). If called with ZSTD_d_refMultipleDDicts disabled (the default), only one dictionary will be managed, and referencing a dictionary effectively \"discards\" any previous one. @result : 0, or an error code (which can be tested with ZSTD_isError()). Special: referencing a NULL DDict means \"return to no-dictionary mode\". Note 2 : DDict is just referenced, its lifetime must outlive its usage from DCtx.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_DCtx_refDDict", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_DCtx_refDDict", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_DCtx_refDDict(ZSTD_DCtx_s* dctx, ZSTD_DDict_s* ddict);
|
public static extern nuint ZSTD_DCtx_refDDict(ZSTD_DCtx_s* dctx, ZSTD_DDict_s* ddict);
|
||||||
|
|
||||||
/// <summary>ZSTD_DCtx_refPrefix() : Requires v1.4.0+ Reference a prefix (single-usage dictionary) to decompress next frame. This is the reverse operation of ZSTD_CCtx_refPrefix(), and must use the same prefix as the one used during compression. Prefix is **only used once**. Reference is discarded at end of frame. End of frame is reached when ZSTD_decompressStream() returns 0. @result : 0, or an error code (which can be tested with ZSTD_isError()). Note 1 : Adding any prefix (including NULL) invalidates any previously set prefix or dictionary Note 2 : Prefix buffer is referenced. It **must** outlive decompression. Prefix buffer must remain unmodified up to the end of frame, reached when ZSTD_decompressStream() returns 0. Note 3 : By default, the prefix is treated as raw content (ZSTD_dct_rawContent). Use ZSTD_CCtx_refPrefix_advanced() to alter dictMode (Experimental section) Note 4 : Referencing a raw content prefix has almost no cpu nor memory cost. A full dictionary is more costly, as it requires building tables.</summary>
|
/// <summary>ZSTD_DCtx_refPrefix() : Requires v1.4.0+ Reference a prefix (single-usage dictionary) to decompress next frame. This is the reverse operation of ZSTD_CCtx_refPrefix(), and must use the same prefix as the one used during compression. Prefix is **only used once**. Reference is discarded at end of frame. End of frame is reached when ZSTD_decompressStream() returns 0. @result : 0, or an error code (which can be tested with ZSTD_isError()). Note 1 : Adding any prefix (including NULL) invalidates any previously set prefix or dictionary Note 2 : Prefix buffer is referenced. It **must** outlive decompression. Prefix buffer must remain unmodified up to the end of frame, reached when ZSTD_decompressStream() returns 0. Note 3 : By default, the prefix is treated as raw content (ZSTD_dct_rawContent). Use ZSTD_CCtx_refPrefix_advanced() to alter dictMode (Experimental section) Note 4 : Referencing a raw content prefix has almost no cpu nor memory cost. A full dictionary is more costly, as it requires building tables.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_DCtx_refPrefix", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_DCtx_refPrefix", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_DCtx_refPrefix(ZSTD_DCtx_s* dctx, void* prefix, nuint prefixSize);
|
public static extern nuint ZSTD_DCtx_refPrefix(ZSTD_DCtx_s* dctx, void* prefix, nuint prefixSize);
|
||||||
|
|
||||||
/// <summary>ZSTD_sizeof_*() : Requires v1.4.0+ These functions give the _current_ memory usage of selected object. Note that object memory usage can evolve (increase or decrease) over time.</summary>
|
/// <summary>ZSTD_sizeof_*() : Requires v1.4.0+ These functions give the _current_ memory usage of selected object. Note that object memory usage can evolve (increase or decrease) over time.</summary>
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_sizeof_CCtx", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_sizeof_CCtx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_sizeof_CCtx(ZSTD_CCtx_s* cctx);
|
public static extern nuint ZSTD_sizeof_CCtx(ZSTD_CCtx_s* cctx);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_sizeof_DCtx", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_sizeof_DCtx", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_sizeof_DCtx(ZSTD_DCtx_s* dctx);
|
public static extern nuint ZSTD_sizeof_DCtx(ZSTD_DCtx_s* dctx);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_sizeof_CStream", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_sizeof_CStream", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_sizeof_CStream(ZSTD_CCtx_s* zcs);
|
public static extern nuint ZSTD_sizeof_CStream(ZSTD_CCtx_s* zcs);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_sizeof_DStream", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_sizeof_DStream", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_sizeof_DStream(ZSTD_DCtx_s* zds);
|
public static extern nuint ZSTD_sizeof_DStream(ZSTD_DCtx_s* zds);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_sizeof_CDict", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_sizeof_CDict", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_sizeof_CDict(ZSTD_CDict_s* cdict);
|
public static extern nuint ZSTD_sizeof_CDict(ZSTD_CDict_s* cdict);
|
||||||
|
|
||||||
[DllImport(__DllName, EntryPoint = "ZSTD_sizeof_DDict", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(__DllName, EntryPoint = "ZSTD_sizeof_DDict", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
|
||||||
public static extern nuint ZSTD_sizeof_DDict(ZSTD_DDict_s* ddict);
|
public static extern nuint ZSTD_sizeof_DDict(ZSTD_DDict_s* ddict);
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user