MagickCore 6.9.12
|
#include "magick/studio.h"
#include "magick/blob.h"
#include "magick/client.h"
#include "magick/configure.h"
#include "magick/deprecate.h"
#include "magick/exception.h"
#include "magick/exception-private.h"
#include "magick/hashmap.h"
#include "magick/memory_.h"
#include "magick/mime.h"
#include "magick/mime-private.h"
#include "magick/nt-base-private.h"
#include "magick/option.h"
#include "magick/semaphore.h"
#include "magick/string_.h"
#include "magick/token.h"
#include "magick/utility.h"
#include "magick/xml-tree.h"
#include "magick/xml-tree-private.h"
Go to the source code of this file.
Data Structures | |
struct | _MimeInfo |
Macros | |
#define | MimeFilename "mime.xml" |
Functions | |
static MagickBooleanType | IsMimeCacheInstantiated (ExceptionInfo *) |
static MagickBooleanType | LoadMimeCache (LinkedListInfo *, const char *, const char *, const size_t, ExceptionInfo *) |
static LinkedListInfo * | AcquireMimeCache (const char *filename, ExceptionInfo *exception) |
MagickExport MagickBooleanType | LoadMimeLists (const char *name, ExceptionInfo *exception) |
MagickExport const MimeInfo * | GetMimeInfo (const char *filename, const unsigned char *magic, const size_t length, ExceptionInfo *exception) |
static int | MimeInfoCompare (const void *x, const void *y) |
MagickExport const MimeInfo ** | GetMimeInfoList (const char *pattern, size_t *number_aliases, ExceptionInfo *exception) |
static int | MimeCompare (const void *x, const void *y) |
MagickExport char ** | GetMimeList (const char *pattern, size_t *number_aliases, ExceptionInfo *exception) |
MagickExport const char * | GetMimeDescription (const MimeInfo *mime_info) |
MagickExport const char * | GetMimeType (const MimeInfo *mime_info) |
MagickExport MagickBooleanType | ListMimeInfo (FILE *file, ExceptionInfo *exception) |
MagickExport char * | MagickToMime (const char *magick) |
MagickExport MagickBooleanType | MimeComponentGenesis (void) |
static void * | DestroyMimeElement (void *mime_info) |
MagickExport void | MimeComponentTerminus (void) |
Variables | |
static const char * | MimeMap |
static LinkedListInfo * | mime_cache = (LinkedListInfo *) NULL |
static SemaphoreInfo * | mime_semaphore = (SemaphoreInfo *) NULL |
|
static |
Definition at line 157 of file mime.c.
References DestroyConfigureOptions(), GetConfigureOptions(), GetNextValueInLinkedList(), GetStringInfoDatum(), GetStringInfoPath(), IsLinkedListEmpty(), LoadMimeCache(), MagickFalse, MagickTrue, MimeMap, NewLinkedList(), ResourceLimitFatalError, and ThrowFatalException.
Referenced by IsMimeCacheInstantiated(), and LoadMimeLists().
|
static |
Definition at line 1079 of file mime.c.
References _MimeInfo::description, DestroyString(), _MimeInfo::magic, _MimeInfo::path, _MimeInfo::pattern, RelinquishMagickMemory(), and _MimeInfo::type.
Referenced by MimeComponentTerminus().
MagickExport const char * GetMimeDescription | ( | const MimeInfo * | mime_info | ) |
Definition at line 612 of file mime.c.
References _MimeInfo::description, GetMagickModule, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, _MimeInfo::signature, and TraceEvent.
MagickExport const MimeInfo * GetMimeInfo | ( | const char * | filename, |
const unsigned char * | magic, | ||
const size_t | length, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 234 of file mime.c.
References ByteData, _MimeInfo::data_type, _MimeInfo::endian, _MimeInfo::extent, GetNextValueInLinkedList(), GlobExpression(), InsertValueInLinkedList(), IsMimeCacheInstantiated(), _MimeInfo::length, LockSemaphoreInfo(), LongData, LSBEndian, _MimeInfo::magic, MagickFalse, _MimeInfo::mask, mime_cache, mime_semaphore, MSBEndian, _MimeInfo::offset, _MimeInfo::pattern, _MimeInfo::priority, RemoveElementByValueFromLinkedList(), ResetLinkedListIterator(), ShortData, StringData, UndefinedEndian, UnlockSemaphoreInfo(), and _MimeInfo::value.
Referenced by GetMimeInfoList(), GetMimeList(), and MagickToMime().
MagickExport const MimeInfo ** GetMimeInfoList | ( | const char * | pattern, |
size_t * | number_aliases, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 450 of file mime.c.
References AcquireQuantumMemory(), GetMagickModule, GetMimeInfo(), GetNextValueInLinkedList(), GetNumberOfElementsInLinkedList(), GlobExpression(), IsEventLogging(), LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, mime_cache, mime_semaphore, MimeInfoCompare(), ResetLinkedListIterator(), _MimeInfo::stealth, TraceEvent, _MimeInfo::type, and UnlockSemaphoreInfo().
Referenced by ListMimeInfo().
MagickExport char ** GetMimeList | ( | const char * | pattern, |
size_t * | number_aliases, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 546 of file mime.c.
References AcquireQuantumMemory(), ConstantString(), GetMagickModule, GetMimeInfo(), GetNextValueInLinkedList(), GetNumberOfElementsInLinkedList(), GlobExpression(), IsEventLogging(), LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, mime_cache, mime_semaphore, MimeCompare(), ResetLinkedListIterator(), _MimeInfo::stealth, TraceEvent, _MimeInfo::type, and UnlockSemaphoreInfo().
MagickExport const char * GetMimeType | ( | const MimeInfo * | mime_info | ) |
Definition at line 643 of file mime.c.
References GetMagickModule, IsEventLogging(), LogMagickEvent(), MagickCoreSignature, MagickFalse, _MimeInfo::signature, TraceEvent, and _MimeInfo::type.
Referenced by MagickToMime().
|
static |
Definition at line 675 of file mime.c.
References AcquireMimeCache(), ActivateSemaphoreInfo(), LockSemaphoreInfo(), MagickFalse, MagickTrue, mime_cache, mime_semaphore, MimeFilename, and UnlockSemaphoreInfo().
Referenced by GetMimeInfo().
MagickExport MagickBooleanType ListMimeInfo | ( | FILE * | file, |
ExceptionInfo * | exception | ||
) |
Definition at line 713 of file mime.c.
References FormatLocaleFile(), GetMimeInfoList(), MagickFalse, MagickTrue, _MimeInfo::path, and RelinquishMagickMemory().
static MagickBooleanType LoadMimeCache | ( | LinkedListInfo * | cache, |
const char * | xml, | ||
const char * | filename, | ||
const size_t | depth, | ||
ExceptionInfo * | exception | ||
) |
Definition at line 803 of file mime.c.
References AcquireMagickMemory(), AcquireString(), AppendValueToLinkedList(), ConcatenateMagickString(), ConfigureError, ConfigureEvent, ConstantString(), CopyMagickString(), _MimeInfo::data_type, _MimeInfo::description, DestroyString(), DestroyXMLTree(), DirectorySeparator, _MimeInfo::endian, _MimeInfo::extent, FileToXML(), GetMagickModule, GetNextXMLTreeTag(), GetPathComponent(), GetXMLTreeAttribute(), GetXMLTreeChild(), HeadPath, IsMagickTrue(), _MimeInfo::length, LoadMimeCache(), LogMagickEvent(), _MimeInfo::magic, MagickCoreSignature, MagickDataTypeOptions, MagickEndianOptions, MagickFalse, MagickMaxRecursionDepth, MagickTrue, _MimeInfo::mask, MaxTextExtent, NewXMLTree(), _MimeInfo::offset, ParseCommandOption(), _MimeInfo::path, _MimeInfo::pattern, _MimeInfo::priority, ResourceLimitError, ResourceLimitFatalError, _MimeInfo::signature, _MimeInfo::stealth, StringData, SubstituteString(), ThrowFatalException, ThrowMagickException(), _MimeInfo::type, and _MimeInfo::value.
Referenced by AcquireMimeCache(), and LoadMimeCache().
MagickExport MagickBooleanType LoadMimeLists | ( | const char * | name, |
ExceptionInfo * | exception | ||
) |
Definition at line 194 of file mime.c.
References AcquireMimeCache(), MagickFalse, MagickTrue, and mime_cache.
MagickExport char * MagickToMime | ( | const char * | magick | ) |
Definition at line 1011 of file mime.c.
References AcquireExceptionInfo(), ConstantString(), DestroyExceptionInfo(), FormatLocaleString(), GetMimeInfo(), GetMimeType(), LocaleLower(), and MaxTextExtent.
|
static |
Definition at line 531 of file mime.c.
Referenced by GetMimeList().
MagickExport MagickBooleanType MimeComponentGenesis | ( | void | ) |
Definition at line 1053 of file mime.c.
References AllocateSemaphoreInfo(), MagickTrue, and mime_semaphore.
Referenced by MagickCoreGenesis().
MagickExport void MimeComponentTerminus | ( | void | ) |
Definition at line 1099 of file mime.c.
References ActivateSemaphoreInfo(), DestroyLinkedList(), DestroyMimeElement(), DestroySemaphoreInfo(), LockSemaphoreInfo(), mime_cache, mime_semaphore, and UnlockSemaphoreInfo().
Referenced by MagickCoreTerminus().
|
static |
Definition at line 433 of file mime.c.
Referenced by GetMimeInfoList().
|
static |
Definition at line 118 of file mime.c.
Referenced by GetMimeInfo(), GetMimeInfoList(), GetMimeList(), IsMimeCacheInstantiated(), LoadMimeLists(), and MimeComponentTerminus().
|
static |
Definition at line 121 of file mime.c.
Referenced by GetMimeInfo(), GetMimeInfoList(), GetMimeList(), IsMimeCacheInstantiated(), MimeComponentGenesis(), and MimeComponentTerminus().
|
static |
Definition at line 112 of file mime.c.
Referenced by AcquireMimeCache().