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

Typedefs

typedef struct scanbotsdk_ref_counted_object_profile_t scanbotsdk_ref_counted_object_profile_t
 scanbotsdk_ref_counted_object_profile_t class
 

Functions

SBSDK_API scanbotsdk_error_code_t scanbotsdk_ref_counted_object_profile_create (const char *unique_id, int64_t timestamp_created, int strong_references, int serialized_references, scanbotsdk_ref_counted_object_profile_t **result)
 Creates a new instance of scanbotsdk_ref_counted_object_profile with given params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_ref_counted_object_profile_create_with_defaults (const char *unique_id, int64_t timestamp_created, scanbotsdk_ref_counted_object_profile_t **result)
 Creates a new instance of scanbotsdk_ref_counted_object_profile_t with given required params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_ref_counted_object_profile_free (scanbotsdk_ref_counted_object_profile_t *object)
 Frees the memory allocated for the instance of scanbotsdk_ref_counted_object_profile_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_ref_counted_object_profile_get_unique_id (scanbotsdk_ref_counted_object_profile_t *self, const char **unique_id)
 Returns value of unique_id field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_ref_counted_object_profile_get_timestamp_created (scanbotsdk_ref_counted_object_profile_t *self, int64_t *timestamp_created)
 Returns value of timestamp_created field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_ref_counted_object_profile_get_strong_references (scanbotsdk_ref_counted_object_profile_t *self, int *strong_references)
 Returns value of strong_references field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_ref_counted_object_profile_get_serialized_references (scanbotsdk_ref_counted_object_profile_t *self, int *serialized_references)
 Returns value of serialized_references field of the given object.
 

Detailed Description

Typedef Documentation

◆ scanbotsdk_ref_counted_object_profile_t

Function Documentation

◆ scanbotsdk_ref_counted_object_profile_create()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_ref_counted_object_profile_create ( const char * unique_id,
int64_t timestamp_created,
int strong_references,
int serialized_references,
scanbotsdk_ref_counted_object_profile_t ** result )

Creates a new instance of scanbotsdk_ref_counted_object_profile with given params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
unique_idUnique ID of the object. The value must not be null.
timestamp_createdTimestamp (milliseconds since the UNIX epoch), at which the object was first created.
strong_referencesNumber of strong references associated with the object. The strong reference count increases when a new instance of a platform ImageRef class is created from the object's unique ID and decreases when the ImageRef instance is destroyed.

Default is 0

Parameters
serialized_referencesNumber of serialized references to the object. The serialized reference count increases when an ImageRef is written to JSON or a Parcel on Android and decrease when the respective JSON or Parcel is deserialized.

Default is 0

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_ref_counted_object_profile_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_ref_counted_object_profile_create_with_defaults()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_ref_counted_object_profile_create_with_defaults ( const char * unique_id,
int64_t timestamp_created,
scanbotsdk_ref_counted_object_profile_t ** result )

Creates a new instance of scanbotsdk_ref_counted_object_profile_t with given required params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
unique_idUnique ID of the object. The value must not be null.
timestamp_createdTimestamp (milliseconds since the UNIX epoch), at which the object was first created.
resultPointer to a variable that will store the created instance of scanbotsdk_ref_counted_object_profile_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_ref_counted_object_profile_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_ref_counted_object_profile_free ( scanbotsdk_ref_counted_object_profile_t * object)

Frees the memory allocated for the instance of scanbotsdk_ref_counted_object_profile_t. If null is passed, the function does nothing.

Parameters
objectPointer to the instance of scanbotsdk_ref_counted_object_profile_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_ref_counted_object_profile_get_serialized_references()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_ref_counted_object_profile_get_serialized_references ( scanbotsdk_ref_counted_object_profile_t * self,
int * serialized_references )

Returns value of serialized_references field of the given object.

Number of serialized references to the object. The serialized reference count increases when an ImageRef is written to JSON or a Parcel on Android and decrease when the respective JSON or Parcel is deserialized.

Default is 0

Parameters
selfPointer to the instance of scanbotsdk_ref_counted_object_profile_t
serialized_referencesPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_ref_counted_object_profile_get_strong_references()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_ref_counted_object_profile_get_strong_references ( scanbotsdk_ref_counted_object_profile_t * self,
int * strong_references )

Returns value of strong_references field of the given object.

Number of strong references associated with the object. The strong reference count increases when a new instance of a platform ImageRef class is created from the object's unique ID and decreases when the ImageRef instance is destroyed.

Default is 0

Parameters
selfPointer to the instance of scanbotsdk_ref_counted_object_profile_t
strong_referencesPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_ref_counted_object_profile_get_timestamp_created()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_ref_counted_object_profile_get_timestamp_created ( scanbotsdk_ref_counted_object_profile_t * self,
int64_t * timestamp_created )

Returns value of timestamp_created field of the given object.

Timestamp (milliseconds since the UNIX epoch), at which the object was first created.

Parameters
selfPointer to the instance of scanbotsdk_ref_counted_object_profile_t
timestamp_createdPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_ref_counted_object_profile_get_unique_id()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_ref_counted_object_profile_get_unique_id ( scanbotsdk_ref_counted_object_profile_t * self,
const char ** unique_id )

Returns value of unique_id field of the given object. The returned pointers do NOT own the underlying object, caller must not free them.

Unique ID of the object.

Parameters
selfPointer to the instance of scanbotsdk_ref_counted_object_profile_t
unique_idPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.