discussion generic import design
Derek Atkins
warlord@MIT.EDU
28 Oct 2002 16:15:59 -0500
Benoit Gr=E9goire <bock@step.polymtl.ca> writes:
> I think the best thing you could work on is indeed (If I understand you=
=20
> properly) the match remembering functions I discussed in the mail I sent =
on=20
> the 21st:
>=20
> Account * gnc_import_find_dest_account(char * match_text) and
> void gnc_import_set_dest_account(char * match_text, Account * dest_accoun=
t).=20=20
> These should be implemented in a new C file and included in the generic=
=20
> importers public include file.
May I suggest:
typedef enum {
GNCIMPORT_MATCH_PAYEE =3D 1,
GNCIMPORT_MATCH_MEMO,
GNCIMPORT_MATCH_CATEGORY,
GNCIMPORT_MATCH_CLASS,
} GncImportMatchType;
Account* gnc_import_find_map_account(GNCBook*, GncImportMatchType);
void gnc_import_add_map_account(GNCBook*, GncImportMatchType, Accou=
nt*);
State (where to store the maps) would be _useful_. Different books
probably want different match-maps.
-derek
--=20
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord@MIT.EDU PGP key available