Back to index

php5  5.3.10
intl_error.h
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | This source file is subject to version 3.01 of the PHP license,      |
00006    | that is bundled with this package in the file LICENSE, and is        |
00007    | available through the world-wide-web at the following url:           |
00008    | http://www.php.net/license/3_01.txt                                  |
00009    | If you did not receive a copy of the PHP license and are unable to   |
00010    | obtain it through the world-wide-web, please send a note to          |
00011    | license@php.net so we can mail you a copy immediately.               |
00012    +----------------------------------------------------------------------+
00013    | Authors: Vadim Savchuk <vsavchuk@productengine.com>                  |
00014    |          Dmitry Lakhtyuk <dlakhtyuk@productengine.com>               |
00015    |          Stanislav Malyshev <stas@zend.com>                          |
00016    +----------------------------------------------------------------------+
00017  */
00018 
00019 #ifndef INTL_ERROR_H
00020 #define INTL_ERROR_H
00021 
00022 #include <unicode/utypes.h>
00023 
00024 #define INTL_ERROR_CODE(e) (e).code
00025 
00026 typedef struct _intl_error {
00027        UErrorCode      code;
00028        char*           custom_error_message;
00029        int             free_custom_error_message;
00030 } intl_error;
00031 
00032 intl_error* intl_error_create( TSRMLS_D );
00033 void        intl_error_init( intl_error* err TSRMLS_DC );
00034 void        intl_error_reset( intl_error* err TSRMLS_DC );
00035 void        intl_error_set_code( intl_error* err, UErrorCode err_code TSRMLS_DC );
00036 void        intl_error_set_custom_msg( intl_error* err, char* msg, int copyMsg TSRMLS_DC );
00037 void        intl_error_set( intl_error* err, UErrorCode code, char* msg, int copyMsg TSRMLS_DC );
00038 UErrorCode  intl_error_get_code( intl_error* err TSRMLS_DC );
00039 char*       intl_error_get_message( intl_error* err TSRMLS_DC );
00040 
00041 // Wrappers to synchonize object's and global error structures.
00042 void        intl_errors_reset( intl_error* err TSRMLS_DC );
00043 void        intl_errors_set_custom_msg( intl_error* err, char* msg, int copyMsg TSRMLS_DC );
00044 void        intl_errors_set_code( intl_error* err, UErrorCode err_code TSRMLS_DC );
00045 void        intl_errors_set( intl_error* err, UErrorCode code, char* msg, int copyMsg TSRMLS_DC );
00046 
00047 #endif // INTL_ERROR_H