diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-23 14:19:35 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-23 14:19:35 +0000 |
commit | 5432a961724cba353c8c2bb5a85ef2f41bf5b324 (patch) | |
tree | 45abd9138bc044aa1b15db34c99ce253080baeb4 /build_tools/menuselect.h | |
parent | 6615c6772cacec2397daf14e4c68eed6c02d431c (diff) |
merge changes to get menuselect using svn:externals
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@35704 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'build_tools/menuselect.h')
-rw-r--r-- | build_tools/menuselect.h | 109 |
1 files changed, 0 insertions, 109 deletions
diff --git a/build_tools/menuselect.h b/build_tools/menuselect.h deleted file mode 100644 index 455f60076..000000000 --- a/build_tools/menuselect.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Asterisk -- An open source telephony toolkit. - * - * Copyright (C) 2005-2006, Russell Bryant - * - * Russell Bryant <russell@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 public data structures and defaults for menuselect - * - */ - -#ifndef MENUSELECT_H -#define MENUSELECT_H - -#include "asterisk/linkedlists.h" - -#define OUTPUT_MAKEOPTS_DEFAULT "menuselect.makeopts" -#define MENUSELECT_DEPS "build_tools/menuselect-deps" - -struct depend { - /*! the name of the dependency */ - const char *name; - /*! for linking */ - AST_LIST_ENTRY(depend) list; -}; - -struct conflict { - /*! the name of the conflict */ - const char *name; - /*! for linking */ - AST_LIST_ENTRY(conflict) list; -}; - -struct member { - /*! What will be sent to the makeopts file */ - const char *name; - /*! Display name if known */ - const char *displayname; - /*! Default setting */ - const char *defaultenabled; - /*! Delete these file(s) if this member changes */ - const char *remove_on_change; - /*! This module is currently selected */ - unsigned int enabled:1; - /*! This module was enabled when the config was loaded */ - unsigned int was_enabled:1; - /*! This module has failed dependencies */ - unsigned int depsfailed:1; - /*! This module has failed conflicts */ - unsigned int conflictsfailed:1; - /*! dependencies of this module */ - AST_LIST_HEAD_NOLOCK(, depend) deps; - /*! conflicts of this module */ - AST_LIST_HEAD_NOLOCK(, conflict) conflicts; - /*! for making a list of modules */ - AST_LIST_ENTRY(member) list; -}; - -struct category { - /*! the Makefile variable */ - const char *name; - /*! the name displayed in the menu */ - const char *displayname; - /*! Delete these file(s) if anything in this category changes */ - const char *remove_on_change; - /*! Output what is selected, as opposed to not selected */ - unsigned int positive_output:1; - /*! the list of possible values to be set in this variable */ - AST_LIST_HEAD_NOLOCK(, member) members; - /*! for linking */ - AST_LIST_ENTRY(category) list; -}; - -extern AST_LIST_HEAD_NOLOCK(categories, category) categories; - -/*! This is implemented by the frontend */ -int run_menu(void); - -int count_categories(void); - -int count_members(struct category *cat); - -/*! \brief Toggle a member of a category at the specified index to enabled/disabled */ -void toggle_enabled(struct category *cat, int index); - -/*! \brief Enable/Disable all members of a category as long as dependencies have been met and no conflicts are found */ -void set_all(struct category *cat, int val); - -/*! \brief returns non-zero if the string is not defined, or has zero length */ -static inline int strlen_zero(const char *s) -{ - return (!s || (*s == '\0')); -} - -#endif /* MENUSELECT_H */ |