GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gnc-account-merge.h
1 /********************************************************************\
2  * gnc-account-merge.h *
3  * Copyright (C) 2006 Joshua Sled <[email protected]> *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License*
16  * along with this program; if not, write to the Free Software *
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
18 \********************************************************************/
19 
20 
21 #ifndef GNC_ACCOUNT_MERGE_H
22 #define GNC_ACCOUNT_MERGE_H
23 
24 #include "Account.h"
25 
26 typedef enum
27 {
28  GNC_ACCOUNT_MERGE_DISPOSITION_USE_EXISTING,
29  GNC_ACCOUNT_MERGE_DISPOSITION_CREATE_NEW
30 } GncAccountMergeDisposition;
31 
32 typedef struct _merge_error
33 {
34  Account *existing_acct;
35  Account *new_acct;
36  GncAccountMergeDisposition disposition;
38 
39 GncAccountMergeDisposition determine_account_merge_disposition(Account *existing_acct, Account *new_acct);
40 GncAccountMergeDisposition determine_merge_disposition(Account *existing_root, Account *new_acct);
41 
42 void account_trees_merge(Account *existing_root, Account *new_accts_root);
43 
44 #endif /* GNC_ACCOUNT_MERGE_H */
Account handling public routines.