MagickCore  6.8.5
blob-private.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2013 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  http://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 private methods.
17 */
18 #ifndef _MAGICKCORE_BLOB_PRIVATE_H
19 #define _MAGICKCORE_BLOB_PRIVATE_H
20 
21 #if defined(__cplusplus) || defined(c_plusplus)
22 extern "C" {
23 #endif
24 
25 #include "magick/image.h"
26 #include "magick/stream.h"
27 
28 #define MagickMinBlobExtent 32767L
29 #if defined(MAGICKCORE_HAVE_FSEEKO)
30 # define fseek fseeko
31 # define ftell ftello
32 #endif
33 
34 typedef enum
35 {
43 } BlobMode;
44 
45 typedef enum
46 {
55 } StreamType;
56 
57 typedef int
58  *(*BlobFifo)(const Image *,const void *,const size_t);
59 
61  *CloneBlobInfo(const BlobInfo *),
63 
64 extern MagickExport char
65  *ReadBlobString(Image *,char *);
66 
67 extern MagickExport const struct stat
68  *GetBlobProperties(const Image *);
69 
70 extern MagickExport double
71  ReadBlobDouble(Image *);
72 
73 extern MagickExport float
74  ReadBlobFloat(Image *);
75 
76 extern MagickExport int
77  EOFBlob(const Image *),
78  ReadBlobByte(Image *);
79 
81  CloseBlob(Image *),
82  DiscardBlobBytes(Image *,const MagickSizeType),
83  OpenBlob(const ImageInfo *,Image *,const BlobMode,ExceptionInfo *),
84  SetBlobExtent(Image *,const MagickSizeType),
85  UnmapBlob(void *,const size_t);
86 
88  SeekBlob(Image *,const MagickOffsetType,const int),
89  TellBlob(const Image *);
90 
92  ReadBlobLongLong(Image *),
93  ReadBlobMSBLongLong(Image *);
94 
95 extern MagickExport ssize_t
96  ReadBlob(Image *,const size_t,unsigned char *),
97  WriteBlob(Image *,const size_t,const unsigned char *),
98  WriteBlobByte(Image *,const unsigned char),
99  WriteBlobFloat(Image *,const float),
100  WriteBlobLong(Image *,const unsigned int),
101  WriteBlobShort(Image *,const unsigned short),
102  WriteBlobLSBLong(Image *,const unsigned int),
103  WriteBlobLSBShort(Image *,const unsigned short),
104  WriteBlobMSBLong(Image *,const unsigned int),
105  WriteBlobMSBLongLong(Image *,const MagickSizeType),
106  WriteBlobMSBShort(Image *,const unsigned short),
107  WriteBlobString(Image *,const char *);
108 
109 extern MagickExport unsigned char
110  *DetachBlob(BlobInfo *),
111  *MapBlob(int,const MapMode,const MagickOffsetType,const size_t);
112 
113 extern MagickExport unsigned int
114  ReadBlobLong(Image *),
115  ReadBlobLSBLong(Image *),
116  ReadBlobMSBLong(Image *);
117 
118 extern MagickExport unsigned short
119  ReadBlobShort(Image *),
120  ReadBlobLSBShort(Image *),
121  ReadBlobMSBShort(Image *);
122 
123 extern MagickExport void
124  AttachBlob(BlobInfo *,const void *,const size_t),
126  MSBOrderLong(unsigned char *,const size_t),
127  MSBOrderShort(unsigned char *,const size_t);
128 
129 #if defined(__cplusplus) || defined(c_plusplus)
130 }
131 #endif
132 
133 #endif