/* * Please do not edit this file. * It was generated using rpcgen. */ #ifndef _DB_VERS_H_RPCGEN #define _DB_VERS_H_RPCGEN #include #ifndef _DB_VERS_H #define _DB_VERS_H /* 'vers' is the version identifier. */ #include "nisdb_rw.h" class vers { unsigned int vers_high; /* major version number, tracks checkpoints */ unsigned int vers_low; /* minor version number, tracks updates. */ unsigned int time_sec; /* time stamp */ unsigned int time_usec; STRUCTRWLOCK(vers); public: /* No argument constructor. All entries initialized to zero. */ vers() { vers_high = vers_low = time_sec = time_usec = 0; INITRW(vers); } /* Constructor that makes copy of 'other'. */ vers( vers *other ); /* Constructor: create version with specified version numbers */ vers( unsigned int high, unsigned int low) { vers_high = high; vers_low = low; time_sec = time_usec = 0; INITRW(vers); } /* Creates new 'vers' with next higher minor version. If minor version exceeds MAXLOW, bump up major version instead. Set timestamp to that of the current time. */ vers* nextminor(); /* Creates new 'vers' with next higher major version. Set timestamp to that of the current time. */ vers* nextmajor(); /* Set this 'vers' to hold values found in 'others'. */ void assign( vers *other ); /* Predicate indicating whether this vers is earlier than 'other' in terms of version numbers. */ bool_t earlier_than( vers *other ); /* Print the value of this 'vers' to specified file. */ void print( FILE *file ); /* Zero out this vers. */ void zero(); /* Predicate indicating whether this vers is equal to 'other'. */ bool_t equal( vers *other); /* Locking methods */ int acqexcl(void) { return (WLOCK(vers)); } int relexcl(void) { return (WULOCK(vers)); } int acqnonexcl(void) { return (RLOCK(vers)); } int relnonexcl(void) { return (RULOCK(vers)); } }; #endif /* VERS_H */ #endif /* !_DB_VERS_H_RPCGEN */