From a1e34e365b84d5a1c47dbcffa4141303533a55e7 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Thu, 10 Mar 2011 17:31:54 +0100 Subject: Use SWIG for easy language binding creation --- src/uca.h | 62 +++++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 27 deletions(-) (limited to 'src/uca.h') diff --git a/src/uca.h b/src/uca.h index 30966c4..e206ad0 100644 --- a/src/uca.h +++ b/src/uca.h @@ -1,6 +1,10 @@ #ifndef __UNIFIED_CAMERA_ACCESS_H #define __UNIFIED_CAMERA_ACCESS_H +#ifdef __cplusplus +extern "C" { +#endif + /** * \file uca.h * \brief Abstract camera model @@ -15,33 +19,6 @@ struct uca_t; struct uca_camera_t; struct uca_property_t; -/** - * \brief Initialize the unified camera access interface - * \return Pointer to a uca_t structure - */ -struct uca_t *uca_init(void); - -/** - * \brief Free resources of the unified camera access interface - */ -void uca_destroy(struct uca_t *uca); - -/** - * \brief Convert a property string to the corresponding ID - */ -enum uca_property_ids uca_get_property_id(const char *property_name); - -/** - * \brief Convert a property ID to the corresponding string - */ -const char* uca_get_property_name(enum uca_property_ids property_id); - -/** - * \brief Return the full property structure for a given ID - */ -struct uca_property_t *uca_get_full_property(enum uca_property_ids property_id); - - /* The property IDs must start with 0 and must be continuous. Whenever this * library is released, the IDs must not change to guarantee binary compatibility! */ enum uca_property_ids { @@ -86,6 +63,34 @@ enum uca_property_ids { UCA_PROP_LAST }; +/** + * \brief Initialize the unified camera access interface + * \return Pointer to a uca_t structure + */ +struct uca_t *uca_init(void); + +/** + * \brief Free resources of the unified camera access interface + */ +void uca_destroy(struct uca_t *uca); + +/** + * \brief Convert a property string to the corresponding ID + */ +enum uca_property_ids uca_get_property_id(const char *property_name); + +/** + * \brief Convert a property ID to the corresponding string + */ +const char* uca_get_property_name(enum uca_property_ids property_id); + +/** + * \brief Return the full property structure for a given ID + */ +struct uca_property_t *uca_get_full_property(enum uca_property_ids property_id); + + + /* Possible timestamp modes for UCA_PROP_TIMESTAMP_MODE */ #define UCA_TIMESTAMP_ASCII 0x01 #define UCA_TIMESTAMP_BINARY 0x02 @@ -158,5 +163,8 @@ struct uca_t { struct uca_grabber_t *grabbers; }; +#ifdef __cplusplus +} +#endif #endif -- cgit v1.2.3