ESR_ReturnCode.h

00001 /*---------------------------------------------------------------------------*
00002  *  ESR_ReturnCode.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 ESR_RETURNCODE_H
00021 #define ESR_RETURNCODE_H
00022 
00023 
00024 
00025 #include "PortPrefix.h"
00026 
00036 typedef enum ESR_ReturnCode_t
00037 {
00038   /*
00039    * Note: do not forget to modify ESR_rc2str when modifying this enum.
00040    */
00041   
00045   ESR_SUCCESS,
00046   
00051   ESR_CONTINUE_PROCESSING,
00052   
00056   ESR_FATAL_ERROR,
00057   
00061   ESR_BUFFER_OVERFLOW,
00062   
00066   ESR_OPEN_ERROR,
00067   
00071   ESR_ALREADY_OPEN,
00072   
00076   ESR_CLOSE_ERROR,
00077   
00081   ESR_ALREADY_CLOSED,
00082   
00086   ESR_READ_ERROR,
00087   
00091   ESR_WRITE_ERROR,
00092   
00096   ESR_FLUSH_ERROR,
00097   
00101   ESR_SEEK_ERROR,
00102   
00106   ESR_OUT_OF_MEMORY,
00107   
00111   ESR_ARGUMENT_OUT_OF_BOUNDS,
00112   
00116   ESR_NO_MATCH_ERROR,
00117   
00122   ESR_INVALID_ARGUMENT,
00123   
00127   ESR_NOT_SUPPORTED,
00128   
00133   ESR_INVALID_STATE,
00134   
00138   ESR_THREAD_CREATION_ERROR,
00139   
00143   ESR_IDENTIFIER_COLLISION,
00144   
00148   ESR_TIMED_OUT,
00149   
00155   ESR_INVALID_RESULT_TYPE,
00156   
00160   ESR_NOT_IMPLEMENTED,
00161   
00166   ESR_CONNECTION_RESET_BY_PEER,
00167   
00171   ESR_PROCESS_CREATE_ERROR,
00172   
00176   ESR_TTS_NO_ENGINE,
00177   
00181   ESR_MUTEX_CREATION_ERROR,
00182   
00186   ESR_DEADLOCK
00187 } ESR_ReturnCode;
00188 
00189 
00193 #define CHK(rc, x) do { if ((rc = (x)) != ESR_SUCCESS) goto CLEANUP; } while (0)
00194 
00195 #include "ptypes.h"
00196 
00203 PORTABLE_API const LCHAR* ESR_rc2str(const ESR_ReturnCode rc);
00204 
00205 #ifdef _WIN32
00206 
00209 PORTABLE_API void _cdecl _penter(void);
00213 PORTABLE_API void _cdecl _pexit(void);
00214 #endif
00215 
00220 #endif 

Generated on Thu May 1 15:37:25 2008 for SREC by  doxygen 1.5.3