Scanbot SDK
Loading...
Searching...
No Matches
Scanbot C SDK Source

Classes

struct  scanbotsdk_external_random_access_source_t
 Provides interface for implementing custom random access source. More...
 

Typedefs

typedef struct scanbotsdk_random_access_source_t scanbotsdk_random_access_source_t
 Represents an instance of the opaque random access source.
 
typedef struct scanbotsdk_external_random_access_source_t scanbotsdk_external_random_access_source_t
 Provides interface for implementing custom random access source.
 

Functions

SBSDK_API scanbotsdk_error_code_t scanbotsdk_random_access_source_free (scanbotsdk_random_access_source_t *object)
 Destroys the source instance. If null is passed does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_random_access_source_create_from_path (const char *path, scanbotsdk_random_access_source_t **result)
 Creates a new instance of the random access source from the path to a file.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_random_access_source_create_from_external (scanbotsdk_external_random_access_source_t external_source, scanbotsdk_random_access_source_t **result)
 Creates a new instance of the random access source from an external implementation of random access source.
 

Detailed Description


Class Documentation

◆ scanbotsdk_external_random_access_source_t

struct scanbotsdk_external_random_access_source_t

Provides interface for implementing custom random access source.

Public Attributes

void * source
 Pointer to the source instance.
 
const char * data
 Pointer to the data stored by source.
 
size_t size
 Size of the data stored by source.
 
bool is_owning
 True if the source instance owns the data. Here owns means that holding a pointer to the source is enough to keep the data alive.
 
void(* free )(void *source)
 Frees the source instance.
 

Typedef Documentation

◆ scanbotsdk_random_access_source_t

Represents an instance of the opaque random access source.

Must be destroyed with scanbotsdk_random_access_source_free after use.

Function Documentation

◆ scanbotsdk_random_access_source_create_from_external()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_random_access_source_create_from_external ( scanbotsdk_external_random_access_source_t external_source,
scanbotsdk_random_access_source_t ** result )

Creates a new instance of the random access source from an external implementation of random access source.

Parameters
external_sourceExternal source implementation
resultPointer to a variable that will be set to the new source instance.
Returns
: Error code, SCANBOTSDK_OK if creation was successful

◆ scanbotsdk_random_access_source_create_from_path()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_random_access_source_create_from_path ( const char * path,
scanbotsdk_random_access_source_t ** result )

Creates a new instance of the random access source from the path to a file.

Parameters
pathPointer to file path
resultPointer to a variable that will be set to the new source instance.
Returns
: Error code, SCANBOTSDK_OK if creation was successful

◆ scanbotsdk_random_access_source_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_random_access_source_free ( scanbotsdk_random_access_source_t * object)

Destroys the source instance. If null is passed does nothing.

Parameters
objectPointer to the source instance