1 /* 2 * Please do not edit this file. 3 * It was generated using rpcgen. 4 */ 5 6 #ifndef _DB_LOG_ENTRY_H_RPCGEN 7 #define _DB_LOG_ENTRY_H_RPCGEN 8 9 #include <rpc/rpc.h> 10 #pragma ident "%Z%%M% %I% %E% SMI" 11 #ifndef _DB_LOG_ENTRY_H 12 #define _DB_LOG_ENTRY_H 13 14 /* A log entry that describes an action to be performed and its parameters. */ 15 16 #include "db_vers.h" 17 #include "db_query.h" 18 #include "db_entry.h" 19 class db_log_entry { 20 vers aversion; /* version of log entry */ 21 db_action action; /* action to be invoked */ 22 db_query *query; /* query supplied with action (if any) */ 23 entry_object *object; /* object involved in action (if any) */ 24 db_log_entry *next; /* Used in constructing list */ 25 vers bversion; /* sanity check */ 26 public: 27 28 /*Constructor: Create an empty log entry, with no query and not object */ 29 db_log_entry() { query = NULL, object = NULL; next = NULL; } 30 31 /*Constructor: Create a log entry using the given parameters. Note that 32 pointers to db_query and entry_object are simply assigned, not copied. */ 33 db_log_entry( db_action, vers *, db_query *, entry_object*); 34 35 ~db_log_entry(); 36 37 /* Print to stdout this log entry */ 38 void print(); 39 40 /* Accessor: return version of log entry */ 41 vers *get_version() { return( &aversion ); } 42 43 /* Accessor: return pointer to action of log entry */ 44 db_action get_action() { return( action ); } 45 46 /* Accessor: return pointer to query part of log entry */ 47 db_query *get_query() { return( query ); } 48 49 /* Predicate: return whether log entry is complete and not truncated */ 50 bool_t sane() { return( aversion.equal( &bversion ) ); } 51 52 /* Accessor: return pointer to copy of object in log entry */ 53 entry_object *get_object() { return( object ); } 54 55 /* Accessor: return pointer to copy of object in log entry */ 56 db_log_entry * getnextptr() { return( next ); } 57 58 /* Accessor: return pointer to copy of object in log entry */ 59 void setnextptr( db_log_entry *p ) { next = p; } 60 }; 61 #ifdef __cplusplus 62 extern "C" bool_t xdr_db_log_entry(XDR*, db_log_entry*); 63 #elif __STDC__ 64 extern bool_t xdr_db_log_entry(XDR*, db_log_entry*); 65 #endif 66 typedef class db_log_entry * db_log_entry_p; 67 68 struct db_log_list { 69 struct { 70 u_int list_len; 71 db_log_entry_p *list_val; 72 } list; 73 }; 74 typedef struct db_log_list db_log_list; 75 #endif /* _DB_LOG_ENTRY_H */ 76 77 /* the xdr functions */ 78 extern bool_t xdr_db_log_list(); 79 80 #endif /* !_DB_LOG_ENTRY_H_RPCGEN */ 81