1 //******************************************************************
3 // Copyright 2017 Samsung Electronics All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://www.apache.org/licenses/LICENSE-2.0
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
25 * This file provides C++ APIs for Notification Service for Accepted Providers.
28 #ifndef _NS_ACCEPTED_PROVIDERS_H_
29 #define _NS_ACCEPTED_PROVIDERS_H_
34 #include "NSProvider.h"
42 * @class NSAcceptedProviders
43 * @brief This class provides a set of C++APIs for managing accepted Providers.
45 class NSAcceptedProviders
49 * Constructor of NSAcceptedProviders.
58 * Destructor of NSAcceptedProviders.
60 ~NSAcceptedProviders()
66 * request to get NSProvider pointer
67 * @param id -id as string
69 * @return shared pointer to NSProvider
71 std::shared_ptr<NSProvider> getProvider(const std::string &id);
74 * request to add NSProvider pointer
75 * @param shared pointer to NSProvider
78 void addProvider(std::shared_ptr<NSProvider> provider);
81 * request to remove NSProvider
82 * @param id -id as string
85 void removeProvider(const std::string &id);
88 * request to check if NSProvider is accepted
89 * @param id -id as string
91 * @return true if accepted else false
93 bool isAccepted(const std::string &id);
96 * get size of providers accepted.
97 * @return m_providers size
102 * request to remove all NSProviders
104 void removeProviders();
107 * get the map of providers accepted.
108 * @return m_providers -map of accepted providers
110 std::map<std::string, std::shared_ptr<NSProvider> > getProviders();
113 std::map<std::string, std::shared_ptr<NSProvider> > m_providers;
119 #endif //_NS_ACCEPTED_PROVIDERS_H_