-/* afs */
-typedef int callback_function(const struct osl_object *, struct osl_object *);
-int send_callback_request(callback_function *f, struct osl_object *query,
- struct osl_object *result);
-int send_standard_callback_request(int argc, const char **argv,
- callback_function *f, struct osl_object *result);
+/**
+ * Standard max_size handler for AFS commands.
+ *
+ * \param buf Contains (part of) the AFS command output.
+ * \param size The number of bytes in \a buf.
+ * \param private Pointer to a \ref afs_max_size_handler_data structure.
+ *
+ * Whenever the output of an AFS command exceeds the maximal size of a shared
+ * memory area, the max size handler of the para_buffer which holds the command
+ * output is called with \a private being a pointer to a structure of type
+ * afs_max_size_handler_data.
+ *
+ * \return The return value of the underlying call to \ref
+ * pass_buffer_as_shm().
+ */
+_static_inline_ int afs_max_size_handler(char *buf, size_t size, void *private)
+{
+ struct afs_max_size_handler_data *amshd = private;
+ return pass_buffer_as_shm(amshd->fd, amshd->band, buf, size);
+}
+
+__noreturn void afs_init(uint32_t cookie, int socket_fd);
+__must_check int afs_event(enum afs_events event, struct para_buffer *pb,
+ void *data);
+int send_callback_request(afs_callback *f, struct osl_object *query,
+ callback_result_handler *result_handler,
+ void *private_result_data);