GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
qofchoice.h
Go to the documentation of this file.
1 /***************************************************************************
2  * qofchoice.h
3  *
4  * Thu Jul 7 12:25:24 2005
5  * Copyright 2005 Neil Williams
7  ****************************************************************************/
8 /*
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22  */
23 
24 #ifndef _QOFCHOICE_H
25 #define _QOFCHOICE_H
26 
93 #include "qofclass.h"
94 #include "qofobject.h"
95 
96 #ifdef __cplusplus
97 extern "C"
98 {
99 #endif
100 
101 #define QOF_MOD_CHOICE "qof.choice"
102 
108 #define QOF_TYPE_CHOICE "choice"
109 
121 gboolean qof_object_is_choice(QofIdTypeConst type);
122 
124 gboolean qof_choice_create(char* type);
125 
135 gboolean qof_choice_add_class(const char* choice, char* add, char* param_name);
136 
147 GList* qof_object_get_choices(QofIdType type, QofParam *param);
148 
158 gboolean qof_choice_check(const char* choice_obj,
159  const char *param_name,
160  const char* choice);
164 #ifdef __cplusplus
165 }
166 #endif
167 
168 #endif /* _QOFCHOICE_H */
const gchar * QofIdTypeConst
Definition: qofid.h:87
the Core Object Registration/Lookup Interface
const gchar * QofIdType
Definition: qofid.h:85
gboolean qof_choice_check(const char *choice_obj, const char *param_name, const char *choice)
Is the choice valid for this param_name?
gboolean qof_object_is_choice(QofIdTypeConst type)
Does this object contain a choice parameter?
gboolean qof_choice_create(char *type)
Set an object as using QOF_TYPE_CHOICE.
API for registering paramters on objects.
GList * qof_object_get_choices(QofIdType type, QofParam *param)
Return the list of all object types usable with this parameter.
gboolean qof_choice_add_class(const char *choice, char *add, char *param_name)
Add the choices for this parameter to the object.