MagickCore  6.9.10
Convert, Edit, Or Compose Bitmap Images
distribute-cache.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 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:1414
MagickExport
#define MagickExport
Definition: method-attribute.h:80
policy.h
_RectangleInfo::x
ssize_t x
Definition: geometry.h:129
SyncImagePixelCache
MagickPrivate MagickBooleanType SyncImagePixelCache(Image *, ExceptionInfo *)
Definition: cache.c:5642
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:472
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:82
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:1490
FormatLocaleString
MagickExport ssize_t FormatLocaleString(char *magick_restrict string, const size_t length, const char *magick_restrict format,...)
Definition: locale.c:502
_RectangleInfo::height
size_t height
Definition: geometry.h:126
magick_restrict
#define magick_restrict
Definition: MagickCore.h:41
_RectangleInfo
Definition: geometry.h:122
image-private.h
_Image::columns
size_t columns
Definition: image.h:174
MagickSizeType
size_t MagickSizeType
Definition: magick-type.h:136
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:524
_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:1325
_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:881
CacheError
@ CacheError
Definition: exception.h:64
version.h
GetMagickCoreSignature
MagickExport unsigned int GetMagickCoreSignature(const StringInfo *)
Definition: version.c:511
random_.h
string_.h
DistributePixelCacheClient
static HANDLER_RETURN_TYPE DistributePixelCacheClient(void *socket)
Definition: distribute-cache.c:761
DestroyString
MagickExport char * DestroyString(char *string)
Definition: string.c:820
GetVirtualIndexQueue
const MagickExport IndexPacket * GetVirtualIndexQueue(const Image *image)
Definition: cache.c:2809
RelinquishDistributePixelCache
MagickPrivate MagickBooleanType RelinquishDistributePixelCache(DistributeCacheInfo *server_info)
Definition: distribute-cache.c:1344
MagickTrue
@ MagickTrue
Definition: magick-type.h:194
_RectangleInfo::y
ssize_t y
Definition: geometry.h:130
DestroyRandomInfo
MagickExport RandomInfo * DestroyRandomInfo(RandomInfo *random_info)
Definition: random.c:272
CopyMagickString
MagickExport size_t CopyMagickString(char *destination, const char *source, const size_t length)
Definition: string.c:752
AcquireStringInfo
MagickExport StringInfo * AcquireStringInfo(const size_t length)
Definition: string.c:185
GetDistributeCacheFile
MagickPrivate int GetDistributeCacheFile(const DistributeCacheInfo *server_info)
Definition: distribute-cache.c:1023
AcquireImage
MagickExport Image * AcquireImage(const ImageInfo *image_info)
Definition: image.c:152
AcquireMagickMemory
MagickExport void * AcquireMagickMemory(const size_t size)
Definition: memory.c:473
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
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:1614
SubstituteString
MagickExport MagickBooleanType SubstituteString(char **string, const char *search, const char *replace)
Definition: string.c:2593
_Image
Definition: image.h:152
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:28
DestroyExceptionInfo
MagickExport ExceptionInfo * DestroyExceptionInfo(ExceptionInfo *exception)
Definition: exception.c:441
_DistributeCacheInfo::hostname
char hostname[MaxTextExtent]
Definition: distribute-cache-private.h:37
GetVirtualPixels
const MagickExport 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:3454
splay-tree.h
DPCHostname
#define DPCHostname
Definition: distribute-cache.c:116
GetValueFromSplayTree
const MagickExport void * GetValueFromSplayTree(SplayTreeInfo *splay_tree, const void *key)
Definition: splay-tree.c:920
locale_.h
MagickPrivate
#define MagickPrivate
Definition: method-attribute.h:81
GetHostname
static char * GetHostname(int *port, ExceptionInfo *exception)
Definition: distribute-cache.c:277
_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
SyncAuthenticPixels
MagickExport MagickBooleanType SyncAuthenticPixels(Image *image, ExceptionInfo *exception)
Definition: cache.c:5589
IsEventLogging
MagickExport MagickBooleanType IsEventLogging(void)
Definition: log.c:716
DestroyDistributeCacheInfo
MagickPrivate DistributeCacheInfo * DestroyDistributeCacheInfo(DistributeCacheInfo *server_info)
Definition: distribute-cache.c:393
image.h
AcquireRandomInfo
MagickExport RandomInfo * AcquireRandomInfo(void)
Definition: random.c:160
DistributePixelCacheServer
MagickExport void DistributePixelCacheServer(const int, ExceptionInfo *)
Definition: distribute-cache.c:881
ReadDistributePixelCachePixels
MagickPrivate MagickOffsetType ReadDistributePixelCachePixels(DistributeCacheInfo *server_info, const RectangleInfo *region, const MagickSizeType length, unsigned char *magick_restrict pixels)
Definition: distribute-cache.c:1278
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
GetDistributeCacheHostname
const MagickPrivate char * GetDistributeCacheHostname(const DistributeCacheInfo *server_info)
Definition: distribute-cache.c:1054
StringRegistryType
@ StringRegistryType
Definition: registry.h:30
_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:191
RelinquishMagickMemory
MagickExport void * RelinquishMagickMemory(void *memory)
Definition: memory.c:1077
random_info
static RandomInfo * random_info
Definition: resource.c:110
OpenDistributePixelCache
MagickPrivate MagickBooleanType OpenDistributePixelCache(DistributeCacheInfo *server_info, Image *image)
Definition: distribute-cache.c:1117
_ExceptionInfo
Definition: exception.h:102
_RectangleInfo::width
size_t width
Definition: geometry.h:125
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:68
DestroyDistributeCache
static MagickBooleanType DestroyDistributeCache(SplayTreeInfo *registry, const size_t session_key)
Definition: distribute-cache.c:431
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:645
memory_.h
GetStringInfoDatum
MagickExport unsigned char * GetStringInfoDatum(const StringInfo *string_info)
Definition: string.c:1275
AcquireDistributeCacheInfo
MagickPrivate DistributeCacheInfo * AcquireDistributeCacheInfo(ExceptionInfo *exception)
Definition: distribute-cache.c:332
dpc_send
static MagickOffsetType dpc_send(int file, const MagickSizeType length, const unsigned char *magick_restrict message)
Definition: distribute-cache.c:440
ReadDistributePixelCacheIndexes
MagickPrivate MagickOffsetType ReadDistributePixelCacheIndexes(DistributeCacheInfo *server_info, const RectangleInfo *region, const MagickSizeType length, unsigned char *indexes)
Definition: distribute-cache.c:1203
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
ThrowFatalException
#define ThrowFatalException(severity, tag)
Definition: exception-private.h:42
GetRandomKey
MagickExport StringInfo * GetRandomKey(RandomInfo *random_info, const size_t length)
Definition: random.c:712
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:847
GetPolicyValue
MagickExport char * GetPolicyValue(const char *name)
Definition: policy.c:500
list.h
AcquireExceptionInfo
MagickExport ExceptionInfo * AcquireExceptionInfo(void)
Definition: exception.c:106
MaxTextExtent
#define MaxTextExtent
Definition: method-attribute.h:89
DestroyImageList
MagickExport Image * DestroyImageList(Image *images)
Definition: list.c:462
string-private.h
RelinquishImageRegistry
static void * RelinquishImageRegistry(void *image)
Definition: distribute-cache.c:640
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
_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:29
ReadDistributeCachePixels
static MagickBooleanType ReadDistributeCachePixels(SplayTreeInfo *registry, int file, const size_t session_key, ExceptionInfo *exception)
Definition: distribute-cache.c:584
_PixelPacket
Definition: pixel.h:131
WriteDistributeCachePixels
static MagickBooleanType WriteDistributeCachePixels(SplayTreeInfo *registry, int file, const size_t session_key, ExceptionInfo *exception)
Definition: distribute-cache.c:705
_RandomInfo
Definition: random.c:76
MagickOffsetType
ssize_t MagickOffsetType
Definition: magick-type.h:135
GetDistributeCachePort
MagickPrivate int GetDistributeCachePort(const DistributeCacheInfo *server_info)
Definition: distribute-cache.c:1085
DeleteNodeFromSplayTree
MagickExport MagickBooleanType DeleteNodeFromSplayTree(SplayTreeInfo *splay_tree, const void *key)
Definition: splay-tree.c:602