File: interface.h

package info (click to toggle)
charls 1.1.0+dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 400 kB
  • sloc: cpp: 4,058; makefile: 17; ansic: 6
file content (66 lines) | stat: -rw-r--r-- 2,231 bytes parent folder | download
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/* 
 (C) Jan de Vaan 2007-2010, all rights reserved. See the accompanying "License.txt" for licensed use. 
*/ 


#ifndef JLS_INTERFACE
#define JLS_INTERFACE

#include "publictypes.h"

/* non-windows (static linking) */
#if !defined(CHARLS_IMEXPORT) && !defined(_WIN32)
#  define CHARLS_IMEXPORT(returntype) returntype
#endif

/* windows static linking */
#if !defined(CHARLS_IMEXPORT) && defined(CHARLS_STATIC)
#  define CHARLS_IMEXPORT(returntype) returntype
#endif

/* windows dll */
#if !defined(CHARLS_IMEXPORT) && defined(CHARLS_DLL)
#define CHARLS_IMEXPORT(returntype) __attribute__ ((visibility ("default"))) returntype
#endif

#if !defined(CHARLS_IMEXPORT)
#error Please #define CHARLS_STATIC or CHARLS_DLL before including "interface.h" to indicate if CharLS is built as a static library or as a dll. 
#endif


#ifdef __cplusplus

#include <iostream>

extern "C" 
{

#endif
  CHARLS_IMEXPORT(enum JLS_ERROR) JpegLsEncode(void* compressedData, size_t compressedLength, size_t* byteCountWritten, 
	    const void* uncompressedData, size_t uncompressedLength, struct JlsParameters* info);

  CHARLS_IMEXPORT(enum JLS_ERROR) JpegLsDecode(void* uncompressedData, size_t uncompressedLength, 
		const void* compressedData, size_t compressedLength, 
		struct JlsParameters* info);

  CHARLS_IMEXPORT(enum JLS_ERROR) JpegLsDecodeRect(void* uncompressedData, size_t uncompressedLength, 
		const void* compressedData, size_t compressedLength, 
		struct JlsRect rect, struct JlsParameters* info);

  CHARLS_IMEXPORT(enum JLS_ERROR) JpegLsReadHeader(const void* compressedData, size_t compressedLength, 
		struct JlsParameters* info);

  CHARLS_IMEXPORT(enum JLS_ERROR) JpegLsVerifyEncode(const void* uncompressedData, size_t uncompressedLength, 
		const void* compressedData, size_t compressedLength);

  
#ifdef __cplusplus

}
	CHARLS_IMEXPORT(enum JLS_ERROR) JpegLsEncodeStream(ByteStreamInfo rawStream, size_t* bytesWritten, ByteStreamInfo inputStream, struct JlsParameters* info);
	CHARLS_IMEXPORT(enum JLS_ERROR) JpegLsDecodeStream(ByteStreamInfo output, ByteStreamInfo input, struct JlsParameters* info);
	CHARLS_IMEXPORT(enum JLS_ERROR) JpegLsReadHeaderStream(ByteStreamInfo input, struct JlsParameters* info);

#endif

#endif