---
name: "globus_ftp_client_restart_marker_plugin"
section: "3"
platform: "linux"
package: "libglobus-ftp-client-doc"
version: "9.8-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/globus_ftp_client_restart_marker_plugin"
---

# globus\_ftp\_client\_restart\_marker\_plugin(3)

Restart Marker Plugin - Restart Marker Plugin.

## NAME

globus\_ftp\_client\_restart\_marker\_plugin - Restart Marker Plugin

 \- Restart Marker Plugin.

## SYNOPSIS

### Macros

\#define **GLOBUS\_FTP\_CLIENT\_RESTART\_MARKER\_PLUGIN\_MODULE**   (&globus\_i\_ftp\_client\_restart\_marker\_plugin\_module)\

### Typedefs

typedef globus\_bool\_t(\* **globus\_ftp\_client\_restart\_marker\_plugin\_begin\_cb\_t**) (void \*user\_arg, **globus\_ftp\_client\_handle\_t** \*handle, const char \*source\_url, const char \*dest\_url, **globus\_ftp\_client\_restart\_marker\_t** \*user\_saved\_marker)\
 Transfer begin callback.  typedef void(\* **globus\_ftp\_client\_restart\_marker\_plugin\_marker\_cb\_t**) (void \*user\_arg, **globus\_ftp\_client\_handle\_t** \*handle, **globus\_ftp\_client\_restart\_marker\_t** \*marker)\
 typedef void(\* **globus\_ftp\_client\_restart\_marker\_plugin\_complete\_cb\_t**) (void \*user\_arg, **globus\_ftp\_client\_handle\_t** \*handle, globus\_object\_t \*error, const char \*error\_url)\

### Functions

globus\_result\_t **globus\_ftp\_client\_restart\_marker\_plugin\_init** (**globus\_ftp\_client\_plugin\_t** \*plugin, **globus\_ftp\_client\_restart\_marker\_plugin\_begin\_cb\_t** begin\_cb, **globus\_ftp\_client\_restart\_marker\_plugin\_marker\_cb\_t** marker\_cb, **globus\_ftp\_client\_restart\_marker\_plugin\_complete\_cb\_t** complete\_cb, void \*user\_arg)\
 globus\_result\_t **globus\_ftp\_client\_restart\_marker\_plugin\_destroy** (**globus\_ftp\_client\_plugin\_t** \*plugin)\

## Detailed Description

Restart Marker Plugin.

This plugin is intended to allow users to make restart markers persistent. During a transfer, every marker received will result in the user's 'marker' callback being called with the new restart marker that can be stored. If the application were to prematurely terminate (while transferring), the user (after restarting the application) could pass this stored marker back to the plugin via the 'begin' callback to force the transfer to be restarted from the last marked point.

## Macro Definition Documentation

### #define GLOBUS\_FTP\_CLIENT\_RESTART\_MARKER\_PLUGIN\_MODULE (&globus\_i\_ftp\_client\_restart\_marker\_plugin\_module)

Module descriptor

## Typedef Documentation

### typedef globus\_bool\_t(\* globus\_ftp\_client\_restart\_marker\_plugin\_begin\_cb\_t) (void \*user\_arg, globus\_ftp\_client\_handle\_t \*handle, const char \*source\_url, const char \*dest\_url, globus\_ftp\_client\_restart\_marker\_t \*user\_saved\_marker)

Transfer begin callback. This callback is called when a get, put, or third party transfer is started.

The intended use for this callback is for the user to use the transfer urls to locate a restart marker in some persistent storage. If one is found, it should be copied into 'user\_saved\_marker' and the callback should return GLOBUS\_TRUE. This will cause the transfer to be restarted using that restart marker. If one is not found, return GLOBUS\_FALSE to indicate that the transfer should proceed from the beginning.

In any case, this is also an opportunity for the user to set up any storage in anticipation of restart markers for this transfer.

**Parameters**

