2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #include <commons/Exception.h>
20 const bool CLAMSHELL_SUPPORTED = false;
21 const bool KEYPAD_SUPPORTED = false;
24 namespace WrtPlugins {
27 Manager& Manager::getInstance()
29 static Manager instance;
36 bool Manager::hasClamshell() const
38 return CLAMSHELL_SUPPORTED;
41 Api::Device::IClamshell* Manager::getClamshell() const
43 ThrowMsg(Commons::UnsupportedException,
44 "Device is not equipped with clamshell.");
47 bool Manager::hasKeypad() const
49 return KEYPAD_SUPPORTED;
52 Api::Device::IKeypad* Manager::getKeypad() const
54 ThrowMsg(Commons::UnsupportedException,
55 "Device is not equipped with keypad.");
58 std::string Manager::getImei() const
61 return m_imei.getString();
63 Catch(Commons::ConversionException) {
64 ReThrow(Commons::PlatformException);
68 Manager::Manager() : m_imei(VCONFKEY_TELEPHONY_IMEI)