Lines Matching refs:srcLength

240 int TextCoder::Utf8ToGsm7bit(uint8_t *dest, int maxLength, const uint8_t *src, int srcLength, MSG_L…  in Utf8ToGsm7bit()  argument
242 if (srcLength == -1 && src) { in Utf8ToGsm7bit()
244 srcLength = strlen(reinterpret_cast<const gchar *>(src)); in Utf8ToGsm7bit()
246 if (srcLength <= 0 || src == nullptr || dest == nullptr || maxLength <= 0) { in Utf8ToGsm7bit()
251 int maxUcs2Length = srcLength; in Utf8ToGsm7bit()
267 TELEPHONY_LOGI("srcLength = %{public}d", srcLength); in Utf8ToGsm7bit()
268 … Utf8ToUcs2(reinterpret_cast<uint8_t *>(pUcs2Text), maxUcs2Length * sizeof(WCHAR), src, srcLength); in Utf8ToGsm7bit()
272 int TextCoder::Utf8ToUcs2(uint8_t *dest, int maxLength, const uint8_t *src, int srcLength) in Utf8ToUcs2() argument
274 if (srcLength == -1 && src) { in Utf8ToUcs2()
276 srcLength = strlen(reinterpret_cast<gchar *>(const_cast<uint8_t *>(src))); in Utf8ToUcs2()
278 if (srcLength <= 0 || src == nullptr || dest == nullptr || maxLength <= 0) { in Utf8ToUcs2()
283 gsize textLen = static_cast<gsize>(srcLength); in Utf8ToUcs2()
296 int TextCoder::GsmUtf8ToAuto(uint8_t *dest, int maxLength, const uint8_t *src, int srcLength, in GsmUtf8ToAuto() argument
299 int maxUcs2Length = srcLength; in GsmUtf8ToAuto()
314 … Utf8ToUcs2(reinterpret_cast<uint8_t *>(pUcs2Text), maxUcs2Length * sizeof(WCHAR), src, srcLength); in GsmUtf8ToAuto()
318 tempTextLen = (srcLength > maxLength) ? maxLength : srcLength; in GsmUtf8ToAuto()
343 int TextCoder::CdmaUtf8ToAuto(uint8_t *dest, int maxLength, const uint8_t *src, int srcLength, Data… in CdmaUtf8ToAuto() argument
345 int maxUcs2Length = srcLength; in CdmaUtf8ToAuto()
360 … Utf8ToUcs2(reinterpret_cast<uint8_t *>(pUcs2Text), maxUcs2Length * sizeof(WCHAR), src, srcLength); in CdmaUtf8ToAuto()
364 tempTextLen = (srcLength > maxLength) ? maxLength : srcLength; in CdmaUtf8ToAuto()
394 uint8_t *dest, int maxLength, const uint8_t *src, int srcLength, const MsgLangInfo &langInfo) in Gsm7bitToUtf8() argument
396 int maxUcs2Length = srcLength; in Gsm7bitToUtf8()
411 TELEPHONY_LOGI("max dest Length = %{public}d, srcLength = %{public}d", maxLength, srcLength); in Gsm7bitToUtf8()
413 …2(reinterpret_cast<uint8_t *>(pUcs2Text), maxUcs2Length * sizeof(WCHAR), src, srcLength, langInfo); in Gsm7bitToUtf8()
429 int TextCoder::Ucs2ToUtf8(uint8_t *dest, int maxLength, const uint8_t *src, int srcLength) in Ucs2ToUtf8() argument
431 if (srcLength == -1 && src) { in Ucs2ToUtf8()
434 srcLength = strlen(reinterpret_cast<gchar *>(const_cast<uint8_t *>(src))); in Ucs2ToUtf8()
436 if (srcLength <= 0 || src == nullptr || dest == nullptr || maxLength <= 0) { in Ucs2ToUtf8()
441 gsize textLen = static_cast<gsize>(srcLength); in Ucs2ToUtf8()
460 int TextCoder::EuckrToUtf8(uint8_t *dest, int maxLength, const uint8_t *src, int srcLength) in EuckrToUtf8() argument
462 if (srcLength == -1 && src) { in EuckrToUtf8()
464 srcLength = strlen(reinterpret_cast<gchar *>(const_cast<uint8_t *>(src))); in EuckrToUtf8()
466 if (srcLength <= 0 || src == nullptr || dest == nullptr || maxLength <= 0) { in EuckrToUtf8()
472 gsize textLen = static_cast<gsize>(srcLength); in EuckrToUtf8()
491 int TextCoder::ShiftjisToUtf8(uint8_t *dest, int maxLength, const uint8_t *src, int srcLength) const in ShiftjisToUtf8()
493 if (srcLength == -1 && src) { in ShiftjisToUtf8()
495 srcLength = strlen(reinterpret_cast<gchar *>(const_cast<uint8_t *>(src))); in ShiftjisToUtf8()
497 if (srcLength <= 0 || src == nullptr || dest == nullptr || maxLength <= 0) { in ShiftjisToUtf8()
502 gsize textLen = static_cast<gsize>(srcLength); in ShiftjisToUtf8()
520 int TextCoder::Ucs2ToGsm7bit(uint8_t *dest, int maxLength, const uint8_t *src, int srcLength, MSG_L… in Ucs2ToGsm7bit() argument
522 if (srcLength <= 0 || src == nullptr || dest == nullptr || maxLength <= 0) { in Ucs2ToGsm7bit()
529 uint8_t currType = GetLangType(src, srcLength); in Ucs2ToGsm7bit()
531 for (int index = 0; index < (srcLength - 1); index += UCS2_LEN_MIN) { in Ucs2ToGsm7bit()
596 int TextCoder::Ucs2ToGsm7bitAuto(uint8_t *dest, int maxLength, const uint8_t *src, int srcLength, in Ucs2ToGsm7bitAuto() argument
599 if (srcLength <= 0 || src == nullptr || dest == nullptr || maxLength <= 0) { in Ucs2ToGsm7bitAuto()
609 for (int i = 0; i < srcLength - 1; i += UCS2_LEN_MIN) { in Ucs2ToGsm7bitAuto()
638 int TextCoder::Ucs2ToAscii(uint8_t *dest, int maxLength, const uint8_t *src, int srcLength, bool &u… in Ucs2ToAscii() argument
640 if (srcLength <= 0 || src == nullptr || dest == nullptr || maxLength <= 0) { in Ucs2ToAscii()
649 for (int index = 0; index < srcLength - 1; index += UCS2_LEN_MIN) { in Ucs2ToAscii()
668 uint8_t TextCoder::GetLangType(const uint8_t *src, int srcLength) in GetLangType() argument
670 if (srcLength <= 0 || src == nullptr) { in GetLangType()
679 for (int index = 0; index < (srcLength - 1); index += UCS2_LEN_MIN) { in GetLangType()
801 uint8_t *dest, int maxLength, const uint8_t *src, int srcLength, const MsgLangInfo &langInfo) in Gsm7bitToUcs2() argument
803 if (srcLength == 0 || src == nullptr || dest == nullptr || maxLength <= 0) { in Gsm7bitToUcs2()
812 for (int i = 0; i < srcLength && maxLength > UCS2_LEN_MIN; i++) { in Gsm7bitToUcs2()
820 i += EscapeTurkishLockingToUcs2(&src[i], (srcLength - i), langInfo, result); in Gsm7bitToUcs2()
824 i += EscapePortuLockingToUcs2(&src[i], (srcLength - i), langInfo, result); in Gsm7bitToUcs2()
829 i += EscapeGsm7bitToUcs2(&src[i], (srcLength - i), langInfo, result); in Gsm7bitToUcs2()