GnuCash 2.4.99
gnc-account-merge.h
00001 /********************************************************************\
00002  * gnc-account-merge.h                                              *
00003  * Copyright (C) 2006 Joshua Sled <jsled@asynchronous.org>          *
00004  *                                                                  *
00005  * This program is free software; you can redistribute it and/or    *
00006  * modify it under the terms of the GNU General Public License as   *
00007  * published by the Free Software Foundation; either version 2 of   *
00008  * the License, or (at your option) any later version.              *
00009  *                                                                  *
00010  * This program is distributed in the hope that it will be useful,  *
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
00013  * GNU General Public License for more details.                     *
00014  *                                                                  *
00015  * You should have received a copy of the GNU General Public License*
00016  * along with this program; if not, write to the Free Software      *
00017  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.        *
00018 \********************************************************************/
00019 
00020 
00021 #ifndef GNC_ACCOUNT_MERGE_H
00022 #define GNC_ACCOUNT_MERGE_H
00023 
00024 #include "Account.h"
00025 
00026 typedef enum
00027 {
00028     GNC_ACCOUNT_MERGE_DISPOSITION_USE_EXISTING,
00029     GNC_ACCOUNT_MERGE_DISPOSITION_CREATE_NEW
00030 } GncAccountMergeDisposition;
00031 
00032 typedef struct _merge_error
00033 {
00034     Account *existing_acct;
00035     Account *new_acct;
00036     GncAccountMergeDisposition disposition;
00037 } GncAccountMergeError;
00038 
00039 GncAccountMergeDisposition determine_account_merge_disposition(Account *existing_acct, Account *new_acct);
00040 GncAccountMergeDisposition determine_merge_disposition(Account *existing_root, Account *new_acct);
00041 
00042 void account_trees_merge(Account *existing_root, Account *new_accts_root);
00043 
00044 #endif /* GNC_ACCOUNT_MERGE_H */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines