[asterisk-commits] russell: branch group/timing r122361 - /team/group/timing/res/res_timing_dahdi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 12 14:49:04 CDT 2008
Author: russell
Date: Thu Jun 12 14:49:04 2008
New Revision: 122361
URL: http://svn.digium.com/view/asterisk?view=rev&rev=122361
Log:
add skeleton res_timing_dahdi
Added:
team/group/timing/res/res_timing_dahdi.c (with props)
Added: team/group/timing/res/res_timing_dahdi.c
URL: http://svn.digium.com/view/asterisk/team/group/timing/res/res_timing_dahdi.c?view=auto&rev=122361
==============================================================================
--- team/group/timing/res/res_timing_dahdi.c (added)
+++ team/group/timing/res/res_timing_dahdi.c Thu Jun 12 14:49:04 2008
@@ -1,0 +1,96 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2008, Digium, Inc.
+ *
+ * Russell Bryant <russell at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*!
+ * \file
+ * \author Russell Bryant <russell at digium.com>
+ *
+ * \brief DAHDI timing interface
+ */
+
+/*** MODULEINFO
+ <depend>dahdi</depend>
+ ***/
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$");
+
+#include "asterisk/module.h"
+#include "asterisk/timing.h"
+
+static void *timing_funcs_handle;
+
+static int dahdi_timer_open(unsigned int rate);
+static void dahdi_timer_close(int handle);
+static void dahdi_timer_ack(int handle, unsigned int quantity);
+static int dahdi_timer_enable_continuous(int handle);
+static int dahdi_timer_disable_continuous(int handle);
+static enum ast_timing_event dahdi_timer_get_event(int handle);
+
+static struct ast_timing_functions dahdi_timing_functions = {
+ .timer_open = dahdi_timer_open,
+ .timer_close = dahdi_timer_close,
+ .timer_ack = dahdi_timer_ack,
+ .timer_enable_continuous = dahdi_timer_enable_continuous,
+ .timer_disable_continuous = dahdi_timer_disable_continuous,
+ .timer_get_event = dahdi_timer_get_event,
+};
+
+static int dahdi_timer_open(unsigned int rate)
+{
+ return 0;
+}
+
+static void dahdi_timer_close(int handle)
+{
+}
+
+static void dahdi_timer_ack(int handle, unsigned int quantity)
+{
+}
+
+static int dahdi_timer_enable_continuous(int handle)
+{
+ return 0;
+}
+
+static int dahdi_timer_disable_continuous(int handle)
+{
+ return 0;
+}
+
+static enum ast_timing_event dahdi_timer_get_event(int handle)
+{
+ return 0;
+}
+
+static int load_module(void)
+{
+ return (timing_funcs_handle = ast_install_timing_functions(&dahdi_timing_functions)) ?
+ AST_MODULE_LOAD_SUCCESS : AST_MODULE_LOAD_DECLINE;
+}
+
+static int unload_module(void)
+{
+ ast_uninstall_timing_functions(timing_funcs_handle);
+
+ return 0;
+}
+
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "DAHDI Timing Interface");
Propchange: team/group/timing/res/res_timing_dahdi.c
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: team/group/timing/res/res_timing_dahdi.c
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: team/group/timing/res/res_timing_dahdi.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
More information about the asterisk-commits
mailing list