manifest_find.h revision 293e3ab30a546cd932ee22f9d54b3979fcb52095
9444c26f4faabda140242c3986089704c4073cedTom Whitten/*
9444c26f4faabda140242c3986089704c4073cedTom Whitten * CDDL HEADER START
9444c26f4faabda140242c3986089704c4073cedTom Whitten *
9444c26f4faabda140242c3986089704c4073cedTom Whitten * The contents of this file are subject to the terms of the
9444c26f4faabda140242c3986089704c4073cedTom Whitten * Common Development and Distribution License (the "License").
9444c26f4faabda140242c3986089704c4073cedTom Whitten * You may not use this file except in compliance with the License.
9444c26f4faabda140242c3986089704c4073cedTom Whitten *
9444c26f4faabda140242c3986089704c4073cedTom Whitten * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9444c26f4faabda140242c3986089704c4073cedTom Whitten * or http://www.opensolaris.org/os/licensing.
9444c26f4faabda140242c3986089704c4073cedTom Whitten * See the License for the specific language governing permissions
9444c26f4faabda140242c3986089704c4073cedTom Whitten * and limitations under the License.
9444c26f4faabda140242c3986089704c4073cedTom Whitten *
9444c26f4faabda140242c3986089704c4073cedTom Whitten * When distributing Covered Code, include this CDDL HEADER in each
9444c26f4faabda140242c3986089704c4073cedTom Whitten * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9444c26f4faabda140242c3986089704c4073cedTom Whitten * If applicable, add the following below this CDDL HEADER, with the
9444c26f4faabda140242c3986089704c4073cedTom Whitten * fields enclosed by brackets "[]" replaced with your own identifying
9444c26f4faabda140242c3986089704c4073cedTom Whitten * information: Portions Copyright [yyyy] [name of copyright owner]
9444c26f4faabda140242c3986089704c4073cedTom Whitten *
9444c26f4faabda140242c3986089704c4073cedTom Whitten * CDDL HEADER END
9444c26f4faabda140242c3986089704c4073cedTom Whitten */
9444c26f4faabda140242c3986089704c4073cedTom Whitten
9444c26f4faabda140242c3986089704c4073cedTom Whitten/*
adfc3118ca8c6b541b6a93d4bc24583eb4ebd73dTruong Nguyen * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
9444c26f4faabda140242c3986089704c4073cedTom Whitten */
9444c26f4faabda140242c3986089704c4073cedTom Whitten
9444c26f4faabda140242c3986089704c4073cedTom Whitten#ifndef _MANIFEST_FIND_H
9444c26f4faabda140242c3986089704c4073cedTom Whitten#define _MANIFEST_FIND_H
9444c26f4faabda140242c3986089704c4073cedTom Whitten
9444c26f4faabda140242c3986089704c4073cedTom Whitten#ifdef __cplusplus
9444c26f4faabda140242c3986089704c4073cedTom Whittenextern "C" {
9444c26f4faabda140242c3986089704c4073cedTom Whitten#endif
9444c26f4faabda140242c3986089704c4073cedTom Whitten
9444c26f4faabda140242c3986089704c4073cedTom Whitten#include <sys/types.h>
293e3ab30a546cd932ee22f9d54b3979fcb52095Truong Q. Nguyen#include <libscf.h>
9444c26f4faabda140242c3986089704c4073cedTom Whitten#include "manifest_hash.h"
9444c26f4faabda140242c3986089704c4073cedTom Whitten
9444c26f4faabda140242c3986089704c4073cedTom Whitten#define CHECKHASH 0x1
9444c26f4faabda140242c3986089704c4073cedTom Whitten#define CHECKEXT 0x2
adfc3118ca8c6b541b6a93d4bc24583eb4ebd73dTruong Nguyen#define BUNDLE_PROF 0x4
adfc3118ca8c6b541b6a93d4bc24583eb4ebd73dTruong Nguyen#define BUNDLE_MFST 0x8
9444c26f4faabda140242c3986089704c4073cedTom Whitten
9444c26f4faabda140242c3986089704c4073cedTom Whittentypedef struct manifest_info {
9444c26f4faabda140242c3986089704c4073cedTom Whitten const char *mi_path; /* Path of manifest file */
9444c26f4faabda140242c3986089704c4073cedTom Whitten const char *mi_prop; /* Property that holds manifest hash */
9444c26f4faabda140242c3986089704c4073cedTom Whitten uchar_t mi_hash[MHASH_SIZE]; /* Manifest hash */
9444c26f4faabda140242c3986089704c4073cedTom Whitten} manifest_info_t;
9444c26f4faabda140242c3986089704c4073cedTom Whitten
9444c26f4faabda140242c3986089704c4073cedTom Whitten/*
adfc3118ca8c6b541b6a93d4bc24583eb4ebd73dTruong Nguyen * Declare functions that are used for finding service bundle files in a
9444c26f4faabda140242c3986089704c4073cedTom Whitten * directory.
9444c26f4faabda140242c3986089704c4073cedTom Whitten */
9444c26f4faabda140242c3986089704c4073cedTom Whitten
9444c26f4faabda140242c3986089704c4073cedTom Whitten
293e3ab30a546cd932ee22f9d54b3979fcb52095Truong Q. Nguyenint find_manifests(scf_handle_t *, const char *, manifest_info_t ***, int);
9444c26f4faabda140242c3986089704c4073cedTom Whittenvoid free_manifest_array(manifest_info_t **);
9444c26f4faabda140242c3986089704c4073cedTom Whitten
9444c26f4faabda140242c3986089704c4073cedTom Whitten#ifdef __cplusplus
9444c26f4faabda140242c3986089704c4073cedTom Whitten}
9444c26f4faabda140242c3986089704c4073cedTom Whitten#endif
9444c26f4faabda140242c3986089704c4073cedTom Whitten
9444c26f4faabda140242c3986089704c4073cedTom Whitten#endif /* _MANIFEST_FIND_H */