[svn-commits] mmichelson: branch group/CCSS r212985 - /team/group/CCSS/include/asterisk/ccss.h
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Aug 18 16:25:31 CDT 2009
Author: mmichelson
Date: Tue Aug 18 16:25:27 2009
New Revision: 212985
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=212985
Log:
Configuration API written.
Next step is to place appropriate pointers within device and channel
structures.
Modified:
team/group/CCSS/include/asterisk/ccss.h
Modified: team/group/CCSS/include/asterisk/ccss.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/include/asterisk/ccss.h?view=diff&rev=212985&r1=212984&r2=212985
==============================================================================
--- team/group/CCSS/include/asterisk/ccss.h (original)
+++ team/group/CCSS/include/asterisk/ccss.h Tue Aug 18 16:25:27 2009
@@ -24,13 +24,16 @@
#ifndef _ASTERISK_CCSS_H
#define _ASTERISK_CCSS_H
+#include "asterisk.h"
+#include "asterisk/linkedlists.h"
+
enum service_type {
/* Call Completion Busy Subscriber */
- AST_CCSS_CCBS;
+ AST_CCSS_CCBS,
/* Call Completion No Response */
- AST_CCSS_CCNR;
+ AST_CCSS_CCNR,
/* Call Completion Not Logged In (currently SIP only) */
- AST_CCSS_CCNL;
+ AST_CCSS_CCNL,
};
/*!
@@ -80,34 +83,9 @@
/*!
* \since 1.6.4
- * \brief A structure for holding the configuration parameters
- * relating to CCSS
- *
- * XXX Should be made opaque. Will do when I create main/ccss.c
- */
-struct ast_cc_config_params {
- enum ccss_policy cc_agent_policy;
- enum ccss_policy cc_monitor_policy;
- unsigned int cc_offer_timer;
- unsigned int ccnr_available_timer;
- unsigned int ccbs_available_timer;
- unsigned int cc_max_agents;
- unsigned int cc_max_monitors;
- /*XXX callback_macro only applies to generic agents. Should this
- * be part of the generic agent's private_data field? My initial
- * thinking is no, since it makes sense that someone might wish
- * to modify this the same way that they would modify any other
- * ccss configuration value. If someone sets a callback_macro and
- * we use a native ccss agent, then we'll just ignore the param...
- */
- const char *callback_macro;
-};
-
-/*!
- * \since 1.6.4
* \brief The various possibilities for cc_agent_policy values
*/
-enum ast_cc_agent_policies {
+enum ast_ccss_agent_policies {
/* Never offer CCSS to the caller */
AST_CCSS_AGENT_NEVER,
/* Offer CCSS using native signaling */
@@ -120,7 +98,7 @@
* \since 1.6.4
* \brief The various possibilities for cc_monitor_policy values
*/
-enum ast_cc_monitor_policies {
+enum ast_ccss_monitor_policies {
/* Never accept CCSS offers from callee */
AST_CCSS_MONITOR_NEVER,
/* CCSS only available if callee offers it through signaling */
@@ -136,13 +114,16 @@
AST_CCSS_MONITOR_ALWAYS,
};
+/* Forward declaration. Struct is in main/ccss.c */
+struct ast_cc_config_params;
+
/*!
* \since 1.6.4
* \brief Get the cc_agent_policy
* \param config The configuration to retrieve the policy from
* \return The current cc_agent_policy for this configuration
*/
-enum ast_cc_agent_policies ast_get_cc_agent_policy(struct ast_cc_config_params *config);
+enum ast_ccss_agent_policies ast_get_cc_agent_policy(struct ast_cc_config_params *config);
/*!
* \since 1.6.4
@@ -152,7 +133,7 @@
* \retval 0 Success
* \retval -1 Failure (likely due to bad input)
*/
-int ast_set_cc_agent_policy(struct ast_cc_config_params *config, enum ast_cc_agent_policies value);
+int ast_set_cc_agent_policy(struct ast_cc_config_params *config, enum ast_ccss_agent_policies value);
/*!
* \since 1.6.4
@@ -160,7 +141,7 @@
* \param config The configuration to retrieve the cc_monitor_policy from
* \return The cc_monitor_policy retrieved from the configuration
*/
-enum ast_cc_monitor_policies ast_get_cc_monitor_policy(struct ast_cc_config_params *config);
+enum ast_ccss_monitor_policies ast_get_cc_monitor_policy(struct ast_cc_config_params *config);
/*!
* \since 1.6.4
@@ -170,7 +151,7 @@
* \retval 0 Success
* \retval -1 Failure (likely due to bad input)
*/
-int ast_set_cc_monitor_policy(struct ast_cc_config_params *config, enum ast_cc_monitor_policies value);
+int ast_set_cc_monitor_policy(struct ast_cc_config_params *config, enum ast_ccss_monitor_policies value);
/*!
* \since 1.6.4
@@ -185,10 +166,9 @@
* \brief Set the cc_offer_timer
* \param config The configuration to set the cc_offer_timer on
* \param value The new cc_offer_timer we want to change to
- * \retval 0 Success
- * \retval -1 Failure (likely due to bad input)
- */
-int ast_set_cc_offer_timer(struct ast_cc_config_params *config, unsigned int value);
+ * \retval void
+ */
+void ast_set_cc_offer_timer(struct ast_cc_config_params *config, unsigned int value);
/*!
* \since 1.6.4
@@ -203,10 +183,9 @@
* \brief Set the ccnr_available_timer
* \param config The configuration to set the ccnr_available_timer on
* \param value The new ccnr_available_timer we want to change to
- * \retval 0 Success
- * \retval -1 Failure (likely due to bad input)
- */
-int ast_set_ccnr_available_timer_(struct ast_cc_config_params *config, unsigned int value);
+ * \retval void
+ */
+void ast_set_ccnr_available_timer(struct ast_cc_config_params *config, unsigned int value);
/*!
* \since 1.6.4
@@ -221,10 +200,9 @@
* \brief Set the ccbs_available_timer
* \param config The configuration to set the ccbs_available_timer on
* \param value The new ccbs_available_timer we want to change to
- * \retval 0 Success
- * \retval -1 Failure (likely due to bad input)
- */
-int ast_set_ccbs_available_timer(struct ast_cc_config_params *config, unsigned int value);
+ * \retval void
+ */
+void ast_set_ccbs_available_timer(struct ast_cc_config_params *config, unsigned int value);
/*!
* \since 1.6.4
@@ -239,10 +217,9 @@
* \brief Set the cc_max_agents
* \param config The configuration to set the cc_max_agents on
* \param value The new cc_max_agents we want to change to
- * \retval 0 Success
- * \retval -1 Failure (likely due to bad input)
- */
-int ast_set_cc_max_agents(struct ast_cc_config_params *config, unsigned int value);
+ * \retval void
+ */
+void ast_set_cc_max_agents(struct ast_cc_config_params *config, unsigned int value);
/*!
* \since 1.6.4
@@ -257,10 +234,9 @@
* \brief Set the cc_max_monitors
* \param config The configuration to set the cc_max_monitors on
* \param value The new cc_max_monitors we want to change to
- * \retval 0 Success
- * \retval -1 Failure (likely due to bad input)
- */
-int ast_set_cc_max_monitors(struct ast_cc_config_params *config, unsigned int value);
+ * \retval void
+ */
+void ast_set_cc_max_monitors(struct ast_cc_config_params *config, unsigned int value);
/*!
* \since 1.6.4
@@ -275,10 +251,9 @@
* \brief Set the callback_macro name
* \param config The configuration to set the callback_macro on
* \param value The new callback macro we want to change to
- * \retval 0 Success
- * \retval -1 Failure (likely due to bad input)
- */
-int ast_set_callback_macro(struct ast_cc_config_params *config, const char * const value);
+ * \retval void
+ */
+void ast_set_callback_macro(struct ast_cc_config_params *config, const char * const value);
/*!
* \brief a link that connects two monitors in the weighted graph of
@@ -389,12 +364,12 @@
* need to do their own thing.
*/
union {
- struct ast_ccss_device_monitor_data;
- struct ast_ccss_extension_monitor_data;
- struct ast_ccss_root_monitor_data;
+ struct ast_ccss_device_monitor_data device_data;
+ struct ast_ccss_extension_monitor_data extension_data;
+ struct ast_ccss_root_monitor_data root_data;
} monitor_data;
/*! The name of the device/extension being monitored */
- const char *name
+ const char *name;
/*! The list of links to upstream extension monitors */
AST_LIST_HEAD(,ast_ccss_monitor_link) parent_links;
/*! Callback functions needed for specific device monitor
@@ -445,7 +420,9 @@
* \retval negative The CCSS core failed to be initialized.
* \retval non-negative The identifier for this instance of the CCSS core
*/
-int ast_ccss_core_init_instance(const char *caller, /*Type?*/ called_tree);
+/*
+int ast_ccss_core_init_instance(const char *caller, called_tree);
+*/
/*!
* \since 1.6.4
@@ -458,4 +435,4 @@
*/
int ast_ccss_request_state_change(enum ast_ccss_state state, const unsigned int core_id, const char *debug);
-#endif /* _ASTERISK_CCSS_H
+#endif /* _ASTERISK_CCSS_H */
More information about the svn-commits
mailing list