1 //******************************************************************
3 // Copyright 2015 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 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21 #include "BundleResource.h"
22 #include "Configuration.h"
30 BundleResource::BundleResource()
32 m_pNotiReceiver = nullptr;
35 BundleResource::~BundleResource()
37 m_pNotiReceiver = nullptr;
40 void BundleResource::registerObserver(NotificationReceiver *pNotiReceiver)
42 m_pNotiReceiver = pNotiReceiver;
45 std::list< string > BundleResource::getAttributeNames()
47 std::list< string > ret;
48 for (RCSResourceAttributes::iterator it = m_resourceAttributes.begin();
49 it != m_resourceAttributes.end(); ++it)
51 ret.push_back(it->key());
56 RCSResourceAttributes &BundleResource::getAttributes()
58 return m_resourceAttributes;
61 void BundleResource::setAttribute(std::string key, RCSResourceAttributes::Value &&value)
63 m_resourceAttributes[key] = value;
66 RCSResourceAttributes::Value BundleResource::getAttribute(const std::string &key)
68 cout << "Bundle resource get attribute " << m_resourceAttributes.at(key).toString() << "|" << endl;
69 return m_resourceAttributes.at(key);