]> granicus.if.org Git - imagemagick/blob - MagickCore/blob.h
Add check to ensure security policy is instantiated
[imagemagick] / MagickCore / blob.h
1 /*
2   Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
3   dedicated to making software imaging solutions freely available.
4   
5   You may not use this file except in compliance with the License.
6   obtain a copy of the License at
7   
8     https://www.imagemagick.org/script/license.php
9   
10   Unless required by applicable law or agreed to in writing, software
11   distributed under the License is distributed on an "AS IS" BASIS,
12   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   See the License for the specific language governing permissions and
14   limitations under the License.
15
16   MagickCore Binary Large OBjects methods.
17 */
18 #ifndef MAGICKCORE_BLOB_H
19 #define MAGICKCORE_BLOB_H
20
21 #if defined(__cplusplus) || defined(c_plusplus)
22 extern "C" {
23 #endif
24
25 #define MagickMaxBufferExtent  81920
26
27 typedef enum
28 {
29   ReadMode,
30   WriteMode,
31   IOMode
32 } MapMode;
33
34 typedef ssize_t
35   (*CustomStreamHandler)(const unsigned char *,const size_t,const void *);
36
37 typedef size_t
38   (*CustomStreamSeeker)(const MagickOffsetType,const int,const void *);
39
40 typedef MagickOffsetType
41   (*CustomStreamTeller)(const void *);
42
43 typedef struct _CustomStreamInfo
44   CustomStreamInfo;
45
46 #include "MagickCore/image.h"
47 #include "MagickCore/stream.h"
48
49 extern MagickExport CustomStreamInfo
50   *AcquireCustomStreamInfo(ExceptionInfo *),
51   *DestroyCustomStreamInfo(CustomStreamInfo *);
52
53 extern MagickExport FILE
54   *GetBlobFileHandle(const Image *);
55
56 extern MagickExport Image
57   *BlobToImage(const ImageInfo *,const void *,const size_t,ExceptionInfo *),
58   *PingBlob(const ImageInfo *,const void *,const size_t,ExceptionInfo *),
59   *CustomStreamToImage(const ImageInfo *,ExceptionInfo *);
60
61 extern MagickExport MagickBooleanType
62   BlobToFile(char *,const void *,const size_t,ExceptionInfo *),
63   FileToImage(Image *,const char *,ExceptionInfo *),
64   GetBlobError(const Image *),
65   ImageToFile(Image *,char *,ExceptionInfo *),
66   InjectImageBlob(const ImageInfo *,Image *,Image *,const char *,
67     ExceptionInfo *),
68   IsBlobExempt(const Image *),
69   IsBlobSeekable(const Image *),
70   IsBlobTemporary(const Image *);
71
72 extern MagickExport MagickSizeType
73   GetBlobSize(const Image *);
74
75 extern MagickExport StreamHandler
76   GetBlobStreamHandler(const Image *);
77
78 extern MagickExport void
79   *GetBlobStreamData(const Image *),
80   DestroyBlob(Image *),
81   DuplicateBlob(Image *,const Image *),
82   *FileToBlob(const char *,const size_t,size_t *,ExceptionInfo *),
83   *ImageToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
84   ImageToCustomStream(const ImageInfo *,Image *,ExceptionInfo *),
85   *ImagesToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
86   ImagesToCustomStream(const ImageInfo *,Image *,ExceptionInfo *),
87   SetBlobExempt(Image *,const MagickBooleanType),
88   SetCustomStreamData(CustomStreamInfo *,void *),
89   SetCustomStreamReader(CustomStreamInfo *,CustomStreamHandler),
90   SetCustomStreamSeeker(CustomStreamInfo *,CustomStreamSeeker),
91   SetCustomStreamTeller(CustomStreamInfo *,CustomStreamTeller),
92   SetCustomStreamWriter(CustomStreamInfo *,CustomStreamHandler);
93
94 #if defined(__cplusplus) || defined(c_plusplus)
95 }
96 #endif
97
98 #endif