2 * Copyright (c) 2015 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 #ifndef NOTIFICATION_NOTIFICATION_MANAGER_H_
18 #define NOTIFICATION_NOTIFICATION_MANAGER_H_
20 #include <notification.h>
22 #include "common/picojson.h"
23 #include "common/platform_result.h"
26 namespace notification {
28 typedef std::map<notification_block_state_e, std::string> BlockStateEnumMap;
30 class NotificationManager {
32 static const BlockStateEnumMap block_state_map_;
34 static NotificationManager* GetInstance();
36 common::PlatformResult Post(const picojson::object& args, picojson::object& out);
37 common::PlatformResult PostUserNoti(const picojson::object& args, picojson::object& out);
38 common::PlatformResult Update(const picojson::object& args);
39 common::PlatformResult UpdateUserNoti(const picojson::object& args);
40 common::PlatformResult Remove(const picojson::object& args);
41 common::PlatformResult RemoveAll();
42 common::PlatformResult Get(const picojson::object& args, picojson::object& out,
43 bool is_new_impl = false);
44 common::PlatformResult GetAll(picojson::array& out, bool is_new_impl = false);
45 common::PlatformResult GetBlockState(picojson::value& out);
47 common::PlatformResult PlayLEDCustomEffect(const picojson::object& args);
48 common::PlatformResult StopLEDCustomEffect();
50 // TODO needed also below functions for new design?
51 common::PlatformResult SaveTemplate(const picojson::object& args);
52 common::PlatformResult CreateFromTemplate(const picojson::object& args, picojson::object& out);
55 NotificationManager();
56 virtual ~NotificationManager();
59 } // namespace notification
60 } // namespace extension
62 #endif /* NOTIFICATION_NOTIFICATION_MANAGER_H_ */