|
Last change
on this file was
17939,
checked in by westram, 6 years ago
|
- change interface AvailableFieldScanner to allow separation of client fields into input- and output-fields.
- separately scan available client fields into 2 arrays.
- display separately using 'input'/'output' selector.
|
|
File size:
1.8 KB
|
| Line | |
|---|
| 1 | // ========================================================= // |
|---|
| 2 | // // |
|---|
| 3 | // File : xfergui.h // |
|---|
| 4 | // Purpose : GUI to configure transfer sets // |
|---|
| 5 | // // |
|---|
| 6 | // Coded by Ralf Westram (coder@reallysoft.de) in Apr 19 // |
|---|
| 7 | // http://www.arb-home.de/ // |
|---|
| 8 | // // |
|---|
| 9 | // ========================================================= // |
|---|
| 10 | |
|---|
| 11 | #ifndef XFERGUI_H |
|---|
| 12 | #define XFERGUI_H |
|---|
| 13 | |
|---|
| 14 | #ifndef ARB_STRARRAY_H |
|---|
| 15 | #include <arb_strarray.h> |
|---|
| 16 | #endif |
|---|
| 17 | #ifndef AW_BASE_HXX |
|---|
| 18 | #include <aw_base.hxx> |
|---|
| 19 | #endif |
|---|
| 20 | |
|---|
| 21 | enum FieldsToScan { |
|---|
| 22 | // bit-flags: |
|---|
| 23 | SCAN_INPUT_FIELDS = 1, // scan input fields (e.g. from import filter) |
|---|
| 24 | SCAN_OUTPUT_FIELDS = 2, // scan output fields (e.g. from target database) |
|---|
| 25 | |
|---|
| 26 | // convenience values: |
|---|
| 27 | SCAN_ALL_FIELDS = SCAN_INPUT_FIELDS | SCAN_OUTPUT_FIELDS |
|---|
| 28 | }; |
|---|
| 29 | |
|---|
| 30 | struct AvailableFieldScanner { |
|---|
| 31 | // allows caller of XFER_select_RuleSet() to provide "available fields" for ruleset definition. |
|---|
| 32 | // call XFER_refresh_available_fields() to trigger field rescan via this interface (e.g. after sth changed on clients side). |
|---|
| 33 | virtual ~AvailableFieldScanner() {} |
|---|
| 34 | |
|---|
| 35 | // scan available fields: |
|---|
| 36 | virtual void scanFields(StrArray& fields, FieldsToScan whatToScan) const = 0; |
|---|
| 37 | // (you may add "<info messages>" to e.g. show error messages) |
|---|
| 38 | }; |
|---|
| 39 | |
|---|
| 40 | void XFER_select_RuleSet(AW_window *aww, const char *awar_selected_fts, const AvailableFieldScanner *fieldScanner); |
|---|
| 41 | const char *XFER_getFullFTS(const char *name); |
|---|
| 42 | void XFER_refresh_available_fields(AW_root *awr, const AvailableFieldScanner *fieldScanner, FieldsToScan whatToScan); |
|---|
| 43 | |
|---|
| 44 | #else |
|---|
| 45 | #error xfergui.h included twice |
|---|
| 46 | #endif // XFERGUI_H |
|---|
Note: See
TracBrowser
for help on using the repository browser.