qemu/include/scsi/pr-manager.h
<<
>>
Prefs
   1#ifndef PR_MANAGER_H
   2#define PR_MANAGER_H
   3
   4#include "qom/object.h"
   5#include "qapi/visitor.h"
   6#include "qom/object_interfaces.h"
   7#include "block/aio.h"
   8
   9#define TYPE_PR_MANAGER "pr-manager"
  10
  11OBJECT_DECLARE_TYPE(PRManager, PRManagerClass,
  12                    PR_MANAGER)
  13
  14struct sg_io_hdr;
  15
  16struct PRManager {
  17    /* <private> */
  18    Object parent;
  19};
  20
  21/**
  22 * PRManagerClass:
  23 * @parent_class: the base class
  24 * @run: callback invoked in thread pool context
  25 */
  26struct PRManagerClass {
  27    /* <private> */
  28    ObjectClass parent_class;
  29
  30    /* <public> */
  31    int (*run)(PRManager *pr_mgr, int fd, struct sg_io_hdr *hdr);
  32    bool (*is_connected)(PRManager *pr_mgr);
  33};
  34
  35bool pr_manager_is_connected(PRManager *pr_mgr);
  36int coroutine_fn pr_manager_execute(PRManager *pr_mgr, AioContext *ctx, int fd,
  37                                    struct sg_io_hdr *hdr);
  38
  39PRManager *pr_manager_lookup(const char *id, Error **errp);
  40
  41#endif
  42