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 std::vector<SceneCollectionResource::Ptr> getSceneCollections() const;
77 std::vector<RCSResourceAttributes> getChildrenAttributes() const;
79 RCSResourceObject::Ptr getResourceObject() const;
82 class SceneListRequestHandler
85 SceneListRequestHandler() = default;
86 ~SceneListRequestHandler() = default;
88 static RCSSetResponse onSetRequest(const RCSRequest &, RCSResourceAttributes &);
89 static RCSGetResponse onGetRequest(const RCSRequest &, RCSResourceAttributes &);
92 RCSResourceObject::Ptr m_sceneListObj;
93 mutable std::mutex m_sceneCollectionLock;
94 std::vector<SceneCollectionResource::Ptr> m_sceneCollections;
97 ~SceneListResource() = default;
99 SceneListResource(const SceneListResource &) = delete;
100 SceneListResource & operator = (const SceneListResource &) = delete;
102 SceneListResource(SceneListResource &&) = delete;
103 SceneListResource & operator = (SceneListResource &&) = delete;
105 RCSResourceObject::Ptr createResourceObject();
110 #endif // SCENE_LIST_RESOURCE_OBJECT_H