Apply unique_ptr on Text
[platform/framework/native/appfw.git] / src / text / FText_GsmEncodingCore.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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 express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file                FText_GsmEncodingCore.h
19  * @brief               This is the header file for the _GsmEncodingCore class.
20  */
21
22 #ifndef _FTEXT_INTERNAL_GSM_ENCODING_CORE_H_
23 #define _FTEXT_INTERNAL_GSM_ENCODING_CORE_H_
24
25 #include <FBase.h>
26 #include "FText_EncodingCore.h"
27
28
29 namespace Tizen { namespace Text
30 {
31
32 class _GsmEncodingCore
33         : public _EncodingCore
34 {
35 public:
36         _GsmEncodingCore(void);
37         ~_GsmEncodingCore(void);
38
39         static _EncodingCore* GetEncodingCoreImplN(const Tizen::Base::String& encodingFrom, const Tizen::Base::String& encodingTo);
40         virtual result GetAvailableEncodingsN(Tizen::Base::Collection::IList* pEncodingList);
41
42         virtual result GetByteCount(const wchar_t* pSrc, int srcLength, int& retLength);
43         virtual result GetCharCount(const byte* pSrc, int srcLength, int& retLength);
44
45         virtual byte* EncodeN(const wchar_t* pSrc, int srcLength, int& retLength);
46         virtual wchar_t* DecodeN(const byte* pSrc, int srcLength, int& retLength);
47
48         virtual int GetMaxByteCount(int charCount) const;
49         virtual int GetMaxCharCount(int byteCount) const;
50
51         virtual Tizen::Base::String GetName(void);
52
53 }; // _GsmEncodingCore
54
55
56 } } // Tizen::Text
57
58
59 #endif