00001
00002
00003
00004
00005
00012
00013
00014 #ifndef APPR_H
00015 #define APPR_H
00016
00017 #include <unidefs.h>
00018 #include <appr/libappr_exports.h>
00019
00031 #define APPR_cfg_mode_rel_date 0
00032 #define APPR_cfg_mode_date_eff 1
00033 #define APPR_cfg_mode_unit_eff 2
00034 #define APPR_cfg_mode_unit_plus_rdate 3
00035 #define APPR_cfg_mode_working_data 4
00036
00038 #ifdef __cplusplus
00039 extern "C"{
00040 #endif
00041
00046 extern APPR_API const char* APPR_get_APPR_attr_op_case_insensitive();
00047 extern APPR_API const char* APPR_get_APPR_attr_op_like();
00048 extern APPR_API const char* APPR_get_APPR_attr_op_not_like();
00049 extern APPR_API const char* APPR_get_APPR_attr_op_null();
00050 extern APPR_API const char* APPR_get_APPR_attr_op_not_null();
00051 extern APPR_API const char* APPR_get_APPR_attr_op_ge();
00052 extern APPR_API const char* APPR_get_APPR_attr_op_le();
00053 extern APPR_API const char* APPR_get_APPR_attr_op_ne();
00054 extern APPR_API const char* APPR_get_APPR_attr_op_eq();
00055 extern APPR_API const char* APPR_get_APPR_attr_op_gt();
00056 extern APPR_API const char* APPR_get_APPR_attr_op_lt();
00064 extern APPR_API int APPR_root_create(
00065 tag_t root_item,
00066 tag_t bom_view,
00067 tag_t revision_rule,
00068 logical has_spatial_data,
00069 tag_t* appr_root
00070 );
00071
00078 extern APPR_API int APPR_root_delete(
00079 tag_t appr_root
00080 );
00081
00087 extern APPR_API int APPR_root_extent(
00088 tag_t root_item,
00089 tag_t bom_view,
00090 tag_t revision_rule,
00092 int* num_appr_roots,
00093 tag_t** appr_roots
00094 );
00095
00103 extern APPR_API int APPR_root_extent_approx_rr(
00104 tag_t root_item,
00105 tag_t bom_view,
00106 tag_t revision_rule,
00108 int* num_appr_roots,
00109 tag_t** appr_roots
00110 );
00111
00115 extern APPR_API int APPR_extent(
00116 tag_t appearance_root,
00120 logical search_on_parent_appearance,
00124 tag_t parent_appearance,
00125 logical search_on_occurrence_thread,
00134 tag_t occurrence_thread,
00135 tag_t component_item,
00137 logical search_on_component_bom_view,
00141 tag_t component_bom_view,
00142 date_t date,
00144 logical search_on_unit_number,
00146 int unit_number,
00147 tag_t query,
00161 int num_query_entries,
00165 char** query_entries,
00166 char** query_values,
00167 int num_ics_classes,
00170 char** ics_class_names,
00171 int num_ics_entries,
00174 int* ics_uncts,
00175 char** ics_values,
00176 int ics_options,
00180 int num_mapped_attrs,
00184 char** mapped_attr_names,
00185 char** mapped_attr_values,
00186 int num_filter_appearances,
00190 tag_t* filter_appearances,
00191 int* num_appearances,
00193 tag_t** appearances
00194 );
00195
00199 extern APPR_API int APPR_root_ask_root_item(
00200 tag_t appr_root,
00201 tag_t* root_item
00202 );
00203
00207 extern APPR_API int APPR_root_ask_bom_view(
00208 tag_t appr_root,
00209 tag_t* bom_view
00210 );
00211
00218 extern APPR_API int APPR_root_ask_root_item_info(
00219 tag_t appr_root,
00220 tag_t* root_item_info
00221 );
00222
00226 extern APPR_API int APPR_root_ask_revision_rule(
00227 tag_t appr_root,
00228 tag_t* revision_rule
00229 );
00230
00236 extern APPR_API int APPR_root_ask_config_mode(
00237 tag_t appr_root,
00238 int* config_mode
00243 );
00244
00250 extern APPR_API int APPR_root_ask_config_context(
00251 tag_t appr_root,
00252 tag_t* config_context
00253 );
00254
00258 extern APPR_API int APPR_ask_validity_dates(
00259 tag_t appearance,
00260 date_t* in_date,
00261 date_t* out_date,
00262 logical* is_null
00264 );
00265
00269 extern APPR_API int APPR_ask_validity_unit_nos(
00270 tag_t appearance,
00271 int* in_unit_no,
00272 int* out_unit_no,
00273 logical* is_null
00275 );
00276
00281 extern APPR_API int APPR_ask_is_valid(
00282 tag_t appearance,
00283 date_t date,
00288 logical check_unit_no,
00292 int unit_no,
00293 logical* verdict
00294 );
00295
00299 extern APPR_API int APPR_ask_parent(
00300 tag_t appearance,
00301 tag_t* parent
00302 );
00303
00307 extern APPR_API int APPR_ask_appr_root(
00308 tag_t appearance,
00309 tag_t* appr_root
00310 );
00311
00315 extern APPR_API int APPR_ask_occurrence(
00316 tag_t appearance,
00317 tag_t* occurrence
00318 );
00319
00323 extern APPR_API int APPR_ask_component_item(
00324 tag_t appearance,
00325 tag_t* component_item
00326 );
00327
00331 extern APPR_API int APPR_ask_component_bom_view(
00332 tag_t appearance,
00333 tag_t* component_bom_view
00334 );
00335
00339 extern APPR_API int APPR_ask_transform(
00340 tag_t appearance,
00341 double** xform_data
00342 );
00343
00349 extern APPR_API int APPR_ask_validity_min_date(
00350 date_t* validity_min_date
00351 );
00352
00359 extern APPR_API int APPR_ask_validity_max_date(
00360 date_t* validity_max_date
00361 );
00362
00369 extern APPR_API int APPR_ask_validity_min_unit_no(
00370 int* validity_min_unit_no
00371 );
00372
00379 extern APPR_API int APPR_ask_validity_max_unit_no(
00380 int* validity_max_unit_no
00381 );
00382
00386 extern APPR_API int APPR_define_attr(
00387 const char* name,
00388 tag_t* attrdef
00389 );
00390
00394 extern APPR_API int APPR_ask_attr_list(
00395 int* n_attrdefs,
00396 tag_t** attrdefs
00397 );
00398
00402 extern APPR_API int APPR_find_attr(
00403 const char* attrname,
00404 tag_t* attrdef
00405 );
00406
00410 extern APPR_API int APPR_ask_attr_name(
00411 tag_t attrdef,
00412 char** name
00413 );
00414
00420 extern APPR_API int APPR_delete_instances_of_attr(
00421 tag_t attrdef
00422 );
00423
00424
00428 extern APPR_API int APPR_ask_attr_mappings(
00429 int* n_mappings,
00430 tag_t** mappings
00431 );
00432
00437 extern APPR_API int APPR_ask_attr_mapping(
00438 tag_t mapping,
00439 int* n_notetypes,
00440 tag_t** notetypes,
00441 int* n_attrdefs,
00442 tag_t** attrdefs
00443 );
00444
00448 extern APPR_API int APPR_ask_attr_mapping_as_string(
00449 tag_t mapping,
00450 char** mappingAsString
00451 );
00452
00456 extern APPR_API int APPR_create_attr_mapping(
00457 int n_notetypes,
00458 tag_t* notetypes,
00459 int n_attrdefs,
00460 tag_t* attrdefs,
00461 logical external,
00462 tag_t* mapping
00463 );
00464
00468 extern APPR_API int APPR_set_attr_mapping(
00469 tag_t mapping,
00470 int n_notetypes,
00471 tag_t* notetypes,
00472 int n_attrdefs,
00473 tag_t* attrdefs
00474 );
00475
00479 extern APPR_API int APPR_find_attr_mapping(
00480 int n_notetypes,
00481 tag_t* notetypes,
00482 int n_attrdefs,
00483 tag_t* attrdefs,
00484 tag_t* mapping
00485 );
00486
00490 extern APPR_API int APPR_ask_mapping_external(
00491 tag_t mapping,
00492 logical* external
00493 );
00494
00498 extern APPR_API int APPR_set_mapping_external(
00499 tag_t mapping,
00500 logical external
00501 );
00502
00506 extern APPR_API int APPR_set_attr_value(
00507 tag_t appearance,
00508 tag_t attrdef,
00509 const char* value
00510 );
00511
00515 extern APPR_API int APPR_ask_attr_value(
00516 tag_t appearance,
00517 tag_t attrdef,
00518 char** value
00519 );
00520
00524 extern APPR_API int APPR_ask_named_attr_values(
00525 tag_t appearance,
00526 int n_values,
00527 const char** attrnames,
00528 char*** attrvalues
00529 );
00530
00535 extern APPR_API int APPR_ask_attr_values(
00536 tag_t appearance,
00537 int* n_values,
00538 char*** attrnames,
00539 char*** attrvalues
00540 );
00541
00546 extern APPR_API int APPR_ask_all_attr_values(
00547 tag_t appearance,
00548 int* n_values,
00549 char*** attrnames,
00550 char*** attrvalues
00551 );
00552
00562 extern APPR_API int APPR_create_updater(
00563 tag_t release_status,
00564 int n_item_revs,
00565 tag_t* item_revs,
00566 tag_t* updater
00567 );
00568
00576 extern APPR_API int APPR_create_incr_updater(
00577 tag_t release_status,
00578 tag_t incr_rev,
00579 tag_t* updater
00580 );
00581
00589 extern APPR_API int APPR_create_pre_release_updater(
00590 tag_t release_status,
00591 int n_item_revs,
00592 tag_t* item_revs,
00593 tag_t* updater
00594 );
00595
00604 extern APPR_API int APPR_create_import_updater(
00605 date_t when,
00606 tag_t release_status,
00607 int n_item_revs,
00608 tag_t* item_revs,
00609 tag_t* updater
00610 );
00611
00615 extern APPR_API int APPR_create_working_updater(
00616 tag_t* updater
00617 );
00618
00622 extern APPR_API int APPR_process_import_updates();
00623
00626 #ifdef __cplusplus
00627 }
00628 #endif
00629
00630 #include <appr/libappr_undef.h>
00631
00632 #endif