1 //******************************************************************
3 // Copyright 2016 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 #ifndef SM_REMOTE_SCENECOLLECTION_H_
22 #define SM_REMOTE_SCENECOLLECTION_H_
29 #include "RemoteScene.h"
30 #include "RCSRemoteResourceObject.h"
37 class SceneCollectionResourceRequestor;
39 class RemoteSceneCollection
42 typedef std::shared_ptr< RemoteSceneCollection > Ptr;
44 typedef std::function< void(RemoteScene::Ptr, int) >
47 typedef std::function< void(int eCode) >
50 typedef std::function< void(int eCode) >
55 ~RemoteSceneCollection() = default;
57 void addNewScene(const std::string &name, AddNewSceneCallback);
58 void removeScene(const std::string &name, RemoveSceneCallback);
60 std::map< const std::string, RemoteScene::Ptr > getRemoteScenes() const;
61 RemoteScene::Ptr getRemoteScene(const std::string &sceneName) const;
63 void setName(const std::string &name, SetNameCallback);
64 std::string getName() const;
66 std::string getId() const;
71 (std::shared_ptr< SceneCollectionResourceRequestor > pRequestor,
72 const std::string &id, const std::string &name);
74 void initializeRemoteSceneCollection(const std::vector< RCSRepresentation > &,
77 RemoteScene::Ptr createRemoteSceneInstance(const std::string &);
79 void onSceneAddedRemoved(const int &reqType, const std::string &name, int eCode,
80 const AddNewSceneCallback &, const RemoveSceneCallback &);
82 void onNameSet(int, const std::string &, const SetNameCallback &);
88 std::map< const std::string, RemoteScene::Ptr > m_remoteScenes;
90 std::shared_ptr< SceneCollectionResourceRequestor > m_requestorPtr;
92 friend class RemoteSceneList;
98 #endif /* SM_REMOTE_SCENECOLLECTION_H_ */