2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FText_Ucs2EncodingCore.h
20 * @brief This is the header file for the _Ucs2EncodingCore class.
23 #ifndef _FTEXT_INTERNAL_UCS2_ENCODING_CORE_H_
24 #define _FTEXT_INTERNAL_UCS2_ENCODING_CORE_H_
27 #include "FText_EncodingCore.h"
30 namespace Tizen { namespace Text
47 class _Ucs2EncodingCore
48 : public _EncodingCore
51 _Ucs2EncodingCore(void);
52 ~_Ucs2EncodingCore(void);
54 static _EncodingCore* GetEncodingCoreImplN(const Tizen::Base::String& encodingFrom, const Tizen::Base::String& encodingTo);
55 virtual result GetAvailableEncodingsN(Tizen::Base::Collection::IList* pEncodingList);
57 virtual result GetByteCount(const wchar_t* pSrc, int srcLength, int& retLength);
58 virtual result GetCharCount(const byte* pSrc, int srcLength, int& retLength);
60 virtual byte* EncodeN(const wchar_t* pSrc, int srcLength, int& retLength);
61 virtual wchar_t* DecodeN(const byte* pSrc, int srcLength, int& retLength);
63 virtual int GetMaxByteCount(int charCount) const;
64 virtual int GetMaxCharCount(int byteCount) const;
66 virtual Tizen::Base::String GetName(void);
69 Ucs2EncodingType __encodingType;
70 Ucs2BomType __bomType;
71 Tizen::Base::String __encodingName;
73 }; // _Ucs2EncodingCore
79 #endif //_FTEXT_INTERNAL_UCS2_ENCODING_CORE_H_