qemu-patch-raspberry4/include/scsi/pr-manager.h
Eduardo Habkost c821774a3b Use OBJECT_DECLARE_TYPE where possible
Replace DECLARE_OBJ_CHECKERS with OBJECT_DECLARE_TYPE where the
typedefs can be safely removed.

Generated running:

$ ./scripts/codeconverter/converter.py -i \
  --pattern=DeclareObjCheckers $(git grep -l '' -- '*.[ch]')

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20200831210740.126168-16-ehabkost@redhat.com>
Message-Id: <20200831210740.126168-17-ehabkost@redhat.com>
Message-Id: <20200831210740.126168-18-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2020-09-09 09:27:11 -04:00

43 lines
967 B
C

#ifndef PR_MANAGER_H
#define PR_MANAGER_H
#include "qom/object.h"
#include "qapi/visitor.h"
#include "qom/object_interfaces.h"
#include "block/aio.h"
#include "qemu/coroutine.h"
#define TYPE_PR_MANAGER "pr-manager"
OBJECT_DECLARE_TYPE(PRManager, PRManagerClass,
pr_manager, PR_MANAGER)
struct sg_io_hdr;
struct PRManager {
/* <private> */
Object parent;
};
/**
* PRManagerClass:
* @parent_class: the base class
* @run: callback invoked in thread pool context
*/
struct PRManagerClass {
/* <private> */
ObjectClass parent_class;
/* <public> */
int (*run)(PRManager *pr_mgr, int fd, struct sg_io_hdr *hdr);
bool (*is_connected)(PRManager *pr_mgr);
};
bool pr_manager_is_connected(PRManager *pr_mgr);
int coroutine_fn pr_manager_execute(PRManager *pr_mgr, AioContext *ctx, int fd,
struct sg_io_hdr *hdr);
PRManager *pr_manager_lookup(const char *id, Error **errp);
#endif