/camera/camlib

To get this branch, use:
bzr branch http://suren.me/webbzr/camera/camlib

« back to all changes in this revision

Viewing changes to include/api.h

  • Committer: Suren A. Chilingaryan
  • Date: 2011-02-13 01:33:37 UTC
  • Revision ID: csa@dside.dyndns.org-20110213013337-ibm4w4n5a3hu4k7u
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
////////////////////////////////////////////////////////////////////////////
 
2
//
 
3
//  API DEFINITION FILE
 
4
//
 
5
//  Here the behaviour of the exported API is specified.
 
6
//
 
7
//
 
8
////////////////////////////////////////////////////////////////////////////
 
9
 
 
10
#ifndef API_H_INCLUDED
 
11
#define API_H_INCLUDED
 
12
 
 
13
#include "platform.h"
 
14
 
 
15
// DEBUGGING
 
16
#ifdef SM2_DSP
 
17
        #ifdef DEBUG2
 
18
                #include <stdio.h>
 
19
                #define DEB(x) x
 
20
        #else
 
21
                #define DEB(x) 
 
22
        #endif
 
23
#else
 
24
        #ifdef DEBUG
 
25
                #include <stdio.h>
 
26
                #define DEB(x) x
 
27
        #else
 
28
                #define DEB(x) 
 
29
        #endif
 
30
#endif
 
31
// Some people might want to use the __stdcall calling convention.
 
32
// They will have to define USE_STDCALL.
 
33
#if defined(__linux__ ) || !defined(USE_STDCALL)
 
34
        #define APIDECL
 
35
#else
 
36
        #define APIDECL WINAPI
 
37
#endif
 
38
 
 
39
 
 
40
#ifndef EXTERN_C
 
41
        #ifdef __cplusplus
 
42
                #define EXTERN_C extern "C"
 
43
        #else
 
44
                #define EXTERN_C 
 
45
        #endif
 
46
#endif
 
47
 
 
48
#ifdef __cplusplus
 
49
        #define PF_INLINE inline
 
50
#else
 
51
        #ifdef __GNUC__
 
52
                #define PF_INLINE static __inline__
 
53
        #else
 
54
                #define PF_INLINE
 
55
        #endif
 
56
#endif
 
57
 
 
58
#ifndef SM2_DSP
 
59
        #if defined (WIN32)
 
60
                #if defined (CAMDLL_EXPORTS) || defined (CAMWRAPPER_EXPORTS)
 
61
                        #define CAMDLL_API EXTERN_C __declspec(dllexport)
 
62
                #else
 
63
                        #define CAMDLL_API EXTERN_C __declspec(dllimport)
 
64
                #endif
 
65
 
 
66
                #ifdef COMDLL_EXPORTS
 
67
                        #define COMDLL_API EXTERN_C __declspec(dllexport)
 
68
                #else
 
69
                        #define COMDLL_API EXTERN_C __declspec(dllimport)
 
70
                #endif
 
71
        #else
 
72
                #define CAMDLL_API
 
73
                #define COMDLL_API
 
74
        #endif
 
75
#else
 
76
        #define CAMDLL_API
 
77
        #define COMDLL_API EXTERN_C
 
78
 
 
79
#endif
 
80
 
 
81
 
 
82
#endif // API_H_INCLUDED