diff options
author | John Crispin <john@openwrt.org> | 2011-02-07 21:47:54 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2011-02-07 21:47:54 +0000 |
commit | e651a9341a241ef5cefc1711d42e3f638aaba9b8 (patch) | |
tree | 6597330d9c4e70a48df28970d1b882986961e618 /package/libtapi/src/tapidemo.c | |
parent | 0cd254bdee1f2575502e0c4c71e1ca2b7dfc5259 (diff) | |
download | upstream-e651a9341a241ef5cefc1711d42e3f638aaba9b8.tar.gz upstream-e651a9341a241ef5cefc1711d42e3f638aaba9b8.tar.bz2 upstream-e651a9341a241ef5cefc1711d42e3f638aaba9b8.zip |
* drop libtapi and tapi_sip (moved to external git) * add build variants to pjsip * split tapi_dev audio driver out of patch into src/
SVN-Revision: 25412
Diffstat (limited to 'package/libtapi/src/tapidemo.c')
-rw-r--r-- | package/libtapi/src/tapidemo.c | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/package/libtapi/src/tapidemo.c b/package/libtapi/src/tapidemo.c deleted file mode 100644 index 63098b89cf..0000000000 --- a/package/libtapi/src/tapidemo.c +++ /dev/null @@ -1,56 +0,0 @@ - -#include <stdbool.h> -#include <stdlib.h> -#include <stdio.h> -#include <sys/ioctl.h> -#include <fcntl.h> -#include <errno.h> -#include <poll.h> - -#include <linux/input.h> -/*#include <sys/timerfd.h>*/ -#include "timerfd.h" -#include "dialdetector.h" - -#include "tapi-ioctl.h" - -#include "tapi-device.h" -#include "tapi-port.h" - -static struct tapi_device dev; -static struct tapi_port ports[2]; - -void dial_callback(struct tapi_port *port, size_t num_digits, const unsigned char *digits) -{ - unsigned int link; - - if (num_digits != 1) - return; - if (port->id == digits[0] || digits[0] > 1) - return; - - tapi_port_set_ring(&ports[digits[0]], true); - - tapi_session_alloc(&dev, port, &ports[digits[0]]); -} - -int main(int argc, char *argv[]) -{ - struct dialdetector *dd, *dd2; - unsigned int link; - unsigned char buf[1024]; - int ret; - - tapi_device_open(0, &dev); - tapi_port_open(0, 0, &ports[0]); - tapi_port_open(0, 1, &ports[1]); - - dd = dialdetector_alloc(&ports[0]); - dd->dial_callback = dial_callback; - dd2 = dialdetector_alloc(&ports[1]); - dd2->dial_callback = dial_callback; - - tapi_mainloop(); - - return 0; -} |