deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/*
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Copyright 1995-1998 by Metro Link, Inc.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync *
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Permission to use, copy, modify, distribute, and sell this software and its
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * documentation for any purpose is hereby granted without fee, provided that
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * the above copyright notice appear in all copies and that both that
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * copyright notice and this permission notice appear in supporting
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * documentation, and that the name of Metro Link, Inc. not be used in
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * advertising or publicity pertaining to distribution of the software without
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * specific, written prior permission. Metro Link, Inc. makes no
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * representations about the suitability of this software for any purpose.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * It is provided "as is" without express or implied warranty.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync *
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * PERFORMANCE OF THIS SOFTWARE.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/*
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Copyright (c) 1997-2002 by The XFree86 Project, Inc.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync *
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Permission is hereby granted, free of charge, to any person obtaining a
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * copy of this software and associated documentation files (the "Software"),
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * to deal in the Software without restriction, including without limitation
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * and/or sell copies of the Software, and to permit persons to whom the
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Software is furnished to do so, subject to the following conditions:
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync *
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * The above copyright notice and this permission notice shall be included in
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * all copies or substantial portions of the Software.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync *
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * OTHER DEALINGS IN THE SOFTWARE.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync *
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Except as contained in this notice, the name of the copyright holder(s)
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * and author(s) shall not be used in advertising or otherwise to promote
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * the sale, use or other dealings in this Software without prior written
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * authorization from the copyright holder(s) and author(s).
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#ifdef HAVE_XORG_CONFIG_H
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#include <xorg-config.h>
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#endif
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#ifndef _LOADERPROCS_H
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define _LOADERPROCS_H
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#undef IN_LOADER
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define IN_LOADER
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#include "xf86Module.h"
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#include <X11/fonts/fontmod.h>
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef struct module_desc {
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync struct module_desc *child;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync struct module_desc *sib;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync struct module_desc *parent;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync struct module_desc *demand_next;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync char *name;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync char *filename;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync char *identifier;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync XID client_id;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int in_use;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int handle;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync ModuleSetupProc SetupProc;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync ModuleTearDownProc TearDownProc;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync void *TearDownData; /* returned from SetupProc */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync const char *path;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync const XF86ModuleVersionInfo *VersionInfo;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync} ModuleDesc, *ModuleDescPtr;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/* External API for the loader */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid LoaderInit(void);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncModuleDescPtr LoadDriver(const char *, const char *, int, pointer, int *,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int *);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncModuleDescPtr LoadModule(const char *, const char *, const char **,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync const char **, pointer, const XF86ModReqInfo *,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int *, int *);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncModuleDescPtr LoadSubModule(ModuleDescPtr, const char *,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync const char **, const char **, pointer,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync const XF86ModReqInfo *, int *, int *);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncModuleDescPtr LoadSubModuleLocal(ModuleDescPtr, const char *,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync const char **, const char **,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync pointer, const XF86ModReqInfo *,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int *, int *);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid LoadFont(FontModule *);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid UnloadModule(ModuleDescPtr);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid UnloadSubModule(ModuleDescPtr);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid UnloadDriver(ModuleDescPtr);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid FreeModuleDesc(ModuleDescPtr mod);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncModuleDescPtr NewModuleDesc(const char *);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncModuleDescPtr AddSibling(ModuleDescPtr head, ModuleDescPtr new);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid LoaderSetPath(const char *path);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid LoaderSortExtensions(void);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncint LoaderUnload(int);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncunsigned long LoaderGetModuleVersion(ModuleDescPtr mod);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid LoaderResetOptions(void);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid LoaderSetOptions(unsigned long);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncvoid LoaderClearOptions(unsigned long);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/* Options for LoaderSetOptions */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define LDR_OPT_ABI_MISMATCH_NONFATAL 0x0001
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#endif /* _LOADERPROCS_H */