libhdfs3_sys/
hdfs3_bindings.rs

1/* automatically generated by rust-bindgen 0.59.2 */
2
3pub type __int16_t = ::std::os::raw::c_short;
4pub type __uint16_t = ::std::os::raw::c_ushort;
5pub type __int32_t = ::std::os::raw::c_int;
6pub type __uint32_t = ::std::os::raw::c_uint;
7pub type __int64_t = ::std::os::raw::c_long;
8pub type __time_t = ::std::os::raw::c_long;
9pub type time_t = __time_t;
10pub type size_t = ::std::os::raw::c_ulong;
11#[doc = " Some utility decls used in libhdfs."]
12pub type tSize = i32;
13#[doc = " size of data for read/write io ops"]
14pub type tTime = time_t;
15#[doc = " time type in seconds"]
16pub type tOffset = i64;
17#[doc = " offset within the file"]
18pub type tPort = u16;
19#[repr(u32)]
20#[doc = " port"]
21#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
22pub enum tObjectKind {
23    kObjectKindFile = 70,
24    kObjectKindDirectory = 68,
25}
26#[repr(C)]
27#[derive(Debug, Copy, Clone)]
28pub struct HdfsFileSystemInternalWrapper {
29    _unused: [u8; 0],
30}
31pub type hdfsFS = *mut HdfsFileSystemInternalWrapper;
32#[repr(C)]
33#[derive(Debug, Copy, Clone)]
34pub struct HdfsFileInternalWrapper {
35    _unused: [u8; 0],
36}
37pub type hdfsFile = *mut HdfsFileInternalWrapper;
38#[repr(C)]
39#[derive(Debug, Copy, Clone)]
40pub struct hdfsBuilder {
41    _unused: [u8; 0],
42}
43extern "C" {
44    #[doc = " Return error information of last failed operation."]
45    #[doc = ""]
46    #[doc = " @return \t\t\tA not NULL const string point of last error information."]
47    #[doc = " \t\t\t\t\tCaller can only read this message and keep it unchanged. No need to free it."]
48    #[doc = " \t\t\t\t\tIf last operation finished successfully, the returned message is undefined."]
49    pub fn hdfsGetLastError() -> *const ::std::os::raw::c_char;
50}
51extern "C" {
52    #[doc = " Determine if a file is open for read."]
53    #[doc = ""]
54    #[doc = " @param file     The HDFS file"]
55    #[doc = " @return         1 if the file is open for read; 0 otherwise"]
56    pub fn hdfsFileIsOpenForRead(file: hdfsFile) -> ::std::os::raw::c_int;
57}
58extern "C" {
59    #[doc = " Determine if a file is open for write."]
60    #[doc = ""]
61    #[doc = " @param file     The HDFS file"]
62    #[doc = " @return         1 if the file is open for write; 0 otherwise"]
63    pub fn hdfsFileIsOpenForWrite(file: hdfsFile) -> ::std::os::raw::c_int;
64}
65extern "C" {
66    #[doc = " hdfsConnectAsUser - Connect to a hdfs file system as a specific user"]
67    #[doc = " Connect to the hdfs."]
68    #[doc = " @param nn   The NameNode.  See hdfsBuilderSetNameNode for details."]
69    #[doc = " @param port The port on which the server is listening."]
70    #[doc = " @param user the user name (this is hadoop domain user). Or NULL is equivelant to hhdfsConnect(host, port)"]
71    #[doc = " @return Returns a handle to the filesystem or NULL on error."]
72    #[doc = " @deprecated Use hdfsBuilderConnect instead."]
73    pub fn hdfsConnectAsUser(
74        nn: *const ::std::os::raw::c_char,
75        port: tPort,
76        user: *const ::std::os::raw::c_char,
77    ) -> hdfsFS;
78}
79extern "C" {
80    #[doc = " hdfsConnect - Connect to a hdfs file system."]
81    #[doc = " Connect to the hdfs."]
82    #[doc = " @param nn   The NameNode.  See hdfsBuilderSetNameNode for details."]
83    #[doc = " @param port The port on which the server is listening."]
84    #[doc = " @return Returns a handle to the filesystem or NULL on error."]
85    #[doc = " @deprecated Use hdfsBuilderConnect instead."]
86    pub fn hdfsConnect(nn: *const ::std::os::raw::c_char, port: tPort) -> hdfsFS;
87}
88extern "C" {
89    #[doc = " hdfsConnect - Connect to an hdfs file system."]
90    #[doc = ""]
91    #[doc = " Forces a new instance to be created"]
92    #[doc = ""]
93    #[doc = " @param nn     The NameNode.  See hdfsBuilderSetNameNode for details."]
94    #[doc = " @param port   The port on which the server is listening."]
95    #[doc = " @param user   The user name to use when connecting"]
96    #[doc = " @return       Returns a handle to the filesystem or NULL on error."]
97    #[doc = " @deprecated   Use hdfsBuilderConnect instead."]
98    pub fn hdfsConnectAsUserNewInstance(
99        nn: *const ::std::os::raw::c_char,
100        port: tPort,
101        user: *const ::std::os::raw::c_char,
102    ) -> hdfsFS;
103}
104extern "C" {
105    #[doc = " hdfsConnect - Connect to an hdfs file system."]
106    #[doc = ""]
107    #[doc = " Forces a new instance to be created"]
108    #[doc = ""]
109    #[doc = " @param nn     The NameNode.  See hdfsBuilderSetNameNode for details."]
110    #[doc = " @param port   The port on which the server is listening."]
111    #[doc = " @return       Returns a handle to the filesystem or NULL on error."]
112    #[doc = " @deprecated   Use hdfsBuilderConnect instead."]
113    pub fn hdfsConnectNewInstance(nn: *const ::std::os::raw::c_char, port: tPort) -> hdfsFS;
114}
115extern "C" {
116    #[doc = " Connect to HDFS using the parameters defined by the builder."]
117    #[doc = ""]
118    #[doc = " The HDFS builder will be freed, whether or not the connection was"]
119    #[doc = " successful."]
120    #[doc = ""]
121    #[doc = " Every successful call to hdfsBuilderConnect should be matched with a call"]
122    #[doc = " to hdfsDisconnect, when the hdfsFS is no longer needed."]
123    #[doc = ""]
124    #[doc = " @param bld    The HDFS builder"]
125    #[doc = " @return       Returns a handle to the filesystem, or NULL on error."]
126    pub fn hdfsBuilderConnect(bld: *mut hdfsBuilder) -> hdfsFS;
127}
128extern "C" {
129    #[doc = " Create an HDFS builder."]
130    #[doc = ""]
131    #[doc = " @return The HDFS builder, or NULL on error."]
132    pub fn hdfsNewBuilder() -> *mut hdfsBuilder;
133}
134extern "C" {
135    #[doc = " Do nothing, we always create a new instance"]
136    #[doc = ""]
137    #[doc = " @param bld The HDFS builder"]
138    pub fn hdfsBuilderSetForceNewInstance(bld: *mut hdfsBuilder);
139}
140extern "C" {
141    #[doc = " Set the HDFS NameNode to connect to."]
142    pub fn hdfsBuilderSetNameNode(bld: *mut hdfsBuilder, nn: *const ::std::os::raw::c_char);
143}
144extern "C" {
145    #[doc = " Set the port of the HDFS NameNode to connect to."]
146    #[doc = ""]
147    #[doc = " @param bld The HDFS builder"]
148    #[doc = " @param port The port."]
149    pub fn hdfsBuilderSetNameNodePort(bld: *mut hdfsBuilder, port: tPort);
150}
151extern "C" {
152    #[doc = " Set the username to use when connecting to the HDFS cluster."]
153    #[doc = ""]
154    #[doc = " @param bld The HDFS builder"]
155    #[doc = " @param userName The user name.  The string will be shallow-copied."]
156    pub fn hdfsBuilderSetUserName(bld: *mut hdfsBuilder, userName: *const ::std::os::raw::c_char);
157}
158extern "C" {
159    #[doc = " Set the path to the Kerberos ticket cache to use when connecting to"]
160    #[doc = " the HDFS cluster."]
161    #[doc = ""]
162    #[doc = " @param bld The HDFS builder"]
163    #[doc = " @param kerbTicketCachePath The Kerberos ticket cache path.  The string"]
164    #[doc = "                            will be shallow-copied."]
165    pub fn hdfsBuilderSetKerbTicketCachePath(
166        bld: *mut hdfsBuilder,
167        kerbTicketCachePath: *const ::std::os::raw::c_char,
168    );
169}
170extern "C" {
171    #[doc = " Set the token used to authenticate"]
172    #[doc = ""]
173    #[doc = " @param bld The HDFS builder"]
174    #[doc = " @param token The token used to authenticate"]
175    pub fn hdfsBuilderSetToken(bld: *mut hdfsBuilder, token: *const ::std::os::raw::c_char);
176}
177extern "C" {
178    #[doc = " Free an HDFS builder."]
179    #[doc = ""]
180    #[doc = " It is normally not necessary to call this function since"]
181    #[doc = " hdfsBuilderConnect frees the builder."]
182    #[doc = ""]
183    #[doc = " @param bld The HDFS builder"]
184    pub fn hdfsFreeBuilder(bld: *mut hdfsBuilder);
185}
186extern "C" {
187    #[doc = " Set a configuration string for an HdfsBuilder."]
188    #[doc = ""]
189    #[doc = " @param key      The key to set."]
190    #[doc = " @param val      The value, or NULL to set no value."]
191    #[doc = "                 This will be shallow-copied.  You are responsible for"]
192    #[doc = "                 ensuring that it remains valid until the builder is"]
193    #[doc = "                 freed."]
194    #[doc = ""]
195    #[doc = " @return         0 on success; nonzero error code otherwise."]
196    pub fn hdfsBuilderConfSetStr(
197        bld: *mut hdfsBuilder,
198        key: *const ::std::os::raw::c_char,
199        val: *const ::std::os::raw::c_char,
200    ) -> ::std::os::raw::c_int;
201}
202extern "C" {
203    #[doc = " Get a configuration string."]
204    #[doc = ""]
205    #[doc = " @param key      The key to find"]
206    #[doc = " @param val      (out param) The value.  This will be set to NULL if the"]
207    #[doc = "                 key isn't found.  You must free this string with"]
208    #[doc = "                 hdfsConfStrFree."]
209    #[doc = ""]
210    #[doc = " @return         0 on success; nonzero error code otherwise."]
211    #[doc = "                 Failure to find the key is not an error."]
212    pub fn hdfsConfGetStr(
213        key: *const ::std::os::raw::c_char,
214        val: *mut *mut ::std::os::raw::c_char,
215    ) -> ::std::os::raw::c_int;
216}
217extern "C" {
218    #[doc = " Get a configuration integer."]
219    #[doc = ""]
220    #[doc = " @param key      The key to find"]
221    #[doc = " @param val      (out param) The value.  This will NOT be changed if the"]
222    #[doc = "                 key isn't found."]
223    #[doc = ""]
224    #[doc = " @return         0 on success; nonzero error code otherwise."]
225    #[doc = "                 Failure to find the key is not an error."]
226    pub fn hdfsConfGetInt(
227        key: *const ::std::os::raw::c_char,
228        val: *mut i32,
229    ) -> ::std::os::raw::c_int;
230}
231extern "C" {
232    #[doc = " Free a configuration string found with hdfsConfGetStr."]
233    #[doc = ""]
234    #[doc = " @param val      A configuration string obtained from hdfsConfGetStr"]
235    pub fn hdfsConfStrFree(val: *mut ::std::os::raw::c_char);
236}
237extern "C" {
238    #[doc = " hdfsDisconnect - Disconnect from the hdfs file system."]
239    #[doc = " Disconnect from hdfs."]
240    #[doc = " @param fs The configured filesystem handle."]
241    #[doc = " @return Returns 0 on success, -1 on error."]
242    #[doc = "         Even if there is an error, the resources associated with the"]
243    #[doc = "         hdfsFS will be freed."]
244    pub fn hdfsDisconnect(fs: hdfsFS) -> ::std::os::raw::c_int;
245}
246extern "C" {
247    #[doc = " hdfsOpenFile - Open a hdfs file in given mode."]
248    #[doc = " @param fs The configured filesystem handle."]
249    #[doc = " @param path The full path to the file."]
250    #[doc = " @param flags - an | of bits/fcntl.h file flags - supported flags are O_RDONLY, O_WRONLY (meaning create or overwrite i.e., implies O_TRUNCAT),"]
251    #[doc = " O_WRONLY|O_APPEND and O_SYNC. Other flags are generally ignored other than (O_RDWR || (O_EXCL & O_CREAT)) which return NULL and set errno equal ENOTSUP."]
252    #[doc = " @param bufferSize Size of buffer for read/write - pass 0 if you want"]
253    #[doc = " to use the default configured values."]
254    #[doc = " @param replication Block replication - pass 0 if you want to use"]
255    #[doc = " the default configured values."]
256    #[doc = " @param blocksize Size of block - pass 0 if you want to use the"]
257    #[doc = " default configured values."]
258    #[doc = " @return Returns the handle to the open file or NULL on error."]
259    pub fn hdfsOpenFile(
260        fs: hdfsFS,
261        path: *const ::std::os::raw::c_char,
262        flags: ::std::os::raw::c_int,
263        bufferSize: ::std::os::raw::c_int,
264        replication: ::std::os::raw::c_short,
265        blocksize: tOffset,
266    ) -> hdfsFile;
267}
268extern "C" {
269    #[doc = " hdfsCloseFile - Close an open file."]
270    #[doc = " @param fs The configured filesystem handle."]
271    #[doc = " @param file The file handle."]
272    #[doc = " @return Returns 0 on success, -1 on error."]
273    #[doc = "         On error, errno will be set appropriately."]
274    #[doc = "         If the hdfs file was valid, the memory associated with it will"]
275    #[doc = "         be freed at the end of this call, even if there was an I/O"]
276    #[doc = "         error."]
277    pub fn hdfsCloseFile(fs: hdfsFS, file: hdfsFile) -> ::std::os::raw::c_int;
278}
279extern "C" {
280    #[doc = " hdfsExists - Checks if a given path exsits on the filesystem"]
281    #[doc = " @param fs The configured filesystem handle."]
282    #[doc = " @param path The path to look for"]
283    #[doc = " @return Returns 0 on success, -1 on error."]
284    pub fn hdfsExists(fs: hdfsFS, path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
285}
286extern "C" {
287    #[doc = " hdfsSeek - Seek to given offset in file."]
288    #[doc = " This works only for files opened in read-only mode."]
289    #[doc = " @param fs The configured filesystem handle."]
290    #[doc = " @param file The file handle."]
291    #[doc = " @param desiredPos Offset into the file to seek into."]
292    #[doc = " @return Returns 0 on success, -1 on error."]
293    pub fn hdfsSeek(fs: hdfsFS, file: hdfsFile, desiredPos: tOffset) -> ::std::os::raw::c_int;
294}
295extern "C" {
296    #[doc = " hdfsTell - Get the current offset in the file, in bytes."]
297    #[doc = " @param fs The configured filesystem handle."]
298    #[doc = " @param file The file handle."]
299    #[doc = " @return Current offset, -1 on error."]
300    pub fn hdfsTell(fs: hdfsFS, file: hdfsFile) -> tOffset;
301}
302extern "C" {
303    #[doc = " hdfsRead - Read data from an open file."]
304    #[doc = " @param fs The configured filesystem handle."]
305    #[doc = " @param file The file handle."]
306    #[doc = " @param buffer The buffer to copy read bytes into."]
307    #[doc = " @param length The length of the buffer."]
308    #[doc = " @return      On success, a positive number indicating how many bytes"]
309    #[doc = "              were read."]
310    #[doc = "              On end-of-file, 0."]
311    #[doc = "              On error, -1.  Errno will be set to the error code."]
312    #[doc = "              Just like the POSIX read function, hdfsRead will return -1"]
313    #[doc = "              and set errno to EINTR if data is temporarily unavailable,"]
314    #[doc = "              but we are not yet at the end of the file."]
315    pub fn hdfsRead(
316        fs: hdfsFS,
317        file: hdfsFile,
318        buffer: *mut ::std::os::raw::c_void,
319        length: tSize,
320    ) -> tSize;
321}
322extern "C" {
323    #[doc = " hdfsWrite - Write data into an open file."]
324    #[doc = " @param fs The configured filesystem handle."]
325    #[doc = " @param file The file handle."]
326    #[doc = " @param buffer The data."]
327    #[doc = " @param length The no. of bytes to write."]
328    #[doc = " @return Returns the number of bytes written, -1 on error."]
329    pub fn hdfsWrite(
330        fs: hdfsFS,
331        file: hdfsFile,
332        buffer: *const ::std::os::raw::c_void,
333        length: tSize,
334    ) -> tSize;
335}
336extern "C" {
337    #[doc = " hdfsWrite - Flush the data."]
338    #[doc = " @param fs The configured filesystem handle."]
339    #[doc = " @param file The file handle."]
340    #[doc = " @return Returns 0 on success, -1 on error."]
341    pub fn hdfsFlush(fs: hdfsFS, file: hdfsFile) -> ::std::os::raw::c_int;
342}
343extern "C" {
344    #[doc = " hdfsHFlush - Flush out the data in client's user buffer. After the"]
345    #[doc = " return of this call, new readers will see the data."]
346    #[doc = " @param fs configured filesystem handle"]
347    #[doc = " @param file file handle"]
348    #[doc = " @return 0 on success, -1 on error and sets errno"]
349    pub fn hdfsHFlush(fs: hdfsFS, file: hdfsFile) -> ::std::os::raw::c_int;
350}
351extern "C" {
352    #[doc = " hdfsSync - Flush out and sync the data in client's user buffer. After the"]
353    #[doc = " return of this call, new readers will see the data."]
354    #[doc = " @param fs configured filesystem handle"]
355    #[doc = " @param file file handle"]
356    #[doc = " @return 0 on success, -1 on error and sets errno"]
357    pub fn hdfsSync(fs: hdfsFS, file: hdfsFile) -> ::std::os::raw::c_int;
358}
359extern "C" {
360    #[doc = " hdfsAvailable - Number of bytes that can be read from this"]
361    #[doc = " input stream without blocking."]
362    #[doc = " @param fs The configured filesystem handle."]
363    #[doc = " @param file The file handle."]
364    #[doc = " @return Returns available bytes; -1 on error."]
365    pub fn hdfsAvailable(fs: hdfsFS, file: hdfsFile) -> ::std::os::raw::c_int;
366}
367extern "C" {
368    #[doc = " hdfsCopy - Copy file from one filesystem to another."]
369    #[doc = " @param srcFS The handle to source filesystem."]
370    #[doc = " @param src The path of source file."]
371    #[doc = " @param dstFS The handle to destination filesystem."]
372    #[doc = " @param dst The path of destination file."]
373    #[doc = " @return Returns 0 on success, -1 on error."]
374    pub fn hdfsCopy(
375        srcFS: hdfsFS,
376        src: *const ::std::os::raw::c_char,
377        dstFS: hdfsFS,
378        dst: *const ::std::os::raw::c_char,
379    ) -> ::std::os::raw::c_int;
380}
381extern "C" {
382    #[doc = " hdfsMove - Move file from one filesystem to another."]
383    #[doc = " @param srcFS The handle to source filesystem."]
384    #[doc = " @param src The path of source file."]
385    #[doc = " @param dstFS The handle to destination filesystem."]
386    #[doc = " @param dst The path of destination file."]
387    #[doc = " @return Returns 0 on success, -1 on error."]
388    pub fn hdfsMove(
389        srcFS: hdfsFS,
390        src: *const ::std::os::raw::c_char,
391        dstFS: hdfsFS,
392        dst: *const ::std::os::raw::c_char,
393    ) -> ::std::os::raw::c_int;
394}
395extern "C" {
396    #[doc = " hdfsDelete - Delete file."]
397    #[doc = " @param fs The configured filesystem handle."]
398    #[doc = " @param path The path of the file."]
399    #[doc = " @param recursive if path is a directory and set to"]
400    #[doc = " non-zero, the directory is deleted else throws an exception. In"]
401    #[doc = " case of a file the recursive argument is irrelevant."]
402    #[doc = " @return Returns 0 on success, -1 on error."]
403    pub fn hdfsDelete(
404        fs: hdfsFS,
405        path: *const ::std::os::raw::c_char,
406        recursive: ::std::os::raw::c_int,
407    ) -> ::std::os::raw::c_int;
408}
409extern "C" {
410    #[doc = " hdfsRename - Rename file."]
411    #[doc = " @param fs The configured filesystem handle."]
412    #[doc = " @param oldPath The path of the source file."]
413    #[doc = " @param newPath The path of the destination file."]
414    #[doc = " @return Returns 0 on success, -1 on error."]
415    pub fn hdfsRename(
416        fs: hdfsFS,
417        oldPath: *const ::std::os::raw::c_char,
418        newPath: *const ::std::os::raw::c_char,
419    ) -> ::std::os::raw::c_int;
420}
421extern "C" {
422    #[doc = " hdfsGetWorkingDirectory - Get the current working directory for"]
423    #[doc = " the given filesystem."]
424    #[doc = " @param fs The configured filesystem handle."]
425    #[doc = " @param buffer The user-buffer to copy path of cwd into."]
426    #[doc = " @param bufferSize The length of user-buffer."]
427    #[doc = " @return Returns buffer, NULL on error."]
428    pub fn hdfsGetWorkingDirectory(
429        fs: hdfsFS,
430        buffer: *mut ::std::os::raw::c_char,
431        bufferSize: size_t,
432    ) -> *mut ::std::os::raw::c_char;
433}
434extern "C" {
435    #[doc = " hdfsSetWorkingDirectory - Set the working directory. All relative"]
436    #[doc = " paths will be resolved relative to it."]
437    #[doc = " @param fs The configured filesystem handle."]
438    #[doc = " @param path The path of the new 'cwd'."]
439    #[doc = " @return Returns 0 on success, -1 on error."]
440    pub fn hdfsSetWorkingDirectory(
441        fs: hdfsFS,
442        path: *const ::std::os::raw::c_char,
443    ) -> ::std::os::raw::c_int;
444}
445extern "C" {
446    #[doc = " hdfsCreateDirectory - Make the given file and all non-existent"]
447    #[doc = " parents into directories."]
448    #[doc = " @param fs The configured filesystem handle."]
449    #[doc = " @param path The path of the directory."]
450    #[doc = " @return Returns 0 on success, -1 on error."]
451    pub fn hdfsCreateDirectory(
452        fs: hdfsFS,
453        path: *const ::std::os::raw::c_char,
454    ) -> ::std::os::raw::c_int;
455}
456extern "C" {
457    #[doc = " hdfsSetReplication - Set the replication of the specified"]
458    #[doc = " file to the supplied value"]
459    #[doc = " @param fs The configured filesystem handle."]
460    #[doc = " @param path The path of the file."]
461    #[doc = " @return Returns 0 on success, -1 on error."]
462    pub fn hdfsSetReplication(
463        fs: hdfsFS,
464        path: *const ::std::os::raw::c_char,
465        replication: i16,
466    ) -> ::std::os::raw::c_int;
467}
468#[doc = " hdfsEncryptionZoneInfo- Information about an encryption zone."]
469#[repr(C)]
470#[derive(Debug, Copy, Clone)]
471pub struct hdfsEncryptionZoneInfo {
472    pub mSuite: ::std::os::raw::c_int,
473    pub mCryptoProtocolVersion: ::std::os::raw::c_int,
474    pub mId: i64,
475    pub mPath: *mut ::std::os::raw::c_char,
476    pub mKeyName: *mut ::std::os::raw::c_char,
477}
478#[test]
479fn bindgen_test_layout_hdfsEncryptionZoneInfo() {
480    assert_eq!(
481        ::std::mem::size_of::<hdfsEncryptionZoneInfo>(),
482        32usize,
483        concat!("Size of: ", stringify!(hdfsEncryptionZoneInfo))
484    );
485    assert_eq!(
486        ::std::mem::align_of::<hdfsEncryptionZoneInfo>(),
487        8usize,
488        concat!("Alignment of ", stringify!(hdfsEncryptionZoneInfo))
489    );
490    assert_eq!(
491        unsafe { &(*(::std::ptr::null::<hdfsEncryptionZoneInfo>())).mSuite as *const _ as usize },
492        0usize,
493        concat!(
494            "Offset of field: ",
495            stringify!(hdfsEncryptionZoneInfo),
496            "::",
497            stringify!(mSuite)
498        )
499    );
500    assert_eq!(
501        unsafe {
502            &(*(::std::ptr::null::<hdfsEncryptionZoneInfo>())).mCryptoProtocolVersion as *const _
503                as usize
504        },
505        4usize,
506        concat!(
507            "Offset of field: ",
508            stringify!(hdfsEncryptionZoneInfo),
509            "::",
510            stringify!(mCryptoProtocolVersion)
511        )
512    );
513    assert_eq!(
514        unsafe { &(*(::std::ptr::null::<hdfsEncryptionZoneInfo>())).mId as *const _ as usize },
515        8usize,
516        concat!(
517            "Offset of field: ",
518            stringify!(hdfsEncryptionZoneInfo),
519            "::",
520            stringify!(mId)
521        )
522    );
523    assert_eq!(
524        unsafe { &(*(::std::ptr::null::<hdfsEncryptionZoneInfo>())).mPath as *const _ as usize },
525        16usize,
526        concat!(
527            "Offset of field: ",
528            stringify!(hdfsEncryptionZoneInfo),
529            "::",
530            stringify!(mPath)
531        )
532    );
533    assert_eq!(
534        unsafe { &(*(::std::ptr::null::<hdfsEncryptionZoneInfo>())).mKeyName as *const _ as usize },
535        24usize,
536        concat!(
537            "Offset of field: ",
538            stringify!(hdfsEncryptionZoneInfo),
539            "::",
540            stringify!(mKeyName)
541        )
542    );
543}
544#[doc = " hdfsEncryptionFileInfo - Information about an encryption file/directory."]
545#[repr(C)]
546#[derive(Debug, Copy, Clone)]
547pub struct hdfsEncryptionFileInfo {
548    pub mSuite: ::std::os::raw::c_int,
549    pub mCryptoProtocolVersion: ::std::os::raw::c_int,
550    pub mKey: *mut ::std::os::raw::c_char,
551    pub mKeyName: *mut ::std::os::raw::c_char,
552    pub mIv: *mut ::std::os::raw::c_char,
553    pub mEzKeyVersionName: *mut ::std::os::raw::c_char,
554}
555#[test]
556fn bindgen_test_layout_hdfsEncryptionFileInfo() {
557    assert_eq!(
558        ::std::mem::size_of::<hdfsEncryptionFileInfo>(),
559        40usize,
560        concat!("Size of: ", stringify!(hdfsEncryptionFileInfo))
561    );
562    assert_eq!(
563        ::std::mem::align_of::<hdfsEncryptionFileInfo>(),
564        8usize,
565        concat!("Alignment of ", stringify!(hdfsEncryptionFileInfo))
566    );
567    assert_eq!(
568        unsafe { &(*(::std::ptr::null::<hdfsEncryptionFileInfo>())).mSuite as *const _ as usize },
569        0usize,
570        concat!(
571            "Offset of field: ",
572            stringify!(hdfsEncryptionFileInfo),
573            "::",
574            stringify!(mSuite)
575        )
576    );
577    assert_eq!(
578        unsafe {
579            &(*(::std::ptr::null::<hdfsEncryptionFileInfo>())).mCryptoProtocolVersion as *const _
580                as usize
581        },
582        4usize,
583        concat!(
584            "Offset of field: ",
585            stringify!(hdfsEncryptionFileInfo),
586            "::",
587            stringify!(mCryptoProtocolVersion)
588        )
589    );
590    assert_eq!(
591        unsafe { &(*(::std::ptr::null::<hdfsEncryptionFileInfo>())).mKey as *const _ as usize },
592        8usize,
593        concat!(
594            "Offset of field: ",
595            stringify!(hdfsEncryptionFileInfo),
596            "::",
597            stringify!(mKey)
598        )
599    );
600    assert_eq!(
601        unsafe { &(*(::std::ptr::null::<hdfsEncryptionFileInfo>())).mKeyName as *const _ as usize },
602        16usize,
603        concat!(
604            "Offset of field: ",
605            stringify!(hdfsEncryptionFileInfo),
606            "::",
607            stringify!(mKeyName)
608        )
609    );
610    assert_eq!(
611        unsafe { &(*(::std::ptr::null::<hdfsEncryptionFileInfo>())).mIv as *const _ as usize },
612        24usize,
613        concat!(
614            "Offset of field: ",
615            stringify!(hdfsEncryptionFileInfo),
616            "::",
617            stringify!(mIv)
618        )
619    );
620    assert_eq!(
621        unsafe {
622            &(*(::std::ptr::null::<hdfsEncryptionFileInfo>())).mEzKeyVersionName as *const _
623                as usize
624        },
625        32usize,
626        concat!(
627            "Offset of field: ",
628            stringify!(hdfsEncryptionFileInfo),
629            "::",
630            stringify!(mEzKeyVersionName)
631        )
632    );
633}
634#[doc = " hdfsFileInfo - Information about a file/directory."]
635#[repr(C)]
636#[derive(Debug, Copy, Clone)]
637pub struct hdfsFileInfo {
638    pub mKind: tObjectKind,
639    pub mName: *mut ::std::os::raw::c_char,
640    pub mLastMod: tTime,
641    pub mSize: tOffset,
642    pub mReplication: ::std::os::raw::c_short,
643    pub mBlockSize: tOffset,
644    pub mOwner: *mut ::std::os::raw::c_char,
645    pub mGroup: *mut ::std::os::raw::c_char,
646    pub mPermissions: ::std::os::raw::c_short,
647    pub mLastAccess: tTime,
648    pub mHdfsEncryptionFileInfo: *mut hdfsEncryptionFileInfo,
649}
650#[test]
651fn bindgen_test_layout_hdfsFileInfo() {
652    assert_eq!(
653        ::std::mem::size_of::<hdfsFileInfo>(),
654        88usize,
655        concat!("Size of: ", stringify!(hdfsFileInfo))
656    );
657    assert_eq!(
658        ::std::mem::align_of::<hdfsFileInfo>(),
659        8usize,
660        concat!("Alignment of ", stringify!(hdfsFileInfo))
661    );
662    assert_eq!(
663        unsafe { &(*(::std::ptr::null::<hdfsFileInfo>())).mKind as *const _ as usize },
664        0usize,
665        concat!(
666            "Offset of field: ",
667            stringify!(hdfsFileInfo),
668            "::",
669            stringify!(mKind)
670        )
671    );
672    assert_eq!(
673        unsafe { &(*(::std::ptr::null::<hdfsFileInfo>())).mName as *const _ as usize },
674        8usize,
675        concat!(
676            "Offset of field: ",
677            stringify!(hdfsFileInfo),
678            "::",
679            stringify!(mName)
680        )
681    );
682    assert_eq!(
683        unsafe { &(*(::std::ptr::null::<hdfsFileInfo>())).mLastMod as *const _ as usize },
684        16usize,
685        concat!(
686            "Offset of field: ",
687            stringify!(hdfsFileInfo),
688            "::",
689            stringify!(mLastMod)
690        )
691    );
692    assert_eq!(
693        unsafe { &(*(::std::ptr::null::<hdfsFileInfo>())).mSize as *const _ as usize },
694        24usize,
695        concat!(
696            "Offset of field: ",
697            stringify!(hdfsFileInfo),
698            "::",
699            stringify!(mSize)
700        )
701    );
702    assert_eq!(
703        unsafe { &(*(::std::ptr::null::<hdfsFileInfo>())).mReplication as *const _ as usize },
704        32usize,
705        concat!(
706            "Offset of field: ",
707            stringify!(hdfsFileInfo),
708            "::",
709            stringify!(mReplication)
710        )
711    );
712    assert_eq!(
713        unsafe { &(*(::std::ptr::null::<hdfsFileInfo>())).mBlockSize as *const _ as usize },
714        40usize,
715        concat!(
716            "Offset of field: ",
717            stringify!(hdfsFileInfo),
718            "::",
719            stringify!(mBlockSize)
720        )
721    );
722    assert_eq!(
723        unsafe { &(*(::std::ptr::null::<hdfsFileInfo>())).mOwner as *const _ as usize },
724        48usize,
725        concat!(
726            "Offset of field: ",
727            stringify!(hdfsFileInfo),
728            "::",
729            stringify!(mOwner)
730        )
731    );
732    assert_eq!(
733        unsafe { &(*(::std::ptr::null::<hdfsFileInfo>())).mGroup as *const _ as usize },
734        56usize,
735        concat!(
736            "Offset of field: ",
737            stringify!(hdfsFileInfo),
738            "::",
739            stringify!(mGroup)
740        )
741    );
742    assert_eq!(
743        unsafe { &(*(::std::ptr::null::<hdfsFileInfo>())).mPermissions as *const _ as usize },
744        64usize,
745        concat!(
746            "Offset of field: ",
747            stringify!(hdfsFileInfo),
748            "::",
749            stringify!(mPermissions)
750        )
751    );
752    assert_eq!(
753        unsafe { &(*(::std::ptr::null::<hdfsFileInfo>())).mLastAccess as *const _ as usize },
754        72usize,
755        concat!(
756            "Offset of field: ",
757            stringify!(hdfsFileInfo),
758            "::",
759            stringify!(mLastAccess)
760        )
761    );
762    assert_eq!(
763        unsafe {
764            &(*(::std::ptr::null::<hdfsFileInfo>())).mHdfsEncryptionFileInfo as *const _ as usize
765        },
766        80usize,
767        concat!(
768            "Offset of field: ",
769            stringify!(hdfsFileInfo),
770            "::",
771            stringify!(mHdfsEncryptionFileInfo)
772        )
773    );
774}
775extern "C" {
776    #[doc = " hdfsListDirectory - Get list of files/directories for a given"]
777    #[doc = " directory-path. hdfsFreeFileInfo should be called to deallocate memory."]
778    #[doc = " @param fs The configured filesystem handle."]
779    #[doc = " @param path The path of the directory."]
780    #[doc = " @param numEntries Set to the number of files/directories in path."]
781    #[doc = " @return Returns a dynamically-allocated array of hdfsFileInfo"]
782    #[doc = " objects; NULL on error."]
783    pub fn hdfsListDirectory(
784        fs: hdfsFS,
785        path: *const ::std::os::raw::c_char,
786        numEntries: *mut ::std::os::raw::c_int,
787    ) -> *mut hdfsFileInfo;
788}
789extern "C" {
790    #[doc = " hdfsGetPathInfo - Get information about a path as a (dynamically"]
791    #[doc = " allocated) single hdfsFileInfo struct. hdfsFreeFileInfo should be"]
792    #[doc = " called when the pointer is no longer needed."]
793    #[doc = " @param fs The configured filesystem handle."]
794    #[doc = " @param path The path of the file."]
795    #[doc = " @return Returns a dynamically-allocated hdfsFileInfo object;"]
796    #[doc = " NULL on error."]
797    pub fn hdfsGetPathInfo(fs: hdfsFS, path: *const ::std::os::raw::c_char) -> *mut hdfsFileInfo;
798}
799extern "C" {
800    #[doc = " hdfsFreeFileInfo - Free up the hdfsFileInfo array (including fields)"]
801    #[doc = " @param infos The array of dynamically-allocated hdfsFileInfo"]
802    #[doc = " objects."]
803    #[doc = " @param numEntries The size of the array."]
804    pub fn hdfsFreeFileInfo(infos: *mut hdfsFileInfo, numEntries: ::std::os::raw::c_int);
805}
806extern "C" {
807    #[doc = " hdfsFreeEncryptionZoneInfo - Free up the hdfsEncryptionZoneInfo array (including fields)"]
808    #[doc = " @param infos The array of dynamically-allocated hdfsEncryptionZoneInfo"]
809    #[doc = " objects."]
810    #[doc = " @param numEntries The size of the array."]
811    pub fn hdfsFreeEncryptionZoneInfo(
812        infos: *mut hdfsEncryptionZoneInfo,
813        numEntries: ::std::os::raw::c_int,
814    );
815}
816extern "C" {
817    #[doc = " hdfsGetHosts - Get hostnames where a particular block (determined by"]
818    #[doc = " pos & blocksize) of a file is stored. The last element in the array"]
819    #[doc = " is NULL. Due to replication, a single block could be present on"]
820    #[doc = " multiple hosts."]
821    #[doc = " @param fs The configured filesystem handle."]
822    #[doc = " @param path The path of the file."]
823    #[doc = " @param start The start of the block."]
824    #[doc = " @param length The length of the block."]
825    #[doc = " @return Returns a dynamically-allocated 2-d array of blocks-hosts;"]
826    #[doc = " NULL on error."]
827    pub fn hdfsGetHosts(
828        fs: hdfsFS,
829        path: *const ::std::os::raw::c_char,
830        start: tOffset,
831        length: tOffset,
832    ) -> *mut *mut *mut ::std::os::raw::c_char;
833}
834extern "C" {
835    #[doc = " hdfsFreeHosts - Free up the structure returned by hdfsGetHosts"]
836    #[doc = " @param hdfsFileInfo The array of dynamically-allocated hdfsFileInfo"]
837    #[doc = " objects."]
838    #[doc = " @param numEntries The size of the array."]
839    pub fn hdfsFreeHosts(blockHosts: *mut *mut *mut ::std::os::raw::c_char);
840}
841extern "C" {
842    #[doc = " hdfsGetDefaultBlockSize - Get the default blocksize."]
843    #[doc = ""]
844    #[doc = " @param fs            The configured filesystem handle."]
845    #[doc = " @deprecated          Use hdfsGetDefaultBlockSizeAtPath instead."]
846    #[doc = ""]
847    #[doc = " @return              Returns the default blocksize, or -1 on error."]
848    pub fn hdfsGetDefaultBlockSize(fs: hdfsFS) -> tOffset;
849}
850extern "C" {
851    #[doc = " hdfsGetCapacity - Return the raw capacity of the filesystem."]
852    #[doc = " @param fs The configured filesystem handle."]
853    #[doc = " @return Returns the raw-capacity; -1 on error."]
854    pub fn hdfsGetCapacity(fs: hdfsFS) -> tOffset;
855}
856extern "C" {
857    #[doc = " hdfsGetUsed - Return the total raw size of all files in the filesystem."]
858    #[doc = " @param fs The configured filesystem handle."]
859    #[doc = " @return Returns the total-size; -1 on error."]
860    pub fn hdfsGetUsed(fs: hdfsFS) -> tOffset;
861}
862extern "C" {
863    #[doc = " Change the user and/or group of a file or directory."]
864    #[doc = ""]
865    #[doc = " @param fs            The configured filesystem handle."]
866    #[doc = " @param path          the path to the file or directory"]
867    #[doc = " @param owner         User string.  Set to NULL for 'no change'"]
868    #[doc = " @param group         Group string.  Set to NULL for 'no change'"]
869    #[doc = " @return              0 on success else -1"]
870    pub fn hdfsChown(
871        fs: hdfsFS,
872        path: *const ::std::os::raw::c_char,
873        owner: *const ::std::os::raw::c_char,
874        group: *const ::std::os::raw::c_char,
875    ) -> ::std::os::raw::c_int;
876}
877extern "C" {
878    #[doc = " hdfsChmod"]
879    #[doc = " @param fs The configured filesystem handle."]
880    #[doc = " @param path the path to the file or directory"]
881    #[doc = " @param mode the bitmask to set it to"]
882    #[doc = " @return 0 on success else -1"]
883    pub fn hdfsChmod(
884        fs: hdfsFS,
885        path: *const ::std::os::raw::c_char,
886        mode: ::std::os::raw::c_short,
887    ) -> ::std::os::raw::c_int;
888}
889extern "C" {
890    #[doc = " hdfsUtime"]
891    #[doc = " @param fs The configured filesystem handle."]
892    #[doc = " @param path the path to the file or directory"]
893    #[doc = " @param mtime new modification time or -1 for no change"]
894    #[doc = " @param atime new access time or -1 for no change"]
895    #[doc = " @return 0 on success else -1"]
896    pub fn hdfsUtime(
897        fs: hdfsFS,
898        path: *const ::std::os::raw::c_char,
899        mtime: tTime,
900        atime: tTime,
901    ) -> ::std::os::raw::c_int;
902}
903extern "C" {
904    #[doc = " hdfsTruncate - Truncate the file in the indicated path to the indicated size."]
905    #[doc = " @param fs The configured filesystem handle."]
906    #[doc = " @param path the path to the file."]
907    #[doc = " @param pos the position the file will be truncated to."]
908    #[doc = " @param shouldWait output value, true if and client does not need to wait for block recovery,"]
909    #[doc = " false if client needs to wait for block recovery."]
910    pub fn hdfsTruncate(
911        fs: hdfsFS,
912        path: *const ::std::os::raw::c_char,
913        pos: tOffset,
914        shouldWait: *mut ::std::os::raw::c_int,
915    ) -> ::std::os::raw::c_int;
916}
917extern "C" {
918    #[doc = " Get a delegation token from namenode."]
919    #[doc = " The token should be freed using hdfsFreeDelegationToken after canceling the token or token expired."]
920    #[doc = ""]
921    #[doc = " @param fs The file system"]
922    #[doc = " @param renewer The user who will renew the token"]
923    #[doc = ""]
924    #[doc = " @return Return a delegation token, NULL on error."]
925    pub fn hdfsGetDelegationToken(
926        fs: hdfsFS,
927        renewer: *const ::std::os::raw::c_char,
928    ) -> *mut ::std::os::raw::c_char;
929}
930extern "C" {
931    #[doc = " Free a delegation token."]
932    #[doc = ""]
933    #[doc = " @param token The token to be freed."]
934    pub fn hdfsFreeDelegationToken(token: *mut ::std::os::raw::c_char);
935}
936extern "C" {
937    #[doc = " Renew a delegation token."]
938    #[doc = ""]
939    #[doc = " @param fs The file system."]
940    #[doc = " @param token The token to be renewed."]
941    #[doc = ""]
942    #[doc = " @return the new expiration time"]
943    pub fn hdfsRenewDelegationToken(fs: hdfsFS, token: *const ::std::os::raw::c_char) -> i64;
944}
945extern "C" {
946    #[doc = " Cancel a delegation token."]
947    #[doc = ""]
948    #[doc = " @param fs The file system."]
949    #[doc = " @param token The token to be canceled."]
950    #[doc = ""]
951    #[doc = " @return return 0 on success, -1 on error."]
952    pub fn hdfsCancelDelegationToken(
953        fs: hdfsFS,
954        token: *const ::std::os::raw::c_char,
955    ) -> ::std::os::raw::c_int;
956}
957#[repr(C)]
958#[derive(Debug, Copy, Clone)]
959pub struct Namenode {
960    pub rpc_addr: *mut ::std::os::raw::c_char,
961    pub http_addr: *mut ::std::os::raw::c_char,
962}
963#[test]
964fn bindgen_test_layout_Namenode() {
965    assert_eq!(
966        ::std::mem::size_of::<Namenode>(),
967        16usize,
968        concat!("Size of: ", stringify!(Namenode))
969    );
970    assert_eq!(
971        ::std::mem::align_of::<Namenode>(),
972        8usize,
973        concat!("Alignment of ", stringify!(Namenode))
974    );
975    assert_eq!(
976        unsafe { &(*(::std::ptr::null::<Namenode>())).rpc_addr as *const _ as usize },
977        0usize,
978        concat!(
979            "Offset of field: ",
980            stringify!(Namenode),
981            "::",
982            stringify!(rpc_addr)
983        )
984    );
985    assert_eq!(
986        unsafe { &(*(::std::ptr::null::<Namenode>())).http_addr as *const _ as usize },
987        8usize,
988        concat!(
989            "Offset of field: ",
990            stringify!(Namenode),
991            "::",
992            stringify!(http_addr)
993        )
994    );
995}
996extern "C" {
997    #[doc = " If hdfs is configured with HA namenode, return all namenode informations as an array."]
998    #[doc = " Else return NULL."]
999    #[doc = ""]
1000    #[doc = " Using configure file which is given by environment parameter LIBHDFS3_CONF"]
1001    #[doc = " or \"hdfs-client.xml\" in working directory."]
1002    #[doc = ""]
1003    #[doc = " @param nameservice hdfs name service id."]
1004    #[doc = " @param size output the size of returning array."]
1005    #[doc = ""]
1006    #[doc = " @return return an array of all namenode information."]
1007    pub fn hdfsGetHANamenodes(
1008        nameservice: *const ::std::os::raw::c_char,
1009        size: *mut ::std::os::raw::c_int,
1010    ) -> *mut Namenode;
1011}
1012extern "C" {
1013    #[doc = " If hdfs is configured with HA namenode, return all namenode informations as an array."]
1014    #[doc = " Else return NULL."]
1015    #[doc = ""]
1016    #[doc = " @param conf the path of configure file."]
1017    #[doc = " @param nameservice hdfs name service id."]
1018    #[doc = " @param size output the size of returning array."]
1019    #[doc = ""]
1020    #[doc = " @return return an array of all namenode information."]
1021    pub fn hdfsGetHANamenodesWithConfig(
1022        conf: *const ::std::os::raw::c_char,
1023        nameservice: *const ::std::os::raw::c_char,
1024        size: *mut ::std::os::raw::c_int,
1025    ) -> *mut Namenode;
1026}
1027extern "C" {
1028    #[doc = " Free the array returned by hdfsGetConfiguredNamenodes()"]
1029    #[doc = ""]
1030    #[doc = " @param the array return by hdfsGetConfiguredNamenodes()"]
1031    pub fn hdfsFreeNamenodeInformation(namenodes: *mut Namenode, size: ::std::os::raw::c_int);
1032}
1033#[repr(C)]
1034#[derive(Debug, Copy, Clone)]
1035pub struct BlockLocation {
1036    pub rangeId: u32,
1037    pub replicaGroupId: u32,
1038    pub corrupt: ::std::os::raw::c_int,
1039    pub numOfNodes: ::std::os::raw::c_int,
1040    pub hosts: *mut *mut ::std::os::raw::c_char,
1041    pub names: *mut *mut ::std::os::raw::c_char,
1042    pub topologyPaths: *mut *mut ::std::os::raw::c_char,
1043    pub length: tOffset,
1044    pub offset: tOffset,
1045}
1046#[test]
1047fn bindgen_test_layout_BlockLocation() {
1048    assert_eq!(
1049        ::std::mem::size_of::<BlockLocation>(),
1050        56usize,
1051        concat!("Size of: ", stringify!(BlockLocation))
1052    );
1053    assert_eq!(
1054        ::std::mem::align_of::<BlockLocation>(),
1055        8usize,
1056        concat!("Alignment of ", stringify!(BlockLocation))
1057    );
1058    assert_eq!(
1059        unsafe { &(*(::std::ptr::null::<BlockLocation>())).rangeId as *const _ as usize },
1060        0usize,
1061        concat!(
1062            "Offset of field: ",
1063            stringify!(BlockLocation),
1064            "::",
1065            stringify!(rangeId)
1066        )
1067    );
1068    assert_eq!(
1069        unsafe { &(*(::std::ptr::null::<BlockLocation>())).replicaGroupId as *const _ as usize },
1070        4usize,
1071        concat!(
1072            "Offset of field: ",
1073            stringify!(BlockLocation),
1074            "::",
1075            stringify!(replicaGroupId)
1076        )
1077    );
1078    assert_eq!(
1079        unsafe { &(*(::std::ptr::null::<BlockLocation>())).corrupt as *const _ as usize },
1080        8usize,
1081        concat!(
1082            "Offset of field: ",
1083            stringify!(BlockLocation),
1084            "::",
1085            stringify!(corrupt)
1086        )
1087    );
1088    assert_eq!(
1089        unsafe { &(*(::std::ptr::null::<BlockLocation>())).numOfNodes as *const _ as usize },
1090        12usize,
1091        concat!(
1092            "Offset of field: ",
1093            stringify!(BlockLocation),
1094            "::",
1095            stringify!(numOfNodes)
1096        )
1097    );
1098    assert_eq!(
1099        unsafe { &(*(::std::ptr::null::<BlockLocation>())).hosts as *const _ as usize },
1100        16usize,
1101        concat!(
1102            "Offset of field: ",
1103            stringify!(BlockLocation),
1104            "::",
1105            stringify!(hosts)
1106        )
1107    );
1108    assert_eq!(
1109        unsafe { &(*(::std::ptr::null::<BlockLocation>())).names as *const _ as usize },
1110        24usize,
1111        concat!(
1112            "Offset of field: ",
1113            stringify!(BlockLocation),
1114            "::",
1115            stringify!(names)
1116        )
1117    );
1118    assert_eq!(
1119        unsafe { &(*(::std::ptr::null::<BlockLocation>())).topologyPaths as *const _ as usize },
1120        32usize,
1121        concat!(
1122            "Offset of field: ",
1123            stringify!(BlockLocation),
1124            "::",
1125            stringify!(topologyPaths)
1126        )
1127    );
1128    assert_eq!(
1129        unsafe { &(*(::std::ptr::null::<BlockLocation>())).length as *const _ as usize },
1130        40usize,
1131        concat!(
1132            "Offset of field: ",
1133            stringify!(BlockLocation),
1134            "::",
1135            stringify!(length)
1136        )
1137    );
1138    assert_eq!(
1139        unsafe { &(*(::std::ptr::null::<BlockLocation>())).offset as *const _ as usize },
1140        48usize,
1141        concat!(
1142            "Offset of field: ",
1143            stringify!(BlockLocation),
1144            "::",
1145            stringify!(offset)
1146        )
1147    );
1148}
1149extern "C" {
1150    #[doc = " Get an array containing hostnames, offset and size of portions of the given file."]
1151    #[doc = ""]
1152    #[doc = " @param fs The file system"]
1153    #[doc = " @param path The path to the file"]
1154    #[doc = " @param start The start offset into the given file"]
1155    #[doc = " @param length The length for which to get locations for"]
1156    #[doc = " @param numOfBlock Output the number of elements in the returned array"]
1157    #[doc = ""]
1158    #[doc = " @return An array of BlockLocation struct."]
1159    pub fn hdfsGetFileBlockLocations(
1160        fs: hdfsFS,
1161        path: *const ::std::os::raw::c_char,
1162        start: tOffset,
1163        length: tOffset,
1164        numOfBlock: *mut ::std::os::raw::c_int,
1165    ) -> *mut BlockLocation;
1166}
1167extern "C" {
1168    #[doc = " Free the BlockLocation array returned by hdfsGetFileBlockLocations"]
1169    #[doc = ""]
1170    #[doc = " @param locations The array returned by hdfsGetFileBlockLocations"]
1171    #[doc = " @param numOfBlock The number of elements in the locaitons"]
1172    pub fn hdfsFreeFileBlockLocations(
1173        locations: *mut BlockLocation,
1174        numOfBlock: ::std::os::raw::c_int,
1175    );
1176}
1177extern "C" {
1178    #[doc = " Create encryption zone for the directory with specific key name"]
1179    #[doc = " @param fs The configured filesystem handle."]
1180    #[doc = " @param path The path of the directory."]
1181    #[doc = " @param keyname The key name of the encryption zone"]
1182    #[doc = " @return Returns 0 on success, -1 on error."]
1183    pub fn hdfsCreateEncryptionZone(
1184        fs: hdfsFS,
1185        path: *const ::std::os::raw::c_char,
1186        keyName: *const ::std::os::raw::c_char,
1187    ) -> ::std::os::raw::c_int;
1188}
1189extern "C" {
1190    #[doc = " hdfsEncryptionZoneInfo - Get information about a path as a (dynamically"]
1191    #[doc = " allocated) single hdfsEncryptionZoneInfo struct. hdfsEncryptionZoneInfo should be"]
1192    #[doc = " called when the pointer is no longer needed."]
1193    #[doc = " @param fs The configured filesystem handle."]
1194    #[doc = " @param path The path of the encryption zone."]
1195    #[doc = " @return Returns a dynamically-allocated hdfsEncryptionZoneInfo object;"]
1196    #[doc = " NULL on error."]
1197    pub fn hdfsGetEZForPath(
1198        fs: hdfsFS,
1199        path: *const ::std::os::raw::c_char,
1200    ) -> *mut hdfsEncryptionZoneInfo;
1201}
1202extern "C" {
1203    #[doc = " hdfsEncryptionZoneInfo -  Get list of all the encryption zones."]
1204    #[doc = " hdfsFreeEncryptionZoneInfo should be called to deallocate memory."]
1205    #[doc = " @param fs The configured filesystem handle."]
1206    #[doc = " @return Returns a dynamically-allocated array of hdfsEncryptionZoneInfo objects;"]
1207    #[doc = " NULL on error."]
1208    pub fn hdfsListEncryptionZones(
1209        fs: hdfsFS,
1210        numEntries: *mut ::std::os::raw::c_int,
1211    ) -> *mut hdfsEncryptionZoneInfo;
1212}