flixengine2/on2types.h

Go to the documentation of this file.
00001 /*
00002 //==========================================================================
00003 //
00004 //  Copyright (c) On2 Technologies Inc. All Rights Reserved.
00005 //
00006 //--------------------------------------------------------------------------
00007 //
00008 //  File:        $Workfile: on2types.h$
00009 //               $Revision: 15$
00010 //
00011 //  Last Update: $DateUTC: 2008-02-17 04:14:36Z$
00012 //
00013 //--------------------------------------------------------------------------
00014 */
00015 #ifndef __ON2TYPES_H__
00016 #define __ON2TYPES_H__
00017 
00018 #ifndef _WIN32_WCE
00019 # include <sys/types.h>
00020 #endif
00021 #ifdef _MSC_VER
00022 # include <basetsd.h>
00023  typedef SSIZE_T ssize_t;
00024 #endif
00025 
00026 #ifdef HAVE_INTTYPES_H
00027 # ifdef __cplusplus
00028 #  define __STDC_FORMAT_MACROS
00029 # endif
00030   /* C99 types are preferred to on2 integer types */
00031 # include <inttypes.h>
00032 #endif
00033 
00036 #if !defined(HAVE_INTTYPES_H) && !defined(INT_T_DEFINED)
00037 # ifdef STRICTTYPES
00038    typedef signed char  int8_t;
00039    typedef signed short int16_t;
00040    typedef signed int   int32_t;
00041 # else
00042    typedef char         int8_t;
00043    typedef short        int16_t;
00044    typedef int          int32_t;
00045 # endif
00046  typedef unsigned char  uint8_t;
00047  typedef unsigned short uint16_t;
00048  typedef unsigned int   uint32_t;
00049 #endif
00050 
00051 typedef int8_t     on2s8;
00052 typedef uint8_t    on2u8;
00053 typedef int16_t    on2s16;
00054 typedef uint16_t   on2u16;
00055 typedef int32_t    on2s32;
00056 typedef uint32_t   on2u32;
00057 typedef int32_t    on2bool;
00058 
00059 enum _on2bool {on2false, on2true};
00060 
00065 #ifdef UNICODE
00066 # ifdef NO_WCHAR
00067 #  error "no non-wchar support added yet"
00068 # else
00069 #  ifdef __SYMBIAN32__
00070 #   include <stddef.h>
00071 #  else
00072 #   include <wchar.h>
00073 #  endif
00074    typedef wchar_t on2tc;
00075 #  define OTC(str) L ## str
00076 #  define ON2TC "ls"
00077 # endif /*NO_WCHAR*/
00078 #else
00079  typedef char on2tc;
00080 # define OTC(str) (on2tc*)str
00081 # define ON2TC "s"
00082 #endif /*UNICODE*/
00083 
00089 #if defined(HAVE_INTTYPES_H)
00090 # define ON264 PRId64
00091  typedef int64_t on2s64;
00092 #elif defined(HASLONGLONG)
00093 # undef  PRId64
00094 # define PRId64 "lld"
00095 # define ON264 PRId64
00096  typedef long long on2s64;
00097 #elif defined(WIN32) || defined(_WIN32_WCE)
00098 # undef  PRId64
00099 # define PRId64 "I64d"
00100 # define ON264 PRId64
00101  typedef __int64 on2s64;
00102 #elif defined(__uClinux__) && defined(CHIP_DM642)
00103 # include <lddk.h>
00104 # undef  PRId64
00105 # define PRId64 "lld"
00106 # define ON264 PRId64
00107  typedef long on2s64;
00108 #elif defined(__SYMBIAN32__)
00109 # undef  PRId64
00110 # define PRId64 "u"
00111 # define ON264 PRId64
00112  typedef unsigned int on2s64;
00113 #else
00114 # error "64 bit integer type undefined for this platform!"
00115 #endif
00116 #if !defined(HAVE_INTTYPES_H) && !defined(INT_T_DEFINED)
00117  typedef on2s64 int64_t;
00118 #endif
00119 
00123 typedef enum {
00124     ON2_NOT_FOUND        = -404,
00125     ON2_BUFFER_EMPTY     = -202,
00126     ON2_BUFFER_FULL      = -201,
00127 
00128     ON2_CONNREFUSED      = -102,
00129     ON2_TIMEDOUT         = -101,
00130     ON2_WOULDBLOCK       = -100,
00131 
00132     ON2_NET_ERROR        = -9,
00133     ON2_INVALID_VERSION  = -8,
00134     ON2_INPROGRESS       = -7,
00135     ON2_NOT_SUPP         = -6,
00136     ON2_NO_MEM           = -3,
00137     ON2_INVALID_PARAMS   = -2,
00138     ON2_ERROR            = -1,
00139     ON2_OK               = 0,
00140     ON2_DONE             = 1
00141 } on2sc;
00142 
00143 #if defined(WIN32) || defined(_WIN32_WCE)
00144 # define DLLIMPORT __declspec(dllimport)
00145 # define DLLEXPORT __declspec(dllexport)
00146 # define DLLLOCAL
00147 #elif defined(LINUX)
00148 # define DLLIMPORT
00149   /*visibility attribute support is available in 3.4 and later.
00150     see: http://gcc.gnu.org/wiki/Visibility for more info*/
00151 # if defined(__GNUC__) && ((__GNUC__<<16|(__GNUC_MINOR__&0xff)) >= (3<<16|4))
00152 #  define GCC_HASCLASSVISIBILITY
00153 # endif /*defined(__GNUC__) && __GNUC_PREREQ(3,4)*/
00154 # ifdef GCC_HASCLASSVISIBILITY
00155 #  define DLLEXPORT   __attribute__ ((visibility("default")))
00156 #  define DLLLOCAL __attribute__ ((visibility("hidden")))
00157 # else
00158 #  define DLLEXPORT
00159 #  define DLLLOCAL
00160 # endif /*GCC_HASCLASSVISIBILITY*/
00161 #endif /*platform ifdefs*/
00162 
00163 #endif /*__ON2TYPES_H__*/
00164 
00165 #undef ON2API
00166 
00171 #ifdef ON2DLL
00172 # ifdef ON2DLLEXPORT
00173 #  define ON2API DLLEXPORT
00174 # else
00175 #  define ON2API DLLIMPORT
00176 # endif /*ON2DLLEXPORT*/
00177 #else
00178 # define ON2API
00179 #endif /*ON2DLL*/

On2 Technologies, Inc Flix Engine Linux documentation, generated on Mon May 19 10:56:06 2008 by doxygen 1.5.2