WizardsToolkit  1.0.7
blob-private.h
Go to the documentation of this file.
00001 /*
00002   Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization
00003   dedicated to making software imaging solutions freely available.
00004 
00005   You may not use this file except in compliance with the License.
00006   obtain a copy of the License at
00007 
00008     http://www.wizards-toolkit.org/script/license.php
00009 
00010   Unless required by applicable law or agreed to in writing, software
00011   distributed under the License is distributed on an "AS IS" BASIS,
00012   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013   See the License for the specific language governing permissions and
00014   limitations under the License.
00015 
00016   Wizard's Toolkit Binary Large OBjects Methods.
00017 */
00018 #ifndef _WIZARDSTOOLKIT_BLOB_PRIVATE_H
00019 #define _WIZARDSTOOLKIT_BLOB_PRIVATE_H
00020 
00021 #if defined(__cplusplus) || defined(c_plusplus)
00022 extern "C" {
00023 #endif
00024 
00025 #include <wizard/blob.h>
00026 
00027 #if defined(WIZARDSTOOLKIT_HAVE_FSEEKO)
00028 # define fseek  fseeko
00029 # define ftell  ftello
00030 #endif
00031 
00032 typedef enum
00033 {
00034   UndefinedBlobMode,
00035   ReadBlobMode,
00036   ReadBinaryBlobMode,
00037   WriteBlobMode,
00038   WriteBinaryBlobMode
00039 } BlobMode;
00040 
00041 extern WizardExport BlobInfo
00042   *DestroyBlob(BlobInfo *),
00043   *OpenBlob(const char *,const BlobMode,const WizardBooleanType,
00044     ExceptionInfo *);
00045 
00046 extern WizardExport const char
00047   *GetBlobFilename(const BlobInfo *);
00048 
00049 extern WizardExport const struct stat
00050   *GetBlobProperties(const BlobInfo *);
00051 
00052 extern WizardExport int
00053   EOFBlob(BlobInfo *),
00054   ReadBlobByte(BlobInfo *),
00055   SyncBlob(BlobInfo *);
00056 
00057 extern WizardExport ssize_t
00058   ReadBlob(BlobInfo *,const size_t,unsigned char *),
00059   ReadBlobChunk(BlobInfo *,const size_t,unsigned char *),
00060   WriteBlob(BlobInfo *,const size_t,const unsigned char *),
00061   WriteBlobByte(BlobInfo *,const unsigned char),
00062   WriteBlobChunk(BlobInfo *,const size_t,const unsigned char *),
00063   WriteBlobString(BlobInfo *,const char *);
00064 
00065 extern WizardExport WizardBooleanType
00066   CloseBlob(BlobInfo *),
00067   SetBlobExtent(BlobInfo *,const WizardSizeType);
00068 
00069 extern WizardExport WizardOffsetType
00070   TellBlob(const BlobInfo *);
00071 
00072 extern WizardExport WizardSizeType
00073   GetBlobSize(BlobInfo *);
00074 
00075 #if defined(__cplusplus) || defined(c_plusplus)
00076 }
00077 #endif
00078 
00079 #endif