/* @(#)13	1.3  src/security/idl/sec_acl_encode.idl, security.src, os2dce21.dss, 960602a.1 5/17/95 09:51:19  */
/*
 *   COMPONENT_NAME: security.src
 *
 *   FUNCTIONS: none
 *
 *   ORIGINS: 72
 *
 */
/*
 * @OSF_COPYRIGHT@
 * COPYRIGHT NOTICE
 * 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_acl_encode.idl,v $
 * Revision 1.1.2.2  1994/06/10  17:13:21  annie
 * 	cr10872 - fixed copyright
 * 	[1994/06/10  17:08:38  annie]
 *
 * Revision 1.1.2.1  1994/06/02  21:28:40  mdf
 * 	hp_sec_to_osf_3 drop, merge up with latest.
 * 	[1994/05/24  15:16:20  mdf]
 * 
 * 	hp_sec_to_osf_3 drop
 * 
 * 	 /main/secd_auth/1  1994/05/03  15:39 UTC  burati
 * 	Public API for the DCE ACL encoding interface.
 * 
 * $EndLog$
 */

/*
 * Copyright (c) Hewlett-Packard Company 1994
 * Unpublished work. All Rights Reserved.
 */

/*
 * Public API to DCE ACL encoding routines
 */

[ local ] interface sec_acl_encode {

import "dce/aclbase.idl";


/*
 * sec_acl_entry_encode - encode sec_acl_entry_t
 */
void sec_acl_entry_encode(
    [in] void               *(*allocate)(unsigned32 size),
    [in] void               (*dealloc)(void *ptr),
    [in] sec_acl_entry_t    *entry,
    [out] unsigned32        *num_bytes,
    [out] byte              **bytes,
    [out] error_status_t    *stp
);


/*
 * sec_acl_entry_decode - decode pickled sec_acl_entry_t
 */
void sec_acl_entry_decode(
    [in] void               *(allocate)(unsigned32 size),
    [in] void               (*dealloc)(void *ptr),
    [in] unsigned32         num_bytes,
    [in] byte               *bytes,
    [out] sec_acl_entry_t   *entry,
    [out] error_status_t    *stp
);


/*
 * Destructor functions for decoded types.
 */
void sec_acl_entry_decoded_data_free(
    [in] void               (*dealloc)(void *ptr),
    [in] sec_acl_entry_t    *epac_data
);


/*
 * sec_acl_encode_v0_entries
 * 
 * For any entries with types that are new to version 1.0 of the rdaclif wire
 * interface, encode that entry and replace it with an extended entry type
 * containing the encoded bytes. 
 */
void sec_acl_encode_v0_entries(
    [in] void               *(*allocate)(unsigned32 size),
    [in] void               (*deallocate)(void *ptr),
    [in] boolean32          free_old_entries,
    [in,out] sec_acl_list_t *aclsP,
    [out] error_status_t    *stp
);


/*
 * sec_acl_decode_v0_entries
 *
 * For any extended types, attempt to decode the pickle into an acl entry type.
 * If successful, replace the extended type with the decoded type.
 */
void sec_acl_decode_v0_entries(
    [in] void               *(*allocate)(unsigned32 size),
    [in] void               (*deallocate)(void *ptr),
    [in] boolean32          free_old_entries,
    [in,out] sec_acl_list_t *aclsP,
    [out] error_status_t    *stp
);

}
