GnuCash 2.4.99
import-backend.h
Go to the documentation of this file.
00001 /********************************************************************\
00002  * This program is free software; you can redistribute it and/or    *
00003  * modify it under the terms of the GNU General Public License as   *
00004  * published by the Free Software Foundation; either version 2 of   *
00005  * the License, or (at your option) any later version.              *
00006  *                                                                  *
00007  * This program is distributed in the hope that it will be useful,  *
00008  * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
00009  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
00010  * GNU General Public License for more details.                     *
00011  *                                                                  *
00012  * You should have received a copy of the GNU General Public License*
00013  * along with this program; if not, contact:                        *
00014  *                                                                  *
00015  * Free Software Foundation           Voice:  +1-617-542-5942       *
00016  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
00017  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
00018 \********************************************************************/
00028 #ifndef TRANSACTION_MATCHER_H
00029 #define TRANSACTION_MATCHER_H
00030 
00031 #include "Transaction.h"
00032 #include "import-match-map.h"
00033 #include "import-settings.h"
00034 
00035 typedef struct _transactioninfo GNCImportTransInfo;
00036 typedef struct _matchinfo GNCImportMatchInfo;
00037 
00038 typedef enum _action
00039 {
00040     GNCImport_SKIP,
00041     GNCImport_ADD,
00042     GNCImport_CLEAR,
00043     GNCImport_UPDATE,
00044     GNCImport_LAST_ACTION,
00045     GNCImport_INVALID_ACTION
00046 } GNCImportAction;
00047 
00048 /************************************************************************
00049  ************************************************************************/
00052 
00060 gboolean gnc_import_exists_online_id (Transaction *trans);
00061 
00086 void gnc_import_find_split_matches(GNCImportTransInfo *trans_info,
00087                                    gint process_threshold,
00088                                    double fuzzy_amount_difference,
00089                                    gint match_date_hardlimit);
00090 
00100 void
00101 gnc_import_TransInfo_init_matches (GNCImportTransInfo *trans_info,
00102                                    GNCImportSettings *settings);
00103 
00121 gboolean
00122 gnc_import_process_trans_item (GncImportMatchMap *matchmap,
00123                                GNCImportTransInfo *trans_info);
00124 
00138 GdkPixbuf* gen_probability_pixbuf (gint score,
00139                                    GNCImportSettings *settings,
00140                                    GtkWidget * widget);
00141 
00145 /************************************************************************
00146  *   Getter/Setter Functions for the Data Types.
00147  ************************************************************************/
00148 
00151 
00163 GNCImportTransInfo *
00164 gnc_import_TransInfo_new (Transaction *trans, GncImportMatchMap *matchmap);
00165 
00167 void gnc_import_TransInfo_delete (GNCImportTransInfo *info);
00168 
00170 GList *gnc_import_TransInfo_get_match_list (const GNCImportTransInfo *info);
00171 
00173 Transaction *gnc_import_TransInfo_get_trans (const GNCImportTransInfo *info);
00174 
00176 gboolean gnc_import_TransInfo_is_balanced (const GNCImportTransInfo *info);
00177 
00179 Split *gnc_import_TransInfo_get_fsplit (const GNCImportTransInfo *info);
00180 
00182 GNCImportMatchInfo *
00183 gnc_import_TransInfo_get_selected_match (const GNCImportTransInfo *info);
00184 
00189 void
00190 gnc_import_TransInfo_set_selected_match (GNCImportTransInfo *info,
00191         GNCImportMatchInfo *match,
00192         gboolean selected_manually);
00193 
00195 gboolean
00196 gnc_import_TransInfo_get_match_selected_manually (const GNCImportTransInfo *info);
00197 
00199 GNCImportAction
00200 gnc_import_TransInfo_get_action (const GNCImportTransInfo *info);
00201 
00203 void
00204 gnc_import_TransInfo_set_action (GNCImportTransInfo *info,
00205                                  GNCImportAction action);
00206 
00208 Account *
00209 gnc_import_TransInfo_get_destacc (const GNCImportTransInfo *info);
00210 
00215 void
00216 gnc_import_TransInfo_set_destacc (GNCImportTransInfo *info,
00217                                   Account *acc,
00218                                   gboolean selected_manually);
00219 
00221 gboolean
00222 gnc_import_TransInfo_refresh_destacc (GNCImportTransInfo *transaction_info,
00223                                       GncImportMatchMap *matchmap);
00224 
00226 gboolean
00227 gnc_import_TransInfo_get_destacc_selected_manually (const GNCImportTransInfo *info);
00228 
00229 
00231 guint32
00232 gnc_import_TransInfo_get_ref_id (const GNCImportTransInfo *info);
00233 
00235 void
00236 gnc_import_TransInfo_set_ref_id (GNCImportTransInfo *info,
00237                                  guint32 ref_id);
00238 
00245 Split *
00246 gnc_import_MatchInfo_get_split (const GNCImportMatchInfo * info);
00247 
00248 
00251 gint
00252 gnc_import_MatchInfo_get_probability (const GNCImportMatchInfo * info);
00255 #endif
00256 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines