Squash  0.7.0
Enumerations | Enumerator | Functions
SquashStatus

Response status codes. More...

Enumerations

enum  SquashStatus {
  SQUASH_OK = 1, SQUASH_PROCESSING = 2, SQUASH_END_OF_STREAM = 3, SQUASH_FAILED = -1,
  SQUASH_UNABLE_TO_LOAD = -2, SQUASH_BAD_PARAM = -3, SQUASH_BAD_VALUE = -4, SQUASH_MEMORY = -5,
  SQUASH_BUFFER_FULL = -6, SQUASH_BUFFER_EMPTY = -7, SQUASH_STATE = -8, SQUASH_INVALID_OPERATION = -9,
  SQUASH_NOT_FOUND = -10, SQUASH_INVALID_BUFFER = -11, SQUASH_IO = -12
}
 Status codes. More...
 

Functions

const char * squash_status_to_string (SquashStatus status)
 Get a string representation of a status code. More...
 
SquashStatus squash_error (SquashStatus status)
 Emit an error. More...
 

Detailed Description

Response status codes.

Enumeration Type Documentation

Status codes.

Enumerator
SQUASH_OK 

Operation completed successfully.

SQUASH_PROCESSING 

Operation partially completed.

SQUASH_END_OF_STREAM 

Reached the end of the stream while decoding.

SQUASH_FAILED 

Operation failed.

SQUASH_UNABLE_TO_LOAD 

Unable to load the requested resource.

SQUASH_BAD_PARAM 

One or more of the parameters were not valid.

SQUASH_BAD_VALUE 

One or more parameter values was not valid.

SQUASH_MEMORY 

Not enough memory is available.

SQUASH_BUFFER_FULL 

Insufficient space in buffer.

SQUASH_BUFFER_EMPTY 

Supplied buffer was empty.

SQUASH_STATE 

Performing the requested operation from the current state is not supported.

SQUASH_INVALID_OPERATION 

The requested operation is not available.

SQUASH_NOT_FOUND 

The requested codec could not be found.

SQUASH_INVALID_BUFFER 

A buffer passed to squash was invalid.

Definition at line 36 of file status.h.

Function Documentation

SquashStatus squash_error ( SquashStatus  status)

Emit an error.

This function simply returns the argument which was passed to it. It exists only to make it easier to debug an error by setting a breakpoint on this function.

Note that only the initial point at which the error was generated should call this function. Do not call it when simply returning an error that was generated by another function.

Parameters
statusthe error
Returns
the error

Definition at line 173 of file status.c.

const char* squash_status_to_string ( SquashStatus  status)

Get a string representation of a status code.

Parameters
statusThe status.
Returns
A string describing status
Examples:
simple.c.

Definition at line 121 of file status.c.