1 /* ------------------------------------------------------------------ 2 * Copyright (C) 1998-2009 PacketVideo 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 * express or implied. 14 * See the License for the specific language governing permissions 15 * and limitations under the License. 16 * ------------------------------------------------------------------- 17 */ 18 19 #ifndef WCHAR_SIZE_UTILS_H_INCLUDED 20 #define WCHAR_SIZE_UTILS_H_INCLUDED 21 22 #ifndef OSCL_BASE_H_INCLUDED 23 #include "oscl_base.h" 24 #endif 25 26 #ifndef OSCL_MEM_H_INCLUDED 27 #include "oscl_mem.h" 28 #endif 29 30 /** 31 * Converts the 4 byte wchar data to 2 byte data. 32 * 33 * @param dest Destination buffer pointer to receive 16 bit data 34 * @param src Source buffer pointer holding 4 byte wchar data 35 * @param nChars Length of chars need to be converted including null char 36 * @return none 37 */ 38 OSCL_IMPORT_REF void PackWChar4BytesTo2Bytes(uint8* dest, oscl_wchar* src, int nChars); 39 40 /** 41 * Converts the 2 byte wchar data to 4 byte data 42 * 43 * @param dest Destination buffer pointer to receive 4 byte data 44 * @param src Source buffer pointer holding 16 bit wchar data 45 * @param nChars Length of chars need to be converted including null char 46 * @return none 47 */ 48 OSCL_IMPORT_REF void ExpandWChar2BytesTo4Bytes(oscl_wchar* dest, uint16* src, int nChars); 49 50 #endif // WCHAR_SIZE_UTILS_H_INCLUDED 51