loaderProcs.h 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. * Copyright 1995-1998 by Metro Link, Inc.
  3. *
  4. * Permission to use, copy, modify, distribute, and sell this software and its
  5. * documentation for any purpose is hereby granted without fee, provided that
  6. * the above copyright notice appear in all copies and that both that
  7. * copyright notice and this permission notice appear in supporting
  8. * documentation, and that the name of Metro Link, Inc. not be used in
  9. * advertising or publicity pertaining to distribution of the software without
  10. * specific, written prior permission. Metro Link, Inc. makes no
  11. * representations about the suitability of this software for any purpose.
  12. * It is provided "as is" without express or implied warranty.
  13. *
  14. * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  15. * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  16. * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  17. * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  18. * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  19. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  20. * PERFORMANCE OF THIS SOFTWARE.
  21. */
  22. /*
  23. * Copyright (c) 1997-2002 by The XFree86 Project, Inc.
  24. *
  25. * Permission is hereby granted, free of charge, to any person obtaining a
  26. * copy of this software and associated documentation files (the "Software"),
  27. * to deal in the Software without restriction, including without limitation
  28. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  29. * and/or sell copies of the Software, and to permit persons to whom the
  30. * Software is furnished to do so, subject to the following conditions:
  31. *
  32. * The above copyright notice and this permission notice shall be included in
  33. * all copies or substantial portions of the Software.
  34. *
  35. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  36. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  37. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  38. * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
  39. * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  40. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  41. * OTHER DEALINGS IN THE SOFTWARE.
  42. *
  43. * Except as contained in this notice, the name of the copyright holder(s)
  44. * and author(s) shall not be used in advertising or otherwise to promote
  45. * the sale, use or other dealings in this Software without prior written
  46. * authorization from the copyright holder(s) and author(s).
  47. */
  48. #ifdef HAVE_XORG_CONFIG_H
  49. #include <xorg-config.h>
  50. #endif
  51. #ifndef _LOADERPROCS_H
  52. #define _LOADERPROCS_H
  53. #include "xf86Module.h"
  54. typedef struct module_desc {
  55. struct module_desc *child;
  56. struct module_desc *sib;
  57. struct module_desc *parent;
  58. char *name;
  59. char *path;
  60. void *handle;
  61. ModuleSetupProc SetupProc;
  62. ModuleTearDownProc TearDownProc;
  63. void *TearDownData; /* returned from SetupProc */
  64. const XF86ModuleVersionInfo *VersionInfo;
  65. } ModuleDesc, *ModuleDescPtr;
  66. /* External API for the loader */
  67. void LoaderInit(void);
  68. ModuleDescPtr LoadDriver(const char *, const char *, int, void *, int *,
  69. int *);
  70. ModuleDescPtr LoadModule(const char *, const char *, const char **,
  71. const char **, void *, const XF86ModReqInfo *,
  72. int *, int *);
  73. ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent);
  74. void UnloadDriver(ModuleDescPtr);
  75. void LoaderSetPath(const char *path);
  76. void LoaderUnload(const char *, void *);
  77. unsigned long LoaderGetModuleVersion(ModuleDescPtr mod);
  78. void LoaderResetOptions(void);
  79. void LoaderSetOptions(unsigned long);
  80. /* Options for LoaderSetOptions */
  81. #define LDR_OPT_ABI_MISMATCH_NONFATAL 0x0001
  82. #endif /* _LOADERPROCS_H */