lib/ffi/gdal/cpl_vsi.rb in ffi-gdal-0.0.3 vs lib/ffi/gdal/cpl_vsi.rb in ffi-gdal-0.0.4

- old
+ new

@@ -1,119 +1,112 @@ -require 'ffi' - - module FFI module GDAL - module CPLVSI - extend ::FFI::Library - ffi_lib 'gdal' - #------------------------------------------------------------------------ - # Defines - #------------------------------------------------------------------------ - VSI_STAT_EXISTS_FLAG = 0x1 - VSI_STAT_NATURE_FLAG = 0x2 - VSI_STAT_SIZE_FLAG = 0x4 + #------------------------------------------------------------------------ + # Defines + #------------------------------------------------------------------------ + VSI_STAT_EXISTS_FLAG = 0x1 + VSI_STAT_NATURE_FLAG = 0x2 + VSI_STAT_SIZE_FLAG = 0x4 - #------------------------------------------------------------------------ - # Typedefs - #------------------------------------------------------------------------ - # Dupes from cpl_conv.rb. Can't figure out how to get these defined - # from just including the module... - typedef :long_long, :GIntBig - typedef :ulong_long, :GUIntBig + #------------------------------------------------------------------------ + # Typedefs + #------------------------------------------------------------------------ + # Dupes from cpl_conv.rb. Can't figure out how to get these defined + # from just including the module... + typedef :long_long, :GIntBig + typedef :ulong_long, :GUIntBig - typedef :GUIntBig, :vsi_l_offset - callback :VSIWriteFunction, %i[pointer size_t size_t pointer], :pointer + typedef :GUIntBig, :vsi_l_offset + callback :VSIWriteFunction, %i[pointer size_t size_t pointer], :pointer - #------------------------------------------------------------------------ - # Functions - #------------------------------------------------------------------------ - attach_function :VSIFOpen, %i[string string], :pointer - attach_function :VSIFClose, %i[pointer], :int - attach_function :VSIFSeek, %i[pointer long int], :int - attach_function :VSIFTell, %i[pointer], :long - attach_function :VSIRewind, %i[pointer], :void - attach_function :VSIFFlush, %i[pointer], :void - attach_function :VSIFRead, %i[pointer size_t size_t pointer], :size_t - attach_function :VSIFWrite, %i[pointer size_t size_t pointer], :size_t - attach_function :VSIFGets, %i[pointer int pointer], :string - attach_function :VSIFPuts, %i[string pointer], :int - attach_function :VSIFPrintf, %i[pointer string varargs], :int - attach_function :VSIFGetc, %i[pointer], :int - attach_function :VSIFPutc, %i[int pointer], :int + #------------------------------------------------------------------------ + # Functions + #------------------------------------------------------------------------ + attach_function :VSIFOpen, %i[string string], :pointer + attach_function :VSIFClose, %i[pointer], :int + attach_function :VSIFSeek, %i[pointer long int], :int + attach_function :VSIFTell, %i[pointer], :long + attach_function :VSIRewind, %i[pointer], :void + attach_function :VSIFFlush, %i[pointer], :void + attach_function :VSIFRead, %i[pointer size_t size_t pointer], :size_t + attach_function :VSIFWrite, %i[pointer size_t size_t pointer], :size_t + attach_function :VSIFGets, %i[pointer int pointer], :string + attach_function :VSIFPuts, %i[string pointer], :int + attach_function :VSIFPrintf, %i[pointer string varargs], :int + attach_function :VSIFGetc, %i[pointer], :int + attach_function :VSIFPutc, %i[int pointer], :int - attach_function :VSIUngetc, %i[int pointer], :int - attach_function :VSIFEof, %i[pointer], :int - attach_function :VSIStat, %i[string pointer], :int + attach_function :VSIUngetc, %i[int pointer], :int + attach_function :VSIFEof, %i[pointer], :int + attach_function :VSIStat, %i[string pointer], :int - attach_function :VSIFOpenL, %i[string string], :pointer - attach_function :VSIFCloseL, %i[pointer], :int - attach_function :VSIFSeekL, %i[pointer vsi_l_offset int], :int - attach_function :VSIFTellL, %i[pointer], :vsi_l_offset - attach_function :VSIRewindL, %i[pointer], :void - attach_function :VSIFReadL, %i[pointer size_t size_t pointer], :size_t - attach_function :VSIFReadMultiRangeL, - %i[int pointer pointer pointer pointer], - :int - attach_function :VSIFWriteL, %i[pointer size_t size_t pointer], :size_t - attach_function :VSIFEofL, %i[pointer], :int - attach_function :VSIFTruncateL, %i[pointer vsi_l_offset], :int - attach_function :VSIFFlushL, %i[pointer], :int - attach_function :VSIFPrintfL, %i[pointer string varargs], :int - attach_function :VSIFPutcL, %i[int pointer], :int - attach_function :VSIIngestFile, - %i[pointer string pointer pointer GIntBig], - :int - attach_function :VSIStatL, %i[string pointer], :int - attach_function :VSIStatExL, %i[string pointer int], :int + attach_function :VSIFOpenL, %i[string string], :pointer + attach_function :VSIFCloseL, %i[pointer], :int + attach_function :VSIFSeekL, %i[pointer vsi_l_offset int], :int + attach_function :VSIFTellL, %i[pointer], :vsi_l_offset + attach_function :VSIRewindL, %i[pointer], :void + attach_function :VSIFReadL, %i[pointer size_t size_t pointer], :size_t + #attach_function :VSIFReadMultiRangeL, + # %i[int pointer pointer pointer pointer], + # :int + attach_function :VSIFWriteL, %i[pointer size_t size_t pointer], :size_t + attach_function :VSIFEofL, %i[pointer], :int + #attach_function :VSIFTruncateL, %i[pointer vsi_l_offset], :int + attach_function :VSIFFlushL, %i[pointer], :int + attach_function :VSIFPrintfL, %i[pointer string varargs], :int + attach_function :VSIFPutcL, %i[int pointer], :int + #attach_function :VSIIngestFile, + # %i[pointer string pointer pointer GIntBig], + # :int + attach_function :VSIStatL, %i[string pointer], :int + #attach_function :VSIStatExL, %i[string pointer int], :int - attach_function :VSIIsCaseSensitiveFS, %i[string], :int - attach_function :VSIFGetNativeFileDescriptorL, %i[pointer], :pointer + #attach_function :VSIIsCaseSensitiveFS, %i[string], :int + #attach_function :VSIFGetNativeFileDescriptorL, %i[pointer], :pointer - attach_function :VSICalloc, %i[size_t size_t], :pointer - attach_function :VSIMalloc, %i[size_t], :pointer - attach_function :VSIFree, %i[pointer], :void - attach_function :VSIRealloc, %i[pointer size_t], :pointer - attach_function :VSIStrdup, %i[string], :string - attach_function :VSIMalloc2, %i[size_t size_t], :pointer - attach_function :VSIMalloc3, %i[size_t size_t size_t], :pointer + attach_function :VSICalloc, %i[size_t size_t], :pointer + attach_function :VSIMalloc, %i[size_t], :pointer + attach_function :VSIFree, %i[pointer], :void + attach_function :VSIRealloc, %i[pointer size_t], :pointer + attach_function :VSIStrdup, %i[string], :string + attach_function :VSIMalloc2, %i[size_t size_t], :pointer + attach_function :VSIMalloc3, %i[size_t size_t size_t], :pointer - attach_function :VSIReadDir, %i[string], :pointer - attach_function :VSIReadDirRecursive, %i[string], :pointer - attach_function :VSIMkdir, %i[string long], :int - attach_function :VSIRmdir, %i[string], :int - attach_function :VSIUnlink, %i[string], :int - attach_function :VSIRename, %i[string string], :int + attach_function :VSIReadDir, %i[string], :pointer + #attach_function :VSIReadDirRecursive, %i[string], :pointer + attach_function :VSIMkdir, %i[string long], :int + attach_function :VSIRmdir, %i[string], :int + attach_function :VSIUnlink, %i[string], :int + attach_function :VSIRename, %i[string string], :int - attach_function :VSIStrerror, %i[int], :string + attach_function :VSIStrerror, %i[int], :string - attach_function :VSIInstallMemFileHandler, [], :void - attach_function :VSIInstallLargeFileHandler, [], :void - attach_function :VSIInstallSubFileHandler, [], :void - attach_function :VSIInstallCurlFileHandler, [], :void - attach_function :VSIInstallCurlStreamingFileHandler, [], :void - attach_function :VSIInstallGZipFileHandler, [], :void - attach_function :VSIInstallZipFileHandler, [], :void - attach_function :VSIInstallStdinHandler, [], :void - attach_function :VSIInstallStdoutHandler, [], :void - attach_function :VSIInstallSparseFileHandler, [], :void - attach_function :VSIInstallTarFileHandler, [], :void - attach_function :VSICleanupFileManager, [], :void + attach_function :VSIInstallMemFileHandler, [], :void + attach_function :VSIInstallLargeFileHandler, [], :void + attach_function :VSIInstallSubFileHandler, [], :void + #attach_function :VSIInstallCurlFileHandler, [], :void + #attach_function :VSIInstallCurlStreamingFileHandler, [], :void + #attach_function :VSIInstallGZipFileHandler, [], :void + #attach_function :VSIInstallZipFileHandler, [], :void + #attach_function :VSIInstallStdinHandler, [], :void + #attach_function :VSIInstallStdoutHandler, [], :void + #attach_function :VSIInstallSparseFileHandler, [], :void + #attach_function :VSIInstallTarFileHandler, [], :void + #attach_function :VSICleanupFileManager, [], :void - attach_function :VSIFileFromMemBuffer, - %i[string pointer vsi_l_offset int], - :pointer - attach_function :VSIGetMemFileBuffer, - %i[string pointer int], - :pointer - # attach_function :VSIStdoutSetRedirection, - # %i[VSIWriteFunction pointer], - # :pointer + attach_function :VSIFileFromMemBuffer, + %i[string pointer vsi_l_offset int], + :pointer + attach_function :VSIGetMemFileBuffer, + %i[string pointer int], + :pointer + # attach_function :VSIStdoutSetRedirection, + # %i[VSIWriteFunction pointer], + # :pointer - attach_function :VSITime, %i[pointer], :ulong - attach_function :VSICTime, %i[ulong], :string - attach_function :VSIGMTime, %i[pointer pointer], :pointer - attach_function :VSILocalTime, %i[pointer pointer], :pointer - end + attach_function :VSITime, %i[pointer], :ulong + attach_function :VSICTime, %i[ulong], :string + attach_function :VSIGMTime, %i[pointer pointer], :pointer + attach_function :VSILocalTime, %i[pointer pointer], :pointer end end