MagickCore  6.9.11-60
Convert, Edit, Or Compose Bitmap Images
distribute-cache.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 distributed cache methods.
17 */
18 #ifndef MAGICKCORE_DISTRIBUTE_CACHE_H
19 #define MAGICKCORE_DISTRIBUTE_CACHE_H
20 
21 #include "magick/exception.h"
22 
23 #if defined(__cplusplus) || defined(c_plusplus)
24 extern "C" {
25 #endif
26 
27 extern MagickExport void
29 
30 #if defined(__cplusplus) || defined(c_plusplus)
31 }
32 #endif
33 
34 #endif
_Image::colorspace
ColorspaceType colorspace
Definition: image.h:158
distribute-cache-private.h
WriteDistributePixelCacheIndexes
MagickPrivate MagickOffsetType WriteDistributePixelCacheIndexes(DistributeCacheInfo *server_info, const RectangleInfo *region, const MagickSizeType length, const unsigned char *indexes)
Definition: distribute-cache.c:1413
MagickExport
#define MagickExport
Definition: method-attribute.h:80
policy.h
_RectangleInfo::x
ssize_t x
Definition: geometry.h:130
SyncImagePixelCache
MagickPrivate MagickBooleanType SyncImagePixelCache(Image *, ExceptionInfo *)
Definition: cache.c:5681
CLOSE_SOCKET
#define CLOSE_SOCKET(socket)
Definition: distribute-cache.c:101
OpenDistributeCache
static MagickBooleanType OpenDistributeCache(SplayTreeInfo *registry, int file, const size_t session_key, ExceptionInfo *exception)
Definition: distribute-cache.c:471
MissingDelegateError
@ MissingDelegateError
Definition: exception.h:59
NewSplayTree
MagickExport SplayTreeInfo * NewSplayTree(int(*compare)(const void *, const void *), void *(*relinquish_key)(void *), void *(*relinquish_value)(void *))
Definition: splay-tree.c:1140
magick_unreferenced
#define magick_unreferenced(x)
Definition: method-attribute.h:106
GetMagickModule
#define GetMagickModule()
Definition: log.h:29
nt-base-private.h
_SplayTreeInfo
Definition: splay-tree.c:83
geometry.h
MagickCoreSignature
#define MagickCoreSignature
Definition: method-attribute.h:86
WriteDistributePixelCachePixels
MagickPrivate MagickOffsetType WriteDistributePixelCachePixels(DistributeCacheInfo *server_info, const RectangleInfo *region, const MagickSizeType length, const unsigned char *magick_restrict pixels)
Definition: distribute-cache.c:1489
FormatLocaleString
MagickExport ssize_t FormatLocaleString(char *magick_restrict string, const size_t length, const char *magick_restrict format,...)
Definition: locale.c:497
_RectangleInfo::height
size_t height
Definition: geometry.h:127
magick_restrict
#define magick_restrict
Definition: MagickCore.h:41
_RectangleInfo
Definition: geometry.h:124
image-private.h
_Image::columns
size_t columns
Definition: image.h:174
MagickSizeType
size_t MagickSizeType
Definition: magick-type.h:140
IndexPacket
Quantum IndexPacket
Definition: pixel.h:129
ReadDistributeCacheIndexes
static MagickBooleanType ReadDistributeCacheIndexes(SplayTreeInfo *registry, int file, const size_t session_key, ExceptionInfo *exception)
Definition: distribute-cache.c:523
_Image::channels
size_t channels
Definition: image.h:346
recv
#define recv(file, buffer, length, flags)
Definition: distribute-cache.c:110
DestroySplayTree
MagickExport SplayTreeInfo * DestroySplayTree(SplayTreeInfo *splay_tree)
Definition: splay-tree.c:681
HANDLER_RETURN_VALUE
#define HANDLER_RETURN_VALUE
Definition: distribute-cache.c:104
GetAuthenticIndexQueue
MagickExport IndexPacket * GetAuthenticIndexQueue(const Image *image)
Definition: cache.c:1334
_DistributeCacheInfo::session_key
size_t session_key
Definition: distribute-cache-private.h:34
pthread_attr_init
#define pthread_attr_init
Definition: vms.h:776
DistributePixelCacheServer
MagickExport void DistributePixelCacheServer(const int port, ExceptionInfo *exception)
Definition: distribute-cache.c:880
CacheError
@ CacheError
Definition: exception.h:64
version.h
GetMagickCoreSignature
MagickExport unsigned int GetMagickCoreSignature(const StringInfo *)
Definition: version.c:539
random_.h
string_.h
DistributePixelCacheClient
static HANDLER_RETURN_TYPE DistributePixelCacheClient(void *socket)
Definition: distribute-cache.c:760
DestroyString
MagickExport char * DestroyString(char *string)
Definition: string.c:808
RelinquishDistributePixelCache
MagickPrivate MagickBooleanType RelinquishDistributePixelCache(DistributeCacheInfo *server_info)
Definition: distribute-cache.c:1343
MagickTrue
@ MagickTrue
Definition: magick-type.h:205
_RectangleInfo::y
ssize_t y
Definition: geometry.h:131
DestroyRandomInfo
MagickExport RandomInfo * DestroyRandomInfo(RandomInfo *random_info)
Definition: random.c:272
AcquireStringInfo
MagickExport StringInfo * AcquireStringInfo(const size_t length)
Definition: string.c:184
GetDistributeCacheFile
MagickPrivate int GetDistributeCacheFile(const DistributeCacheInfo *server_info)
Definition: distribute-cache.c:1022
AcquireImage
MagickExport Image * AcquireImage(const ImageInfo *image_info)
Definition: image.c:131
AcquireMagickMemory
MagickExport void * AcquireMagickMemory(const size_t size)
Definition: memory.c:552
cache-private.h
GetImageRegistry
MagickExport void * GetImageRegistry(const RegistryType type, const char *key, ExceptionInfo *exception)
Definition: registry.c:186
registry
static SplayTreeInfo * registry
Definition: registry.c:74
GetVirtualPixels
MagickExport const PixelPacket * GetVirtualPixels(const Image *image, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, ExceptionInfo *exception)
Definition: cache.c:3448
GetAuthenticPixels
MagickExport PixelPacket * GetAuthenticPixels(Image *image, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, ExceptionInfo *exception)
Definition: cache.c:1623
SubstituteString
MagickExport MagickBooleanType SubstituteString(char **string, const char *search, const char *replace)
Definition: string.c:2542
_Image
Definition: image.h:153
CacheFatalError
@ CacheFatalError
Definition: exception.h:87
dpc_read
static MagickOffsetType dpc_read(int file, const MagickSizeType length, unsigned char *magick_restrict message)
Definition: distribute-cache.c:147
MSG_NOSIGNAL
#define MSG_NOSIGNAL
Definition: distribute-cache.c:121
ConnectPixelCacheServer
static int ConnectPixelCacheServer(const char *hostname, const int port, size_t *session_key, ExceptionInfo *exception)
Definition: distribute-cache.c:176
DPCPendingConnections
#define DPCPendingConnections
Definition: distribute-cache.c:117
version-private.h
_DistributeCacheInfo
Definition: distribute-cache-private.h:29
DestroyExceptionInfo
MagickExport ExceptionInfo * DestroyExceptionInfo(ExceptionInfo *exception)
Definition: exception.c:448
_DistributeCacheInfo::hostname
char hostname[MaxTextExtent]
Definition: distribute-cache-private.h:37
splay-tree.h
DPCHostname
#define DPCHostname
Definition: distribute-cache.c:116
locale_.h
MagickPrivate
#define MagickPrivate
Definition: method-attribute.h:81
GetHostname
static char * GetHostname(int *port, ExceptionInfo *exception)
Definition: distribute-cache.c:276
_ImageInfo
Definition: image.h:362
StringToArgv
MagickExport char ** StringToArgv(const char *text, int *argc)
Definition: string.c:1989
MagickFalse
@ MagickFalse
Definition: magick-type.h:204
SyncAuthenticPixels
MagickExport MagickBooleanType SyncAuthenticPixels(Image *image, ExceptionInfo *exception)
Definition: cache.c:5628
IsEventLogging
MagickExport MagickBooleanType IsEventLogging(void)
Definition: log.c:725
GetValueFromSplayTree
MagickExport const void * GetValueFromSplayTree(SplayTreeInfo *splay_tree, const void *key)
Definition: splay-tree.c:920
DestroyDistributeCacheInfo
MagickPrivate DistributeCacheInfo * DestroyDistributeCacheInfo(DistributeCacheInfo *server_info)
Definition: distribute-cache.c:392
image.h
AcquireRandomInfo
MagickExport RandomInfo * AcquireRandomInfo(void)
Definition: random.c:161
DistributePixelCacheServer
MagickExport void DistributePixelCacheServer(const int, ExceptionInfo *)
Definition: distribute-cache.c:880
ReadDistributePixelCachePixels
MagickPrivate MagickOffsetType ReadDistributePixelCachePixels(DistributeCacheInfo *server_info, const RectangleInfo *region, const MagickSizeType length, unsigned char *magick_restrict pixels)
Definition: distribute-cache.c:1277
pthread_create
#define pthread_create
Definition: vms.h:799
registry.h
AddValueToSplayTree
MagickExport MagickBooleanType AddValueToSplayTree(SplayTreeInfo *splay_tree, const void *key, const void *value)
Definition: splay-tree.c:153
StringRegistryType
@ StringRegistryType
Definition: registry.h:30
GetVirtualIndexQueue
MagickExport const IndexPacket * GetVirtualIndexQueue(const Image *image)
Definition: cache.c:2819
_Image::rows
size_t rows
Definition: image.h:175
cache.h
_ExceptionInfo::signature
size_t signature
Definition: exception.h:124
LENGTH_TYPE
#define LENGTH_TYPE
Definition: distribute-cache.c:106
_Image::signature
size_t signature
Definition: image.h:307
MagickBooleanType
MagickBooleanType
Definition: magick-type.h:203
RelinquishMagickMemory
MagickExport void * RelinquishMagickMemory(void *memory)
Definition: memory.c:1162
random_info
static RandomInfo * random_info
Definition: resource.c:112
OpenDistributePixelCache
MagickPrivate MagickBooleanType OpenDistributePixelCache(DistributeCacheInfo *server_info, Image *image)
Definition: distribute-cache.c:1116
GetDistributeCacheHostname
MagickPrivate const char * GetDistributeCacheHostname(const DistributeCacheInfo *server_info)
Definition: distribute-cache.c:1053
_ExceptionInfo
Definition: exception.h:103
_RectangleInfo::width
size_t width
Definition: geometry.h:126
studio.h
_Image::storage_class
ClassType storage_class
Definition: image.h:155
StringToLong
static long StringToLong(const char *magick_restrict value)
Definition: string-private.h:108
DestroyDistributeCache
static MagickBooleanType DestroyDistributeCache(SplayTreeInfo *registry, const size_t session_key)
Definition: distribute-cache.c:430
SOCKET_TYPE
#define SOCKET_TYPE
Definition: distribute-cache.c:105
distribute-cache.h
HANDLER_RETURN_TYPE
#define HANDLER_RETURN_TYPE
Definition: distribute-cache.c:103
DPCPort
#define DPCPort
Definition: distribute-cache.c:118
_DistributeCacheInfo::port
int port
Definition: distribute-cache-private.h:40
DPCSessionKeyLength
#define DPCSessionKeyLength
Definition: distribute-cache.c:119
WriteDistributeCacheIndexes
static MagickBooleanType WriteDistributeCacheIndexes(SplayTreeInfo *registry, int file, const size_t session_key, ExceptionInfo *exception)
Definition: distribute-cache.c:644
memory_.h
GetStringInfoDatum
MagickExport unsigned char * GetStringInfoDatum(const StringInfo *string_info)
Definition: string.c:1183
AcquireDistributeCacheInfo
MagickPrivate DistributeCacheInfo * AcquireDistributeCacheInfo(ExceptionInfo *exception)
Definition: distribute-cache.c:331
dpc_send
static MagickOffsetType dpc_send(int file, const MagickSizeType length, const unsigned char *magick_restrict message)
Definition: distribute-cache.c:439
ReadDistributePixelCacheIndexes
MagickPrivate MagickOffsetType ReadDistributePixelCacheIndexes(DistributeCacheInfo *server_info, const RectangleInfo *region, const MagickSizeType length, unsigned char *indexes)
Definition: distribute-cache.c:1202
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
ThrowFatalException
#define ThrowFatalException(severity, tag)
Definition: exception-private.h:42
GetRandomKey
MagickExport StringInfo * GetRandomKey(RandomInfo *random_info, const size_t length)
Definition: random.c:680
exception.h
_DistributeCacheInfo::debug
MagickBooleanType debug
Definition: distribute-cache-private.h:46
send
#define send(file, buffer, length, flags)
Definition: distribute-cache.c:109
DestroyStringInfo
MagickExport StringInfo * DestroyStringInfo(StringInfo *string_info)
Definition: string.c:835
CopyMagickString
MagickExport size_t CopyMagickString(char *magick_restrict destination, const char *magick_restrict source, const size_t length)
Definition: string.c:751
GetPolicyValue
MagickExport char * GetPolicyValue(const char *name)
Definition: policy.c:524
list.h
AcquireExceptionInfo
MagickExport ExceptionInfo * AcquireExceptionInfo(void)
Definition: exception.c:113
MaxTextExtent
#define MaxTextExtent
Definition: method-attribute.h:89
DestroyImageList
MagickExport Image * DestroyImageList(Image *images)
Definition: list.c:475
string-private.h
RelinquishImageRegistry
static void * RelinquishImageRegistry(void *image)
Definition: distribute-cache.c:639
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:37
_DistributeCacheInfo::file
int file
Definition: distribute-cache-private.h:31
_DistributeCacheInfo::signature
size_t signature
Definition: distribute-cache-private.h:43
_StringInfo
Definition: string_.h:30
ReadDistributeCachePixels
static MagickBooleanType ReadDistributeCachePixels(SplayTreeInfo *registry, int file, const size_t session_key, ExceptionInfo *exception)
Definition: distribute-cache.c:583
_PixelPacket
Definition: pixel.h:132
WriteDistributeCachePixels
static MagickBooleanType WriteDistributeCachePixels(SplayTreeInfo *registry, int file, const size_t session_key, ExceptionInfo *exception)
Definition: distribute-cache.c:704
_RandomInfo
Definition: random.c:78
MAGICK_SSIZE_MAX
#define MAGICK_SSIZE_MAX
Definition: studio.h:382
MagickOffsetType
ssize_t MagickOffsetType
Definition: magick-type.h:139
GetDistributeCachePort
MagickPrivate int GetDistributeCachePort(const DistributeCacheInfo *server_info)
Definition: distribute-cache.c:1084
DeleteNodeFromSplayTree
MagickExport MagickBooleanType DeleteNodeFromSplayTree(SplayTreeInfo *splay_tree, const void *key)
Definition: splay-tree.c:602