ReturnCodesC.h (1513B)
1 /** @file 2 @brief Header declaring a type and values for simple C return codes. 3 4 Must be c-safe! 5 6 @date 2014 7 8 @author 9 Sensics, Inc. 10 <http://sensics.com/osvr> 11 */ 12 13 /* 14 // Copyright 2014 Sensics, Inc. 15 // 16 // Licensed under the Apache License, Version 2.0 (the "License"); 17 // you may not use this file except in compliance with the License. 18 // You may obtain a copy of the License at 19 // 20 // http://www.apache.org/licenses/LICENSE-2.0 21 // 22 // Unless required by applicable law or agreed to in writing, software 23 // distributed under the License is distributed on an "AS IS" BASIS, 24 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 25 // See the License for the specific language governing permissions and 26 // limitations under the License. 27 */ 28 29 #ifndef INCLUDED_ReturnCodesC_h_GUID_C81A2FDE_E5BB_4AAA_70A4_C616DD7C141A 30 #define INCLUDED_ReturnCodesC_h_GUID_C81A2FDE_E5BB_4AAA_70A4_C616DD7C141A 31 32 /* Internal Includes */ 33 #include <osvr/Util/APIBaseC.h> 34 #include <osvr/Util/AnnotationMacrosC.h> 35 36 OSVR_EXTERN_C_BEGIN 37 38 /** @addtogroup PluginKit 39 @{ 40 */ 41 /** @name Return Codes 42 @{ 43 */ 44 /** @brief The "success" value for an OSVR_ReturnCode */ 45 #define OSVR_RETURN_SUCCESS (0) 46 /** @brief The "failure" value for an OSVR_ReturnCode */ 47 #define OSVR_RETURN_FAILURE (1) 48 /** @brief Return type from C API OSVR functions. */ 49 typedef OSVR_RETURN_SUCCESS_CONDITION( 50 return == OSVR_RETURN_SUCCESS) char OSVR_ReturnCode; 51 /** @} */ 52 53 /** @} */ /* end of group */ 54 55 OSVR_EXTERN_C_END 56 57 #endif