Squash  0.7.0
status.h
1 /* Copyright (c) 2013 The Squash Authors
2  *
3  * Permission is hereby granted, free of charge, to any person
4  * obtaining a copy of this software and associated documentation
5  * files (the "Software"), to deal in the Software without
6  * restriction, including without limitation the rights to use, copy,
7  * modify, merge, publish, distribute, sublicense, and/or sell copies
8  * of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be
12  * included in all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
18  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21  * SOFTWARE.
22  *
23  * Authors:
24  * Evan Nemerson <evan@nemerson.com>
25  */
26 
27 #ifndef SQUASH_STATUS_H
28 #define SQUASH_STATUS_H
29 
30 #if !defined (SQUASH_H_INSIDE) && !defined (SQUASH_COMPILATION)
31 #error "Only <squash/squash.h> can be included directly."
32 #endif
33 
34 SQUASH_BEGIN_DECLS
35 
36 typedef enum {
37  SQUASH_OK = 1,
40 
52  SQUASH_IO = -12
53 } SquashStatus;
54 
55 SQUASH_API const char* squash_status_to_string (SquashStatus status);
56 
57 SQUASH_API SquashStatus squash_error (SquashStatus status);
58 
59 SQUASH_END_DECLS
60 
61 #endif /* SQUASH_STATUS_H */
Performing the requested operation from the current state is not supported.
Definition: status.h:48
Supplied buffer was empty.
Definition: status.h:47
The requested operation is not available.
Definition: status.h:49
Operation failed.
Definition: status.h:41
A buffer passed to squash was invalid.
Definition: status.h:51
Reached the end of the stream while decoding.
Definition: status.h:39
Operation partially completed.
Definition: status.h:38
The requested codec could not be found.
Definition: status.h:50
SQUASH_API const char * squash_status_to_string(SquashStatus status)
Get a string representation of a status code.
Definition: status.c:121
Insufficient space in buffer.
Definition: status.h:46
Not enough memory is available.
Definition: status.h:45
SquashStatus
Status codes.
Definition: status.h:36
SQUASH_API SquashStatus squash_error(SquashStatus status)
Emit an error.
Definition: status.c:173
One or more parameter values was not valid.
Definition: status.h:44
Unable to load the requested resource.
Definition: status.h:42
Operation completed successfully.
Definition: status.h:37
One or more of the parameters were not valid.
Definition: status.h:43