00001
00002
00003
00004
00005
00013
00014
00015 #ifndef WORKSPACEOBJECT_H
00016 #define WORKSPACEOBJECT_H
00017
00018 #include <tc/tc_startup.h>
00019 #include <tccore/libtccore_exports.h>
00020
00140 #define WSO_name_size_c 128
00141 #define TC_LEGACY_ID_NAME_SIZE 32
00142
00144 #define WSO_desc_size_c 240
00145
00146 #define WSO_date_size_c 21
00147 #define WSO_object_type_size_c 32
00148 #define WSO_revision_size_c 15
00149 #define WSO_release_status_size_c 128
00150
00151 #define WSO_ip_class_size_c 128
00152 #define WSO_gov_class_size_c 128
00153
00159 #define WSO_where_ref_any_depth -1
00160
00165 #define RLM_tasktype_name_size_c 32
00166 #define RLM_tasktype_desc_size_c 32
00167 #define RLM_followup_action_size_c 32
00168
00173 #define Describe_object_name 0x1
00174 #define Describe_object_type 0x2
00175 #define Describe_owner 0x4
00176 #define Describe_application 0x8
00177 #define Describe_date_created 0x10
00178 #define Describe_date_modified 0x20
00179 #define Describe_date_released 0x40
00180 #define Describe_released_for 0x80
00181 #define Describe_id_string 0x100
00182 #define Describe_revision_number 0x200
00183 #define Describe_revision_limit 0x400
00184 #define Describe_owning_group 0x800
00185 #define Describe_last_mod_user 0x1000
00186 #define Describe_archive_date 0x2000
00187 #define Describe_backup_date 0x4000
00188 #define Describe_description 0x8000
00189 #define Describe_is_frozen 0x10000
00190 #define Describe_is_reserved 0x20000
00191 #define Describe_revision_id 0x40000
00192 #define Describe_owning_site 0x80000
00193
00205 typedef struct WSO_description_s {
00206 char object_name[WSO_name_size_c + 1];
00207 char object_type[WSO_name_size_c + 1];
00208
00209 char owners_name[WSO_name_size_c + 1];
00210 char application[WSO_name_size_c + 1];
00211
00212 char date_created[WSO_date_size_c + 1];
00213 char date_modified[WSO_date_size_c + 1];
00214 char date_released[WSO_date_size_c + 1];
00215 char released_for[WSO_release_status_size_c + 1];
00216
00217 char id_string[WSO_name_size_c + 19];
00218 int revision_number;
00219 int revision_limit;
00221 char owning_group_name[WSO_name_size_c+1];
00222 char last_modifying_user_name[WSO_name_size_c+1];
00223 char archive_date[WSO_date_size_c+1];
00224 char backup_date[WSO_date_size_c+1];
00225 char description[WSO_desc_size_c+1];
00226 int is_frozen;
00227 int is_reserved;
00228 char revision_id[WSO_name_size_c+1];
00229 char owning_site_name[WSO_name_size_c+1];
00230 } WSO_description_t, *WSO_description_p_t;
00231
00235 typedef struct WSO_search_criteria_s{
00236 char class_name[WSO_name_size_c+1];
00238 char pom_class_name[WSO_name_size_c+1];
00239 char name[WSO_name_size_c+1];
00240 char desc[WSO_desc_size_c+1];
00241 int revision;
00242 tag_t owner;
00243 tag_t group;
00244 date_t createdBefore;
00245 date_t modifiedBefore;
00246 date_t releasedBefore;
00247 date_t createdAfter;
00248 date_t modifiedAfter;
00249 date_t releasedAfter;
00250 int scope;
00251 } WSO_search_criteria_t, *WSO_search_criteria_p_t;
00252
00253 #define WSO_search_HOR 0
00254 #define WSO_search_Vault 1
00255
00279 typedef struct WSO_get_info_entry_s {
00280 char name[WSO_name_size_c + 1];
00281 int size;
00282 char* value;
00283 char desc[32];
00284 int p_flag;
00286 int m_flag;
00287 void* client_data;
00289 int entry_number;
00290 int number_of_entries;
00291 } WSO_get_info_entry_t, *WSO_get_info_entry_p_t;
00292
00303 typedef struct WSO_descriptor_s {
00304 int m_flag;
00305 tag_t owner;
00306 tag_t group;
00307 int n_entries;
00308 WSO_get_info_entry_t* entries;
00309 } WSO_descriptor_t, *WSO_descriptor_p_t;
00310
00315 typedef struct WSO_status_s {
00316 char tasktype[RLM_tasktype_name_size_c + 1];
00317 date_t start_date;
00318 date_t end_date;
00319 int start_serial_no;
00320 int end_serial_no;
00321 date_t date_released;
00322 tag_t authorization;
00323 } WSO_status_t;
00324
00328 typedef enum WSOM_open_ended_status_e {
00329 EFFECTIVITY_closed = 0,
00330 EFFECTIVITY_open_ended = 1,
00331 EFFECTIVITY_stock_out = 2
00332 } WSOM_open_ended_status_t;
00333
00340 typedef enum WSOM_range_type_e {
00341 EFFECTIVITY_range_not_defined = 0,
00342 EFFECTIVITY_range_unit = 1,
00343 EFFECTIVITY_range_date = 2,
00344 EFFECTIVITY_range_legacy_unit_and_date = 3
00345 } WSOM_range_type_t;
00346
00347
00348 typedef struct WSOM_effectivity_info_s {
00349 tag_t enditem;
00350 int unitCount;
00351 int* units;
00352 int dateCount;
00353 date_t* dates;
00354 WSOM_open_ended_status_t openEndedStatus;
00355 } WSOM_effectivity_info_t;
00356
00357 #ifdef __cplusplus
00358 extern "C"{
00359 #endif
00360
00361 extern TCCORE_API int WSOM_init_module();
00362
00363 extern TCCORE_API int WSOM_exit_module();
00364
00369 extern TCCORE_API int WSOM_extent(
00370 int* n_instances,
00371 tag_t** instances
00372 );
00373
00381 extern TCCORE_API int WSOM_initialize(
00382 tag_t a_WSO_tag,
00383 const char a_name[WSO_name_size_c + 1],
00384 const char a_description[WSO_desc_size_c + 1]
00385 );
00386
00391 extern TCCORE_API int WSOM_initialize2(
00392 tag_t a_WSO_tag,
00393 const char *a_name,
00394 const char *a_description
00395 );
00396
00407 extern TCCORE_API int WSOM_set_name(
00408 tag_t a_WSO_tag,
00409 const char new_name[WSO_name_size_c + 1]
00410 );
00411
00419 extern TCCORE_API int WSOM_set_name2(
00420 tag_t a_WSO_tag,
00421 const char *new_name
00422 );
00423
00430 extern TCCORE_API int WSOM_ask_name(
00431 tag_t a_WSO_tag,
00432 char a_name[WSO_name_size_c + 1]
00433 );
00434
00438 extern TCCORE_API int WSOM_ask_name2(
00439 tag_t a_WSO_tag,
00440 char **a_name
00441 );
00442
00449 extern TCCORE_API int WSOM_ask_id_string(
00450 tag_t a_WSO_tag,
00451 char** an_id
00452 );
00453
00458 extern TCCORE_API int WSOM_ask_object_id_string(
00459 tag_t a_WSO_tag,
00460 char** object_id
00461 );
00462
00473 extern TCCORE_API int WSOM_set_description(
00474 tag_t a_WSO_tag,
00475 const char new_description[WSO_desc_size_c + 1]
00476 );
00477
00485 extern TCCORE_API int WSOM_set_description2(
00486 tag_t a_WSO_tag,
00487 const char *new_description
00488 );
00489
00496 extern TCCORE_API int WSOM_ask_description(
00497 tag_t a_WSO_tag,
00498 char a_description[WSO_desc_size_c + 1]
00499 );
00500
00504 extern TCCORE_API int WSOM_ask_description2(
00505 tag_t a_WSO_tag,
00506 char **a_description
00507 );
00508
00531 extern TCCORE_API int WSOM_set_object_type(
00532 tag_t wso_tag,
00533 const char object_type[WSO_name_size_c + 1]
00534 );
00535
00556 extern TCCORE_API int WSOM_set_object_type2(
00557 tag_t wso_tag,
00558 const char *object_type
00559 );
00560
00566 extern TCCORE_API int WSOM_ask_status(
00567 tag_t a_WSO_tag,
00568 int* status_count,
00569 WSO_status_t** status_structures
00570 );
00571
00576 extern TCCORE_API int WSOM_set_ip_classification(
00577 tag_t aWSOsTag,
00578 const char newClassn[WSO_ip_class_size_c + 1]
00579 );
00580
00581
00582 extern TCCORE_API int WSOM_set_ip_classification2(
00583 tag_t aWSOsTag,
00584 const char *newClassn
00585 );
00586
00591 extern TCCORE_API int WSOM_ask_ip_classification(
00592 tag_t aWSOsTag,
00593 char aClassification[WSO_ip_class_size_c + 1]
00594 );
00595
00596
00597 extern TCCORE_API int WSOM_ask_ip_classification2(
00598 tag_t aWSOsTag,
00599 char **aClassification
00600 );
00601
00605 extern TCCORE_API int WSOM_has_ip_classification(
00606 tag_t aWSOsTag,
00607 logical* hasIPClassification
00608 );
00609
00614 extern TCCORE_API int WSOM_set_gov_classification(
00615 tag_t aWSOsTag,
00616 const char classification[WSO_gov_class_size_c + 1]
00617 );
00618
00619
00620 extern TCCORE_API int WSOM_set_gov_classification2(
00621 tag_t aWSOsTag,
00622 const char *classification
00623 );
00624
00629 extern TCCORE_API int WSOM_ask_gov_classification(
00630 tag_t aWSOsTag,
00631 char classification[WSO_gov_class_size_c + 1]
00632 );
00633
00634
00635 extern TCCORE_API int WSOM_ask_gov_classification2(
00636 tag_t aWSOsTag,
00637 char **classification
00638 );
00639
00643 extern TCCORE_API int WSOM_has_gov_classification(
00644 tag_t aWSOsTag,
00645 logical* hasGovClassification
00646 );
00650 extern TCCORE_API int WSOM_ask_ip_logged(
00651 tag_t aWSOsTag,
00652 logical* logged
00653 );
00654
00658 extern TCCORE_API int WSOM_ask_user_can_unmanage(
00659 tag_t aWSOsTag,
00660 logical* can_unmanage
00661 );
00662
00666 extern TCCORE_API int WSOM_ask_licenses(
00667 tag_t aWSOTag,
00668 int* licenseCount,
00669 tag_t** licenses
00670 );
00671
00686 extern TCCORE_API int WSOM_find(
00687 const char name[WSO_name_size_c + 1],
00688 int* hits,
00689 tag_t** list
00690 );
00691
00700 extern TCCORE_API int WSOM_find2(
00701 const char *name,
00702 int* hits,
00703 tag_t** list
00704 );
00705
00710 extern TCCORE_API int WSOM_clear_search_criteria(
00711 WSO_search_criteria_t* criteria
00712 );
00713
00765 extern TCCORE_API int WSOM_search(
00766 WSO_search_criteria_t criteria,
00767 int* hits,
00768 tag_t** list
00769 );
00770
00787 extern TCCORE_API int WSOM_get_info(
00788 tag_t a_WS0_tag,
00789 WSO_descriptor_t* info
00790 );
00791
00796 extern TCCORE_API int WSOM_set_info(
00797 tag_t a_WS0_tag,
00798 WSO_descriptor_t* info
00799 );
00800
00804 extern TCCORE_API int WSOM_free_info(
00805 tag_t a_WS0_tag,
00806 WSO_descriptor_t* info
00807 );
00808
00816 extern TCCORE_API int WSOM_describe(
00817 tag_t a_WSO_tag,
00818 WSO_description_t* description
00819 );
00820
00832 extern TCCORE_API int WSOM_copy(
00833 tag_t a_WSO_tag,
00834 const char* new_name,
00835 tag_t* copy_tag
00836 );
00837
00845 extern TCCORE_API int WSOM_set_revision(
00846 tag_t a_WSO_tag,
00847 int rev_number
00848 );
00849
00853 extern TCCORE_API int WSOM_ask_revision(
00854 tag_t a_WSO_tag,
00855 int* rev_number
00856 );
00857
00863 extern TCCORE_API int WSOM_set_revision_limit(
00864 tag_t a_WSO_tag,
00865 int rev_limit
00866 );
00867
00871 extern TCCORE_API int WSOM_ask_revision_limit(
00872 tag_t a_WSO_tag,
00873 int* rev_limit
00874 );
00875
00882 extern TCCORE_API int WSOM_ask_object_type(
00883 tag_t a_WSO_tag,
00884 char object_type[WSO_name_size_c+1]
00885 );
00886
00890 extern TCCORE_API int WSOM_ask_object_type2(
00891 tag_t a_WSO_tag,
00892 char **object_type
00893 );
00894
00905 extern TCCORE_API int WSOM_ask_based_on(
00906 tag_t wso,
00907 tag_t* based_on_wso
00909 );
00910
00921 extern TCCORE_API int WSOM_list_derived_wsos(
00922 tag_t wso,
00923 int* n_derived,
00924 tag_t** derived_wsos
00925 );
00926
00959 extern TCCORE_API int WSOM_where_referenced(
00960 tag_t wso,
00961 int n_levels,
00963 int* n_referencers,
00964 int** levels,
00966 tag_t** referencers,
00967 char*** relations
00969 );
00970
00981 extern TCCORE_API int WSOM_ask_release_status_list(
00982 tag_t workspace_object,
00983 int* status_count,
00984 tag_t** status_list
00985 );
00986
00990 extern TCCORE_API int WSOM_status_ask_date_released(
00991 tag_t release_status,
00992 date_t* release_date
00993 );
00994
01012 extern TCCORE_API int WSOM_effectivity_create(
01013 tag_t release_status,
01014 tag_t end_item,
01015 tag_t* effectivity
01016 );
01017
01023 extern TCCORE_API int WSOM_effectivity_create_empty(
01024 tag_t release_status,
01025 tag_t* effectivity
01026 );
01027
01031 extern TCCORE_API int WSOM_eff_create_with_date_text(
01032 tag_t release_status,
01033 tag_t end_item,
01034 const char* range_text,
01035 tag_t* effectivity
01036 );
01037
01041 extern TCCORE_API int WSOM_eff_create_with_unit_text(
01042 tag_t release_status,
01043 tag_t end_item,
01044 const char* range_text,
01045 tag_t* effectivity
01046 );
01047
01051 extern TCCORE_API int WSOM_effectivity_create_with_effectivitygroup(
01052 tag_t effectivitygroup_rev,
01053 tag_t end_item,
01054 const char* unit_text,
01055 tag_t* effectivity
01056 );
01057
01067 extern TCCORE_API int WSOM_effectivity_create_with_text(
01068 tag_t release_status,
01069 tag_t end_item,
01070 const char* range_text,
01071 tag_t* effectivity
01072 );
01073
01079 extern TCCORE_API int WSOM_effectivity_create_with_units(
01080 tag_t release_status,
01081 tag_t end_item,
01082 int n_units,
01083 int* start_end_values,
01085 WSOM_open_ended_status_t open_ended_or_stock_out,
01087 tag_t* effectivity
01088 );
01089
01095 extern TCCORE_API int WSOM_effectivity_create_with_dates(
01096 tag_t release_status,
01097 tag_t end_item,
01098 int n_dates,
01099 date_t* start_end_values,
01101 WSOM_open_ended_status_t open_ended_or_stock_out,
01103 tag_t* effectivity
01104 );
01105
01112 extern TCCORE_API int WSOM_status_ask_effectivities(
01113 tag_t release_status,
01114 int* n_effectivities,
01115 tag_t** effectivities
01116 );
01117
01123 extern TCCORE_API int WSOM_status_remove_effectivity(
01124 tag_t release_status,
01125 tag_t effectivity
01126 );
01127
01133 extern TCCORE_API int WSOM_status_clear_effectivities(
01134 tag_t release_status
01135 );
01136
01159 extern TCCORE_API int WSOM_eff_set_range(
01160 tag_t release_status,
01161 tag_t effectivity,
01162 const char* range_text,
01163 logical append
01165 );
01166
01173 extern TCCORE_API int WSOM_effectivity_set_range(
01174 tag_t effectivity,
01175 const char* range_text,
01176 logical append
01177 );
01178
01184 extern TCCORE_API int WSOM_eff_set_unit_range(
01185 tag_t release_status,
01186 tag_t effectivity,
01187 const char* range_text,
01188 logical append
01189 );
01190
01195 extern TCCORE_API int WSOM_eff_ask_unit_range(
01196 tag_t release_status,
01197 tag_t effectivity,
01198 char** range_text
01199 );
01200
01205 extern TCCORE_API int WSOM_effectivity_ask_unit_range(
01206 tag_t effectivity,
01207 char** range_text
01208 );
01209
01215 extern TCCORE_API int WSOM_eff_set_date_range(
01216 tag_t release_status,
01217 tag_t effectivity,
01218 const char* range_text,
01219 logical append
01220 );
01221
01226 extern TCCORE_API int WSOM_eff_ask_date_range(
01227 tag_t release_status,
01228 tag_t effectivity,
01229 char** range_text
01230 );
01231
01236 extern TCCORE_API int WSOM_effectivity_ask_date_range(
01237 tag_t effectivity,
01238 char** range_text
01239 );
01240
01245 extern TCCORE_API int WSOM_eff_ask_range(
01246 tag_t release_status,
01247 tag_t effectivity,
01248 char** range_text
01249 );
01250
01255 extern TCCORE_API int WSOM_effectivity_ask_range(
01256 tag_t effectivity,
01257 char** range_text
01258 );
01259
01273 extern TCCORE_API int WSOM_eff_set_units(
01274 tag_t release_status,
01275 tag_t effectivity,
01276 int n_units,
01277 int* start_end_values,
01285 WSOM_open_ended_status_t open_ended_or_stock_out,
01287 logical append
01289 );
01290
01295 extern TCCORE_API int WSOM_effectivity_set_units(
01296 tag_t effectivity,
01297 int n_units,
01298 int* start_end_values,
01299 WSOM_open_ended_status_t open_ended_or_stock_out,
01300 logical append
01301 );
01302
01312 extern TCCORE_API int WSOM_eff_set_dates(
01313 tag_t release_status,
01314 tag_t effectivity,
01315 int n_dates,
01316 date_t* start_end_values,
01324 WSOM_open_ended_status_t open_ended_or_stock_out,
01326 logical append
01328 );
01329
01334 extern TCCORE_API int WSOM_effectivity_set_dates(
01335 tag_t effectivity,
01336 int n_dates,
01337 date_t* start_end_values,
01338 WSOM_open_ended_status_t open_ended_or_stock_out,
01339 logical append
01340 );
01341
01346 extern TCCORE_API int WSOM_eff_ask_units(
01347 tag_t release_status,
01348 tag_t effectivity,
01349 int* n_units,
01350 int** start_end_values,
01351 WSOM_open_ended_status_t* open_ended_or_stock_out
01353 );
01354
01359 extern TCCORE_API int WSOM_effectivity_ask_units(
01360 tag_t effectivity,
01361 int* n_units,
01362 int** start_end_values,
01363 WSOM_open_ended_status_t* open_ended_or_stock_out
01364 );
01365
01370 extern TCCORE_API int WSOM_eff_ask_dates(
01371 tag_t release_status,
01372 tag_t effectivity,
01373 int* n_dates,
01374 date_t** start_end_values,
01375 WSOM_open_ended_status_t* open_ended_or_stock_out
01377 );
01378
01383 extern TCCORE_API int WSOM_effectivity_ask_dates(
01384 tag_t effectivity,
01385 int* n_dates,
01386 date_t** start_end_values,
01387 WSOM_open_ended_status_t* open_ended_or_stock_out
01388 );
01389
01399 extern TCCORE_API int WSOM_eff_ask_ranges(
01400 tag_t release_status,
01401 tag_t effectivity,
01402 int* n_units,
01403 int* n_dates,
01404 int** units,
01405 date_t** dates,
01406 WSOM_open_ended_status_t* unit_open_ended_status,
01408 WSOM_open_ended_status_t* date_open_ended_status
01409 );
01410
01415 extern TCCORE_API int WSOM_effectivity_ask_ranges(
01416 tag_t effectivity,
01417 int* n_units,
01418 int* n_dates,
01419 int** units,
01420 date_t** dates,
01421 WSOM_open_ended_status_t* unit_open_ended_status,
01422 WSOM_open_ended_status_t* date_open_ended_status
01423 );
01424
01428 extern TCCORE_API int WSOM_eff_ask_range_type(
01429 tag_t release_status,
01430 tag_t effectivity,
01431 WSOM_range_type_t* range_type
01434 );
01435
01440 extern TCCORE_API int WSOM_effectivity_ask_range_type(
01441 tag_t effectivity,
01442 WSOM_range_type_t* range_type
01443 );
01444
01449 extern TCCORE_API int WSOM_eff_clear_ranges(
01450 tag_t release_status,
01451 tag_t effectivity
01452 );
01453
01461 extern TCCORE_API int WSOM_eff_set_range_type(
01462 tag_t release_status,
01463 tag_t effectivity,
01464 WSOM_range_type_t range_type
01465 );
01466
01472 extern TCCORE_API int WSOM_effectivity_set_range_type(
01473 tag_t effectivity,
01474 WSOM_range_type_t range_type
01475 );
01476
01487 extern TCCORE_API int WSOM_eff_set_end_item_rev(
01488 tag_t release_status,
01489 tag_t effectivity,
01490 tag_t end_item_rev
01491 );
01492
01493
01503 extern TCCORE_API int WSOM_eff_set_end_item(
01504 tag_t release_status,
01505 tag_t effectivity,
01506 tag_t end_item
01507 );
01508
01513 extern TCCORE_API int WSOM_effectivity_set_end_item(
01514 tag_t effectivity,
01515 tag_t end_item
01516 );
01517
01521 extern TCCORE_API int WSOM_eff_ask_end_item_rev(
01522 tag_t release_status,
01523 tag_t effectivity,
01524 tag_t* end_item_rev
01525 );
01526
01530 extern TCCORE_API int WSOM_eff_ask_end_item(
01531 tag_t release_status,
01532 tag_t effectivity,
01533 tag_t* end_item
01534 );
01535
01540 extern TCCORE_API int WSOM_effectivity_ask_end_item(
01541 tag_t effectivity,
01542 tag_t* end_item
01543 );
01544
01550 extern TCCORE_API int WSOM_eff_set_protection(
01551 tag_t release_status,
01552 tag_t effectivity,
01553 logical protection
01554 );
01555
01560 extern TCCORE_API int WSOM_effectivity_set_protection(
01561 tag_t effectivity,
01562 logical protection
01563 );
01564
01568 extern TCCORE_API int WSOM_eff_ask_is_protected(
01569 tag_t release_status,
01570 tag_t effectivity,
01571 logical* is_protected
01572 );
01573
01578 extern TCCORE_API int WSOM_effectivity_is_protected(
01579 tag_t effectivity,
01580 logical* is_protected
01581 );
01582
01592 extern TCCORE_API int WSOM_ask_effectivity_mode(
01593 logical* is_v7
01594 );
01595
01596
01597 extern TCCORE_API int WSOM_ask_ead_paragraph (
01598 tag_t aWSOTag,
01599 int* num,
01600 char *** paragraph
01601 );
01602
01603
01604
01607 #ifdef __cplusplus
01608 }
01609 #endif
01610
01613 #include <tccore/libtccore_undef.h>
01614
01615 #endif