summaryrefslogtreecommitdiffstats
path: root/thk04/freej_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'thk04/freej_plugin.h')
-rw-r--r--thk04/freej_plugin.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/thk04/freej_plugin.h b/thk04/freej_plugin.h
new file mode 100644
index 0000000..be5cb55
--- /dev/null
+++ b/thk04/freej_plugin.h
@@ -0,0 +1,29 @@
+#ifndef __freej_plugin_h__
+#define __freej_plugin_h__
+
+static char *name;
+static char *author;
+static char *info;
+static int version;
+
+char *getname() { return name; };
+char *getauthor() { return author; };
+char *getinfo() { return info; };
+int getversion() { return version; };
+
+/* INTERNAL =================================================
+ this counts how many times a plugin is instantiated
+ it is handled into the Plugin:: open() and close() methods */
+int dlcount = 0;
+
+/* here we hardcode maximum instances permitted by every plugin */
+int maxinstances = 1;
+
+int dlinc() {
+ if(dlcount<maxinstances) {
+ dlcount++; return(dlcount);
+ } else return(-1); };
+int dldec() { dlcount--; return(dlcount); };
+/* ========================================================== */
+
+#endif