#![allow(warnings)]
#![allow(non_snake_case)]
use std::ffi::{c_void, c_char, c_long};
pub use aes_types::{TaggedData,TaggedDataUnion};
pub type SoHServer = *mut c_long;
pub type SoHObject = *mut c_long;
pub type ESerror_t = c_long;
pub type SoObjectInitialize_f = unsafe extern "C" fn(hObject: SoHObject, argc: i32, argv: *mut TaggedData) -> ESerror_t;
pub type SoObjectGet_f = unsafe extern "C" fn(hObject: SoHObject, name: *mut SoCClientName, pValue: *mut TaggedData) -> ESerror_t;
pub type SoObjectPut_f = unsafe extern "C" fn(hObject: SoHObject, name: *mut SoCClientName, pValue: *mut TaggedData) -> ESerror_t;
pub type SoObjectCall_f = unsafe extern "C" fn(hObject: SoHObject, name: *mut SoCClientName, argc: i32, argv: *mut TaggedData, pResult: *mut TaggedData) -> ESerror_t;
pub type SoObjectValueOf_f = unsafe extern "C" fn(hObject: SoHObject, pResult: *mut TaggedData) -> ESerror_t;
pub type SoObjectToString_f = unsafe extern "C" fn(hObject: SoHObject, pResult: *mut TaggedData) -> ESerror_t;
pub type SoObjectFinalize_f = unsafe extern "C" fn(hObject: SoHObject) -> ESerror_t;
pub type SoMemoryMalloc_f = unsafe extern "C" fn(size: usize) -> *mut c_void;
pub type SoMemoryFree_f = unsafe extern "C" fn(ptr: *mut c_void);
#[repr(C)]
#[repr(align(8))]
#[derive(Copy, Clone)]
pub struct SoCClientName {
pub name_sig: *const c_char,
pub id: i32,
pub desc: *mut c_char,
}
#[repr(C)]
#[repr(align(8))]
#[derive(Copy, Clone)]
pub struct SoMemoryInterface {
pub malloc: SoMemoryMalloc_f,
pub free: SoMemoryFree_f,
}
#[repr(C)]
#[repr(align(8))]
#[derive(Copy, Clone)]
pub struct SoObjectInterface {
pub initialize: SoObjectInitialize_f,
pub put: SoObjectPut_f,
pub get: SoObjectGet_f,
pub call: SoObjectCall_f,
pub valueOf: SoObjectValueOf_f,
pub toString: SoObjectToString_f,
pub finalize: SoObjectFinalize_f,
}
#[repr(C)]
#[repr(align(8))]
#[derive(Copy, Clone)]
pub struct SoServerInterface {
pub dumpServer: SoServerDumpServer_f,
pub dumpObject: SoServerDumpObject_f,
pub addClass: SoServerAddClass_f,
pub addMethod: SoServerAddMethod_f,
pub addMethods: SoServerAddMethods_f,
pub addProperty: SoServerAddProperty_f,
pub addProperties: SoServerAddProperties_f,
pub getClass: SoServerGetClass_f,
pub getServer: SoServerGetServer_f,
pub setClientData: SoServerSetClientData_f,
pub getClientData: SoServerGetClientData_f,
pub eval: SoServerEval_f,
pub taggedDataInit: SoServerTaggedDataInit_f,
pub taggedDataFree: SoServerTaggedDataFree_f,
pub callLiveObject: SoServerCallLiveObject_f,
pub getLiveObject: SoServerGetLiveObject_f,
pub putLiveObject: SoServerPutLiveObject_f,
}
pub type SoServerDumpServer_f = unsafe extern "C" fn(hServer: SoHServer) -> ESerror_t;
pub type SoServerDumpObject_f = unsafe extern "C" fn(hObject: SoHObject) -> ESerror_t;
pub type SoServerAddClass_f = unsafe extern "C" fn(hServer: SoHServer, name: *mut c_char, objectInterface: *mut SoObjectInterface) -> ESerror_t;
pub type SoServerAddMethod_f = unsafe extern "C" fn(hObject: SoHObject, name: *const c_char, id: i32, desc: *mut c_char) -> ESerror_t;
pub type SoServerAddMethods_f = unsafe extern "C" fn(hObject: SoHObject, pNames: *mut SoCClientName) -> ESerror_t;
pub type SoServerAddProperty_f = unsafe extern "C" fn(hObject: SoHObject, name: *const c_char, id: i32, desc: *mut c_char) -> ESerror_t;
pub type SoServerAddProperties_f = unsafe extern "C" fn(hObject: SoHObject, pNames: *mut SoCClientName) -> ESerror_t;
pub type SoServerGetClass_f = unsafe extern "C" fn(hObject: SoHObject, name: *mut c_char, name_l: i32) -> ESerror_t;
pub type SoServerGetServer_f = unsafe extern "C" fn(hObject: SoHObject, phServer: *mut SoHServer, ppServerInterface: *mut *mut SoServerInterface) -> ESerror_t;
pub type SoServerSetClientData_f = unsafe extern "C" fn(hObject: SoHObject, pClientData: *mut c_void) -> ESerror_t;
pub type SoServerGetClientData_f = unsafe extern "C" fn(hObject: SoHObject, ppClientData: *mut *mut c_void) -> ESerror_t;
pub type SoServerEval_f = unsafe extern "C" fn(hServer: SoHServer, string: *mut c_char, pTaggedData: *mut TaggedData) -> ESerror_t;
pub type SoServerTaggedDataInit_f = unsafe extern "C" fn(hServer: SoHServer, pTaggedData: *mut TaggedData) -> ESerror_t;
pub type SoServerTaggedDataFree_f = unsafe extern "C" fn(hServer: SoHServer, pTaggedData: *mut TaggedData) -> ESerror_t;
pub type SoServerCallLiveObject_f = unsafe extern "C" fn(hServer: SoHServer, hObject: SoHObject, method: *mut c_char, argc: i32, argv: *mut TaggedData, pResult: *mut TaggedData) -> ESerror_t;
pub type SoServerGetLiveObject_f = unsafe extern "C" fn(hServer: SoHServer, hObject: SoHObject, method: *mut c_char, pResult: *mut TaggedData) -> ESerror_t;
pub type SoServerPutLiveObject_f = unsafe extern "C" fn(hServer: SoHServer, hObject: SoHObject, method: *mut c_char, pValue: *mut TaggedData) -> ESerror_t;
pub type SoCClient_f = unsafe extern "C" fn(
eReason: SoCClient_e,
pServer: *mut SoServerInterface,
hServer: SoHServer,
) -> ESerror_t;
#[repr(C)]
#[derive(Copy, Clone, Debug)]
pub enum SoCClient_e {
Init = 0,
Term = 1,
}
extern "C" {
pub fn SoCClientInitialize(client: SoCClient_f, memory: *mut SoMemoryInterface) -> ESerror_t;
pub fn SoCClientTerminate(client: SoCClient_f) -> ESerror_t;
pub fn SoCClientTerminateAll() -> ESerror_t;
}