HP2500C driver writes devmode with private data that ends
[samba.git] / source3 / python / py_spoolss.h
index 766e420c6e6692291215122b7b846c60ca5240bf..7c7669c7528bf4ea0b70f975098ee95a5f735a74 100644 (file)
 #ifndef _PY_SPOOLSS_H
 #define _PY_SPOOLSS_H
 
-/* Another version of offsetof (-: */
+#include "includes.h"
+#include "Python.h"
 
-#undef offsetof
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#include "python/py_common.h"
+
+/* Spoolss policy handle object */
 
 typedef struct {
        PyObject_HEAD
@@ -33,11 +35,19 @@ typedef struct {
        POLICY_HND pol;
 } spoolss_policy_hnd_object;
      
+/* Exceptions raised by this module */
+
 extern PyTypeObject spoolss_policy_hnd_type;
 
 extern PyObject *spoolss_error, *spoolss_werror;
 
-void to_struct(void *s, PyObject *dict, struct pyconv *conv);
-PyObject *from_struct(void *s, struct pyconv *conv);
+/* Return a cli_state struct opened on the SPOOLSS pipe.  If credentials
+   are passed use them. */
+
+typedef struct cli_state *(cli_pipe_fn)(
+       struct cli_state *cli, char *system_name,
+       struct ntuser_creds *creds);
+
+#include "python/py_spoolss_proto.h"
 
 #endif /* _PY_SPOOLSS_H */