MagickCore  6.9.10
Convert, Edit, Or Compose Bitmap Images
delegate.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2019 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.
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 
45  *previous,
46  *next; /* deprecated, use GetDelegateInfoList() */
47 
48  size_t
50 
53 } DelegateInfo;
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:266
GetImageIndexInList
MagickExport ssize_t GetImageIndexInList(const Image *images)
Definition: list.c:657
_DelegateInfo::stealth
MagickBooleanType stealth
Definition: delegate.h:42
LockSemaphoreInfo
MagickExport void LockSemaphoreInfo(SemaphoreInfo *semaphore_info)
Definition: semaphore.c:345
MagickExport
#define MagickExport
Definition: method-attribute.h:80
GetDelegateInfo
const MagickExport DelegateInfo * GetDelegateInfo(const char *decode, const char *encode, ExceptionInfo *exception)
Definition: delegate.c:1230
InterpretDelegateProperties
static char * InterpretDelegateProperties(const ImageInfo *image_info, Image *image, const char *embed_text)
Definition: delegate.c:924
_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:1510
_RectangleInfo::x
ssize_t x
Definition: geometry.h:129
AcquireDelegateCache
static LinkedListInfo * AcquireDelegateCache(const char *filename, ExceptionInfo *exception)
Definition: delegate.c:176
GetDelegateMode
MagickExport ssize_t GetDelegateMode(const DelegateInfo *delegate_info)
Definition: delegate.c:1510
ThrowFileException
#define ThrowFileException(exception, severity, tag, context)
Definition: exception-private.h:60
_Image::matte
MagickBooleanType matte
Definition: image.h:171
DelegateComponentGenesis
MagickExport MagickBooleanType DelegateComponentGenesis(void)
Definition: delegate.c:232
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
PolicyDomain
PolicyDomain
Definition: policy.h:28
IsMagickTrue
MagickExport MagickBooleanType IsMagickTrue(const char *value)
Definition: token.c:649
MagickCoreSignature
#define MagickCoreSignature
Definition: method-attribute.h:86
O_BINARY
#define O_BINARY
Definition: studio.h:354
FormatLocaleString
MagickExport ssize_t FormatLocaleString(char *magick_restrict string, const size_t length, const char *magick_restrict format,...)
Definition: locale.c:502
OptionWarning
@ OptionWarning
Definition: exception.h:34
GetImageProperty
const MagickExport char * GetImageProperty(const Image *image, const char *property)
Definition: property.c:2217
_RectangleInfo::height
size_t height
Definition: geometry.h:126
_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:122
GetNextToken
MagickExport void GetNextToken(const char *start, const char **end, const size_t extent, char *token)
Definition: token.c:172
SetImageGray
MagickExport MagickBooleanType SetImageGray(Image *image, ExceptionInfo *exception)
Definition: colorspace.c:1267
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:1427
GetPathAttributes
MagickExport MagickBooleanType GetPathAttributes(const char *path, void *attributes)
Definition: utility.c:1160
image-private.h
DestroyLinkedList
MagickExport LinkedListInfo * DestroyLinkedList(LinkedListInfo *list_info, void *(*relinquish_value)(void *))
Definition: hashmap.c:398
MagickCompressOptions
@ MagickCompressOptions
Definition: option.h:40
_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:589
delegate.h
StringToList
MagickExport char ** StringToList(const char *text)
Definition: string.c:2358
_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:1124
MagickDisposeOptions
@ MagickDisposeOptions
Definition: option.h:47
PolicyRights
PolicyRights
Definition: policy.h:41
ResourceLimitError
@ ResourceLimitError
Definition: exception.h:55
utility.h
S_MODE
#define S_MODE
Definition: studio.h:243
DelegateComponentGenesis
MagickExport MagickBooleanType DelegateComponentGenesis(void)
DelegateError
@ DelegateError
Definition: exception.h:58
GetDelegateInfo
const MagickExport DelegateInfo * GetDelegateInfo(const char *, const char *, ExceptionInfo *exception)
IsDelegateCacheInstantiated
static MagickBooleanType IsDelegateCacheInstantiated(ExceptionInfo *)
Definition: delegate.c:1574
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:125
DestroyString
MagickExport char * DestroyString(char *string)
Definition: string.c:820
GetMagickPropertyLetter
static char * GetMagickPropertyLetter(const ImageInfo *image_info, Image *image, const char letter)
Definition: delegate.c:510
GetPathComponent
MagickExport void GetPathComponent(const char *path, PathType type, char *component)
Definition: utility.c:1208
MagickTrue
@ MagickTrue
Definition: magick-type.h:194
blob.h
semaphore.h
_DelegateInfo::next
struct _DelegateInfo * next
Definition: delegate.h:46
_RectangleInfo::y
ssize_t y
Definition: geometry.h:130
GetBlobSize
MagickExport MagickSizeType GetBlobSize(const Image *image)
Definition: blob.c:1507
CopyMagickString
MagickExport size_t CopyMagickString(char *destination, const char *source, const size_t length)
Definition: string.c:752
_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:1442
TraceEvent
@ TraceEvent
Definition: log.h:38
ListDelegateInfo
MagickExport MagickBooleanType ListDelegateInfo(FILE *, ExceptionInfo *)
Definition: delegate.c:1971
AcquireMagickMemory
MagickExport void * AcquireMagickMemory(const size_t size)
Definition: memory.c:473
SignatureImage
MagickExport MagickBooleanType SignatureImage(Image *)
Definition: signature.c:466
GetDelegateThreadSupport
MagickExport MagickBooleanType GetDelegateThreadSupport(const DelegateInfo *)
FormatLocaleFile
MagickExport ssize_t FormatLocaleFile(FILE *file, const char *magick_restrict format,...)
Definition: locale.c:407
GetDelegateList
MagickExport char ** GetDelegateList(const char *, size_t *, ExceptionInfo *)
Definition: delegate.c:1442
CloneImageInfo
MagickExport ImageInfo * CloneImageInfo(const ImageInfo *image_info)
Definition: image.c:944
SemaphoreInfo
Definition: semaphore.c:59
GetDelegateInfoList
const MagickExport DelegateInfo ** GetDelegateInfoList(const char *pattern, size_t *number_delegates, ExceptionInfo *exception)
Definition: delegate.c:1346
_ImageInfo::adjoin
MagickBooleanType adjoin
Definition: image.h:371
SubstituteString
MagickExport MagickBooleanType SubstituteString(char **string, const char *search, const char *replace)
Definition: string.c:2593
_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:1542
_Image
Definition: image.h:152
StripString
MagickExport void StripString(char *message)
Definition: string.c:2531
FormatMagickSize
MagickExport ssize_t FormatMagickSize(const MagickSizeType size, const MagickBooleanType bi, char *format)
Definition: string.c:1082
signature.h
ExternalDelegateCommand
MagickExport int ExternalDelegateCommand(const MagickBooleanType asynchronous, const MagickBooleanType verbose, const char *command, char *message, ExceptionInfo *exception)
Definition: delegate.c:325
_DelegateInfo::spawn
MagickBooleanType spawn
Definition: delegate.h:41
ConfigureEvent
@ ConfigureEvent
Definition: log.h:43
SanitizeString
MagickExport char * SanitizeString(const char *source)
Definition: string.c:1685
MagickMaxRecursionDepth
#define MagickMaxRecursionDepth
Definition: studio.h:373
LocaleCompare
MagickExport int LocaleCompare(const char *p, const char *q)
Definition: locale.c:1440
_Image::delay
size_t delay
Definition: image.h:245
ColorspaceType
ColorspaceType
Definition: colorspace.h:25
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
_Image::x_resolution
double x_resolution
Definition: image.h:209
_LinkedListInfo
Definition: hashmap.c:77
DelegateFilename
#define DelegateFilename
Definition: delegate.c:80
AcquireUniqueSymbolicLink
MagickExport MagickBooleanType AcquireUniqueSymbolicLink(const char *source, char *destination)
Definition: utility.c:151
xml-tree-private.h
_ImageInfo
Definition: image.h:361
StringToArgv
MagickExport char ** StringToArgv(const char *text, int *argc)
Definition: string.c:2081
MagickFalse
@ MagickFalse
Definition: magick-type.h:193
_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:1971
MagickResolutionOptions
@ MagickResolutionOptions
Definition: option.h:86
_ImageInfo::filename
char filename[MaxTextExtent]
Definition: image.h:473
LoadDelegateCache
static MagickBooleanType LoadDelegateCache(LinkedListInfo *, const char *, const char *, const size_t, ExceptionInfo *)
Definition: delegate.c:2073
AppendValueToLinkedList
MagickExport MagickBooleanType AppendValueToLinkedList(LinkedListInfo *list_info, const void *value)
Definition: hashmap.c:150
DelegateMap
static const char * DelegateMap
Definition: delegate.c:86
GetNextImageInList
MagickExport Image * GetNextImageInList(const Image *images)
Definition: list.c:771
CopyDelegateFile
static MagickBooleanType CopyDelegateFile(const char *source, const char *destination, const MagickBooleanType overwrite)
Definition: delegate.c:1618
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:325
FileOpenError
@ FileOpenError
Definition: exception.h:61
GetDelegateCommands
const MagickExport char * GetDelegateCommands(const DelegateInfo *)
Definition: delegate.c:1193
MagickDelay
MagickExport void MagickDelay(const MagickSizeType milliseconds)
Definition: utility.c:1697
ActivateSemaphoreInfo
MagickExport void ActivateSemaphoreInfo(SemaphoreInfo **semaphore_info)
Definition: semaphore.c:97
WriteImage
MagickExport MagickBooleanType WriteImage(const ImageInfo *image_info, Image *image)
Definition: constitute.c:1038
_ImageInfo::verbose
MagickBooleanType verbose
Definition: image.h:435
DestroyImageInfo
MagickExport ImageInfo * DestroyImageInfo(ImageInfo *image_info)
Definition: image.c:1260
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:1691
GlobExpression
MagickExport MagickBooleanType GlobExpression(const char *expression, const char *pattern, const MagickBooleanType case_insensitive)
Definition: token.c:347
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:293
GetImageListLength
MagickExport size_t GetImageListLength(const Image *images)
Definition: list.c:696
ConstantString
MagickExport char * ConstantString(const char *source)
Definition: string.c:697
constitute.h
DelegateComponentTerminus
MagickExport void DelegateComponentTerminus(void)
Definition: delegate.c:278
_Image::signature
size_t signature
Definition: image.h:307
MagickBooleanType
MagickBooleanType
Definition: magick-type.h:191
_Image::extent
MagickSizeType extent
Definition: image.h:340
ConcatenateMagickString
MagickExport size_t ConcatenateMagickString(char *destination, const char *source, const size_t length)
Definition: string.c:424
GetNextValueInLinkedList
MagickExport void * GetNextValueInLinkedList(LinkedListInfo *list_info)
Definition: hashmap.c:606
RelinquishMagickMemory
MagickExport void * RelinquishMagickMemory(void *memory)
Definition: memory.c:1077
_ExceptionInfo
Definition: exception.h:102
utility-private.h
_ImageInfo::signature
size_t signature
Definition: image.h:489
CommandOptionToMnemonic
const MagickExport char * CommandOptionToMnemonic(const CommandOption option, const ssize_t type)
Definition: option.c:2292
_DelegateInfo::thread_support
MagickBooleanType thread_support
Definition: delegate.h:40
_RectangleInfo::width
size_t width
Definition: geometry.h:125
studio.h
_Image::storage_class
ClassType storage_class
Definition: image.h:155
MACSystemCommand
MagickExport int MACSystemCommand(const char *)
RelinquishUniqueFileResource
MagickExport MagickBooleanType RelinquishUniqueFileResource(const char *path)
Definition: resource.c:1190
DelegateInfoCompare
static int DelegateInfoCompare(const void *x, const void *y)
Definition: delegate.c:1317
token-private.h
GetDelegateCommands
const MagickExport char * GetDelegateCommands(const DelegateInfo *delegate_info)
Definition: delegate.c:1193
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:96
FileToXML
MagickPrivate char * FileToXML(const char *, const size_t)
Definition: xml-tree.c:598
InvokeDelegate
MagickExport MagickBooleanType InvokeDelegate(ImageInfo *, Image *, const char *, const char *, ExceptionInfo *)
AppendString2Text
#define AppendString2Text(string)
GetDelegateInfoList
const MagickExport DelegateInfo ** GetDelegateInfoList(const char *, size_t *, ExceptionInfo *)
Definition: delegate.c:1346
SetImageInfo
MagickExport MagickBooleanType SetImageInfo(ImageInfo *image_info, const unsigned int frames, ExceptionInfo *exception)
Definition: image.c:2756
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:1275
LocaleUpper
MagickExport void LocaleUpper(char *string)
Definition: locale.c:1602
DestroyDelegate
static void * DestroyDelegate(void *delegate_info)
Definition: delegate.c:258
MagickEpsilon
#define MagickEpsilon
Definition: magick-type.h:115
GetStringInfoPath
const MagickExport char * GetStringInfoPath(const StringInfo *string_info)
Definition: string.c:1362
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:1068
_DelegateInfo
Definition: delegate.h:28
ThrowFatalException
#define ThrowFatalException(severity, tag)
Definition: exception-private.h:42
UnlockSemaphoreInfo
MagickExport void UnlockSemaphoreInfo(SemaphoreInfo *semaphore_info)
Definition: semaphore.c:450
_DelegateInfo::previous
struct _DelegateInfo * previous
Definition: delegate.h:44
exception.h
GetDelegateThreadSupport
MagickExport MagickBooleanType GetDelegateThreadSupport(const DelegateInfo *delegate_info)
Definition: delegate.c:1542
option.h
GetConfigureOptions
MagickExport LinkedListInfo * GetConfigureOptions(const char *filename, ExceptionInfo *exception)
Definition: configure.c:653
_ImageInfo::unique
char unique[MaxTextExtent]
Definition: image.h:471
_Image::compression
CompressionType compression
Definition: image.h:161
_Image::magick_columns
size_t magick_columns
Definition: image.h:283
DestroyConfigureOptions
MagickExport LinkedListInfo * DestroyConfigureOptions(LinkedListInfo *options)
Definition: configure.c:325
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:1399
_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
delegate_semaphore
static SemaphoreInfo * delegate_semaphore
Definition: delegate.c:140
_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:278
delegate_cache
static LinkedListInfo * delegate_cache
Definition: delegate.c:137
ExtensionPath
@ ExtensionPath
Definition: utility.h:33
ResourceLimitFatalError
@ ResourceLimitFatalError
Definition: exception.h:78
AcquireString
MagickExport char * AcquireString(const char *source)
Definition: string.c:125
MagickMin
#define MagickMin(x, y)
Definition: image-private.h:27
ConfigureError
@ ConfigureError
Definition: exception.h:75
open_utf8
static int open_utf8(const char *path, int flags, mode_t mode)
Definition: utility-private.h:166
_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:29
_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:544
configure.h