resource_.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. Copyright 1999 ImageMagick Studio LLC, a non-profit organization
  3. dedicated to making software imaging solutions freely available.
  4. You may not use this file except in compliance with the License. You may
  5. obtain a copy of the License at
  6. https://imagemagick.org/script/license.php
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. MagickCore resource methods.
  13. */
  14. #ifndef MAGICKCORE_RESOURCE_H
  15. #define MAGICKCORE_RESOURCE_H
  16. #if defined(__cplusplus) || defined(c_plusplus)
  17. extern "C" {
  18. #endif
  19. typedef enum
  20. {
  21. UndefinedResource,
  22. AreaResource,
  23. DiskResource,
  24. FileResource,
  25. MapResource,
  26. MemoryResource,
  27. ThreadResource,
  28. TimeResource,
  29. ThrottleResource,
  30. WidthResource,
  31. HeightResource,
  32. ListLengthResource
  33. } ResourceType;
  34. #define MagickResourceInfinity (MagickULLConstant(~0) >> 1)
  35. extern MagickExport int
  36. AcquireUniqueFileResource(char *);
  37. extern MagickExport MagickBooleanType
  38. AcquireMagickResource(const ResourceType,const MagickSizeType),
  39. GetPathTemplate(char *),
  40. ListMagickResourceInfo(FILE *,ExceptionInfo *),
  41. RelinquishUniqueFileResource(const char *),
  42. ResourceComponentGenesis(void),
  43. SetMagickResourceLimit(const ResourceType,const MagickSizeType);
  44. extern MagickExport MagickSizeType
  45. GetMagickResource(const ResourceType),
  46. GetMagickResourceLimit(const ResourceType);
  47. extern MagickExport void
  48. AsynchronousResourceComponentTerminus(void),
  49. RelinquishMagickResource(const ResourceType,const MagickSizeType),
  50. ResourceComponentTerminus(void);
  51. #if defined(__cplusplus) || defined(c_plusplus)
  52. }
  53. #endif
  54. #endif