root/src/ftmod/ftmod_skel/ftmod_skel.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. FIO_CONFIGURE_FUNCTION
  2. FIO_CONFIGURE_SPAN_FUNCTION
  3. FIO_OPEN_FUNCTION
  4. FIO_CLOSE_FUNCTION
  5. FIO_WAIT_FUNCTION
  6. FIO_READ_FUNCTION
  7. FIO_WRITE_FUNCTION
  8. FIO_COMMAND_FUNCTION
  9. FIO_SPAN_POLL_EVENT_FUNCTION
  10. FIO_SPAN_NEXT_EVENT_FUNCTION
  11. FIO_CHANNEL_DESTROY_FUNCTION
  12. FIO_SPAN_DESTROY_FUNCTION
  13. FIO_GET_ALARMS_FUNCTION
  14. FIO_IO_LOAD_FUNCTION
  15. FIO_IO_UNLOAD_FUNCTION

   1 /*
   2  * Copyright (c) 2007, Anthony Minessale II
   3  * All rights reserved.
   4  * 
   5  * Redistribution and use in source and binary forms, with or without
   6  * modification, are permitted provided that the following conditions
   7  * are met:
   8  * 
   9  * * Redistributions of source code must retain the above copyright
  10  * notice, this list of conditions and the following disclaimer.
  11  * 
  12  * * Redistributions in binary form must reproduce the above copyright
  13  * notice, this list of conditions and the following disclaimer in the
  14  * documentation and/or other materials provided with the distribution.
  15  * 
  16  * * Neither the name of the original author; nor the names of any contributors
  17  * may be used to endorse or promote products derived from this software
  18  * without specific prior written permission.
  19  * 
  20  * 
  21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  24  * A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER
  25  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  26  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  27  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  28  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  29  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  30  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  31  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32  */
  33 
  34 
  35 #include "private/ftdm_core.h"
  36 //#include "ftdm_skel.h"
  37 
  38 static FIO_CONFIGURE_FUNCTION(skel_configure)
  39 {
  40         return FTDM_FAIL;
  41 }
  42 
  43 static FIO_CONFIGURE_SPAN_FUNCTION(skel_configure_span)
  44 {
  45         return FTDM_FAIL;
  46 }
  47 
  48 static FIO_OPEN_FUNCTION(skel_open) 
  49 {
  50         return FTDM_FAIL;
  51 }
  52 
  53 static FIO_CLOSE_FUNCTION(skel_close)
  54 {
  55         return FTDM_FAIL;
  56 }
  57 
  58 static FIO_WAIT_FUNCTION(skel_wait)
  59 {
  60         return FTDM_FAIL;
  61 }
  62 
  63 static FIO_READ_FUNCTION(skel_read)
  64 {
  65         return FTDM_FAIL;
  66 }
  67 
  68 static FIO_WRITE_FUNCTION(skel_write)
  69 {
  70         return FTDM_FAIL;
  71 }
  72 
  73 static FIO_COMMAND_FUNCTION(skel_command)
  74 {
  75         return FTDM_FAIL;
  76 }
  77 
  78 static FIO_SPAN_POLL_EVENT_FUNCTION(skel_poll_event)
  79 {
  80         return FTDM_FAIL;
  81 }
  82 
  83 static FIO_SPAN_NEXT_EVENT_FUNCTION(skel_next_event)
  84 {
  85         return FTDM_FAIL;
  86 }
  87 
  88 static FIO_CHANNEL_DESTROY_FUNCTION(skel_channel_destroy)
  89 {
  90         return FTDM_FAIL;
  91 }
  92 
  93 static FIO_SPAN_DESTROY_FUNCTION(skel_span_destroy)
  94 {
  95         return FTDM_FAIL;
  96 }
  97 
  98 static FIO_GET_ALARMS_FUNCTION(skel_get_alarms)
  99 {
 100         return FTDM_FAIL;
 101 }
 102 
 103 static ftdm_io_interface_t skel_interface;
 104 
 105 static FIO_IO_LOAD_FUNCTION(skel_init)
 106 {
 107         assert(fio != NULL);
 108         memset(&skel_interface, 0, sizeof(skel_interface));
 109 
 110         skel_interface.name = "skel";
 111         skel_interface.configure =  skel_configure;
 112         skel_interface.configure_span =  skel_configure_span;
 113         skel_interface.open = skel_open;
 114         skel_interface.close = skel_close;
 115         skel_interface.wait = skel_wait;
 116         skel_interface.read = skel_read;
 117         skel_interface.write = skel_write;
 118         skel_interface.command = skel_command;
 119         skel_interface.poll_event = skel_poll_event;
 120         skel_interface.next_event = skel_next_event;
 121         skel_interface.channel_destroy = skel_channel_destroy;
 122         skel_interface.span_destroy = skel_span_destroy;
 123         skel_interface.get_alarms = skel_get_alarms;
 124         *fio = &skel_interface;
 125 
 126         return FTDM_SUCCESS;
 127 }
 128 
 129 static FIO_IO_UNLOAD_FUNCTION(skel_destroy)
 130 {
 131         return FTDM_SUCCESS;
 132 }
 133 
 134 
 135 ftdm_module_t ftdm_module = { 
 136         "skel",
 137         skel_init,
 138         skel_destroy,
 139 };
 140 
 141 
 142 /* For Emacs:
 143  * Local Variables:
 144  * mode:c
 145  * indent-tabs-mode:t
 146  * tab-width:4
 147  * c-basic-offset:4
 148  * End:
 149  * For VIM:
 150  * vim:set softtabstop=4 shiftwidth=4 tabstop=4:
 151  */
 152 

/* [<][>][^][v][top][bottom][index][help] */