summaryrefslogtreecommitdiffstats
path: root/callchan.cpp
diff options
context:
space:
mode:
authorSuper User2007-05-06 15:54:52 +0200
committerSuper User2007-05-06 15:54:52 +0200
commit2ed0fee489c37a6e2d4473f6185ebbe3e746ac11 (patch)
treefcf232bc282c083404cfde0ce5b04236fe202c3e /callchan.cpp
parentfirst commit (diff)
downloadlcr-2ed0fee489c37a6e2d4473f6185ebbe3e746ac11.tar.gz
lcr-2ed0fee489c37a6e2d4473f6185ebbe3e746ac11.tar.xz
lcr-2ed0fee489c37a6e2d4473f6185ebbe3e746ac11.zip
only for backup, still in coding state - no compile!!!
Diffstat (limited to 'callchan.cpp')
-rw-r--r--callchan.cpp87
1 files changed, 87 insertions, 0 deletions
diff --git a/callchan.cpp b/callchan.cpp
new file mode 100644
index 0000000..0c946c5
--- /dev/null
+++ b/callchan.cpp
@@ -0,0 +1,87 @@
+/*****************************************************************************\
+** **
+** PBX4Linux **
+** **
+**---------------------------------------------------------------------------**
+** Copyright: Andreas Eversberg **
+** **
+** call functions for channel driver **
+** **
+\*****************************************************************************/
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+//#include <unistd.h>
+//#include <poll.h>
+//#include <sys/types.h>
+//#include <sys/stat.h>
+//#include <fcntl.h>
+#include "main.h"
+//#define __u8 unsigned char
+//#define __u16 unsigned short
+//#define __u32 unsigned long
+//#include "linux/isdnif.h"
+
+
+/*
+ * constructor for a new call
+ * the call will have a relation to the calling endpoint
+ */
+CallChan::CallChan(class Endpoint *epoint) : Call(epoint)
+{
+ if (!epoint)
+ {
+ PERROR("software error, epoint is NULL.\n");
+ exit(-1);
+ }
+
+ PDEBUG(DEBUG_CALL, "creating new call and connecting it to the endpoint.\n");
+
+ c_type = CALL_TYPE_CHAN;
+ c_epoint_id = epoint->ep_serial;
+
+ PDEBUG(DEBUG_CALL, "Constructor(new call)");
+}
+
+
+/*
+ * call descructor
+ */
+CallChan::~CallChan()
+{
+
+}
+
+
+/* release call from endpoint
+ * if the call has two relations, all relations are freed and the call will be
+ * destroyed
+ */
+void CallChan::release(unsigned long epoint_id, int hold, int location, int cause)
+{
+ if (!epoint_id)
+ {
+ PERROR("software error, epoint is NULL.\n");
+ return;
+ }
+
+ c_epoint_id = 0;
+
+ PDEBUG(DEBUG_CALL, "call_release(): ended.\n");
+}
+
+
+/* call process is called from the main loop
+ * it processes the current calling state.
+ * returns 0 if call nothing was done
+ */
+int CallChan::handler(void)
+{
+ return(0);
+}
+
+void CallChan::message_epoint(unsigned long epoint_id, int message_type, union parameter *param)
+{
+}
+