use libc::{c_int, c_void, size_t, uint8_t};

pub type FolderInitialize = extern "C" fn(name:                 *const uint8_t,
                                          name_length:          size_t,
                                          error_message:        *mut *const uint8_t,
                                          error_message_length: *mut size_t)
                                          -> *mut c_void;

pub type FolderStep = extern "C" fn(accumulator:          *mut c_void,
                                    entry:                *const uint8_t,
                                    entry_length:         size_t,
                                    error_message:        *mut *const uint8_t,
                                    error_message_length: *mut size_t)
                                    -> c_int;

pub type FolderFinalize = extern "C" fn(accumulator:          *mut c_void,
                                        value:                *mut *const uint8_t,
                                        value_length:         *mut size_t,
                                        error_message:        *mut *const uint8_t,
                                        error_message_length: *mut size_t)
                                        -> c_int;

pub type FolderFree = extern "C" fn(accumulator: *mut c_void);
