Functions to assist with RIP farm location IDs. More...
#include <stdarg.h>
Functions | |
char * | rf_location_id (const char *format,...) |
Create a location ID suitable for use in raster descriptions and elsewhere. More... | |
char * | rf_vlocation_id (const char *format, va_list ap) |
Create a location ID suitable for use in raster descriptions and elsewhere. More... | |
Functions to assist with RIP farm location IDs.
Copyright (C) 2023 Global Graphics Software Ltd. All rights reserved. Global Graphics Software Ltd. Confidential Information.
char* rf_location_id | ( | const char * | format, |
... | |||
) |
Create a location ID suitable for use in raster descriptions and elsewhere.
[in] | format | A format string used to determine what components to put in the location ID. |
NULL
if there was an error creating the string. The string must be freed using rf_mem_free() after use.This function is conceptually similar to the printf()
family of functions, but with a restricted set of valid format codes. It constructs an ID string according to a format, inserting components to represent different localities within the RIP farm.
As with printf()
, literal characters are copied from the format string, and constructed components are inserted using format codes. Format codes are indicated in the format string using the %
character. The set of valid format codes are:
char *
pointer.int
.int
.int
.char
(which will be promoted to int
).If any other format escape not on this list is used, this function will return NULL
. In particular, note that field width and precision specifications are not supported.
Location components created by this function use characters from the union of valid characters in a domain name and an IP address (IPv4 and IPv6), i.e., a-z A-Z 0-9 - _ : .
Location IDs are passed to the Raster Manager for use in routing decisions and placement decisions. The Raster Manager will only ever compare location IDs for equality, it will never attempt to deconstruct them. However, OEM components can parse and deconstruct locations known to have been created by other OEM components.
Errors may be caused by a NULL
or empty format string, an invalid argument to a format, an invalid format code, memory exhaustion, or an internal error in a function used to find an ID component.
char* rf_vlocation_id | ( | const char * | format, |
va_list | ap | ||
) |
Create a location ID suitable for use in raster descriptions and elsewhere.
[in] | format | A format string used to determine what components to put in the location ID. |
[in] | ap | A handle to a variable-length list of arguments, already initialised using va_start() on entry. |
NULL
if there was an error creating the string. The string must be freed using rf_mem_free() after use.See the description of rf_location_id() for details of the format specifiers and output.