FSEG-SPI
FLAM Segment Store Exit (FSEG) Service Provider Interface (SPI) Version: 5.2.1-42969
FsegGet Struct Reference

Parameters for FSEG_FUNC_GET. More...

#include <FSEG.h>

Data Fields

long long siSegInd
 [INPUT] Segment index to retrieve.
unsigned int uiSegLen
 [OUTPUT] Segment data length in bytes.
unsigned int uiRes0
 [DUMMY] Reserved; set to 0.
const unsigned char ** ppSegDat
 [OUTPUT] Locate pointer to segment data (provider-owned buffer).

Detailed Description

Parameters for FSEG_FUNC_GET.

This is a locate call: the provider writes a pointer to its internal buffer into *ppSegDat without copying data to a caller-supplied buffer. The pointed-to buffer must remain valid until the next FSEG_FUNC_GET call or FSEG_FUNC_CLS, whichever comes first. The provider owns the buffer and must not free it before then.

Implementation note for remote or database backends
Backends that must fetch data over the network or from a database (ODBC, S3, etc.) need to maintain a single internal "locate buffer" per open handle. On each GET call:
  1. Free the previous locate buffer (if any).
  2. Fetch the data and store it in a newly allocated buffer.
  3. Write the pointer to *ppSegDat and the length to uiSegLen. The buffer is then freed either at the next GET call or at CLS. FLAM does not call free() on this pointer.

Field Documentation

◆ ppSegDat

const unsigned char** FsegGet::ppSegDat

[OUTPUT] Locate pointer to segment data (provider-owned buffer).

◆ siSegInd

long long FsegGet::siSegInd

[INPUT] Segment index to retrieve.

◆ uiRes0

unsigned int FsegGet::uiRes0

[DUMMY] Reserved; set to 0.

◆ uiSegLen

unsigned int FsegGet::uiSegLen

[OUTPUT] Segment data length in bytes.


The documentation for this struct was generated from the following file: