r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
[samba.git] / source3 / python / py_conv.h
index 3b1ad8a9b9bfc8285a01c43c126d817cd140ba94..c4baa84cc52dad1627c92cc27a28cc3fa8a7c4e6 100644 (file)
@@ -5,7 +5,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#ifndef _PY_SPOOLSS_CONV_H
-#define _PY_SPOOLSS_CONV_H
+#ifndef _PY_CONV_H
+#define _PY_CONV_H
 
-enum pyconv_types { PY_UNISTR, PY_UINT32, PY_UINT16 };
+#include "python/py_common.h"
+
+enum pyconv_types { PY_UNISTR, PY_UNISTR2, PY_UINT32, PY_UINT16, PY_STRING, 
+                   PY_UID, PY_GID };
 
 struct pyconv {
        char *name;             /* Name of member */
@@ -30,6 +32,12 @@ struct pyconv {
 };
 
 PyObject *from_struct(void *s, struct pyconv *conv);
-void to_struct(void *s, PyObject *dict, struct pyconv *conv);
+BOOL to_struct(void *s, PyObject *dict, struct pyconv *conv);
+PyObject *from_unistr_list(uint16 *dependentfiles);
+
+/* Another version of offsetof (-: */
+
+#undef offsetof
+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
 
-#endif /* _PY_SPOOLSS_CONV_H */
+#endif /* _PY_CONV_H */