[svn-commits] dvossel: branch dvossel/fixtheworld_phase1_step1 r298342 - in /team/dvossel/f...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Dec 15 17:49:21 UTC 2010


Author: dvossel
Date: Wed Dec 15 11:49:17 2010
New Revision: 298342

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=298342
Log:
addition of the Format Capabilities API

Added:
    team/dvossel/fixtheworld_phase1_step1/include/asterisk/format_cap.h   (with props)
    team/dvossel/fixtheworld_phase1_step1/main/format_cap.c   (with props)
Modified:
    team/dvossel/fixtheworld_phase1_step1/include/asterisk/format.h
    team/dvossel/fixtheworld_phase1_step1/main/format.c

Modified: team/dvossel/fixtheworld_phase1_step1/include/asterisk/format.h
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step1/include/asterisk/format.h?view=diff&rev=298342&r1=298341&r2=298342
==============================================================================
--- team/dvossel/fixtheworld_phase1_step1/include/asterisk/format.h (original)
+++ team/dvossel/fixtheworld_phase1_step1/include/asterisk/format.h Wed Dec 15 11:49:17 2010
@@ -1,10 +1,9 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 2009-2010, Digium, Inc.
+ * Copyright (C) 2010, Digium, Inc.
  *
  * David Vossel <dvossel at digium.com>
- * Russell Bryant <russell at digium.com>
  *
  * See http://www.asterisk.org for more information about
  * the Asterisk project. Please do not directly contact

Added: team/dvossel/fixtheworld_phase1_step1/include/asterisk/format_cap.h
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step1/include/asterisk/format_cap.h?view=auto&rev=298342
==============================================================================
--- team/dvossel/fixtheworld_phase1_step1/include/asterisk/format_cap.h (added)
+++ team/dvossel/fixtheworld_phase1_step1/include/asterisk/format_cap.h Wed Dec 15 11:49:17 2010
@@ -1,0 +1,72 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2010, Digium, Inc.
+ *
+ * David Vossel <dvossel 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
+ * \brief Format Capability API
+ *
+ * \author David Vossel <dvossel at digium.com>
+ */
+
+#ifndef _AST_FORMATCAP_H_
+#define _AST_FORMATCAP_H_
+
+/*! Capabilities are represented by an opaque structure statically defined in format_capability.c */
+struct ast_cap;
+
+/*! \brief Allocate a new ast_cap structure.
+ *
+ * \retval ast_cap object on success.
+ * \retval NULL on failure.
+ */
+struct ast_cap *ast_cap_alloc(void);
+
+/*! \brief Destroy an ast_cap structure.
+ *
+ * \return NULL
+ */
+void *ast_cap_destroy(struct ast_cap *cap);
+
+/*! \brief Add format capability to capabilities structure. */
+void ast_cap_add(struct ast_cap *cap, struct ast_format *format);
+
+/*! \brief Remove format capability from capability structure */
+void ast_cap_remove(struct ast_cap *cap, struct ast_format *format);
+
+/*! \brief Find if ast_format is part of the capabilities structure.
+ *
+ * retval 1 format is found.
+ * retval 0 format is not found
+ */
+int ast_cap_find(struct ast_cap *cap, struct ast_format *format);
+
+/*! \brief Get joint capability structure.
+ *
+ * \retval !NULL success
+ * \retval NULL failure
+ */
+struct ast_cap *ast_cap_joint(struct ast_cap *cap1, struct ast_cap *cap2);
+
+/*! \brief Get all capabilities for a specific media type
+ *
+ * \retval !NULL success
+ * \retval NULL failure
+ */
+struct ast_cap *ast_cap_get_type(struct ast_cap *cap, enum ast_format_type);
+
+#endif /* _AST_FORMATCAP_H */

Propchange: team/dvossel/fixtheworld_phase1_step1/include/asterisk/format_cap.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/dvossel/fixtheworld_phase1_step1/include/asterisk/format_cap.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/dvossel/fixtheworld_phase1_step1/include/asterisk/format_cap.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: team/dvossel/fixtheworld_phase1_step1/main/format.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step1/main/format.c?view=diff&rev=298342&r1=298341&r2=298342
==============================================================================
--- team/dvossel/fixtheworld_phase1_step1/main/format.c (original)
+++ team/dvossel/fixtheworld_phase1_step1/main/format.c Wed Dec 15 11:49:17 2010
@@ -1,7 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 2009-2010, Digium, Inc.
+ * Copyright (C) 2010, Digium, Inc.
  *
  * David Vossel <dvossel at digium.com>
  *

Added: team/dvossel/fixtheworld_phase1_step1/main/format_cap.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step1/main/format_cap.c?view=auto&rev=298342
==============================================================================
--- team/dvossel/fixtheworld_phase1_step1/main/format_cap.c (added)
+++ team/dvossel/fixtheworld_phase1_step1/main/format_cap.c Wed Dec 15 11:49:17 2010
@@ -1,0 +1,75 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2010, Digium, Inc.
+ *
+ * David Vossel <dvossel 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
+ * \brief Format Capability API
+ *
+ * \author David Vossel <dvossel at digium.com>
+ */
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$");
+
+#include "asterisk/_private.h"
+#include "asterisk/version.h"
+#include "asterisk/format.h"
+#include "asterisk/format_cap.h"
+#include "asterisk/astobj2.h"
+
+
+struct ast_cap {
+	struct ao2_container *formats;
+};
+
+struct ast_cap *ast_cap_alloc(void)
+{
+	return NULL;
+}
+
+void *ast_cap_destroy(struct ast_cap *cap)
+{
+	return NULL;
+}
+
+void ast_cap_add(struct ast_cap *cap, struct ast_format *format)
+{
+	return;
+}
+
+void ast_cap_remove(struct ast_cap *cap, struct ast_format *format)
+{
+	return;
+}
+
+int ast_cap_find(struct ast_cap *cap, struct ast_format *format)
+{
+	return 0;
+}
+
+struct ast_cap *ast_cap_joint(struct ast_cap *cap1, struct ast_cap *cap2)
+{
+	return NULL;
+}
+
+struct ast_cap *ast_cap_get_type(struct ast_cap *cap, enum ast_format_type ftype)
+{
+	return NULL;
+}
+

Propchange: team/dvossel/fixtheworld_phase1_step1/main/format_cap.c
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/dvossel/fixtheworld_phase1_step1/main/format_cap.c
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/dvossel/fixtheworld_phase1_step1/main/format_cap.c
------------------------------------------------------------------------------
    svn:mime-type = text/plain




More information about the svn-commits mailing list