File: mscgen_api.h

package info (click to toggle)
doxygen 1.9.8%2Bds-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 24,000 kB
  • sloc: cpp: 215,370; lex: 42,621; python: 32,388; ansic: 26,705; xml: 15,390; javascript: 8,352; yacc: 581; f90: 455; php: 441; perl: 378; makefile: 195; sh: 24; objc: 14; cs: 5; java: 1
file content (41 lines) | stat: -rw-r--r-- 1,218 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef MSCGEN_API_H
#define MSCGEN_API_H

#ifdef __cplusplus
extern "C" {
#endif

#define MSCGEN_OK                   ( 0)
#define MSCGEN_FILE_ERROR           (-1)
#define MSCGEN_INPUT_FORMAT_ERROR   (-2)
#define MSCGEN_OUTPUT_CONTEXT_ERROR (-3)

/** The supported image formats */
typedef enum
{
  mscgen_format_png, /**< PNG bitmap image file */
  mscgen_format_eps, /**< Encapsulated PostScript file */
  mscgen_format_svg, /**< Scalable Vector Graphics file */
  mscgen_format_pngmap, /**< Image map for a bitmap file */
  mscgen_format_svgmap  /**< Image map for a SVG file */
} mscgen_format_t;

/** generate an image file for a given .msc file.
 *  @param inputFile the name of the MSC file to process.
 *  @param outputFile the name of the image file to generate.
 *  @param format the format of the image file to generate.
 *  @return 0 on success, a non zero error code on failure.
 */
int mscgen_generate(const char *inputFile,
                    const char *outputFile,
                    mscgen_format_t format
                   );

/** Translates the error code returned by mscgen_generate into a string */
const char *mscgen_error2str(int code);

#ifdef __cplusplus
}
#endif

#endif // MSCGEN_API_H