2009-04-06 07:13:46 -05:00
|
|
|
/********************************************************************\
|
|
|
|
* gnc-account-merge.h *
|
|
|
|
* Copyright (C) 2006 Joshua Sled <jsled@asynchronous.org> *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or *
|
|
|
|
* modify it under the terms of the GNU General Public License as *
|
|
|
|
* published by the Free Software Foundation; either version 2 of *
|
|
|
|
* the License, or (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License*
|
|
|
|
* along with this program; if not, write to the Free Software *
|
|
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
|
|
|
|
\********************************************************************/
|
|
|
|
|
2006-01-15 17:04:19 -06:00
|
|
|
|
|
|
|
#ifndef GNC_ACCOUNT_MERGE_H
|
|
|
|
#define GNC_ACCOUNT_MERGE_H
|
|
|
|
|
|
|
|
#include "Account.h"
|
|
|
|
|
2009-12-29 14:12:48 -06:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GNC_ACCOUNT_MERGE_DISPOSITION_USE_EXISTING,
|
|
|
|
GNC_ACCOUNT_MERGE_DISPOSITION_CREATE_NEW
|
2006-01-15 17:04:19 -06:00
|
|
|
} GncAccountMergeDisposition;
|
|
|
|
|
2009-12-29 14:12:48 -06:00
|
|
|
typedef struct _merge_error
|
|
|
|
{
|
|
|
|
Account *existing_acct;
|
|
|
|
Account *new_acct;
|
|
|
|
GncAccountMergeDisposition disposition;
|
2006-01-15 17:04:19 -06:00
|
|
|
} GncAccountMergeError;
|
|
|
|
|
|
|
|
GncAccountMergeDisposition determine_account_merge_disposition(Account *existing_acct, Account *new_acct);
|
2007-02-22 19:23:31 -06:00
|
|
|
GncAccountMergeDisposition determine_merge_disposition(Account *existing_root, Account *new_acct);
|
2006-01-15 17:04:19 -06:00
|
|
|
|
2007-02-22 19:23:31 -06:00
|
|
|
void account_trees_merge(Account *existing_root, Account *new_accts_root);
|
2006-01-15 17:04:19 -06:00
|
|
|
|
2006-01-18 19:29:24 -06:00
|
|
|
#endif /* GNC_ACCOUNT_MERGE_H */
|