[commit] r14012 - in freeswitch/trunk/contrib/mod/endpoints/mod_khomp: . docs
Author: jmesquita Date: Sat Jun 27 02:33:43 2009 New Revision: 14012 Log: Gimme a little documentation, PLEASE. Added: freeswitch/trunk/contrib/mod/endpoints/mod_khomp/docs/ freeswitch/trunk/contrib/mod/endpoints/mod_khomp/docs/Doxygen.conf Modified: freeswitch/trunk/contrib/mod/endpoints/mod_khomp/mod_khomp.cpp Added: freeswitch/trunk/contrib/mod/endpoints/mod_khomp/docs/Doxygen.conf ============================================================================== --- (empty file) +++ freeswitch/trunk/contrib/mod/endpoints/mod_khomp/docs/Doxygen.conf Sat Jun 27 02:33:43 2009 @@ -0,0 +1,265 @@ +# Doxyfile 1.4.6 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = mod_khomp +PROJECT_NUMBER = 1.0 +OUTPUT_DIRECTORY = . +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +USE_WINDOWS_ENCODING = YES +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = YES +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = NO +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES +#IGNORE_PREFIX = khomp_ + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = NO +EXTRACT_STATIC = NO +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +HIDE_UNDOC_MEMBERS = YES +HIDE_UNDOC_CLASSES = YES +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = NO +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = YES +FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = ../src ../src/include ../ +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.d \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.idl \ + *.odl \ + *.cs \ + *.php \ + *.php3 \ + *.inc \ + *.m \ + *.mm \ + *.dox \ + *.py +RECURSIVE = NO +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = YES +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +USE_HTAGS = YES +VERBATIM_HEADERS = NO +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 1 +#IGNORE_PREFIX = khomp_ +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +CHM_FILE = mod_khomp.chm +HHC_LOCATION = +GENERATE_CHI = YES +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = YES +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = NO +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = *.h +PREDEFINED = SWITCH_DECLARE(x)=x \ + APR_DECLARE(x)=x \ + SWITCH_MOD_DECLARE(x)=x \ + DoxyDefine(x)=x + +EXPAND_AS_DEFINED = NO +SKIP_FUNCTION_MACROS = NO +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = YES +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = YES +TEMPLATE_RELATIONS = YES +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = YES +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = jpg +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1024 +MAX_DOT_GRAPH_DEPTH = 1000 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO Modified: freeswitch/trunk/contrib/mod/endpoints/mod_khomp/mod_khomp.cpp ============================================================================== --- freeswitch/trunk/contrib/mod/endpoints/mod_khomp/mod_khomp.cpp (original) +++ freeswitch/trunk/contrib/mod/endpoints/mod_khomp/mod_khomp.cpp Sat Jun 27 02:33:43 2009 @@ -23,21 +23,47 @@ * * Contributor(s): * - * Joao Mesquita <mesquita@khomp.com.br> + * Joao Mesquita <mesquita (at) khomp.com.br> + * Raul Fragoso <raulfragoso (at) gmail.com> * * * mod_khomp.c -- Khomp board Endpoint Module * */ +/** + * @file mod_khomp.cpp + * @brief Khomp Endpoint Module + * @see mod_khomp + */ + + #define KHOMP_SYNTAX "khomp show [info|links|channels]" #include "mod_khomp.h" -/* Handles callbacks and events from the boards */ + +/*! + \brief Callback generated from K3L API for every new event on the board. + \param Object ID (could be a channel or a board, depends on device type) which generated the event + \param The event itself (look at the K3L doc for its structure) + \return ksSuccess if the event was treated + */ static int32 Kstdcall khomp_event_callback(int32 obj, K3L_EVENT * e); -static void Kstdcall khomp_audio_listener(int32 deviceid, int32 objectid, byte * read_buffer, int32 read_size); +/*! + \brief Callback generated from K3L API everytime audio is available on the board. + \param Board on which we get the event + \param The channel we are getting the audio from + \param The audio buffer itself (RAW) + \param The buffer size, meaning the amount of data to be read + \return ksSuccess if the event was treated + */ +static void Kstdcall khomp_audio_listener(int32 deviceid, int32 objectid, + byte * read_buffer, int32 read_size); +/*! + \brief Defined by mod_reference, defines statuses for the switch_channel + */ typedef enum { TFLAG_IO = (1 << 0), @@ -114,15 +140,26 @@ /* Macros to define specific API functions */ SWITCH_STANDARD_API(khomp); -/* Helper function prototypes */ +/*! + \brief Print a system summary for all the boards. [khomp show info] + */ static void printSystemSummary(switch_stream_handle_t* stream); +/*! + \brief Print link status. [khomp show links] + */ static void printLinks(switch_stream_handle_t* stream, unsigned int device, unsigned int link); +/*! + \brief Print board channel status. [khomp show channels] + */ static void printChannels(switch_stream_handle_t* stream, unsigned int device, unsigned int link); -/* Will init part of our private structure and setup all the read/write buffers */ +/*! + \brief Will init part of our private structure and setup all the read/write + buffers along with the proper codecs. Right now, only PCMA. + */ static switch_status_t tech_init(KhompPvt *tech_pvt, switch_core_session_t *session) { tech_pvt->_read_frame.data = tech_pvt->_databuf; @@ -173,8 +210,8 @@ } -/* - State methods they get called when the state changes to the specific state +/*! + \brief State methods they get called when the state changes to the specific state returning SWITCH_STATUS_SUCCESS tells the core to execute the standard state method next so if you fully implement the state you can return SWITCH_STATUS_FALSE to skip it. */ @@ -451,8 +488,9 @@ return SWITCH_STATUS_SUCCESS; } -/* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines - that allocate memory or you will have 1 channel with memory allocated from another channel's pool! +/*! + \brief Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines + that allocate memory or you will have 1 channel with memory allocated from another channel's pool! */ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_event_t *var_event, switch_caller_profile_t *outbound_profile, @@ -491,7 +529,7 @@ } else { -// usar algoritmo de busca de canais (spec.*). + // usar algoritmo de busca de canais (spec.*). tech_pvt->_KDeviceId = atoi(argv[0]); tech_pvt->_KChannel = atoi(argv[1]); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Dialing to %s out from Board:%u, Channel:%u.\n", @@ -636,8 +674,8 @@ return SWITCH_STATUS_SUCCESS; } -/* - khomp API definition +/*! + \brief khomp API definition TODO: Add as xml modifier */ SWITCH_STANDARD_API(khomp) @@ -688,7 +726,6 @@ } -/* Helper functions */ static void printChannels(switch_stream_handle_t* stream, unsigned int device, unsigned int link) { if (!device) { // Print all channels from all boards and links
participants (1)
-
FreeSWITCH SVN