2 // Open Service Platform
\r
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
\r
5 // Licensed under the Apache License, Version 2.0 (the License);
\r
6 // you may not use this file except in compliance with the License.
\r
7 // You may obtain a copy of the License at
\r
9 // http://www.apache.org/licenses/LICENSE-2.0
\r
11 // Unless required by applicable law or agreed to in writing, software
\r
12 // distributed under the License is distributed on an "AS IS" BASIS,
\r
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
14 // See the License for the specific language governing permissions and
\r
15 // limitations under the License.
\r
19 * @file FUiImeInputMethodInfo.cpp
\r
20 * @brief This is the implementation file for the %InputMethodInfo class.
\r
22 * This implementation file contains definition of the %InputMethodInfo class.
\r
25 #include <FBaseSysLog.h>
\r
26 #include <FUiImeInputMethodInfo.h>
\r
28 #include <FSec_AccessController.h>
\r
29 #include "FUiIme_InputMethodInfoImpl.h"
\r
31 using namespace Tizen::Security;
\r
33 namespace Tizen { namespace Ui { namespace Ime {
\r
35 InputMethodInfo::InputMethodInfo(void)
\r
37 result r = E_SUCCESS;
\r
39 __pInputMethodInfoImpl = _InputMethodInfoImpl::CreateInputMethodInfoImplN();
\r
40 r = GetLastResult();
\r
41 SysTryReturnVoidResult(NID_UI_IME, __pInputMethodInfoImpl, r, "[%s] Propagating.", GetErrorMessage(r));
\r
46 InputMethodInfo::~InputMethodInfo(void)
\r
48 delete __pInputMethodInfoImpl;
\r
49 __pInputMethodInfoImpl = null;
\r
52 InputMethodInfo::InputMethodInfo(const InputMethodInfo& info)
\r
54 result r = E_SUCCESS;
\r
56 __pInputMethodInfoImpl = _InputMethodInfoImpl::CreateInputMethodInfoImplN(*(info.__pInputMethodInfoImpl));
\r
57 r = GetLastResult();
\r
58 SysTryReturnVoidResult(NID_UI_IME, __pInputMethodInfoImpl, r, "[%s] Propagating.", GetErrorMessage(r));
\r
64 InputMethodInfo::operator=(const InputMethodInfo& info)
\r
66 *__pInputMethodInfoImpl = *(info.__pInputMethodInfoImpl);
\r
72 InputMethodInfo::Equals(const Object& object) const
\r
74 const InputMethodInfo* pInputMethodInfo = static_cast<const InputMethodInfo*>(&object);
\r
75 SysTryReturn(NID_UI_IME, pInputMethodInfo, false, E_INVALID_ARG, "Invalid argument(s) is used. The object is not the InputMethodInfo.");
\r
77 return __pInputMethodInfoImpl->Equals(*(pInputMethodInfo->__pInputMethodInfoImpl));
\r
81 InputMethodInfo::GetAppId(void) const
\r
83 result r = E_SUCCESS;
\r
85 r = _AccessController::CheckUserPrivilege(_PRV_IMEMANAGER);
\r
86 SysTryReturn(NID_UI_IME, r == E_SUCCESS, "", E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
\r
88 return __pInputMethodInfoImpl->GetAppId();
\r
91 const Tizen::Base::Collection::IList*
\r
92 InputMethodInfo::GetLanguageList(void) const
\r
94 result r = E_SUCCESS;
\r
96 r = _AccessController::CheckUserPrivilege(_PRV_IMEMANAGER);
\r
97 SysTryReturn(NID_UI_IME, r == E_SUCCESS, null, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
\r
99 return __pInputMethodInfoImpl->GetLanguageList();
\r
102 Tizen::Base::String
\r
103 InputMethodInfo::GetName(void) const
\r
105 result r = E_SUCCESS;
\r
107 r = _AccessController::CheckUserPrivilege(_PRV_IMEMANAGER);
\r
108 SysTryReturn(NID_UI_IME, r == E_SUCCESS, "", E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
\r
110 return __pInputMethodInfoImpl->GetName();
\r
113 }}} // Tizen::Ui::Ime
\r