*/
struct callback_query {
/** The function to be called. */
- callback_function *handler;
+ afs_callback *handler;
/** The number of bytes of the query */
size_t query_size;
};
*
* \sa send_option_arg_callback_request(), send_standard_callback_request().
*/
-int send_callback_request(callback_function *f, struct osl_object *query,
+int send_callback_request(afs_callback *f, struct osl_object *query,
callback_result_handler *result_handler,
void *private_result_data)
{
* \sa send_standard_callback_request(), send_callback_request().
*/
int send_option_arg_callback_request(struct osl_object *options,
- int argc, char * const * const argv, callback_function *f,
+ int argc, char * const * const argv, afs_callback *f,
callback_result_handler *result_handler,
void *private_result_data)
{
* send_option_arg_callback_request().
*/
int send_standard_callback_request(int argc, char * const * const argv,
- callback_function *f, callback_result_handler *result_handler,
+ afs_callback *f, callback_result_handler *result_handler,
void *private_result_data)
{
return send_option_arg_callback_request(NULL, argc, argv, f, result_handler,
*
* \sa send_callback_request().
*/
-typedef int callback_function(int fd, const struct osl_object *);
+typedef int afs_callback(int fd, const struct osl_object *);
/**
* Callbacks send chunks to data back to the command handler. Pointers to
__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(callback_function *f, struct osl_object *query,
+int send_callback_request(afs_callback *f, struct osl_object *query,
callback_result_handler *result_handler,
void *private_result_data);
int send_option_arg_callback_request(struct osl_object *options,
- int argc, char * const * const argv, callback_function *f,
+ int argc, char * const * const argv, afs_callback *f,
callback_result_handler *result_handler,
void *private_result_data);
int send_standard_callback_request(int argc, char * const * const argv,
- callback_function *f, callback_result_handler *result_handler,
+ afs_callback *f, callback_result_handler *result_handler,
void *private_result_data);
int string_compare(const struct osl_object *obj1, const struct osl_object *obj2);
int for_each_matching_row(struct pattern_match_data *pmd);
return ret;
}
-static int com_lsblob(callback_function *f, struct command_context *cc)
+static int com_lsblob(afs_callback *f, struct command_context *cc)
{
uint32_t flags = 0;
struct osl_object options = {.data = &flags, .size = sizeof(flags)};
return ret;
}
-static int com_catblob(callback_function *f, struct command_context *cc)
+static int com_catblob(afs_callback *f, struct command_context *cc)
{
if (cc->argc < 2)
return -E_BLOB_SYNTAX;
return ret;
}
-static int com_rmblob(callback_function *f, struct command_context *cc)
+static int com_rmblob(afs_callback *f, struct command_context *cc)
{
if (cc->argc < 2)
return -E_MOOD_SYNTAX;
* afs process via the callback method.
*/
static int stdin_command(struct command_context *cc, struct osl_object *arg_obj,
- callback_function *f)
+ afs_callback *f)
{
struct osl_object query, stdin_obj;
int ret;
return ret;
}
-static int com_addblob(callback_function *f, struct command_context *cc)
+static int com_addblob(afs_callback *f, struct command_context *cc)
{
struct osl_object arg_obj;
return ret;
}
-static int com_mvblob(callback_function *f, struct command_context *cc)
+static int com_mvblob(afs_callback *f, struct command_context *cc)
{
if (cc->argc != 3)
return -E_MOOD_SYNTAX;