GnuCash  4.8a-132-gcdaeb421d+
gnc-event.c
1 /********************************************************************\
2  * This program is free software; you can redistribute it and/or *
3  * modify it under the terms of the GNU General Public License as *
4  * published by the Free Software Foundation; either version 2 of *
5  * the License, or (at your option) any later version. *
6  * *
7  * This program is distributed in the hope that it will be useful, *
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
10  * GNU General Public License for more details. *
11  * *
12  * You should have received a copy of the GNU General Public License*
13  * along with this program; if not, contact: *
14  * *
15  * Free Software Foundation Voice: +1-617-542-5942 *
16  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
17  * Boston, MA 02110-1301, USA gnu@gnu.org *
18  * *
19 \********************************************************************/
20 
21 #include <config.h>
22 #include "gnc-event.h"
23 
25 {
26  switch (id)
27  {
28  case 0:
29  return "NONE";
30  case QOF_EVENT_CREATE:
31  return "CREATE";
32  case QOF_EVENT_MODIFY:
33  return "MODIFY";
34  case QOF_EVENT_DESTROY:
35  return "DESTROY";
36  case QOF_EVENT_ADD:
37  return "ADD";
38  case QOF_EVENT_REMOVE:
39  return "REMOVE";
40 
42  return "ITEM_ADDED";
43  case GNC_EVENT_ITEM_REMOVED:
44  return "ITEM_REMOVED";
45  case GNC_EVENT_ITEM_CHANGED:
46  return "ITEM_CHANGED";
47 
48  default:
49  return "<unknown, maybe multiple>";
50  }
51 }
const char * qofeventid_to_string(QofEventId id)
Convert the given QofEventId (an integer number) to a string that is usable in debugging output...
Definition: gnc-event.c:24
gint QofEventId
Define the type of events allowed.
Definition: qofevent.h:45
Additional event handling code.
#define GNC_EVENT_ITEM_ADDED
These events are used when a split is added to an account.
Definition: gnc-event.h:45