delegates - Methods to Read/Write/Invoke Delegates

- NAME
- SYNOPSIS
- FUNCTION DESCRIPTIONS
  - DestroyDelegateInfo
  - GetDelegateInfo
  - GetDelegateCommand
  - InvokeDelegate
  - ListDelegateInfo
  - SetDelegateInfo

# NAME

delegates - Methods to Read/Write/Invoke Delegates

# SYNOPSIS

DestroyDelegateInfo( image_info );

char * GetDelegateCommand( const ImageInfo *image_info, const Image *image, const char *decode_tag, const char `*encode_tag` );

unsigned int GetDelegateInfo( const char *decode_tag, const char *encode_tag, DelegateInfo `*delegate_info` );

unsigned int InvokeDelegate( const ImageInfo *image_info, Image *image, const char *decode_tag, const char `*encode_tag` );

void ListDelegateInfo( FILE `*file` );

DelegateInfo * SetDelegateInfo( DelegateInfo `*delegate_info` );

# FUNCTION DESCRIPTIONS

## DestroyDelegateInfo

Method DestroyDelegateInfo deallocates memory associated with the delegates list.

The format of the DestroyDelegateInfo method is:

> DestroyDelegateInfo ( image_info );

A description of each parameter follows:

image_info:

  Specifies a pointer to a Delegates structure.

## GetDelegateInfo

Method GetDelegateInfo returns any delegates associated with the specified tag. True is returned if a delegate is found, otherwise False.

The format of the GetDelegateInfo method is:

> unsigned int GetDelegateInfo ( const char *decode_tag, const char *encode_tag, DelegateInfo *delegate_info );

A description of each parameter follows:

status:

  Method GetDelegateInfo returns True if a delegate is found, otherwise False.

decode_tag:

  Specifies the decode delegate we are searching for as a character string.

encode_tag:

  Specifies the encode delegate we are searching for as a character string.

delegate_info:

  A structure of type DelegateInfo. On return this structure contains the delegate information for the specified tag.

## GetDelegateCommand

Method GetDelegateCommand replaces any embedded formatting characters with the appropriate image attribute and returns the resulting command.

The format of the GetDelegateCommand method is:

> char *GetDelegateCommand ( const ImageInfo *image_info, const Image *image, const char *decode_tag, const char *encode_tag );

A description of each parameter follows:

command:

  Method GetDelegateCommand returns the command associated with specified delegate tag.

image_info:

  The address of a structure of type ImageInfo.

image:

  The address of a structure of type Image.

decode_tag:

  Specifies the decode delegate we are searching for as a character string.

encode_tag:

  Specifies the encode delegate we are searching for as a character string.

## InvokeDelegate

Method InvokeDelegate replaces any embedded formatting characters with the appropriate image attribute and executes the resulting command. False is returned if the commands execute with success otherwise True.

The format of the InvokeDelegate method is:

> unsigned int InvokeDelegate ( const ImageInfo *image_info, Image *image, const char *decode_tag, const char *encode_tag );

A description of each parameter follows:

image_info:

  The address of a structure of type ImageInfo.

image:

  The address of a structure of type Image.

## ListDelegateInfo

Method ListDelegateInfo lists the image formats to a file.

The format of the ListDelegateInfo method is:

> void ListDelegateInfo ( FILE *file );

A description of each parameter follows.

file:

  An pointer to a FILE.

## SetDelegateInfo

Method SetDelegateInfo adds or replaces a delegate in the delegate list and returns the address of the first delegate. If the delegate is NULL, just the address of the first delegate is returned.

The format of the SetDelegateInfo method is:

> DelegateInfo *SetDelegateInfo ( DelegateInfo *delegate_info );

A description of each parameter follows:

delegate_info:

  Method SetDelegateInfo returns the address of the first delegate in the delegates list.

delegate_info:

  A structure of type DelegateInfo. This information is added to the end of the delegates linked-list.