|
MagickCore
6.7.5
|
#include "MagickCore/studio.h"#include "MagickCore/property.h"#include "MagickCore/blob.h"#include "MagickCore/client.h"#include "MagickCore/configure.h"#include "MagickCore/constitute.h"#include "MagickCore/delegate.h"#include "MagickCore/delegate-private.h"#include "MagickCore/exception.h"#include "MagickCore/exception-private.h"#include "MagickCore/hashmap.h"#include "MagickCore/list.h"#include "MagickCore/memory_.h"#include "MagickCore/policy.h"#include "MagickCore/resource_.h"#include "MagickCore/semaphore.h"#include "MagickCore/string_.h"#include "MagickCore/token.h"#include "MagickCore/utility.h"#include "MagickCore/utility-private.h"#include "MagickCore/xml-tree.h"
Go to the source code of this file.
Defines | |
| #define | DelegateFilename "delegates.xml" |
Functions | |
| static MagickBooleanType | InitializeDelegateList (ExceptionInfo *) |
| static MagickBooleanType | LoadDelegateLists (const char *, ExceptionInfo *) |
| MagickPrivate MagickBooleanType | DelegateComponentGenesis (void) |
| static void * | DestroyDelegate (void *delegate_info) |
| MagickPrivate void | DelegateComponentTerminus (void) |
| MagickExport char * | GetDelegateCommand (const ImageInfo *image_info, Image *image, const char *decode, const char *encode, ExceptionInfo *exception) |
| MagickExport const char * | GetDelegateCommands (const DelegateInfo *delegate_info) |
| MagickExport const DelegateInfo * | GetDelegateInfo (const char *decode, const char *encode, ExceptionInfo *exception) |
| static int | DelegateInfoCompare (const void *x, const void *y) |
| MagickExport const DelegateInfo ** | GetDelegateInfoList (const char *pattern, size_t *number_delegates, ExceptionInfo *exception) |
| static int | DelegateCompare (const void *x, const void *y) |
| MagickExport char ** | GetDelegateList (const char *pattern, size_t *number_delegates, ExceptionInfo *exception) |
| MagickExport ssize_t | GetDelegateMode (const DelegateInfo *delegate_info) |
| MagickExport MagickBooleanType | GetDelegateThreadSupport (const DelegateInfo *delegate_info) |
| static size_t | MagickMin (const size_t x, const size_t y) |
| static MagickBooleanType | CopyDelegateFile (const char *source, const char *destination) |
| MagickExport MagickBooleanType | InvokeDelegate (ImageInfo *image_info, Image *image, const char *decode, const char *encode, ExceptionInfo *exception) |
| MagickExport MagickBooleanType | ListDelegateInfo (FILE *file, ExceptionInfo *exception) |
| static MagickBooleanType | LoadDelegateList (const char *xml, const char *filename, const size_t depth, ExceptionInfo *exception) |
Variables | |
| static const char * | DelegateMap = "</delegatemap>" |
| static LinkedListInfo * | delegate_list = (LinkedListInfo *) NULL |
| static SemaphoreInfo * | delegate_semaphore = (SemaphoreInfo *) NULL |
| static volatile MagickBooleanType | instantiate_delegate = MagickFalse |
| #define DelegateFilename "delegates.xml" |
Definition at line 73 of file delegate.c.
Referenced by InitializeDelegateList().
| static MagickBooleanType CopyDelegateFile | ( | const char * | source, |
| const char * | destination | ||
| ) | [static] |
Definition at line 759 of file delegate.c.
References GetPathAttributes(), MagickFalse, MagickTrue, open_utf8(), O_BINARY, S_MODE, MagickMaxBufferExtent, MagickMin(), AcquireQuantumMemory(), and RelinquishMagickMemory().
Referenced by InvokeDelegate().
| static int DelegateCompare | ( | const void * | x, |
| const void * | y | ||
| ) | [static] |
Definition at line 557 of file delegate.c.
References LocaleCompare().
Referenced by GetDelegateList().
| MagickPrivate MagickBooleanType DelegateComponentGenesis | ( | void | ) |
Definition at line 164 of file delegate.c.
References AcquireSemaphoreInfo(), delegate_semaphore, and MagickTrue.
Referenced by MagickCoreGenesis().
| MagickPrivate void DelegateComponentTerminus | ( | void | ) |
Definition at line 207 of file delegate.c.
References delegate_semaphore, AcquireSemaphoreInfo(), LockSemaphoreInfo(), delegate_list, DestroyLinkedList(), DestroyDelegate(), instantiate_delegate, MagickFalse, UnlockSemaphoreInfo(), and DestroySemaphoreInfo().
Referenced by MagickCoreTerminus().
| static int DelegateInfoCompare | ( | const void * | x, |
| const void * | y | ||
| ) | [static] |
Definition at line 451 of file delegate.c.
References LocaleCompare().
Referenced by GetDelegateInfoList().
| static void* DestroyDelegate | ( | void * | delegate_info | ) | [static] |
Definition at line 189 of file delegate.c.
References _DelegateInfo::path, DestroyString(), _DelegateInfo::decode, _DelegateInfo::encode, _DelegateInfo::commands, and RelinquishMagickMemory().
Referenced by DelegateComponentTerminus().
| MagickExport char* GetDelegateCommand | ( | const ImageInfo * | image_info, |
| Image * | image, | ||
| const char * | decode, | ||
| const char * | encode, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 256 of file delegate.c.
References _ImageInfo::signature, MagickSignature, _Image::signature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, GetDelegateInfo(), ThrowMagickException(), DelegateError, StringToList(), _DelegateInfo::commands, ResourceLimitError, InterpretImageProperties(), DestroyString(), and RelinquishMagickMemory().
| MagickExport const char* GetDelegateCommands | ( | const DelegateInfo * | delegate_info | ) |
Definition at line 325 of file delegate.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, _DelegateInfo::signature, MagickSignature, and _DelegateInfo::commands.
| MagickExport const DelegateInfo* GetDelegateInfo | ( | const char * | decode, |
| const char * | encode, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 362 of file delegate.c.
References delegate_list, instantiate_delegate, MagickFalse, InitializeDelegateList(), IsLinkedListEmpty(), LocaleCompare(), GetValueFromLinkedList(), LockSemaphoreInfo(), delegate_semaphore, ResetLinkedListIterator(), GetNextValueInLinkedList(), _DelegateInfo::mode, _DelegateInfo::decode, _DelegateInfo::encode, InsertValueInLinkedList(), RemoveElementByValueFromLinkedList(), and UnlockSemaphoreInfo().
Referenced by ReadImage(), WriteImage(), GetDelegateCommand(), GetDelegateInfoList(), GetDelegateList(), and InvokeDelegate().
| MagickExport const DelegateInfo** GetDelegateInfoList | ( | const char * | pattern, |
| size_t * | number_delegates, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 476 of file delegate.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, GetDelegateInfo(), AcquireQuantumMemory(), GetNumberOfElementsInLinkedList(), delegate_list, LockSemaphoreInfo(), delegate_semaphore, ResetLinkedListIterator(), GetNextValueInLinkedList(), _DelegateInfo::stealth, MagickFalse, GlobExpression(), _DelegateInfo::decode, _DelegateInfo::encode, UnlockSemaphoreInfo(), and DelegateInfoCompare().
Referenced by ListDelegateInfo().
| MagickExport char** GetDelegateList | ( | const char * | pattern, |
| size_t * | number_delegates, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 572 of file delegate.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, GetDelegateInfo(), AcquireQuantumMemory(), GetNumberOfElementsInLinkedList(), delegate_list, LockSemaphoreInfo(), delegate_semaphore, ResetLinkedListIterator(), GetNextValueInLinkedList(), _DelegateInfo::stealth, MagickFalse, GlobExpression(), _DelegateInfo::decode, ConstantString(), _DelegateInfo::encode, UnlockSemaphoreInfo(), and DelegateCompare().
| MagickExport ssize_t GetDelegateMode | ( | const DelegateInfo * | delegate_info | ) |
Definition at line 640 of file delegate.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, _DelegateInfo::signature, MagickSignature, and _DelegateInfo::mode.
Referenced by WriteImage().
| MagickExport MagickBooleanType GetDelegateThreadSupport | ( | const DelegateInfo * | delegate_info | ) |
Definition at line 672 of file delegate.c.
References LogMagickEvent(), TraceEvent, GetMagickModule, _DelegateInfo::signature, MagickSignature, and _DelegateInfo::thread_support.
Referenced by ReadImage(), and WriteImage().
| static MagickBooleanType InitializeDelegateList | ( | ExceptionInfo * | exception | ) | [static] |
Definition at line 703 of file delegate.c.
References delegate_list, instantiate_delegate, MagickFalse, delegate_semaphore, AcquireSemaphoreInfo(), LockSemaphoreInfo(), LoadDelegateLists(), DelegateFilename, MagickTrue, and UnlockSemaphoreInfo().
Referenced by GetDelegateInfo().
| MagickExport MagickBooleanType InvokeDelegate | ( | ImageInfo * | image_info, |
| Image * | image, | ||
| const char * | decode, | ||
| const char * | encode, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 832 of file delegate.c.
References MaxTextExtent, _ImageInfo::signature, MagickSignature, _Image::signature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, ExecutePolicyRights, IsRightsAuthorized(), DelegatePolicyDomain, ThrowMagickException(), PolicyError, MagickTrue, AcquireUniqueFilename(), ThrowFileException, FileOpenError, GetDelegateInfo(), RelinquishUniqueFileResource(), DelegateError, _ImageInfo::filename, _ImageInfo::temporary, _DelegateInfo::mode, _DelegateInfo::encode, _DelegateInfo::decode, _ImageInfo::unique, _ImageInfo::zero, InterpretImageProperties(), LocaleUpper(), CloneImageInfo(), CopyMagickString(), _ImageInfo::magick, LocaleCompare(), _Image::magick, DestroyString(), FormatLocaleString(), SetImageInfo(), GetImageListLength(), GetNextImageInList(), WriteImage(), DestroyImageInfo(), _ImageInfo::adjoin, StringToList(), _DelegateInfo::commands, ResourceLimitError, AcquireUniqueSymbolicLink(), SystemCommand(), _DelegateInfo::spawn, _ImageInfo::verbose, CopyDelegateFile(), and RelinquishMagickMemory().
Referenced by ReadImage(), and WriteImage().
| MagickExport MagickBooleanType ListDelegateInfo | ( | FILE * | file, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1101 of file delegate.c.
References MaxTextExtent, GetDelegateInfoList(), MagickFalse, LocaleCompare(), FormatLocaleFile(), _DelegateInfo::path, CopyMagickString(), ConcatenateMagickString(), StringToList(), StripString(), DestroyString(), RelinquishMagickMemory(), and MagickTrue.
| static MagickBooleanType LoadDelegateList | ( | const char * | xml, |
| const char * | filename, | ||
| const size_t | depth, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 1202 of file delegate.c.
References MaxTextExtent, LogMagickEvent(), ConfigureEvent, GetMagickModule, MagickFalse, delegate_list, NewLinkedList(), ThrowFileException, ResourceLimitError, MagickTrue, AcquireString(), GetMagickToken(), CopyMagickString(), LocaleNCompare(), LocaleCompare(), ThrowMagickException(), ConfigureError, GetPathComponent(), HeadPath, ConcatenateMagickString(), DirectorySeparator, FileToString(), RelinquishMagickMemory(), AcquireMagickMemory(), ThrowFatalException, ResourceLimitFatalError, ResetMagickMemory(), _DelegateInfo::path, ConstantString(), _DelegateInfo::signature, MagickSignature, AppendValueToLinkedList(), _DelegateInfo::commands, SubstituteString(), _DelegateInfo::decode, _DelegateInfo::mode, _DelegateInfo::encode, _DelegateInfo::spawn, IsMagickTrue(), _DelegateInfo::stealth, and _DelegateInfo::thread_support.
Referenced by LoadDelegateLists().
| static MagickBooleanType LoadDelegateLists | ( | const char * | filename, |
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1465 of file delegate.c.
References LoadDelegateList(), DelegateMap, MagickFalse, GetConfigureOptions(), GetNextValueInLinkedList(), GetStringInfoDatum(), GetStringInfoPath(), DestroyConfigureOptions(), delegate_list, IsLinkedListEmpty(), and MagickTrue.
Referenced by InitializeDelegateList().
| static size_t MagickMin | ( | const size_t | x, |
| const size_t | y | ||
| ) | [inline, static] |
Definition at line 752 of file delegate.c.
Referenced by CopyDelegateFile().
LinkedListInfo* delegate_list = (LinkedListInfo *) NULL [static] |
Definition at line 131 of file delegate.c.
Referenced by DelegateComponentTerminus(), GetDelegateInfo(), GetDelegateInfoList(), GetDelegateList(), InitializeDelegateList(), LoadDelegateList(), and LoadDelegateLists().
SemaphoreInfo* delegate_semaphore = (SemaphoreInfo *) NULL [static] |
Definition at line 134 of file delegate.c.
Referenced by DelegateComponentGenesis(), DelegateComponentTerminus(), GetDelegateInfo(), GetDelegateInfoList(), GetDelegateList(), and InitializeDelegateList().
const char* DelegateMap = "</delegatemap>" [static] |
Definition at line 79 of file delegate.c.
Referenced by LoadDelegateLists().
volatile MagickBooleanType instantiate_delegate = MagickFalse [static] |
Definition at line 137 of file delegate.c.
Referenced by DelegateComponentTerminus(), GetDelegateInfo(), and InitializeDelegateList().