1/* This file is part of Libspectre.
2 *
3 * Copyright (C) 2007 Albert Astals Cid <aacid@kde.org>
4 * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
5 *
6 * Libspectre is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * Libspectre is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20
21#ifndef SPECTRE_STATUS_H
22#define SPECTRE_STATUS_H
23
24#include <libspectre/spectre-macros.h>
25
26SPECTRE_BEGIN_DECLS
27
28/*! Defines the error status of a Spectre object */
29typedef enum _SpectreStatus {
30 SPECTRE_STATUS_SUCCESS /*! No error */ = 0,
31 SPECTRE_STATUS_NO_MEMORY /*! There has been a problem
32 allocating memory */,
33 SPECTRE_STATUS_LOAD_ERROR /*! There has been a problem
34 loading the postcript file */,
35 SPECTRE_STATUS_DOCUMENT_NOT_LOADED /*! A function that needs the
36 document to be loaded has been
37 called and the document has not
38 been loaded or there was an
39 error when loading it */,
40 SPECTRE_STATUS_INVALID_PAGE /*! The request page number
41 is not in the document page
42 range */,
43 SPECTRE_STATUS_RENDER_ERROR /*! There has been a problem
44 rendering the page */,
45 SPECTRE_STATUS_EXPORTER_ERROR /*! There has been a problem
46 exporting the document */,
47 SPECTRE_STATUS_SAVE_ERROR /*! There has been a problem
48 saving the document */
49} SpectreStatus;
50
51/*! Gets a textual description of the given status
52 @param status the status whose textual description will be returned
53*/
54const char *spectre_status_to_string (SpectreStatus status);
55
56SPECTRE_END_DECLS
57
58#endif /* SPECTRE_STATUS_H */
59