Fixed a defect of GsmEncoding
[platform/framework/native/appfw.git] / src / text / FText_GsmEncodingCore.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17
18 /**
19  * @file                FText_GsmEncodingCore.h
20  * @brief               This is the header file for the _GsmEncodingCore class.
21  */
22
23 #ifndef _FTEXT_INTERNAL_GSM_ENCODING_CORE_H_
24 #define _FTEXT_INTERNAL_GSM_ENCODING_CORE_H_
25
26 #include <FBase.h>
27 #include "FText_EncodingCore.h"
28
29
30 namespace Tizen { namespace Text
31 {
32
33 class _GsmEncodingCore
34         : public _EncodingCore
35 {
36 public:
37         _GsmEncodingCore(void);
38         ~_GsmEncodingCore(void);
39
40         static _EncodingCore* GetEncodingCoreImplN(const Tizen::Base::String& encodingFrom, const Tizen::Base::String& encodingTo);
41         virtual result GetAvailableEncodingsN(Tizen::Base::Collection::IList* pEncodingList);
42
43         virtual result GetByteCount(const wchar_t* pSrc, int srcLength, int& retLength);
44         virtual result GetCharCount(const byte* pSrc, int srcLength, int& retLength);
45
46         virtual byte* EncodeN(const wchar_t* pSrc, int srcLength, int& retLength);
47         virtual wchar_t* DecodeN(const byte* pSrc, int srcLength, int& retLength);
48
49         virtual int GetMaxByteCount(int charCount) const;
50         virtual int GetMaxCharCount(int byteCount) const;
51
52         virtual Tizen::Base::String GetName(void);
53
54 }; // _GsmEncodingCore
55
56
57 } } // Tizen::Text
58
59
60 #endif