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 * @author Zbigniew Kostrzewa (z.kostrzewa@samsung.com)
20 #include <Commons/Exception.h>
21 #include "EmailAccountInfo.h"
23 namespace WrtDeviceApis {
26 EmailAccountInfo::EmailAccountInfo(int id,
27 const std::string& name,
28 const std::string& address) :
32 std::stringstream stream;
35 ThrowMsg(Commons::UnknownException,
36 "Couldn't convert e-mail account id");
41 EmailAccountInfo::EmailAccountInfo(const std::string& id,
42 const std::string& name,
43 const std::string& address) :
50 int EmailAccountInfo::getIntId() const
53 std::stringstream stream(m_id);
56 ThrowMsg(Commons::UnknownException,
57 "Couldn't convert e-mail account id");
62 std::string EmailAccountInfo::getId() const
67 std::string EmailAccountInfo::getName() const
72 std::string EmailAccountInfo::getAddress() const
77 bool EmailAccountInfo::operator==(const EmailAccountInfo& account) const
79 return (m_id == account.m_id &&
80 m_name == account.m_name &&
81 m_address == account.m_address);