• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

pilot-qof.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *            pilot-qof.h
00003  *
00004  *  Sun Apr 17 17:56:17 2005
00005  *  Copyright  2005, 2006  Neil Williams
00006  *  linux@codehelp.co.uk
00007  ****************************************************************************/
00008 /*
00009     This program is free software; you can redistribute it and/or modify
00010     it under the terms of the GNU General Public License as published by
00011     the Free Software Foundation; either version 3 of the License, or
00012     (at your option) any later version.
00013 
00014     This program is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017     GNU General Public License for more details.
00018 
00019     You should have received a copy of the GNU General Public License
00020     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00021 */
00022 
00023 #ifndef _PILOT_QOF_H
00024 #define _PILOT_QOF_H
00025 
00091 #include <glib/gprintf.h>
00092 #include "pi-buffer.h"
00093 #include "pi-expense.h"
00094 
00096 #define PQ_MOD_PILOT "pilotqof-objects"
00097 
00099 #define PQ_MOD_PILOT "pilotqof-objects"
00100 
00102 #define PILOT_QOF_LOG "pilot-qof.trace"
00103 
00105 #define PQ_MOD_CLI   "pilotqof-cli"
00106 
00108 #define PQ_DLP_CARD 0
00109 
00111 #define PQ_DLP_OFFSET 0
00112 
00114 #define PQ_DLP_RECORD 0
00115 
00117 #define PQ_DLP_NEW_REC 0
00118 
00120 #define PQ_DLP_SET_ID 0
00121 
00125 #define PQ_DLP_APPREAD -1
00126 
00131 #define PQ_DLP_APPREAD -1
00132 
00137 #define PQ_DLP_REC_ATTR 0
00138 
00140 #define PQ_DEF_BUFSZ 0xffff
00141 
00143 #define PILOT_LINK_SUPPORT "0.12"
00144 
00149 #define PQ_PREF_USE_BACKUP 1
00150 
00155 #define PQ_PREF_USE_SIZE 0
00156 
00158 #define PQ_PREF_VERSION 0
00159 
00180 void 
00181 pilot_entity_finaliser (QofBook * book, gpointer key, 
00182                         gpointer data);
00183 
00196 void 
00197 pilot_qof_pack (QofEntity * ent, gpointer user_data);
00198 
00208 void 
00209 pilot_qof_unpack (QofEntity * ent, gpointer user_data);
00210 
00229 void 
00230 pilot_app_unpack (QofIdTypeConst e_type, gpointer user_data);
00231 
00239 typedef gint (*QofPack) (QofEntity * ent, gpointer user_data);
00240 
00251 typedef struct PilotPack_s
00252 {
00254     QofIdTypeConst e_type;
00257     QofPack pack_func;
00260     QofPack unpack_func;
00263     QofPack free_pack_func;
00266     const gchar *palm_db_name;
00269     QofPack app_info_unpack;
00273     QofPack db_pref_unpack;
00277     const gchar *pref_creator;
00280     gint pref_flag;
00281 } PQPack;
00282 
00293 gboolean 
00294 pilot_qof_pack_register (const PQPack * p);
00295 
00301 const PQPack *pilot_qof_pack_lookup (QofIdTypeConst object_type);
00302 
00305 typedef struct PQExp_s
00306 {
00308     enum ExpenseDistance unit_of_distance;
00310     gint default_currency;
00312     GList *exp_currency_list;
00313 } PQExpensePref;
00314 
00316 typedef struct PQContext_s
00317 {
00319     QofMainContext qof;
00321     gint sd;
00323     gint db;
00325     pi_buffer_t *pi_buf;
00327     pi_buffer_t *app_buf;
00329     CategoryAppInfo_t *pi_cat;
00332     PQExpensePref pi_exp_pref;
00335     guchar pref_buf[PQ_DEF_BUFSZ];
00337     gchar *port;
00339     gint quiet;
00341     gint ent_category;
00343     const gchar *cat_name;
00345     gchar names[16][16];
00348     gboolean invoice_city;
00351     gboolean invoice_vendor;
00352 } PQContext;
00353 
00360 void qof_cmd_hotsync (PQContext * context);
00361 
00364 void pilot_qof_close (void);
00365 
00378 PQContext *
00379 pilot_qof_init (void);
00380 
00384 #endif /* _PILOT_QOF_H */

Generated on Wed Jul 28 2010 21:39:21 for pilot-qof by  doxygen 1.7.1