2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A
2N/A/*
2N/A * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _LIBZFS_JNI_POOL_H
2N/A#define _LIBZFS_JNI_POOL_H
2N/A
2N/A#include <jni.h>
2N/A#include <libnvpair.h>
2N/A#include <libzfs.h>
2N/A#include <libzfs_jni_ipool.h>
2N/A#include <libzfs_jni_util.h>
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A/*
2N/A * Types
2N/A */
2N/A
2N/Atypedef struct DeviceStatsBean {
2N/A jmethodID method_setSize;
2N/A jmethodID method_setReplacementSize;
2N/A jmethodID method_setUsed;
2N/A jmethodID method_setReadBytes;
2N/A jmethodID method_setWriteBytes;
2N/A jmethodID method_setReadOperations;
2N/A jmethodID method_setWriteOperations;
2N/A jmethodID method_setReadErrors;
2N/A jmethodID method_setWriteErrors;
2N/A jmethodID method_setChecksumErrors;
2N/A jmethodID method_setDeviceState;
2N/A jmethodID method_setDeviceStatus;
2N/A} DeviceStatsBean_t;
2N/A
2N/Atypedef struct PoolStatsBean {
2N/A DeviceStatsBean_t super;
2N/A jmethodID method_setPoolState;
2N/A jmethodID method_setPoolStatus;
2N/A jmethodID method_setPoolVersion;
2N/A} PoolStatsBean_t;
2N/A
2N/A/*
2N/A * Function prototypes
2N/A */
2N/A
2N/Avoid new_DeviceStats(JNIEnv *, DeviceStatsBean_t *, zjni_Object_t *);
2N/Avoid new_PoolStats(JNIEnv *, PoolStatsBean_t *, zjni_Object_t *);
2N/Anvlist_t *zjni_get_root_vdev(zpool_handle_t *);
2N/Anvlist_t *zjni_get_vdev(zpool_handle_t *, nvlist_t *, uint64_t, uint64_t *);
2N/Ajobject zjni_get_VirtualDevice_from_vdev(
2N/A JNIEnv *, zpool_handle_t *, nvlist_t *, uint64_t *p_vdev_id);
2N/Ajobject zjni_get_VirtualDevices_from_vdev(
2N/A JNIEnv *, zpool_handle_t *, nvlist_t *, uint64_t *p_vdev_id);
2N/Aint zjni_create_add_ImportablePool(nvlist_t *, void *);
2N/Aint populate_DeviceStatsBean(
2N/A JNIEnv *, nvlist_t *, DeviceStatsBean_t *, zjni_Object_t *);
2N/Ajobject zjni_pool_state_to_obj(JNIEnv *, pool_state_t);
2N/Ajobject zjni_pool_status_to_obj(JNIEnv *, zpool_status_t);
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _LIBZFS_JNI_POOL_H */