Class
VipsTarget
since: 8.0
Description [src]
class Vips.Target : Vips.Connection
{
/* No available fields */
}
A VipsTarget provides a unified interface for writing data to various
output destinations.
This target could be a socket, file, memory area, or any other destination that accepts byte data.
Available since: 8.0
Constructors
vips_target_new_temp
Create a temporary target — either a temporary file on disc, or an area in
memory, depending on what sort of target based_on is.
since: 8.0
vips_target_new_to_descriptor
Create a target attached to a file descriptor.
descriptor is kept open until the target is finalized.
since: 8.0
vips_target_new_to_memory
Create a target which will write to a memory area. Read from blob to get memory.
since: 8.0
Instance methods
vips_target_end
Call this at the end of write to make the target do any cleaning up. You can call it many times.
since: 8.0
vips_target_putc
Write a single character ch to target. See the macro VIPS_TARGET_PUTC()
for a faster way to do this.
since: 8.0
vips_target_read
Read up to length bytes from target and store the bytes in buffer.
Return the number of bytes actually read. If all bytes have been read from
the file, return 0.
since: 8.0
vips_target_steal
Memory targets only (see vips_target_new_to_memory()). Steal all data
written to the target so far, and call vips_target_end().
since: 8.0
vips_target_write_amp
Write str to target, but escape stuff that xml hates in text. Our
argument string is utf-8.
since: 8.0
Methods inherited from VipsConnection (2)
vips_connection_filename
since: 8.0
vips_connection_nick
since: 8.0
Methods inherited from VipsObject (27)
Please see VipsObject for a full list of methods.
Properties
Properties inherited from VipsConnection (2)
Vips.Connection:descriptor
since: 8.0
Vips.Connection:filename
since: 8.0
Properties inherited from VipsObject (2)
Vips.Object:description
since: 8.0
Vips.Object:nickname
since: 8.0
Signals
Signals inherited from VipsObject (4)
VipsObject::close
The ::close signal is emitted once during object close. The object is dying and may not work.
since: 8.0
VipsObject::postbuild
The ::postbuild signal is emitted once just after successful object construction. Return non-zero to cause object construction to fail.
since: 8.0
VipsObject::postclose
The ::postclose signal is emitted once after object close. The object pointer is still valid, but nothing else.
since: 8.0
VipsObject::preclose
The ::preclose signal is emitted once just before object close starts. The object is still alive.
since: 8.0
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
since: 2.0
Class structure
struct VipsTargetClass {
VipsConnectionClass parent_class;
gint64 (* write) (
VipsTarget* target,
void* data,
size_t length
);
void (* finish) (
VipsTarget* target
);
gint64 (* read) (
VipsTarget* target,
void* buffer,
size_t length
);
gint64 (* seek) (
VipsTarget* target,
gint64 offset,
int whence
);
int (* end) (
VipsTarget* target
);
}
Class members
parent_class: VipsConnectionClass- No description available.
write: gint64 (* write) ( VipsTarget* target, void* data, size_t length )- No description available.
finish: void (* finish) ( VipsTarget* target )- No description available.
read: gint64 (* read) ( VipsTarget* target, void* buffer, size_t length )- No description available.
seek: gint64 (* seek) ( VipsTarget* target, gint64 offset, int whence )- No description available.
end: int (* end) ( VipsTarget* target )- No description available.
Virtual methods
Vips.TargetClass.end
Call this at the end of write to make the target do any cleaning up. You can call it many times.
since: 8.0
Vips.TargetClass.read
Read up to length bytes from target and store the bytes in buffer.
Return the number of bytes actually read. If all bytes have been read from
the file, return 0.
since: 8.0