types.h

00001 /*---------------------------------------------------------------------------*
00002  *  types.h                                                                  *
00003  *                                                                           *
00004  *  Copyright 2007 Nuance Communciations, Inc.                               *
00005  *                                                                           *
00006  *  Licensed under the Apache License, Version 2.0 (the 'License');          *
00007  *  you may not use this file except in compliance with the License.         *
00008  *                                                                           *
00009  *  You may obtain a copy of the License at                                  *
00010  *      http://www.apache.org/licenses/LICENSE-2.0                           *
00011  *                                                                           *
00012  *  Unless required by applicable law or agreed to in writing, software      *
00013  *  distributed under the License is distributed on an 'AS IS' BASIS,        *
00014  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
00015  *  See the License for the specific language governing permissions and      *
00016  *  limitations under the License.                                           *
00017  *                                                                           *
00018  *---------------------------------------------------------------------------*/
00019 
00020 #ifndef __UAPI__TYPES
00021 #define __UAPI__TYPES
00022 
00023 #include <math.h>
00024 
00025 
00026 namespace android
00027 {
00028   namespace speech
00029   {
00030     namespace recognition
00031     {
00035       typedef long LONG;
00036       
00040       typedef unsigned long ULONG;
00041       
00045       typedef int INT32;
00046       
00050       const INT32 INT32_MIN = -2147483647 - 1;
00051       // VS2003 gives a compiler warning unless we use -1
00052       
00056       const INT32 INT32_MAX = 2147483647;
00057       
00061       const int INT32_DIGITS = (int) ceil(32*log10(2.0) + 1);
00062       
00066       typedef unsigned int UINT32;
00067       
00071       const UINT32 UINT32_MIN = 0;
00072       
00076       const UINT32 UINT32_MAX = 4294967295ul;
00077       
00081       const int UINT32_DIGITS = (int) ceil(32*log10(2.0) + 1);
00082       
00086       typedef short INT16;
00087       
00091       const int INT16_DIGITS = (int) ceil(16*log10(2.0) + 1);
00092       
00096       typedef unsigned short UINT16;
00097       
00101       const UINT16 UINT16_MIN = 0;
00102       
00106       const UINT16 UINT16_MAX = 65535;
00107       
00111       typedef char INT8;
00112       
00116       typedef unsigned char UINT8;
00117       
00121       const UINT8 UINT8_MIN = 0;
00122       
00126       const UINT8 UINT8_MAX = 255;
00127       
00131       typedef int ARRAY_LIMIT;
00132       
00136       const ARRAY_LIMIT ARRAY_LIMIT_MIN = 0;
00137       
00141       const ARRAY_LIMIT ARRAY_LIMIT_MAX = 2147483647;
00142     }
00143   }
00144 }
00145 
00146 #endif

Generated on Thu May 1 17:16:37 2008 for UAPI by  doxygen 1.5.3