MagickCore  6.9.12-38
Convert, Edit, Or Compose Bitmap Images
delegate.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2021 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. You may
6  obtain a copy of the License at
7 
8  https://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 delegates methods.
17 */
18 #ifndef MAGICKCORE_DELEGATE_H
19 #define MAGICKCORE_DELEGATE_H
20 
21 #if defined(__cplusplus) || defined(c_plusplus)
22 extern "C" {
23 #endif
24 
25 #include <stdarg.h>
26 #include "magick/semaphore.h"
27 
28 typedef struct _DelegateInfo
29 {
30  char
31  *path,
35 
36  ssize_t
38 
43 
44  struct _DelegateInfo
46  *next; /* deprecated, use GetDelegateInfoList() */
47 
48  size_t
50 
54 
55 extern MagickExport char
56  *GetDelegateCommand(const ImageInfo *,Image *,const char *,const char *,
57  ExceptionInfo *),
58  **GetDelegateList(const char *,size_t *,ExceptionInfo *);
59 
60 extern MagickExport const char
62 
63 extern MagickExport const DelegateInfo
64  *GetDelegateInfo(const char *,const char *,ExceptionInfo *exception),
65  **GetDelegateInfoList(const char *,size_t *,ExceptionInfo *);
66 
67 extern MagickExport int
69  const char *,char *,ExceptionInfo *);
70 
71 extern MagickExport ssize_t
73 
77  InvokeDelegate(ImageInfo *,Image *,const char *,const char *,ExceptionInfo *),
79 
80 extern MagickExport void
82 
83 #if defined(__cplusplus) || defined(c_plusplus)
84 }
85 #endif
86 
87 #endif
_Image::colorspace
ColorspaceType colorspace
Definition: image.h:158
DirectorySeparator
#define DirectorySeparator
Definition: studio.h:270
GetImageIndexInList
MagickExport ssize_t GetImageIndexInList(const Image *images)
Definition: list.c:672
_DelegateInfo::stealth
MagickBooleanType stealth
Definition: delegate.h:42
LockSemaphoreInfo
MagickExport void LockSemaphoreInfo(SemaphoreInfo *semaphore_info)
Definition: semaphore.c:293
MagickExport
#define MagickExport
Definition: method-attribute.h:80
InterpretDelegateProperties
static char * InterpretDelegateProperties(const ImageInfo *image_info, Image *image, const char *embed_text)
Definition: delegate.c:973
_Image::debug
MagickBooleanType debug
Definition: image.h:290
policy.h
_Image::filename
char filename[MaxTextExtent]
Definition: image.h:278
GetDelegateMode
MagickExport ssize_t GetDelegateMode(const DelegateInfo *)
Definition: delegate.c:1553
_RectangleInfo::x
ssize_t x
Definition: geometry.h:130
AcquireDelegateCache
static LinkedListInfo * AcquireDelegateCache(const char *filename, ExceptionInfo *exception)
Definition: delegate.c:184
GetDelegateMode
MagickExport ssize_t GetDelegateMode(const DelegateInfo *delegate_info)
Definition: delegate.c:1553
ThrowFileException
#define ThrowFileException(exception, severity, tag, context)
Definition: exception-private.h:60
_Image::matte
MagickBooleanType matte
Definition: image.h:171
GetStringInfoPath
MagickExport const char * GetStringInfoPath(const StringInfo *string_info)
Definition: string.c:1283
PixelsPerCentimeterResolution
@ PixelsPerCentimeterResolution
Definition: image.h:94
DelegateComponentGenesis
MagickExport MagickBooleanType DelegateComponentGenesis(void)
Definition: delegate.c:233
GetDelegateCommands
MagickExport const char * GetDelegateCommands(const DelegateInfo *delegate_info)
Definition: delegate.c:1236
IsLinkedListEmpty
MagickExport MagickBooleanType IsLinkedListEmpty(const LinkedListInfo *list_info)
Definition: hashmap.c:1205
PolicyError
@ PolicyError
Definition: exception.h:76
HeadPath
@ HeadPath
Definition: utility.h:30
GetMagickModule
#define GetMagickModule()
Definition: log.h:29
nt-base-private.h
MagickStatusType
unsigned int MagickStatusType
Definition: magick-type.h:127
_DelegateInfo::semaphore
SemaphoreInfo * semaphore
Definition: delegate.h:52
TailPath
@ TailPath
Definition: utility.h:31
GetImageProperty
MagickExport const char * GetImageProperty(const Image *image, const char *property)
Definition: property.c:2205
PolicyDomain
PolicyDomain
Definition: policy.h:29
IsMagickTrue
MagickExport MagickBooleanType IsMagickTrue(const char *value)
Definition: token.c:657
MagickCoreSignature
#define MagickCoreSignature
Definition: method-attribute.h:86
O_BINARY
#define O_BINARY
Definition: studio.h:358
FormatLocaleString
MagickExport ssize_t FormatLocaleString(char *magick_restrict string, const size_t length, const char *magick_restrict format,...)
Definition: locale.c:497
DefaultResolution
#define DefaultResolution
Definition: image-private.h:27
OptionWarning
@ OptionWarning
Definition: exception.h:34
_RectangleInfo::height
size_t height
Definition: geometry.h:127
_Image::depth
size_t depth
Definition: image.h:176
MagickMaxBufferExtent
#define MagickMaxBufferExtent
Definition: blob.h:28
AcquireUniqueFilename
MagickExport MagickBooleanType AcquireUniqueFilename(char *path)
Definition: utility.c:109
_Image::quality
size_t quality
Definition: image.h:164
_RectangleInfo
Definition: geometry.h:124
SetImageGray
MagickExport MagickBooleanType SetImageGray(Image *image, ExceptionInfo *exception)
Definition: colorspace.c:1329
property.h
GetDelegateCommand
MagickExport char * GetDelegateCommand(const ImageInfo *, Image *, const char *, const char *, ExceptionInfo *)
DelegateCompare
static int DelegateCompare(const void *x, const void *y)
Definition: delegate.c:1470
GetPathAttributes
MagickExport MagickBooleanType GetPathAttributes(const char *path, void *attributes)
Definition: utility.c:1170
image-private.h
DestroyLinkedList
MagickExport LinkedListInfo * DestroyLinkedList(LinkedListInfo *list_info, void *(*relinquish_value)(void *))
Definition: hashmap.c:398
MagickCompressOptions
@ MagickCompressOptions
Definition: option.h:40
GetDelegateInfoList
MagickExport const DelegateInfo ** GetDelegateInfoList(const char *, size_t *, ExceptionInfo *)
Definition: delegate.c:1389
_Image::columns
size_t columns
Definition: image.h:174
artifact.h
ResetLinkedListIterator
MagickExport void ResetLinkedListIterator(LinkedListInfo *list_info)
Definition: hashmap.c:1921
IsRightsAuthorized
MagickExport MagickBooleanType IsRightsAuthorized(const PolicyDomain domain, const PolicyRights rights, const char *pattern)
Definition: policy.c:613
delegate.h
StringToList
MagickExport char ** StringToList(const char *text)
Definition: string.c:2279
_ImageInfo::number_scenes
size_t number_scenes
Definition: image.h:383
_DelegateInfo::decode
char * decode
Definition: delegate.h:32
resource_.h
GetDelegateCommand
MagickExport char * GetDelegateCommand(const ImageInfo *image_info, Image *image, const char *decode, const char *encode, ExceptionInfo *exception)
Definition: delegate.c:1167
MagickDisposeOptions
@ MagickDisposeOptions
Definition: option.h:47
PolicyRights
PolicyRights
Definition: policy.h:42
GetDelegateInfo
MagickExport const DelegateInfo * GetDelegateInfo(const char *, const char *, ExceptionInfo *exception)
ResourceLimitError
@ ResourceLimitError
Definition: exception.h:55
utility.h
S_MODE
#define S_MODE
Definition: studio.h:247
DelegateComponentGenesis
MagickExport MagickBooleanType DelegateComponentGenesis(void)
DelegateError
@ DelegateError
Definition: exception.h:58
IsDelegateCacheInstantiated
static MagickBooleanType IsDelegateCacheInstantiated(ExceptionInfo *)
Definition: delegate.c:1617
ExecutePolicyRights
@ ExecutePolicyRights
Definition: policy.h:47
string_.h
_ImageInfo::temporary
MagickBooleanType temporary
Definition: image.h:370
_DelegateInfo::signature
size_t signature
Definition: delegate.h:49
GetImageBoundingBox
MagickExport RectangleInfo GetImageBoundingBox(const Image *image, ExceptionInfo *exception)
Definition: attribute.c:391
DestroyString
MagickExport char * DestroyString(char *string)
Definition: string.c:821
GetMagickPropertyLetter
static char * GetMagickPropertyLetter(const ImageInfo *image_info, Image *image, const char letter)
Definition: delegate.c:546
GetPathComponent
MagickExport void GetPathComponent(const char *path, PathType type, char *component)
Definition: utility.c:1218
MagickTrue
@ MagickTrue
Definition: magick-type.h:201
blob.h
semaphore.h
_DelegateInfo::next
struct _DelegateInfo * next
Definition: delegate.h:46
_RectangleInfo::y
ssize_t y
Definition: geometry.h:131
GetDelegateInfo
MagickExport const DelegateInfo * GetDelegateInfo(const char *decode, const char *encode, ExceptionInfo *exception)
Definition: delegate.c:1273
GetBlobSize
MagickExport MagickSizeType GetBlobSize(const Image *image)
Definition: blob.c:1546
_DelegateInfo::path
char * path
Definition: delegate.h:31
hashmap.h
_DelegateInfo::mode
ssize_t mode
Definition: delegate.h:37
GetDelegateList
MagickExport char ** GetDelegateList(const char *pattern, size_t *number_delegates, ExceptionInfo *exception)
Definition: delegate.c:1485
TraceEvent
@ TraceEvent
Definition: log.h:38
ListDelegateInfo
MagickExport MagickBooleanType ListDelegateInfo(FILE *, ExceptionInfo *)
Definition: delegate.c:2016
SignatureImage
MagickExport MagickBooleanType SignatureImage(Image *)
Definition: signature.c:467
GetDelegateThreadSupport
MagickExport MagickBooleanType GetDelegateThreadSupport(const DelegateInfo *)
FormatLocaleFile
MagickExport ssize_t FormatLocaleFile(FILE *file, const char *magick_restrict format,...)
Definition: locale.c:402
GetDelegateList
MagickExport char ** GetDelegateList(const char *, size_t *, ExceptionInfo *)
Definition: delegate.c:1485
CloneImageInfo
MagickExport ImageInfo * CloneImageInfo(const ImageInfo *image_info)
Definition: image.c:934
SemaphoreInfo
Definition: semaphore.c:61
ConcatenateMagickString
MagickExport size_t ConcatenateMagickString(char *magick_restrict destination, const char *magick_restrict source, const size_t length)
Definition: string.c:426
_ImageInfo::adjoin
MagickBooleanType adjoin
Definition: image.h:371
SubstituteString
MagickExport MagickBooleanType SubstituteString(char **string, const char *search, const char *replace)
Definition: string.c:2555
_Image::dispose
DisposeType dispose
Definition: image.h:238
LocaleNCompare
MagickExport int LocaleNCompare(const char *p, const char *q, const size_t length)
Definition: locale.c:1570
_Image
Definition: image.h:153
StripString
MagickExport void StripString(char *message)
Definition: string.c:2493
FormatMagickSize
MagickExport ssize_t FormatMagickSize(const MagickSizeType size, const MagickBooleanType bi, char *format)
Definition: string.c:1083
signature.h
ExternalDelegateCommand
MagickExport int ExternalDelegateCommand(const MagickBooleanType asynchronous, const MagickBooleanType verbose, const char *command, char *message, ExceptionInfo *exception)
Definition: delegate.c:326
_DelegateInfo::spawn
MagickBooleanType spawn
Definition: delegate.h:41
ConfigureEvent
@ ConfigureEvent
Definition: log.h:43
SanitizeString
MagickExport char * SanitizeString(const char *source)
Definition: string.c:1606
MagickMaxRecursionDepth
#define MagickMaxRecursionDepth
Definition: studio.h:377
LocaleCompare
MagickExport int LocaleCompare(const char *p, const char *q)
Definition: locale.c:1435
_Image::delay
size_t delay
Definition: image.h:245
ColorspaceType
ColorspaceType
Definition: colorspace.h:26
attribute.h
_Image::y_resolution
double y_resolution
Definition: image.h:210
_ImageInfo::scene
size_t scene
Definition: image.h:382
_Image::exception
ExceptionInfo exception
Definition: image.h:287
SanitizeDelegateString
static char * SanitizeDelegateString(const char *source)
Definition: delegate-private.h:80
_Image::iterations
size_t iterations
Definition: image.h:251
_Image::x_resolution
double x_resolution
Definition: image.h:209
_LinkedListInfo
Definition: hashmap.c:78
DelegateFilename
#define DelegateFilename
Definition: delegate.c:88
AcquireUniqueSymbolicLink
MagickExport MagickBooleanType AcquireUniqueSymbolicLink(const char *source, char *destination)
Definition: utility.c:151
xml-tree-private.h
_ImageInfo
Definition: image.h:362
StringToArgv
MagickExport char ** StringToArgv(const char *text, int *argc)
Definition: string.c:2002
MagickFalse
@ MagickFalse
Definition: magick-type.h:200
_ImageInfo::zero
char zero[MaxTextExtent]
Definition: image.h:472
_ImageInfo::magick
char magick[MaxTextExtent]
Definition: image.h:470
xml-tree.h
GetNumberOfElementsInLinkedList
MagickExport size_t GetNumberOfElementsInLinkedList(const LinkedListInfo *list_info)
Definition: hashmap.c:679
ListDelegateInfo
MagickExport MagickBooleanType ListDelegateInfo(FILE *file, ExceptionInfo *exception)
Definition: delegate.c:2016
MagickResolutionOptions
@ MagickResolutionOptions
Definition: option.h:86
_ImageInfo::filename
char filename[MaxTextExtent]
Definition: image.h:473
CommandOptionToMnemonic
MagickExport const char * CommandOptionToMnemonic(const CommandOption option, const ssize_t type)
Definition: option.c:2311
LoadDelegateCache
static MagickBooleanType LoadDelegateCache(LinkedListInfo *, const char *, const char *, const size_t, ExceptionInfo *)
Definition: delegate.c:2118
AppendValueToLinkedList
MagickExport MagickBooleanType AppendValueToLinkedList(LinkedListInfo *list_info, const void *value)
Definition: hashmap.c:150
DelegateMap
static const char * DelegateMap
Definition: delegate.c:94
GetNextImageInList
MagickExport Image * GetNextImageInList(const Image *images)
Definition: list.c:786
CopyDelegateFile
static MagickBooleanType CopyDelegateFile(const char *source, const char *destination, const MagickBooleanType overwrite)
Definition: delegate.c:1661
AllocateSemaphoreInfo
MagickExport SemaphoreInfo * AllocateSemaphoreInfo(void)
Definition: semaphore.c:192
DelegatePolicyDomain
@ DelegatePolicyDomain
Definition: policy.h:32
_DelegateInfo::commands
char * commands
Definition: delegate.h:34
ExternalDelegateCommand
MagickExport int ExternalDelegateCommand(const MagickBooleanType, const MagickBooleanType, const char *, char *, ExceptionInfo *)
Definition: delegate.c:326
FileOpenError
@ FileOpenError
Definition: exception.h:61
popen_utf8
static FILE * popen_utf8(const char *command, const char *type)
Definition: utility-private.h:182
MagickDelay
MagickExport void MagickDelay(const MagickSizeType milliseconds)
Definition: utility.c:1727
ActivateSemaphoreInfo
MagickExport void ActivateSemaphoreInfo(SemaphoreInfo **semaphore_info)
Definition: semaphore.c:98
WriteImage
MagickExport MagickBooleanType WriteImage(const ImageInfo *image_info, Image *image)
Definition: constitute.c:1090
_ImageInfo::verbose
MagickBooleanType verbose
Definition: image.h:435
DestroyImageInfo
MagickExport ImageInfo * DestroyImageInfo(ImageInfo *image_info)
Definition: image.c:1250
MagickClassOptions
@ MagickClassOptions
Definition: option.h:33
InvokeDelegate
MagickExport MagickBooleanType InvokeDelegate(ImageInfo *image_info, Image *image, const char *decode, const char *encode, ExceptionInfo *exception)
Definition: delegate.c:1734
MagickColorspaceOptions
@ MagickColorspaceOptions
Definition: option.h:37
_Image::rows
size_t rows
Definition: image.h:175
DestroySemaphoreInfo
MagickExport void DestroySemaphoreInfo(SemaphoreInfo **semaphore_info)
Definition: semaphore.c:351
GetImageListLength
MagickExport size_t GetImageListLength(const Image *images)
Definition: list.c:711
ConstantString
MagickExport char * ConstantString(const char *source)
Definition: string.c:711
constitute.h
DelegateComponentTerminus
MagickExport void DelegateComponentTerminus(void)
Definition: delegate.c:279
_Image::signature
size_t signature
Definition: image.h:307
MagickBooleanType
MagickBooleanType
Definition: magick-type.h:199
_Image::extent
MagickSizeType extent
Definition: image.h:340
GetNextValueInLinkedList
MagickExport void * GetNextValueInLinkedList(LinkedListInfo *list_info)
Definition: hashmap.c:606
RelinquishMagickMemory
MagickExport void * RelinquishMagickMemory(void *memory)
Definition: memory.c:1162
_ExceptionInfo
Definition: exception.h:103
utility-private.h
_ImageInfo::signature
size_t signature
Definition: image.h:489
_DelegateInfo::thread_support
MagickBooleanType thread_support
Definition: delegate.h:40
_RectangleInfo::width
size_t width
Definition: geometry.h:126
studio.h
_Image::storage_class
ClassType storage_class
Definition: image.h:155
RelinquishUniqueFileResource
MagickExport MagickBooleanType RelinquishUniqueFileResource(const char *path)
Definition: resource.c:1287
DelegateInfoCompare
static int DelegateInfoCompare(const void *x, const void *y)
Definition: delegate.c:1360
token-private.h
GRAYColorspace
@ GRAYColorspace
Definition: colorspace.h:29
BasePath
@ BasePath
Definition: utility.h:32
_ImageInfo::authenticate
char * authenticate
Definition: image.h:439
access_utf8
static int access_utf8(const char *path, int mode)
Definition: utility-private.h:92
FileToXML
MagickPrivate char * FileToXML(const char *, const size_t)
Definition: xml-tree.c:597
InvokeDelegate
MagickExport MagickBooleanType InvokeDelegate(ImageInfo *, Image *, const char *, const char *, ExceptionInfo *)
AppendString2Text
#define AppendString2Text(string)
SetImageInfo
MagickExport MagickBooleanType SetImageInfo(ImageInfo *image_info, const unsigned int frames, ExceptionInfo *exception)
Definition: image.c:2747
MAGICKCORE_QUANTUM_DEPTH
#define MAGICKCORE_QUANTUM_DEPTH
Definition: magick-type.h:28
memory_.h
DelegateInfo
struct _DelegateInfo DelegateInfo
GetStringInfoDatum
MagickExport unsigned char * GetStringInfoDatum(const StringInfo *string_info)
Definition: string.c:1196
LocaleUpper
MagickExport void LocaleUpper(char *string)
Definition: locale.c:1630
GetDelegateCommands
MagickExport const char * GetDelegateCommands(const DelegateInfo *)
Definition: delegate.c:1236
DestroyDelegate
static void * DestroyDelegate(void *delegate_info)
Definition: delegate.c:259
MagickEpsilon
#define MagickEpsilon
Definition: magick-type.h:115
NewLinkedList
MagickExport LinkedListInfo * NewLinkedList(const size_t capacity)
Definition: hashmap.c:1363
exception-private.h
ThrowMagickException
MagickExport MagickBooleanType ThrowMagickException(ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *tag, const char *format,...)
Definition: exception.c:1149
_DelegateInfo
Definition: delegate.h:29
ThrowFatalException
#define ThrowFatalException(severity, tag)
Definition: exception-private.h:42
UnlockSemaphoreInfo
MagickExport void UnlockSemaphoreInfo(SemaphoreInfo *semaphore_info)
Definition: semaphore.c:449
_DelegateInfo::previous
struct _DelegateInfo * previous
Definition: delegate.h:44
exception.h
GetDelegateThreadSupport
MagickExport MagickBooleanType GetDelegateThreadSupport(const DelegateInfo *delegate_info)
Definition: delegate.c:1585
GlobExpression
MagickExport MagickBooleanType GlobExpression(const char *magick_restrict expression, const char *magick_restrict pattern, const MagickBooleanType case_insensitive)
Definition: token.c:355
option.h
GetConfigureOptions
MagickExport LinkedListInfo * GetConfigureOptions(const char *filename, ExceptionInfo *exception)
Definition: configure.c:622
_ImageInfo::unique
char unique[MaxTextExtent]
Definition: image.h:471
_Image::compression
CompressionType compression
Definition: image.h:161
CopyMagickString
MagickExport size_t CopyMagickString(char *magick_restrict destination, const char *magick_restrict source, const size_t length)
Definition: string.c:764
_Image::magick_columns
size_t magick_columns
Definition: image.h:283
DestroyConfigureOptions
MagickExport LinkedListInfo * DestroyConfigureOptions(LinkedListInfo *options)
Definition: configure.c:294
list.h
LogMagickEvent
MagickExport MagickBooleanType LogMagickEvent(const LogEventType type, const char *module, const char *function, const size_t line, const char *format,...)
Definition: log.c:1420
GetDelegateInfoList
MagickExport const DelegateInfo ** GetDelegateInfoList(const char *pattern, size_t *number_delegates, ExceptionInfo *exception)
Definition: delegate.c:1389
_Image::magick_rows
size_t magick_rows
Definition: image.h:284
RemoveElementByValueFromLinkedList
MagickExport void * RemoveElementByValueFromLinkedList(LinkedListInfo *list_info, const void *value)
Definition: hashmap.c:1597
MaxTextExtent
#define MaxTextExtent
Definition: method-attribute.h:89
MagickBooleanOptions
@ MagickBooleanOptions
Definition: option.h:30
GetNextToken
MagickExport magick_hot_spot size_t GetNextToken(const char *magick_restrict start, const char **magick_restrict end, const size_t extent, char *magick_restrict token)
Definition: token.c:174
delegate_semaphore
static SemaphoreInfo * delegate_semaphore
Definition: delegate.c:148
_Image::units
ResolutionType units
Definition: image.h:198
token.h
_Image::scene
size_t scene
Definition: image.h:244
DelegateComponentTerminus
MagickExport void DelegateComponentTerminus(void)
Definition: delegate.c:279
delegate_cache
static LinkedListInfo * delegate_cache
Definition: delegate.c:145
ExtensionPath
@ ExtensionPath
Definition: utility.h:33
ResourceLimitFatalError
@ ResourceLimitFatalError
Definition: exception.h:78
AcquireString
MagickExport char * AcquireString(const char *source)
Definition: string.c:126
MagickMin
#define MagickMin(x, y)
Definition: image-private.h:37
ConfigureError
@ ConfigureError
Definition: exception.h:75
open_utf8
static int open_utf8(const char *path, int flags, mode_t mode)
Definition: utility-private.h:162
_Image::page
RectangleInfo page
Definition: image.h:213
client.h
_Image::magick
char magick[MaxTextExtent]
Definition: image.h:280
_Image::magick_filename
char magick_filename[MaxTextExtent]
Definition: image.h:279
_StringInfo
Definition: string_.h:30
_DelegateInfo::encode
char * encode
Definition: delegate.h:33
InsertValueInLinkedList
MagickExport MagickBooleanType InsertValueInLinkedList(LinkedListInfo *list_info, const size_t index, const void *value)
Definition: hashmap.c:990
ExtendInterpretText
#define ExtendInterpretText(string_length)
AcquireQuantumMemory
MagickExport void * AcquireQuantumMemory(const size_t count, const size_t quantum)
Definition: memory.c:665
configure.h
MagickPathExtent
#define MagickPathExtent
Definition: magick-type.h:31