/* teamtrack-record.h -- Python wrapper round TSRecord class Gareth Rees, Ravenbrook Limited, 2000-08-07 $Id: //info.ravenbrook.com/project/p4dti/branch/2000-09-05/interface-debugging/python-teamtrack-interface/teamtrack-record.h#1 $ */ #if !defined(TEAMTRACK_RECORD_H) #define TEAMTRACK_RECORD_H #include "teamtrack-python.h" #include "teamtrack-server.h" #include "TSRecord.h" /* A teamtrack_record object is a Python wrapper around a TSRecord object. */ typedef struct { PyObject_HEAD TSRecord *r; /* The wrapped record. */ teamtrack_server *server; /* Python wrapper round server this record belongs to. */ int delete_p; /* Delete the TSRecord object when Python wrapper deleted? */ } teamtrack_record; /* teamtrack_record_type is the type object for teamtrack_record objects. */ extern PyTypeObject teamtrack_record_type; /* teamtrack_record_p(x) is true iff x (which must be a Python object) is a teamtrack_record. */ #define teamtrack_record_p(x) ((x)->ob_type == &teamtrack_record_type) /* teamtrack_record_new(r, server, delete_p) returns a Python wrapper for the TSRecord object r, or 0 if there is an error. The server argument is the Python wrapper for the TSServer object to which the record belongs. Iff delete_p is true, then the TSRecord object will be deleted when the Python wrapper is deleted. */ extern PyObject * teamtrack_record_new(TSRecord *r, teamtrack_server *server, int delete_p); #endif /* !defined(TEAMTRACK_RECORD_H) */