ITK Function Reference
(V10000.1.0.60_20160308.00)
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
sa
am.h
Go to the documentation of this file.
1
/*==============================================================================
2
Copyright (c) 2003-2005 UGS Corporation
3
Unpublished - All Rights Reserved
4
==============================================================================*/
5
12
/* */
13
14
#ifndef AM_INCLUDED
15
#define AM_INCLUDED
16
22
#ifdef __lint
23
#pragma uginclude needed
24
#endif
25
26
#include <
unidefs.h
>
27
#include <
pom/am/am_errors.h
>
28
29
#include <sa/libsa_exports.h>
30
80
#define AM_acl_name_len 128
81
#define AM_rule_name_len 32
82
#define AM_rule_arg_len 128
83
#define AM_priv_name_len 32
84
#define AM_named_tag_name_len 32
85
86
#define AM_MODE_UNSET 0
87
#define AM_MODE_ALL_GROUPS (1 << 0)
88
#define AM_MODE_RULES (1 << 1)
89
90
#define AM_ACLClassName "AM_ACL"
91
#define AM_REASONPropertyName "reason"
92
93
#ifdef __cplusplus
94
extern
"C"
{
95
#endif
96
105
SA_API
int
AM_find_acl
(
106
const
char
* acl_name,
107
tag_t
* acl_id
108
);
109
113
SA_API
int
AM_list_acls
(
114
int
* n_acls,
115
tag_t
** acl_ids
116
);
117
122
SA_API
int
AM_create_acl
(
123
const
char
* acl_name,
124
tag_t
* acl_id
125
);
126
135
SA_API
int
AM_save_acl
(
136
tag_t
acl_id
137
);
138
142
SA_API
int
AM_unload_acl
(
143
tag_t
acl_id
144
);
145
150
SA_API
int
AM_delete_acl
(
151
tag_t
acl_id
152
);
153
158
SA_API
int
AM_set_acl_name
(
159
tag_t
acl_id,
160
const
char
* acl_name
161
);
162
166
SA_API
int
AM_ask_acl_name
(
167
tag_t
acl_id,
168
char
** acl_name
169
);
170
174
SA_API
int
AM_ask_acl_display_name
(
175
tag_t
acl_id,
176
char
** acl_display_name
177
);
178
179
SA_API
int
AM_set_default_acl_flag
(
180
tag_t
acl_id
181
);
182
183
SA_API
int
AM_set_acl_flag
(
184
tag_t
acl_id,
185
const
char
* acl_flag
186
);
187
188
SA_API
int
AM_ask_acl_flag
(
189
tag_t
acl_id,
190
char
** acl_flag
191
);
192
193
SA_API
int
AM_list_acls_by_type
(
194
int
* n_acls,
195
tag_t
** acl_ids,
196
const
char
* acl_flag
197
);
198
209
SA_API
int
AM_list_accessors
(
210
tag_t
acl_id,
211
int
* n_accessors,
212
tag_t
** accessors
213
);
214
226
SA_API
int
AM_grant_privilege
(
227
tag_t
acl_id,
228
tag_t
accessor_id,
229
tag_t
privilege
230
);
231
243
SA_API
int
AM_revoke_privilege
(
244
tag_t
acl_id,
245
tag_t
accessor_id,
246
tag_t
privilege
247
);
248
260
SA_API
int
AM_unset_privilege
(
261
tag_t
acl_id,
262
tag_t
accessor_id,
263
tag_t
privilege
264
);
265
270
SA_API
int
AM_list_accessor_privileges
(
271
tag_t
acl_id,
272
tag_t
accessor_id,
273
int
* n_granted,
274
tag_t
** granted,
275
int
* n_revoked,
276
tag_t
** revoked
277
);
278
292
SA_API
int
AM_evaluate_privilege
(
293
tag_t
object
,
294
const
char
* privilege,
296
logical
* verdict,
297
int
* n_rules,
298
char
*** rules,
299
char
*** args,
300
tag_t
* acl,
301
tag_t
* accessor
302
);
303
311
SA_API
int
AM_check_privilege
(
312
tag_t
object
,
313
const
char
* privilege,
315
logical
* verdict
316
);
317
326
SA_API
int
AM_check_users_privilege
(
327
tag_t
user,
328
tag_t
object
,
329
const
char
* privilege,
331
logical
* verdict
332
);
333
342
SA_API
int
AM_evaluate_users_privilege
(
343
tag_t
user,
344
tag_t
object
,
345
const
char
* privilege,
347
logical
* verdict,
348
int
* n_rules,
349
char
*** rules,
350
char
*** args,
351
tag_t
* acl,
352
tag_t
* accessor
353
);
354
368
SA_API
int
AM_get_effective_acl
(
369
tag_t
object
,
370
tag_t
* eff_acl_tag,
371
int
* length
372
);
373
378
SA_API
int
AM_effective_acl_line
(
379
tag_t
eff_acl_tag,
380
int
index,
381
tag_t
* source_acl,
382
tag_t
* accessor,
383
int
* n_granted,
384
tag_t
** granted,
385
int
* n_revoked,
386
tag_t
** revoked
387
);
388
395
SA_API
int
AM_free_effective_acl
(
396
tag_t
eff_acl_tag
397
);
398
399
408
SA_API
int
AM_get_combined_read_expression
(
409
int
count,
410
const
char
** read_expressions,
411
char
** cumulative_re
412
);
413
449
SA_API
int
AM_ask_read_expressions
(
450
int
count,
451
tag_t
* objs,
452
char
*** read_expressions
453
);
454
472
SA_API
int
AM_ask_session_info
(
473
int
* count,
474
char
*** keys,
475
char
*** values
476
);
477
485
SA_API
int
AM_check_sites_privilege
(
486
tag_t
site,
487
tag_t
object
,
488
const
char
* privilege,
490
logical
* verdict
491
);
492
502
SA_API
int
AM_check_suppliers_privilege_in_bulk
(
503
tag_t
vendor_contact,
504
int
n_objects,
505
const
tag_t
* objects,
506
const
char
* privilege,
507
logical
** verdicts
508
);
509
510
517
SA_API
int
AM_check_accessors_privilege
(
518
int
n_accessors,
519
tag_t
* accessors,
520
tag_t
object
,
521
const
char
* privilege,
523
logical
* verdict
524
);
525
530
SA_API
int
AM_remove_accessor
(
531
tag_t
acl_id,
532
tag_t
accessor_id
533
);
534
538
SA_API
int
AM_clear_acl
(
539
tag_t
acl_id
540
);
541
546
SA_API
int
AM_delete_accessor
(
547
tag_t
accessor_id
548
);
549
558
SA_API
int
AM_find_privilege
(
559
const
char
* name,
560
tag_t
* privilege_id
561
);
562
566
SA_API
int
AM_privilege_of_offset
(
567
int
offset,
568
tag_t
* privilege_id
569
);
570
574
SA_API
int
AM_list_privileges
(
575
int
* n_privileges,
576
tag_t
** privilege_ids
577
);
578
583
SA_API
int
AM_create_privilege
(
584
const
char
* privilege_name,
585
tag_t
* privilege_id
586
);
587
594
SA_API
int
AM_delete_privilege
(
595
tag_t
privilege_id
596
);
597
601
SA_API
int
AM_ask_priv_name
(
602
tag_t
privilege_id,
603
char
** privilege_name
604
);
605
609
SA_API
int
AM_set_priv_name
(
610
tag_t
privilege_id,
611
const
char
* privilege_name
612
);
613
617
SA_API
int
AM_ask_priv_offset
(
618
tag_t
privilege_id,
619
int
* offset
620
);
621
632
SA_API
int
AM_find_named_tag
(
633
const
char
* named_tag_name,
634
tag_t
* named_tag_id
635
);
636
640
SA_API
int
AM_create_named_tag
(
641
const
char
* named_tag_name,
642
tag_t
* named_tag_id
643
);
644
648
SA_API
int
AM_delete_named_tag
(
649
tag_t
named_tag_id
650
);
651
655
SA_API
int
AM_ask_named_tag_name
(
656
tag_t
named_tag_id,
657
char
** named_tag_name
658
);
659
663
SA_API
int
AM_set_named_tag_name
(
664
tag_t
named_tag_id,
665
const
char
* named_tag_name
666
);
667
671
SA_API
int
AM_list_named_tags
(
672
int
* n_named_tags,
673
tag_t
** named_tags
674
);
675
686
SA_API
int
AM_node_ask_root
(
687
tag_t
* root
688
);
689
693
SA_API
int
AM_node_ask_parent
(
694
tag_t
node,
695
tag_t
* parent
696
);
697
701
SA_API
int
AM_node_ask_children
(
702
tag_t
node,
703
int
* no_children,
704
tag_t
** children
705
);
706
710
SA_API
int
AM_node_ask_rule_name
(
711
tag_t
node,
712
char
** rule_name
713
);
714
719
SA_API
int
AM_node_set_rule_name
(
720
tag_t
node,
721
const
char
* rule_name
722
);
723
727
SA_API
int
AM_node_ask_rule_arg
(
728
tag_t
node,
729
char
** rule_arg
730
);
731
736
SA_API
int
AM_node_set_rule_arg
(
737
tag_t
node,
738
const
char
* rule_arg
739
);
740
744
SA_API
int
AM_node_ask_acl
(
745
tag_t
node,
746
tag_t
* acl
747
);
748
753
SA_API
int
AM_node_set_acl
(
754
tag_t
node,
755
tag_t
acl
756
);
757
758
SA_API
int
AM_node_ask_expanded
(
759
tag_t
node,
760
logical
* expanded
761
);
762
763
SA_API
int
AM_node_set_expanded
(
764
tag_t
node,
765
logical
expanded
766
);
767
768
SA_API
int
AM_node_ask_children_editable
(
769
tag_t
node,
770
logical
* editable
771
);
772
773
SA_API
int
AM_node_set_children_editable
(
774
tag_t
node,
775
logical
editable
776
);
777
793
SA_API
int
AM_create_node
(
794
const
char
* rule_name,
795
const
char
* rule_arg,
796
tag_t
parent,
797
tag_t
prev,
798
tag_t
acl,
799
tag_t
* node
800
);
801
814
SA_API
int
AM_node_paste
(
815
tag_t
node,
816
tag_t
parent,
817
tag_t
prev
818
);
819
824
SA_API
int
AM_node_cut
(
825
tag_t
node
826
);
827
834
SA_API
int
AM_node_move_up
(
835
tag_t
node
836
);
837
844
SA_API
int
AM_node_move_down
(
845
tag_t
node
846
);
847
851
SA_API
int
AM_save_tree
(
void
);
852
856
SA_API
int
AM_unload_tree
(
void
);
857
858
SA_API
int
AM_refresh_tree
(
void
);
859
860
SA_API
int
AM_tree_discard_changes
(
void
);
861
862
SA_API
int
AM_tree_find_nodes
(
863
tag_t
parent,
864
char
* ruleName,
865
char
* ruleArg,
866
int
* count,
867
tag_t
** nodes
868
);
869
875
SA_API
int
AM_list_rules
(
876
int
* no_rules,
877
char
*** rules
878
);
879
883
SA_API
int
AM_list_rule_args
(
884
const
char
* rule_name,
885
int
* no_args,
886
char
*** args
887
);
888
893
SA_API
int
AM_validate_rule_arg
(
894
const
char
* rule_name,
895
const
char
* rule_arg,
896
logical
* is_valid
897
);
898
902
SA_API
int
AM_accessor_info
(
903
tag_t
accessor,
904
char
** type,
905
char
** name
906
);
907
911
SA_API
int
AM_find_accessor
(
912
const
char
* type,
913
const
char
* name,
914
tag_t
* acc
915
);
916
920
SA_API
int
AM_list_accessors_by_type
(
921
const
char
* type,
922
int
* n_accs,
923
tag_t
** accs
924
);
925
929
SA_API
int
AM_list_accessor_types
(
930
int
* n_types,
931
char
*** types
932
);
933
938
SA_API
int
AM_list_session_accessors
(
939
int
* n_accessors,
940
tag_t
** accessors
941
);
942
955
SA_API
int
AM_set_mode
(
956
int
mode
957
);
958
964
SA_API
int
AM_ask_mode
(
965
int
* mode
966
);
967
971
SA_API
int
AM_set_journalling
(
972
logical
flag
973
);
974
984
SA_API
int
AM_init_module
(
void
);
985
989
SA_API
void
AM_preload_rule_tree
(
void
);
990
994
SA_API
int
AM_exit_module
(
void
);
995
1007
SA_API
int
AM_check_read_privilege_in_bulk
(
1008
int
n_objects,
1009
const
tag_t
* objects,
1010
logical
** decisions
1011
);
1012
1024
SA_API
int
AM_log_statistics
(
1025
logical
clear
1026
);
1027
1030
/*<AO><29-Oct-2007> added these for supporting delegation for forms/named references
1031
*/
1032
SA_API
int
AM_record_object_parent
(
int
n_tags,
tag_t
*ref_tag,
tag_t
parent_tag );
1033
SA_API
int
AM_remove_parent_from_cache
(
int
n_tags,
tag_t
*ref_tag,
tag_t
parent_tag );
1034
SA_API
int
AM_record_delegation_classes
(
int
n_strings,
const
char
**class_names,
const
char
*parent_class );
1035
SA_API
int
AM_lookup_delegation_class
(
const
char
*class_name,
int
*cid );
1036
1048
SA_API
int
AM_check_privilege_in_bulk
(
1049
int
n_instances,
1050
const
tag_t
* instances,
1051
const
char
* privilege_name,
1052
const
logical
* are_loaded,
1053
logical
** decisions
1054
);
1055
1056
1059
#ifdef __cplusplus
1060
}
1061
#endif
1062
#include <sa/libsa_undef.h>
1063
1064
#endif
1065