4 #include "qom/object.h"
5 #include "qapi/visitor.h"
6 #include "qom/object_interfaces.h"
9 #define TYPE_PR_MANAGER "pr-manager"
11 OBJECT_DECLARE_TYPE(PRManager
, PRManagerClass
,
23 * @parent_class: the base class
24 * @run: callback invoked in thread pool context
26 struct PRManagerClass
{
28 ObjectClass parent_class
;
31 int (*run
)(PRManager
*pr_mgr
, int fd
, struct sg_io_hdr
*hdr
);
32 bool (*is_connected
)(PRManager
*pr_mgr
);
35 bool pr_manager_is_connected(PRManager
*pr_mgr
);
36 int coroutine_fn
pr_manager_execute(PRManager
*pr_mgr
, AioContext
*ctx
, int fd
,
37 struct sg_io_hdr
*hdr
);
39 PRManager
*pr_manager_lookup(const char *id
, Error
**errp
);