vaseboot/include/VasEBoot/device.h

44 lines
1.4 KiB
C

/* device.h - device manager */
/*
* VasEBoot -- GRand Unified Bootloader
* Copyright (C) 2002,2005,2007 Free Software Foundation, Inc.
*
* VasEBoot is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* VasEBoot is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with VasEBoot. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef VasEBoot_DEVICE_HEADER
#define VasEBoot_DEVICE_HEADER 1
#include <VasEBoot/symbol.h>
#include <VasEBoot/err.h>
struct VasEBoot_disk;
struct VasEBoot_net;
struct VasEBoot_device
{
struct VasEBoot_disk *disk;
struct VasEBoot_net *net;
};
typedef struct VasEBoot_device *VasEBoot_device_t;
typedef int (*VasEBoot_device_iterate_hook_t) (const char *name, void *data);
VasEBoot_device_t EXPORT_FUNC(VasEBoot_device_open) (const char *name);
VasEBoot_err_t EXPORT_FUNC(VasEBoot_device_close) (VasEBoot_device_t device);
int EXPORT_FUNC(VasEBoot_device_iterate) (VasEBoot_device_iterate_hook_t hook,
void *hook_data);
#endif /* ! VasEBoot_DEVICE_HEADER */