summaryrefslogtreecommitdiffstats
path: root/src/objects/server-object.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/objects/server-object.h')
-rw-r--r--src/objects/server-object.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/objects/server-object.h b/src/objects/server-object.h
new file mode 100644
index 0000000..0703f47
--- /dev/null
+++ b/src/objects/server-object.h
@@ -0,0 +1,28 @@
+#ifndef _SERVER_OBJECT_H_
+#define _SERVER_OBJECT_H_
+
+#include <Python.h>
+#include "base-objects.h"
+
+/* forward */
+struct _SERVER_REC;
+
+#define PyServer_HEAD(type) \
+ PyIrssi_HEAD(type) \
+ PyObject *connect; \
+ PyObject *rawlog;
+
+typedef struct
+{
+ PyServer_HEAD(struct _SERVER_REC)
+} PyServer;
+
+extern PyTypeObject PyServerType;
+
+int server_object_init(void);
+PyObject *pyserver_sub_new(void *server, PyTypeObject *subclass);
+PyObject *pyserver_new(void *server);
+
+#define pyserver_check(op) PyObject_TypeCheck(op, &PyServerType)
+
+#endif