ITK Function Reference

(V10000.1.0.60_20160308.00)
appinterface.h
Go to the documentation of this file.
1 /*==============================================================================
2  Copyright (c) 2003-2005 UGS Corporation
3  Unpublished - All Rights Reserved
4  ==============================================================================*/
5 
14 /* */
15 
16 #ifndef APPINTERFACE_H
17 #define APPINTERFACE_H
18 
19 #include <unidefs.h>
20 #include <pie/pie.h>
21 
22 #include <ai/libai_exports.h>
23 
34 #define AppInterface_class_name_c "AppInterface"
35 #define MasterRecord_class_name_c "MasterRecord"
36 #define RequestObject_class_name_c "RequestObject"
37 #define RecordObject_class_name_c "RecordObject"
38 
44 #define AppInterfaceType_class_name_c "AppInterfaceType"
45 #define AppInterface_private_structure_type_name_c "PrivateContext"
46 #define AppInterface_private_appgrp_type_name_c "PrivateAppGrp"
47 #define AppInterface_vis_structure_type_name_c "VisStructureContext"
48 
50 #define TC_link_ic_relation_name "IMAN_eco_link"
51 
52 #define AI_id_size_c WSO_desc_size_c
53 #define AI_msg_size_c WSO_desc_size_c
54 
56 #define AI_request_no_dependancy "AI_request_no_dependancy"
57 
59 #define AI_max_app_ref_string 240
60 
62 #define AppInterfaceType_idc_type_name_c "IntermediateDataCapture"
63 typedef enum Request_type_e
64 {
69 
71 typedef enum Request_status_e
72 {
79 
81 typedef enum Request_state_e
82 {
91 
93 typedef enum Request_scope_e
94 {
99 
101 typedef enum Request_update_e
102 {
107 
108 typedef struct AI_search_criteria_s
109 {
115 
119 
123 
127 
129 
130 #ifdef __cplusplus
131  extern "C"{
132 #endif
133 
134 extern AI_API int AI_init_module();
135 
144 extern AI_API int AI_create_instance(
145  const char* type,
146  const char* name,
147  const char* desc,
148  tag_t* ai
149  );
150 
159 extern AI_API int AI_export_objects(
160  tag_t ai,
161  int num,
162  tag_t* objects,
163  logical partial
164  );
173 extern AI_API int AI_export_objects_incremental(
174  tag_t ai,
175  int num,
176  tag_t* objects,
177  logical partial
178 );
186 extern AI_API int AI_can_add_request(
187  tag_t ai,
188  Request_type_t type,
189  logical* ok
190  );
191 
199 extern AI_API int AI_create_request(
200  tag_t ai,
201  const char* name,
202  const char* desc,
203  Request_type_t reqType,
204  tag_t* req
205  );
206 
210 extern AI_API int AI_ask_request_objects(
211  tag_t ai,
212  Request_type_t type,
213  Request_state_t state,
214  int* num,
215  tag_t** req
216  );
217 
221 extern AI_API int AI_ask_next_request(
222  tag_t ai,
223  tag_t cur_req,
224  Request_type_t type,
225  Request_state_t state,
226  tag_t* req
227  );
228 
229 extern AI_API int AI_remove_request_object(
230  tag_t ai,
231  tag_t req
232  );
233 
237 extern AI_API int AI_find(
238  AI_search_criteria_t* seach,
239  int* num,
240  tag_t** ais
241  );
242 
243 extern AI_API int AI_init_search(
244  AI_search_criteria_t* seach
245  );
246 
247 extern AI_API int AI_ask_transfermode(
248  tag_t ai,
249  PIE_direction_t type,
250  tag_t* tm
251  );
252 
253 extern AI_API int AI_set_transfermode(
254  tag_t ai,
255  PIE_direction_t type,
256  tag_t tm
257  );
258 
259 extern AI_API int AI_ask_master_record(
260  tag_t ai,
261  tag_t* ma
262  );
263 
264 extern AI_API int AI_set_master_record(
265  tag_t ai,
266  tag_t ma
267  );
268 
269 extern AI_API int AI_ask_base_refs(
270  tag_t ai,
271  int* num,
272  tag_t** refs
273  );
274 
275 /*****************************************************************************
276  * Description
277  * Set the input tags to base references ( the root objects used by this interface)
278  * If the tags are run time configured objects such as BOMLine, we need to
279  * persistant it.
280  *
281  * If multiple BOMLines are input, we will just create one single private StructureContext
282  *
283  * Note: it will reset the previous baserefs.
284  *
285  * Input:
286  * ref - tag of reference
287  * Output:
288  *
289  *
290  * Returns:
291  * status_t
292  *
293  * Side Effects:
294  * see Description
295  *
296  *****************************************************************************/
297 extern AI_API int AI_set_base_refs(
298  tag_t ai,
299  int num,
300  tag_t* refs
301  );
302 
303 extern AI_API int AI_add_base_ref(
304  tag_t ai,
305  tag_t ref
306  );
307 
308 /*****************************************************************************
309  * Description
310  * Add the input tags to base references ( the root objects used by this interface)
311  * If the tags are run time configured objects such as BOMLine, we need to
312  * persistant it.
313  *
314  * If multiple BOMLines are input, we will just create one single private StructureContext
315  *
316  * Input:
317  * ref - tag of reference
318  * Output:
319  *
320  *
321  * Returns:
322  * status_t
323  *
324  * Side Effects:
325  * see Description
326  *
327  *****************************************************************************/
328 extern AI_API int AI_add_base_refs(
329  tag_t ai,
330  int num,
331  tag_t* refs,
332  int* persistNum,
333  tag_t** persistObj
334  );
335 
342 extern AI_API int AI_ask_site_id(
343  tag_t ai,
344  char id[AI_id_size_c+1]
345  );
346 
347 
349 extern AI_API int AI_ask_site_id2(
350  tag_t ai,
351  char **id
352  );
353 
354 extern AI_API int AI_set_site(
355  tag_t ai,
356  tag_t site
357  );
358 
365 extern AI_API int AI_ask_app_id(
366  tag_t ai,
367  char id[AI_id_size_c+1]
368  );
369 
371 extern AI_API int AI_ask_app_id2(
372  tag_t ai,
373  char **id
374  );
375 
381 extern AI_API int AI_ask_project_id(
382  tag_t ai,
383  char id[AI_id_size_c+1]
384  );
385 
387 extern AI_API int AI_ask_project_id2(
388  tag_t ai,
389  char **id
390  );
391 
392 extern AI_API int AI_set_project_id(
393  tag_t ai,
394  const char* id
395  );
396 
398 extern AI_API int AI_ask_master_file(
399  tag_t ai,
400  tag_t* mf
401  );
402 
403 extern AI_API int AI_set_master_file(
404  tag_t ai,
405  tag_t mf
406  );
407 
422 extern AI_API int AI_request_process(
423  tag_t req,
424  tag_t eco
425  );
426 
430 extern AI_API int AI_request_can_process(
431  tag_t req,
432  logical* ok
433  );
434 
436 extern AI_API int AI_request_process_partial(
437  tag_t req,
438  int num_obj,
439  tag_t* objs
440  );
441 
442 extern AI_API int AI_request_ask_type(
443  tag_t req,
444  int* type
445  );
446 
448 extern AI_API int AI_request_ask_scope(
449  tag_t req,
450  int* scope
451  );
452 
453 extern AI_API int AI_request_set_scope(
454  tag_t req,
455  Request_scope_t scope
456  );
457 
459 extern AI_API int AI_request_ask_update_type(
460  tag_t req,
461  int* update
462  );
463 
464 /*Set for update type, which is Full/Delta*/
465 extern AI_API int AI_request_set_update_type
466 (
467  tag_t req,
468  Request_update_t update
469 );
470 
471 extern AI_API int AI_request_ask_state(
472  tag_t req,
473  int* stat
474  );
475 
476 extern AI_API int AI_request_set_state(
477  tag_t req,
478  Request_state_t stat
479  );
480 
481 
486 extern AI_API int AI_request_ask_state_msg(
487  tag_t req,
488  char stat_msg[AI_msg_size_c+1]
489  );
490 
491 
492 extern AI_API int AI_request_ask_state_msg2(
493  tag_t req,
494  char **stat_msg
495  );
496 
497 extern AI_API int AI_request_set_state_msg(
498  tag_t req,
499  const char* stat_msg
500  );
501 
502 extern AI_API int AI_request_ask_status(
503  tag_t req,
504  int* stat
505  );
506 
507 extern AI_API int AI_request_set_status(
508  tag_t req,
509  Request_status_t stat
510  );
511 
512 
517 extern AI_API int AI_request_ask_status_msg(
518  tag_t req,
519  char stat_msg[AI_msg_size_c+1]
520  );
521 
522 
523 extern AI_API int AI_request_ask_status_msg2(
524  tag_t req,
525  char **stat_msg
526  );
527 
528 extern AI_API int AI_request_set_status_msg(
529  tag_t req,
530  const char* stat_msg
531  );
532 
533 extern AI_API int AI_request_ask_structure_file(
534  tag_t req,
535  Request_update_t type,
536  tag_t* file
537  );
538 
539 extern AI_API int AI_request_set_structure_file(
540  tag_t req,
541  Request_update_t type,
542  tag_t file
543  );
544 
545 extern AI_API int AI_request_ask_process_by(
546  tag_t req,
547  tag_t* user
548  );
549 
550 extern AI_API int AI_request_ask_process_on(
551  tag_t req,
552  date_t* date
553  );
554 
555 extern AI_API int AI_request_ask_owning_ai(
556  tag_t req,
557  tag_t* owner
558  );
559 
560 extern AI_API int AI_request_add_file_map(
561  tag_t req,
562  const char* fileRef,
563  const char* fileId
564  );
565 
570 extern AI_API int AI_request_import_file(
571  tag_t req,
572  const char* fName,
573  const char* fRefId,
574  int fileType,
575  const char* appName,
576  const char* siteId,
577  const char* version,
578  tag_t* fileTag
579  );
580 
591 extern AI_API int AI_save_records(
592  tag_t ai
593  );
594 
598 extern AI_API int AI_add_record(
599  tag_t ai,
600  const char* objId,
601  const char* masterId,
602  date_t date,
603  tag_t* record
604  );
605 
606 extern AI_API int AI_ask_record(
607  tag_t ai,
608  const char* objId,
609  tag_t* record
610  );
611 
612 extern AI_API int AI_remove_record(
613  tag_t ai,
614  const char* objId
615  );
616 
621 extern AI_API int AI_is_object_modified(
622  tag_t ai,
623  const char* objId,
624  date_t modDate,
625  logical* modified
626  );
627 
632 #ifdef __cplusplus
633  }
634 #endif
635 
636 /* ----------------------------------------------------------------------------------
637  AppInterface Type related
638 -------------------------------------------------------------------------------------*/
639 
640 /*****************************************************************************
641 * Description
642 * Finds an AppInterface Type with specified name
643 *
644 * Input:
645 * name - Name of new AIType
646 *
647 * Output:
648 * typeTag - Tag of AIType
649 *
650 * Returns:
651 *
652 * Side Effects:
653 * see Description
654 *
655 *****************************************************************************/
656 extern AI_API int AIType_find
657 (
658  const char *name, /* (I) */
659  tag_t *type /* (O) */
660 );
661 
662 /*****************************************************************************
663 * Description
664 * Returns isUsedForIDC logical flag on AppInterface type.
665 *
666 * Input:
667 * aitype - AppInterface Type object tag
668 *
669 * Output:
670 * status - TRUE/FALSE
671 *
672 * Returns:
673 *
674 * Side Effects:
675 * see Description
676 *
677 *****************************************************************************/
678 extern AI_API int AIType_ask_is_used_for_idc
679 (
680  tag_t aitype, /* (I) */
681  logical* status /* (O) */
682 );
683 
684 /*********************************************************************************
685  Utility Funtion
686 **********************************************************************************/
687 /*****************************************************************************
688 * Description
689 * Utility funtion to validate the PLMXML file, given a checking data file.
690 * It will be able to check:
691 * 1) Total number of element: Element ; Occurrence; 100
692 * 2) Total Number of attribute: Attribute ; Occurrence ; linkedOccurrenceRef; 23
693 * 3) Check whether has require attribute: Required ; Occurrence ; instancedRef
694 *
695 * If any checking failes, will return failure. Checking result will be print to the log file
696 *
697 * Input:
698 * char* plmxml_file, PLMXML file full name
699 * char *custom_fptr, Customization file which contains the checking info
700 * char *log_fptr, Log file
701 *
702 *
703 * Output:
704 * write the result to the log file
705 * logical* failed check failed or not
706 * Returns:
707 *
708 * Side Effects:
709 * see Description
710 *
711 *****************************************************************************/
712 
713 extern AI_API int AI_validate_plmxml
714 (
715  char* plmxml_file, /* (I) */
716  char *custom_fptr, /* (I) */
717  char *log_fptr, /* (I) */
718  logical* failed /* (O) */
719 );
720 extern AI_API int AI_request_find_by_ai_type(
721  Request_type_t req_type, /* (I) */
722  Request_state_t state, /* (I) */
723  const char* ai_type, /* (I) */
724  int* num, /* (O) */
725  tag_t **reqs /* (OF) */
726 );
727 
728 #include <ai/libai_undef.h>
729 
730 #endif