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 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
24 * This file contains the declaration of classes and its members related to SceneListResrouceObject
27 #ifndef SCENE_LIST_RESOURCE_OBJECT_H
28 #define SCENE_LIST_RESOURCE_OBJECT_H
32 #include "RCSResourceObject.h"
33 #include "SceneCollectionResource.h"
34 #include "SceneCommons.h"
40 class SceneListResource
44 * Returns Scene List Resource object as single instance.
46 static SceneListResource * getInstance();
49 * Add Scene Collection resource object to Scene List Resource.
51 * @param collectionObj created Scene Collection Resource Object by constructor of SceneCollectionResourceObject class
53 void addSceneCollectionResource(SceneCollectionResource::Ptr collectionObj);
56 * Returns Scene List name.
58 std::string getName() const;
61 * Sets Scene List name.
63 * @param name name to set
65 void setName(std::string && name);
70 void setName(const std::string &);
73 * Returns all of Scene Collection Resource object.
75 const std::vector<SceneCollectionResource::Ptr> getSceneCollections();
78 class SceneListRequestHandler
81 SceneListRequestHandler() = default;
82 ~SceneListRequestHandler() = default;
84 static RCSSetResponse onSetRequest(const RCSRequest &, RCSResourceAttributes &);
87 std::string m_SceneListName;
88 RCSResourceObject::Ptr m_SceneListObj;
89 SceneListRequestHandler m_RequestHandler;
90 std::mutex m_SceneCollectionLock;
91 std::vector<SceneCollectionResource::Ptr> m_SceneCollections;
94 ~SceneListResource() = default;
96 SceneListResource(const SceneListResource &) = delete;
97 SceneListResource & operator = (const SceneListResource &) = delete;
99 SceneListResource(SceneListResource &&) = delete;
100 SceneListResource && operator = (SceneListResource &&) = delete;
106 #endif // SCENE_LIST_RESOURCE_OBJECT_H