/** @file */
/***********************************************

 !!!! DO NOT EDIT THIS FILE !!!!

 All content has been auto-generated by 
 the boilerplater.pl utility.

 See boilerplater's documentation for details.

 ***********************************************/



#ifndef R_KINO_SHAREDLOCK
#define R_KINO_SHAREDLOCK 1

#include "KinoSearch/Store/SharedLock.h"

#define KINO_SHAREDLOCK_BOILERPLATE

typedef chy_bool_t
(*kino_ShLock_do_obtain_t)(kino_SharedLock *self);

typedef void
(*kino_ShLock_release_t)(kino_SharedLock *self);

typedef chy_bool_t
(*kino_ShLock_is_locked_t)(kino_SharedLock *self);

#define Kino_ShLock_Clone(self) \
    (self)->_->clone((kino_Obj*)self)

#define Kino_ShLock_Destroy(self) \
    (self)->_->destroy((kino_Obj*)self)

#define Kino_ShLock_Equals(self, other) \
    (self)->_->equals((kino_Obj*)self, other)

#define Kino_ShLock_Hash_Code(self) \
    (self)->_->hash_code((kino_Obj*)self)

#define Kino_ShLock_Is_A(self, target_vtable) \
    (self)->_->is_a((kino_Obj*)self, target_vtable)

#define Kino_ShLock_To_String(self) \
    (self)->_->to_string((kino_Obj*)self)

#define Kino_ShLock_Serialize(self, target) \
    (self)->_->serialize((kino_Obj*)self, target)

#define Kino_ShLock_Obtain(self) \
    (self)->_->obtain((kino_Lock*)self)

#define Kino_ShLock_Do_Obtain(self) \
    (self)->_->do_obtain((kino_Lock*)self)

#define Kino_ShLock_Release(self) \
    (self)->_->release((kino_Lock*)self)

#define Kino_ShLock_Is_Locked(self) \
    (self)->_->is_locked((kino_Lock*)self)

#define Kino_ShLock_Clear_Stale(self) \
    (self)->_->clear_stale((kino_Lock*)self)

struct KINO_SHAREDLOCK_VTABLE {
    KINO_OBJ_VTABLE *_;
    chy_u32_t refcount;
    KINO_OBJ_VTABLE *parent;
    const char *class_name;
    kino_Obj_clone_t clone;
    kino_Obj_destroy_t destroy;
    kino_Obj_equals_t equals;
    kino_Obj_hash_code_t hash_code;
    kino_Obj_is_a_t is_a;
    kino_Obj_to_string_t to_string;
    kino_Obj_serialize_t serialize;
    kino_Lock_obtain_t obtain;
    kino_Lock_do_obtain_t do_obtain;
    kino_Lock_release_t release;
    kino_Lock_is_locked_t is_locked;
    kino_Lock_clear_stale_t clear_stale;
};

extern KINO_SHAREDLOCK_VTABLE KINO_SHAREDLOCK;

#ifdef KINO_USE_SHORT_NAMES
  #define SharedLock kino_SharedLock
  #define SHAREDLOCK KINO_SHAREDLOCK
  #define ShLock_new kino_ShLock_new
  #define ShLock_do_obtain kino_ShLock_do_obtain
  #define ShLock_release kino_ShLock_release
  #define ShLock_is_locked kino_ShLock_is_locked
  #define ShLock_Clone Kino_ShLock_Clone
  #define ShLock_Destroy Kino_ShLock_Destroy
  #define ShLock_Equals Kino_ShLock_Equals
  #define ShLock_Hash_Code Kino_ShLock_Hash_Code
  #define ShLock_Is_A Kino_ShLock_Is_A
  #define ShLock_To_String Kino_ShLock_To_String
  #define ShLock_Serialize Kino_ShLock_Serialize
  #define ShLock_Obtain Kino_ShLock_Obtain
  #define ShLock_Do_Obtain Kino_ShLock_Do_Obtain
  #define ShLock_Release Kino_ShLock_Release
  #define ShLock_Is_Locked Kino_ShLock_Is_Locked
  #define ShLock_Clear_Stale Kino_ShLock_Clear_Stale
#endif /* KINO_USE_SHORT_NAMES */

#define KINO_SHAREDLOCK_MEMBER_VARS \
    chy_u32_t  refcount; \
    struct kino_Folder * folder; \
    struct kino_ByteBuf * lock_name; \
    struct kino_ByteBuf * filename; \
    struct kino_ByteBuf * agent_id; \
    chy_i32_t  timeout

#ifdef KINO_WANT_SHAREDLOCK_VTABLE
KINO_SHAREDLOCK_VTABLE KINO_SHAREDLOCK = {
    (KINO_OBJ_VTABLE*)&KINO_VIRTUALTABLE,
    1,
    (KINO_OBJ_VTABLE*)&KINO_LOCK,
    "KinoSearch::Store::SharedLock",
    (kino_Obj_clone_t)kino_Obj_clone,
    (kino_Obj_destroy_t)kino_Lock_destroy,
    (kino_Obj_equals_t)kino_Obj_equals,
    (kino_Obj_hash_code_t)kino_Obj_hash_code,
    (kino_Obj_is_a_t)kino_Obj_is_a,
    (kino_Obj_to_string_t)kino_Obj_to_string,
    (kino_Obj_serialize_t)kino_Obj_serialize,
    (kino_Lock_obtain_t)kino_Lock_obtain,
    (kino_Lock_do_obtain_t)kino_ShLock_do_obtain,
    (kino_Lock_release_t)kino_ShLock_release,
    (kino_Lock_is_locked_t)kino_ShLock_is_locked,
    (kino_Lock_clear_stale_t)kino_Lock_clear_stale
};
#endif /* KINO_WANT_SHAREDLOCK_VTABLE */

#undef KINO_SHAREDLOCK_BOILERPLATE


#endif /* R_KINO_SHAREDLOCK */


/* Copyright 2007 Marvin Humphrey
 *
 * This program is free software; you can redistribute it and/or modify
 * under the same terms as Perl itself.
 */