Skip to content

Commit

Permalink
wrappers/c_sync: Add dllexport to sync API - fixes OpenKinect#315
Browse files Browse the repository at this point in the history
Signed-off-by: Benn Snyder <[email protected]>
  • Loading branch information
piedar committed Mar 22, 2014
1 parent 3b74e9c commit 8c59ba2
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions wrappers/c_sync/libfreenect_sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,26 @@
#include "libfreenect.h"
#include <stdint.h>


/// If Win32, export all functions for DLL usage
#ifndef _WIN32
#define FREENECTAPI_SYNC /**< DLLExport information for windows, set to nothing on other platforms */
#else
/**< DLLExport information for windows, set to nothing on other platforms */
#ifdef __cplusplus
#define FREENECTAPI_SYNC extern "C" __declspec(dllexport)
#else
// this is required when building from a Win32 port of gcc without being
// forced to compile all of the library files (.c) with g++...
#define FREENECTAPI_SYNC __declspec(dllexport)
#endif
#endif

#ifdef __cplusplus
extern "C" {
#endif

int freenect_sync_get_video(void **video, uint32_t *timestamp, int index, freenect_video_format fmt);
FREENECTAPI_SYNC int freenect_sync_get_video(void **video, uint32_t *timestamp, int index, freenect_video_format fmt);
/* Synchronous video function, starts the runloop if it isn't running
The returned buffer is valid until this function is called again, after which the buffer must not
Expand All @@ -49,7 +64,7 @@ int freenect_sync_get_video(void **video, uint32_t *timestamp, int index, freene
*/


int freenect_sync_get_depth(void **depth, uint32_t *timestamp, int index, freenect_depth_format fmt);
FREENECTAPI_SYNC int freenect_sync_get_depth(void **depth, uint32_t *timestamp, int index, freenect_depth_format fmt);
/* Synchronous depth function, starts the runloop if it isn't running
The returned buffer is valid until this function is called again, after which the buffer must not
Expand All @@ -65,7 +80,7 @@ int freenect_sync_get_depth(void **depth, uint32_t *timestamp, int index, freene
Nonzero on error.
*/

int freenect_sync_set_tilt_degs(int angle, int index);
FREENECTAPI_SYNC int freenect_sync_set_tilt_degs(int angle, int index);
/* Tilt function, starts the runloop if it isn't running
Args:
Expand All @@ -76,7 +91,7 @@ int freenect_sync_set_tilt_degs(int angle, int index);
Nonzero on error.
*/

int freenect_sync_get_tilt_state(freenect_raw_tilt_state **state, int index);
FREENECTAPI_SYNC int freenect_sync_get_tilt_state(freenect_raw_tilt_state **state, int index);
/* Tilt state function, starts the runloop if it isn't running
Args:
Expand All @@ -87,7 +102,7 @@ int freenect_sync_get_tilt_state(freenect_raw_tilt_state **state, int index);
Nonzero on error.
*/

int freenect_sync_set_led(freenect_led_options led, int index);
FREENECTAPI_SYNC int freenect_sync_set_led(freenect_led_options led, int index);
/* Led function, starts the runloop if it isn't running
Args:
Expand All @@ -99,7 +114,7 @@ int freenect_sync_set_led(freenect_led_options led, int index);
*/


void freenect_sync_stop(void);
FREENECTAPI_SYNC void freenect_sync_stop(void);
#ifdef __cplusplus
}
#endif

0 comments on commit 8c59ba2

Please sign in to comment.