/* This file is auto-generated from ../src/locking/lock_protocol.x */

#include <rpc/rpc.h>
#include "internal.h"

#pragma once

#include "internal.h"

#include "lock_driver_lockd.h"

typedef char virLockSpaceProtocolUUID[VIR_UUID_BUFLEN];
void xdr_virLockSpaceProtocolUUID_clear(virLockSpaceProtocolUUID *objp);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virLockSpaceProtocolUUID, xdr_virLockSpaceProtocolUUID_clear);

#define VIR_LOCK_SPACE_PROTOCOL_STRING_MAX 65536

typedef char *virLockSpaceProtocolNonNullString;
void xdr_virLockSpaceProtocolNonNullString_clear(virLockSpaceProtocolNonNullString *objp);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virLockSpaceProtocolNonNullString, xdr_virLockSpaceProtocolNonNullString_clear);

typedef virLockSpaceProtocolNonNullString *virLockSpaceProtocolString;
void xdr_virLockSpaceProtocolString_clear(virLockSpaceProtocolString *objp);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virLockSpaceProtocolString, xdr_virLockSpaceProtocolString_clear);

struct virLockSpaceProtocolOwner {
    virLockSpaceProtocolUUID uuid;
    virLockSpaceProtocolNonNullString name;
    u_int id;
    u_int pid;
};
typedef struct virLockSpaceProtocolOwner virLockSpaceProtocolOwner;
void xdr_virLockSpaceProtocolOwner_clear(virLockSpaceProtocolOwner *objp);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virLockSpaceProtocolOwner, xdr_virLockSpaceProtocolOwner_clear);

struct virLockSpaceProtocolRegisterArgs {
    virLockSpaceProtocolOwner owner;
    u_int flags;
};
typedef struct virLockSpaceProtocolRegisterArgs virLockSpaceProtocolRegisterArgs;
void xdr_virLockSpaceProtocolRegisterArgs_clear(virLockSpaceProtocolRegisterArgs *objp);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virLockSpaceProtocolRegisterArgs, xdr_virLockSpaceProtocolRegisterArgs_clear);

struct virLockSpaceProtocolRestrictArgs {
    u_int flags;
};
typedef struct virLockSpaceProtocolRestrictArgs virLockSpaceProtocolRestrictArgs;
void xdr_virLockSpaceProtocolRestrictArgs_clear(virLockSpaceProtocolRestrictArgs *objp);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virLockSpaceProtocolRestrictArgs, xdr_virLockSpaceProtocolRestrictArgs_clear);

struct virLockSpaceProtocolNewArgs {
    virLockSpaceProtocolNonNullString path;
    u_int flags;
};
typedef struct virLockSpaceProtocolNewArgs virLockSpaceProtocolNewArgs;
void xdr_virLockSpaceProtocolNewArgs_clear(virLockSpaceProtocolNewArgs *objp);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virLockSpaceProtocolNewArgs, xdr_virLockSpaceProtocolNewArgs_clear);

struct virLockSpaceProtocolCreateResourceArgs {
    virLockSpaceProtocolNonNullString path;
    virLockSpaceProtocolNonNullString name;
    u_int flags;
};
typedef struct virLockSpaceProtocolCreateResourceArgs virLockSpaceProtocolCreateResourceArgs;
void xdr_virLockSpaceProtocolCreateResourceArgs_clear(virLockSpaceProtocolCreateResourceArgs *objp);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virLockSpaceProtocolCreateResourceArgs, xdr_virLockSpaceProtocolCreateResourceArgs_clear);

struct virLockSpaceProtocolDeleteResourceArgs {
    virLockSpaceProtocolNonNullString path;
    virLockSpaceProtocolNonNullString name;
    u_int flags;
};
typedef struct virLockSpaceProtocolDeleteResourceArgs virLockSpaceProtocolDeleteResourceArgs;
void xdr_virLockSpaceProtocolDeleteResourceArgs_clear(virLockSpaceProtocolDeleteResourceArgs *objp);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virLockSpaceProtocolDeleteResourceArgs, xdr_virLockSpaceProtocolDeleteResourceArgs_clear);

struct virLockSpaceProtocolAcquireResourceArgs {
    virLockSpaceProtocolNonNullString path;
    virLockSpaceProtocolNonNullString name;
    u_int flags;
};
typedef struct virLockSpaceProtocolAcquireResourceArgs virLockSpaceProtocolAcquireResourceArgs;
void xdr_virLockSpaceProtocolAcquireResourceArgs_clear(virLockSpaceProtocolAcquireResourceArgs *objp);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virLockSpaceProtocolAcquireResourceArgs, xdr_virLockSpaceProtocolAcquireResourceArgs_clear);