*handle* this the client handle that this transfer will be occurring on\
 *user\_arg* this is the user\_arg passed to the init func\
 *source\_url* source of the transfer (GLOBUS\_NULL if 'put')\
 *dest\_url* dest of the transfer (GLOBUS\_NULL if 'get')\
 *user\_saved\_marker* pointer to an initialized restart marker

**Returns**

- •

  GLOBUS\_TRUE to indicate that the plugin should use 'user\_saved\_marker' to restart the transfer (and subsequently, destroy the marker)

- •

  GLOBUS\_FALSE to indicate that 'user\_saved\_marker' has not been modified, and that the transfer should proceed normally

### typedef void(\* globus\_ftp\_client\_restart\_marker\_plugin\_complete\_cb\_t) (void \*user\_arg, globus\_ftp\_client\_handle\_t \*handle, globus\_object\_t \*error, const char \*error\_url)

Transfer complete callback

This callback will be called upon transfer completion (successful or otherwise)

**Parameters**

*handle* this the client handle that this transfer was occurring on\
 *user\_arg* this is the user\_arg passed to the init func\
 *error* the error object indicating what went wrong (GLOBUS\_NULL on success)\
 *error\_url* the url which is the source of the above error (GLOBUS\_NULL on success)

**Returns**

- •

  n/a

### typedef void(\* globus\_ftp\_client\_restart\_marker\_plugin\_marker\_cb\_t) (void \*user\_arg, globus\_ftp\_client\_handle\_t \*handle, globus\_ftp\_client\_restart\_marker\_t \*marker)

Restart marker received callback

This callback will be called every time a restart marker is available.

To receive restart markers in a 'put' or 'third\_party\_transfer', the transfer must be in Extended Block mode. 'get' transfers will have their markers generated internally. Markers generated internally will be 'sent' at most, once per second.

The intended use for this callback is to allow the user to store this marker (most likely in place of any previous marker) in a format that the 'begin\_cb' can parse and pass back.

**Parameters**

*handle* this the client handle that this transfer is occurring on\
 *user\_arg* this is the user\_arg passed to the init func\
 *marker* the restart marker that has been received. This marker is owned by the caller. The user must use the copy method to keep it. Note: this restart marker currently contains all ranges received as of yet. Should I instead only pass a marker with the ranges just made available? If so, the user may need a way to combine restart markers (globus\_ftp\_client\_restart\_marker\_combine)

**Returns**

- •

  n/a

## Function Documentation

### globus\_result\_t globus\_ftp\_client\_restart\_marker\_plugin\_destroy (globus\_ftp\_client\_plugin\_t \* plugin)

Destroy restart marker plugin

Frees up memory associated with plugin

**Parameters**

*plugin* plugin previously initialized with init (above)

**Returns**

- •

  GLOBUS\_SUCCESS

- •

  Error on NULL plugin

### globus\_result\_t globus\_ftp\_client\_restart\_marker\_plugin\_init (globus\_ftp\_client\_plugin\_t \* plugin, globus\_ftp\_client\_restart\_marker\_plugin\_begin\_cb\_t begin\_cb, globus\_ftp\_client\_restart\_marker\_plugin\_marker\_cb\_t marker\_cb, globus\_ftp\_client\_restart\_marker\_plugin\_complete\_cb\_t complete\_cb, void \* user\_arg)

Initialize a restart marker plugin

This function initializes a restart marker plugin. Any params except for the plugin may be GLOBUS\_NULL

**Parameters**

*plugin* a pointer to a plugin type to be initialized\
 *user\_arg* a pointer to some user specific data that will be provided to all callbacks\
 *begin\_cb* the callback to be called upon the start of a transfer\
 *marker\_cb* the callback to be called with every restart marker received\
 *complete\_cb* the callback to be called to indicate transfer completion

**Returns**

- •

  GLOBUS\_SUCCESS

- •

  Error on NULL plugin

- •

  Error on init internal plugin

## Author

Generated automatically by Doxygen for globus\_ftp\_client from the source code.
