111996SThomas.Whitten@Sun.COM /* 211996SThomas.Whitten@Sun.COM * CDDL HEADER START 311996SThomas.Whitten@Sun.COM * 411996SThomas.Whitten@Sun.COM * The contents of this file are subject to the terms of the 511996SThomas.Whitten@Sun.COM * Common Development and Distribution License (the "License"). 611996SThomas.Whitten@Sun.COM * You may not use this file except in compliance with the License. 711996SThomas.Whitten@Sun.COM * 811996SThomas.Whitten@Sun.COM * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 911996SThomas.Whitten@Sun.COM * or http://www.opensolaris.org/os/licensing. 1011996SThomas.Whitten@Sun.COM * See the License for the specific language governing permissions 1111996SThomas.Whitten@Sun.COM * and limitations under the License. 1211996SThomas.Whitten@Sun.COM * 1311996SThomas.Whitten@Sun.COM * When distributing Covered Code, include this CDDL HEADER in each 1411996SThomas.Whitten@Sun.COM * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1511996SThomas.Whitten@Sun.COM * If applicable, add the following below this CDDL HEADER, with the 1611996SThomas.Whitten@Sun.COM * fields enclosed by brackets "[]" replaced with your own identifying 1711996SThomas.Whitten@Sun.COM * information: Portions Copyright [yyyy] [name of copyright owner] 1811996SThomas.Whitten@Sun.COM * 1911996SThomas.Whitten@Sun.COM * CDDL HEADER END 2011996SThomas.Whitten@Sun.COM */ 2111996SThomas.Whitten@Sun.COM 2211996SThomas.Whitten@Sun.COM /* 2312418STruong.Q.Nguyen@Sun.COM * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 2411996SThomas.Whitten@Sun.COM */ 2511996SThomas.Whitten@Sun.COM 2611996SThomas.Whitten@Sun.COM #ifndef _MANIFEST_FIND_H 2711996SThomas.Whitten@Sun.COM #define _MANIFEST_FIND_H 2811996SThomas.Whitten@Sun.COM 2911996SThomas.Whitten@Sun.COM #ifdef __cplusplus 3011996SThomas.Whitten@Sun.COM extern "C" { 3111996SThomas.Whitten@Sun.COM #endif 3211996SThomas.Whitten@Sun.COM 3311996SThomas.Whitten@Sun.COM #include <sys/types.h> 34*13112STony.Q.Nguyen@oracle.com #include <libscf.h> 3511996SThomas.Whitten@Sun.COM #include "manifest_hash.h" 3611996SThomas.Whitten@Sun.COM 3711996SThomas.Whitten@Sun.COM #define CHECKHASH 0x1 3811996SThomas.Whitten@Sun.COM #define CHECKEXT 0x2 3912418STruong.Q.Nguyen@Sun.COM #define BUNDLE_PROF 0x4 4012418STruong.Q.Nguyen@Sun.COM #define BUNDLE_MFST 0x8 4111996SThomas.Whitten@Sun.COM 4211996SThomas.Whitten@Sun.COM typedef struct manifest_info { 4311996SThomas.Whitten@Sun.COM const char *mi_path; /* Path of manifest file */ 4411996SThomas.Whitten@Sun.COM const char *mi_prop; /* Property that holds manifest hash */ 4511996SThomas.Whitten@Sun.COM uchar_t mi_hash[MHASH_SIZE]; /* Manifest hash */ 4611996SThomas.Whitten@Sun.COM } manifest_info_t; 4711996SThomas.Whitten@Sun.COM 4811996SThomas.Whitten@Sun.COM /* 4912418STruong.Q.Nguyen@Sun.COM * Declare functions that are used for finding service bundle files in a 5011996SThomas.Whitten@Sun.COM * directory. 5111996SThomas.Whitten@Sun.COM */ 5211996SThomas.Whitten@Sun.COM 5311996SThomas.Whitten@Sun.COM 54*13112STony.Q.Nguyen@oracle.com int find_manifests(scf_handle_t *, const char *, manifest_info_t ***, int); 5511996SThomas.Whitten@Sun.COM void free_manifest_array(manifest_info_t **); 5611996SThomas.Whitten@Sun.COM 5711996SThomas.Whitten@Sun.COM #ifdef __cplusplus 5811996SThomas.Whitten@Sun.COM } 5911996SThomas.Whitten@Sun.COM #endif 6011996SThomas.Whitten@Sun.COM 6111996SThomas.Whitten@Sun.COM #endif /* _MANIFEST_FIND_H */ 62