/* @(#)97       1.7  src/security/idl/sec_attr_util.idl, security.src, os2dce21.dss, 960602a.1  5/17/95  09:50:41 */
/*
 * COMPONENT_NAME:  security.src
 *
 * FUNCTIONS:
 *
 * ORIGINS: 72
 *
 */
/*
 * Copyright (c) 1990, 1991, 1992, 1993, 1994 Open Software Foundation, Inc.
 * ALL RIGHTS RESERVED (DCE).  See the file named COPYRIGHT.DCE for
 * the full copyright text.
 */
/*
 * HISTORY
 * $Log: sec_attr_util.idl,v $
 * Revision 1.1.5.1  1994/10/17  18:18:18  cuti
 * 	modularized free routines for schema trig binding and acl_mgr_set
 * 	[1994/10/14  16:15:54  cuti]
 *
 * Revision 1.1.2.3  1994/08/16  10:36:46  mdf
 * 	Bug fixes from Hewlett Packard
 * 	[1994/08/15  19:51:18  mdf]
 * 
 * Revision 1.1.2.2  1994/06/17  18:42:31  devsrc
 * 	cr10872 - fix copyright
 * 	[1994/06/17  18:10:36  devsrc]
 * 
 * Revision 1.1.2.1  1994/03/02  17:55:28  hanfei
 * 	Initial ERA drop
 * 	[1994/02/18  19:19:57  hanfei]
 * 
 * $EndLog$
 */
/*
** Copyright (c) Hewlett-Packard Company 1994
** Unpublished work. All Rights Reserved.
**
**     Attribute utility functions
*/
[ local ] interface sec_attr_util {

    import "dce/sec_attr_base.idl";

    /* s e c _ a t t r _ u t i l _ a l l o c _ c o p y
     *
     * Allocate the necessary subfields of the destination sec_attr_t and
     * copy the corresponding data from the source sec_attr_t.
     */
    void sec_attr_util_alloc_copy(
        [in]  void *(*allocate)(unsigned32 size),
        [in]  sec_attr_t     *from,
        [out] sec_attr_t     *to,
        [out] error_status_t *stp
    );

    void sec_attr_util_free(
        [in] void (*deallocate)(void *ptr),
        [in, out] sec_attr_t *attr
    );


/*
 * s e c _ a t t r _ u t i l _ s c h _ f r e e _ a c l _ m g r s
 *
 * Free every non-null pointer in the acl_mgr_set field of
 * the schema entry pointed to by sec_sch_entry_p.
 * Set sec_sch_entry_p->acl_mgr_set to NULL.
 *
 * INPUT/OUTPUT:
 *	sec_sch_entry_p - [in] points to an allocated and potentially
 *		initialized sec_attr_schema_entry_t.
 *		[out] acl_mgr_set ptrs freed and set to NULL.
 *
 */
    void sec_attr_util_sch_free_acl_mgrs(
	[in] sec_attr_schema_entry_t     *sec_sch_entry_p
    );


/*
 * s e c _ a t t r _ u t i l _ s c h _ f r e e _ b i n d i n g
 *
 * Free every non-null pointer in the trig_binding field of
 * the schema entry pointed to by sec_sch_entry_p.
 * Set sec_sch_entry_p->trig_binding to NULL.
 *
 * INPUT/OUTPUT:
 *	sec_sch_entry_p - [in] points to an allocated and potentially
 *		initialized sec_attr_schema_entry_t.
 *		[out] trig_binding ptrs freed and set to NULL.
 *
 */
    void sec_attr_util_sch_free_binding(
	[in] sec_attr_schema_entry_t     *sec_sch_entry_p
    );


/*
 * s e c _ a t t r _ u t i l _ s c h _ e n t _ f r e e _ p t r s
 *
 * Free every non-null pointer in the schema entry pointed to
 * by sec_sch_entry_p.  Note that this data structure may
 * have been only partially initialized.  The sec_sch_entry_p
 * pointer itself is NOT freed.
 *
 * INPUT/OUTPUT:
 *      sec_sch_entry_p - [in] points to an allocated and potentially
 *              initialized sec_attr_schema_entry_t.
 *              [out] internal ptrs freed.
 *
 */
    void sec_attr_util_sch_ent_free_ptrs(
	[in] sec_attr_schema_entry_t     *sec_sch_entry_p
    );

/*
 * s e c _ a t t r _ u t i l _ s c h _ e n t _ f r e e
 *
 * Free every non-null pointer in the schema entry pointed to
 * by sec_sch_entry_p.  Note that this data structure may
 * have been only partially initialized.
 * Also free sec_sch_entry_p.
 *
 * INPUT/OUTPUT:
 *      sec_sch_entry_p - [in] points to an allocated and partially
 *              or fully initialized sec_attr_schema_entry_t.
 *              [out] all internal ptrs and self freed.
 *
 */
    void sec_attr_util_sch_ent_free(
	[in, out] sec_attr_schema_entry_t     **sec_sch_entry_p
    );


/*
 * s e c _ a t t r _ u t i l _ i n s t _ f r e e _ p t r s
 *
 * Free every non-null pointer in the attribute instance pointed to
 * by sec_attr_p.  Note that this data structure may
 * have been only partially initialized.  The sec_attr_p
 * pointer itself is NOT freed.
 *
 * INPUT/OUTPUT:
 *      sec_attr_p - [in] points to an allocated and potentially
 *              initialized sec_attr_t.
 *              [out] internal ptrs freed and set to NULL.
 *
 */

    void sec_attr_util_inst_free_ptrs(
	[in] sec_attr_t		*sec_attr_p
    );


/*
 * s e c _ a t t r _ u t i l _ i n s t _ f r e e
 *
 * Free every non-null pointer in the attribute instance pointed to
 * by sec_attr_p.  Note that this data structure may
 * have been only partially initialized.
 * Also free *sec_attr_p and set it to NULL.
 *
 * INPUT/OUTPUT:
 *      sec_attr_p - [in] points to an allocated and partially
 *              or fully initialized sec_attr_t.
 *              [out] all internal ptrs and self freed.
 *
 */
    void sec_attr_util_inst_free(
	[in, out] sec_attr_t	**sec_attr_p
    );


}