struct virLockSpaceProtocolReleaseResourceArgs {
    virLockSpaceProtocolNonNullString path;
    virLockSpaceProtocolNonNullString name;
    u_int flags;
};
typedef struct virLockSpaceProtocolReleaseResourceArgs virLockSpaceProtocolReleaseResourceArgs;
void xdr_virLockSpaceProtocolReleaseResourceArgs_clear(virLockSpaceProtocolReleaseResourceArgs *objp);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virLockSpaceProtocolReleaseResourceArgs, xdr_virLockSpaceProtocolReleaseResourceArgs_clear);

struct virLockSpaceProtocolCreateLockSpaceArgs {
    virLockSpaceProtocolNonNullString path;
};
typedef struct virLockSpaceProtocolCreateLockSpaceArgs virLockSpaceProtocolCreateLockSpaceArgs;
void xdr_virLockSpaceProtocolCreateLockSpaceArgs_clear(virLockSpaceProtocolCreateLockSpaceArgs *objp);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virLockSpaceProtocolCreateLockSpaceArgs, xdr_virLockSpaceProtocolCreateLockSpaceArgs_clear);

#define VIR_LOCK_SPACE_PROTOCOL_PROGRAM 0xEA7BEEF

#define VIR_LOCK_SPACE_PROTOCOL_PROGRAM_VERSION 1

enum virLockSpaceProtocolProcedure {
    VIR_LOCK_SPACE_PROTOCOL_PROC_REGISTER = 1,
    VIR_LOCK_SPACE_PROTOCOL_PROC_RESTRICT = 2,
    VIR_LOCK_SPACE_PROTOCOL_PROC_NEW = 3,
    VIR_LOCK_SPACE_PROTOCOL_PROC_CREATE_RESOURCE = 4,
    VIR_LOCK_SPACE_PROTOCOL_PROC_DELETE_RESOURCE = 5,
    VIR_LOCK_SPACE_PROTOCOL_PROC_ACQUIRE_RESOURCE = 6,
    VIR_LOCK_SPACE_PROTOCOL_PROC_RELEASE_RESOURCE = 7,
    VIR_LOCK_SPACE_PROTOCOL_PROC_CREATE_LOCKSPACE = 8,
};
typedef enum virLockSpaceProtocolProcedure virLockSpaceProtocolProcedure;

extern  bool_t xdr_virLockSpaceProtocolUUID(XDR *, virLockSpaceProtocolUUID);

extern  bool_t xdr_virLockSpaceProtocolNonNullString(XDR *, virLockSpaceProtocolNonNullString*);

extern  bool_t xdr_virLockSpaceProtocolString(XDR *, virLockSpaceProtocolString*);

extern  bool_t xdr_virLockSpaceProtocolOwner(XDR *, virLockSpaceProtocolOwner*);

extern  bool_t xdr_virLockSpaceProtocolRegisterArgs(XDR *, virLockSpaceProtocolRegisterArgs*);

extern  bool_t xdr_virLockSpaceProtocolRestrictArgs(XDR *, virLockSpaceProtocolRestrictArgs*);

extern  bool_t xdr_virLockSpaceProtocolNewArgs(XDR *, virLockSpaceProtocolNewArgs*);

extern  bool_t xdr_virLockSpaceProtocolCreateResourceArgs(XDR *, virLockSpaceProtocolCreateResourceArgs*);

extern  bool_t xdr_virLockSpaceProtocolDeleteResourceArgs(XDR *, virLockSpaceProtocolDeleteResourceArgs*);

extern  bool_t xdr_virLockSpaceProtocolAcquireResourceArgs(XDR *, virLockSpaceProtocolAcquireResourceArgs*);

extern  bool_t xdr_virLockSpaceProtocolReleaseResourceArgs(XDR *, virLockSpaceProtocolReleaseResourceArgs*);

extern  bool_t xdr_virLockSpaceProtocolCreateLockSpaceArgs(XDR *, virLockSpaceProtocolCreateLockSpaceArgs*);

extern  bool_t xdr_virLockSpaceProtocolProcedure(XDR *, virLockSpaceProtocolProcedure*);

