2 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
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.
22 #include "notification-ex/item_info_internal.h"
28 #define LOG_TAG "NOTIFICATION_EX"
31 namespace notification {
34 AbstractItem::Impl::ItemInfo::ItemInfo(AbstractItem::Impl* impl) : impl_(impl) {
36 int AbstractItem::Impl::ItemInfo::GetUid() const {
40 void AbstractItem::Impl::ItemInfo::SetUid(int uid) {
44 time_t AbstractItem::Impl::ItemInfo::GetTime() const {
48 void AbstractItem::Impl::ItemInfo::SetTime(time_t time) {
52 int AbstractItem::Impl::ItemInfo::GetVersion() const {
53 return impl_->version_;
56 void AbstractItem::Impl::ItemInfo::SetVersion(int ver) {
57 impl_->version_ = ver;
60 void AbstractItem::Impl::ItemInfo::SetHideTime(int hide_time) {
61 impl_->hide_time_ = hide_time;
64 int AbstractItem::Impl::ItemInfo::GetHideTime() const {
65 return impl_->hide_time_;
68 void AbstractItem::Impl::ItemInfo::SetDeleteTime(int delete_time) {
69 impl_->delete_time_ = delete_time;
72 int AbstractItem::Impl::ItemInfo::GetDeleteTime() const {
73 return impl_->delete_time_;
76 void AbstractItem::Impl::ItemInfo::AddHideViewer(std::string appid) {
77 if (find(impl_->hide_viewer_list_.begin(),
78 impl_->hide_viewer_list_.end(), appid) !=
79 impl_->hide_viewer_list_.end()) {
82 impl_->hide_viewer_list_.push_back(appid);
85 std::list<std::string> AbstractItem::Impl::ItemInfo::GetHideViewerList() const {
86 return impl_->hide_viewer_list_;
90 } // namespace notification