DVBCore
1.0
Open source DVB engine
|
00001 /******************************************************************************* 00002 * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org) 00003 * Copyright © 2004 Ocean Blue Software Ltd 00004 * 00005 * This file is part of a DTVKit Software Component 00006 * You are permitted to copy, modify or distribute this file subject to the terms 00007 * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org 00008 * 00009 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 00010 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES 00011 * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 00012 * 00013 * If you or your organisation is not a member of DTVKit then you have access 00014 * to this source code outside of the terms of the licence agreement 00015 * and you are expected to delete this and any associated files immediately. 00016 * Further information on DTVKit, membership and terms can be found at www.dtvkit.org 00017 *******************************************************************************/ 00025 #ifndef _STBUNI_H 00026 00027 #define _STBUNI_H 00028 00029 00030 //---constant definitions--------------------------------------------------------------------------- 00031 00032 /* 00033 * Convert the number of Unicode characters to the number of bytes for the Unicode string. 00034 * I.e. (2*<NumberUnicodeChars>) + 1 byte header + 2 byte null terminator. 00035 */ 00036 #define STB_UTF16_LEN_TO_BYTES_IN_STRING(x) (((x) *2) + 3) 00037 #define INVALID_UNICODE_CHAR 0xFFFF // 0xFFFF is an invalid unicode char value 00038 00039 //---typedefs-structs-enumerations------------------------------------------------------------------ 00040 00041 00042 //---function prototypes---------------------------------------------------------------------------- 00043 U8BIT* STB_SetUnicodeStringChar(U8BIT *string_ptr, U16BIT char_id, U16BIT code); 00044 00045 U8BIT* STB_DeleteUnicodeStringChar(U8BIT *string_ptr, U16BIT char_id); 00046 00047 U32BIT STB_GetUnicodeStringChar(U8BIT *string_ptr, U16BIT char_id); 00048 00049 U8BIT* STB_ConcatUnicodeStrings(U8BIT *string1_ptr, U8BIT *string2_ptr); 00050 00051 U8BIT* STB_UnicodeStringTokenise(U8BIT *str, U8BIT **save_ptr); 00052 00053 U8BIT* STB_UnicodeStrStr(U8BIT *str1, U8BIT *str2, BOOLEAN ignore_case); 00054 00055 S8BIT STB_CompareUnicodeStrings(U8BIT *string1_ptr, U8BIT *string2_ptr, BOOLEAN exact_match, BOOLEAN ignore_case); 00056 00057 U8BIT* STB_ConvertStringToUnicode(U8BIT *string, BOOLEAN *reverse_dir, U16BIT *nchar, 00058 BOOLEAN strip_DVB_cntrl_char, U32BIT lang_code); 00059 U8BIT* STB_ConvertStringToUTF8(U8BIT *string, U16BIT *nchar, BOOLEAN strip_DVB_cntrl_char, 00060 U32BIT lang_code); 00061 00062 void STB_ReleaseUnicodeString(U8BIT *string); 00063 00064 U8BIT* STB_ConvertUTF16toUTF8( U8BIT *src, U32BIT *outlen ); 00065 00066 BOOLEAN STB_IsUnicodeString(U8BIT *string_ptr); 00067 00068 BOOLEAN STB_IsNormalString(U8BIT *string_ptr); 00069 00070 U32BIT STB_GetNumBytesInString(U8BIT *string_ptr); 00071 00072 BOOLEAN STB_IsUnicodeStringReversed(U8BIT *string_ptr); 00073 00074 BOOLEAN STB_IsStringEmpty(U8BIT *string_ptr); 00075 00076 void STB_SetDefaultAsciiTable(U8BIT table); 00077 00078 S8BIT STB_CompareStringsIgnoreCase(U8BIT *string1_ptr, U8BIT *string2_ptr); 00079 00080 U8BIT* STB_FormatUnicodeString( BOOLEAN strip_DVB_cntrl_char, BOOLEAN *reverse_dir, const U8BIT *const format_ptr, ... ); 00081 00082 U32BIT STB_UnicodeStringLen(U8BIT *string_ptr); 00083 00084 U8BIT* STB_UnicodeInsertString(U8BIT *src_str, U16BIT insert_pos, U8BIT *insert_str, BOOLEAN replace_char); 00085 00086 #endif // _STBUNI_H 00087 00088 //************************************************************************************************** 00089 // End of File 00090 //**************************************************************************************************