MagickCore  6.9.11
mime.c File Reference
#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"
Include dependency graph for mime.c:

Go to the source code of this file.

Data Structures

struct  _MimeInfo


#define MimeFilename   "mime.xml"


static MagickBooleanType IsMimeCacheInstantiated (ExceptionInfo *)
static MagickBooleanType LoadMimeCache (LinkedListInfo *, const char *, const char *, const size_t, ExceptionInfo *)
static LinkedListInfoAcquireMimeCache (const char *filename, ExceptionInfo *exception)
MagickExport MagickBooleanType LoadMimeLists (const char *name, ExceptionInfo *exception)
MagickExport const MimeInfoGetMimeInfo (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)


static const char * MimeMap
static LinkedListInfomime_cache = (LinkedListInfo *) NULL
static SemaphoreInfomime_semaphore = (SemaphoreInfo *) NULL

Macro Definition Documentation

◆ MimeFilename

#define MimeFilename   "mime.xml"

Definition at line 63 of file mime.c.

Referenced by IsMimeCacheInstantiated().

Function Documentation

◆ AcquireMimeCache()

◆ DestroyMimeElement()

static void* DestroyMimeElement ( void *  mime_info)

◆ GetMimeDescription()

MagickExport const char* GetMimeDescription ( const MimeInfo mime_info)

◆ GetMimeInfo()

◆ GetMimeInfoList()

◆ GetMimeList()

◆ GetMimeType()

MagickExport const char* GetMimeType ( const MimeInfo mime_info)

◆ IsMimeCacheInstantiated()

static MagickBooleanType IsMimeCacheInstantiated ( ExceptionInfo exception)

◆ ListMimeInfo()

MagickExport MagickBooleanType ListMimeInfo ( FILE *  file,
ExceptionInfo exception 

◆ LoadMimeCache()

◆ LoadMimeLists()

MagickExport MagickBooleanType LoadMimeLists ( const char *  name,
ExceptionInfo exception 

Definition at line 194 of file mime.c.

References AcquireMimeCache(), MagickFalse, MagickTrue, and mime_cache.

◆ MagickToMime()

MagickExport char* MagickToMime ( const char *  magick)

◆ MimeCompare()

static int MimeCompare ( const void *  x,
const void *  y 

Definition at line 530 of file mime.c.

Referenced by GetMimeList().

◆ MimeComponentGenesis()

MagickExport MagickBooleanType MimeComponentGenesis ( void  )

Definition at line 1049 of file mime.c.

References AllocateSemaphoreInfo(), MagickTrue, and mime_semaphore.

Referenced by MagickCoreGenesis().

◆ MimeComponentTerminus()

◆ MimeInfoCompare()

static int MimeInfoCompare ( const void *  x,
const void *  y 

Definition at line 433 of file mime.c.

Referenced by GetMimeInfoList().

Variable Documentation

◆ mime_cache

◆ mime_semaphore

◆ MimeMap

const char* MimeMap
Initial value:
= (char *)
"<?xml version=\"1.0\"?>"

Definition at line 112 of file mime.c.

Referenced by AcquireMimeCache().