Line data Source code
1 : /***************************************************************************
2 : * cashobjects.c
3 : *
4 : * Mon Aug 22 09:49:52 2005
5 : * Copyright 2005 Neil Williams linux@codehelp.co.uk
6 : *
7 : * Copyright (C) 2002 Derek Atkins
8 : * Copyright (C) 2010 Christian Stimming
9 : *
10 : ****************************************************************************/
11 :
12 : /*
13 : * This program is free software; you can redistribute it and/or modify
14 : * it under the terms of the GNU General Public License as published by
15 : * the Free Software Foundation; either version 2 of the License, or
16 : * (at your option) any later version.
17 : *
18 : * This program is distributed in the hope that it will be useful,
19 : * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 : * GNU General Public License for more details.
22 : *
23 : * You should have received a copy of the GNU General Public License
24 : * along with this program; if not, write to the Free Software
25 : * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26 : * 02110-1301, USA.
27 : */
28 :
29 : #include <config.h>
30 : #include "cashobjects.h"
31 : #include "gnc-engine.h"
32 : #include "AccountP.hpp"
33 : #include "TransactionP.hpp"
34 : #include "SchedXaction.h"
35 : #include "SX-book-p.h"
36 : #include "gnc-pricedb-p.h"
37 : #include "gnc-lot-p.h"
38 : #include "gnc-budget.h"
39 :
40 : #include "gncAddressP.h"
41 : #include "gncBillTermP.h"
42 : #include "gncCustomerP.h"
43 : #include "gncEmployeeP.h"
44 : #include "gncEntryP.h"
45 : #include "gncInvoiceP.h"
46 : #include "gncJobP.h"
47 : #include "gncOrderP.h"
48 : #include "gncOwnerP.h"
49 : #include "gncTaxTableP.h"
50 : #include "gncVendorP.h"
51 :
52 : static void
53 83 : business_core_init(void)
54 : {
55 : /* initialize known types */
56 83 : gncInvoiceRegister ();
57 83 : gncJobRegister ();
58 83 : gncBillTermRegister ();
59 83 : gncCustomerRegister ();
60 83 : gncAddressRegister ();
61 83 : gncEmployeeRegister ();
62 83 : gncEntryRegister ();
63 83 : gncOrderRegister ();
64 83 : gncOwnerRegister ();
65 83 : gncTaxTableRegister ();
66 83 : gncVendorRegister ();
67 83 : }
68 :
69 : gboolean
70 83 : cashobjects_register(void)
71 : {
72 83 : g_return_val_if_fail(gnc_commodity_table_register(), FALSE);
73 83 : g_return_val_if_fail(xaccAccountRegister(), FALSE);
74 83 : g_return_val_if_fail ( gnc_sxtt_register(), FALSE);
75 83 : g_return_val_if_fail ( SXRegister (), FALSE);
76 83 : g_return_val_if_fail ( xaccTransRegister(), FALSE);
77 83 : g_return_val_if_fail ( xaccSplitRegister(), FALSE);
78 83 : g_return_val_if_fail(gnc_pricedb_register(), FALSE);
79 83 : g_return_val_if_fail (gnc_budget_register(), FALSE);
80 83 : g_return_val_if_fail ( gnc_lot_register (), FALSE);
81 :
82 : /* And the business objects */
83 83 : business_core_init();
84 :
85 83 : return TRUE;
86 : }
87 :
|