#include <provider.h>
Public Attributes | |
| int(* | getattr )(struct statefs_property const *) |
| statefs_ssize_t(* | size )(struct statefs_property const *) |
| statefs_handle_t(* | open )(struct statefs_property *self, int flags) |
| int(* | read )(statefs_handle_t h, char *dst, statefs_size_t len, statefs_off_t off) |
| int(* | write )(statefs_handle_t, char const *, statefs_size_t, statefs_off_t) |
| void(* | close )(statefs_handle_t) |
| bool(* | connect )(struct statefs_property *, struct statefs_slot *) |
| void(* | disconnect )(struct statefs_property *) |
API to access properties. The API itself can be accessed concurently but access to separate properties and opened property handles is serialized.
| void(* statefs_io::close)(statefs_handle_t) |
close I/O handle
| bool(* statefs_io::connect)(struct statefs_property *, struct statefs_slot *) |
connect discrete property to server slot, provider should invoke statefs_slot.on_changed() when property value is changed
| void(* statefs_io::disconnect)(struct statefs_property *) |
disconnect previously connected slot
| int(* statefs_io::getattr)(struct statefs_property const *) |
get property attributes
| mask | STATEFS_ATTR_DISCRETE | STATEFS_ATTR_WRITE | STATEFS_ATTR_READ |
| statefs_handle_t(* statefs_io::open)(struct statefs_property *self, int flags) |
open property for I/O
| flags | [O_RDONLY, O_RDWR, O_WRONLY] |
| opaque | handle to be used for I/O operations |
| int(* statefs_io::read)(statefs_handle_t h, char *dst, statefs_size_t len, statefs_off_t off) |
read property value (len bytes starting from off)
| statefs_ssize_t(* statefs_io::size)(struct statefs_property const *) |
get property size. If property length is variable it is better to return maximum property size
| int(* statefs_io::write)(statefs_handle_t, char const *, statefs_size_t, statefs_off_t) |
write property value (len bytes starting from off)
1.8.3.1