1 /******************************************************************
3 * Copyright 2015 Samsung Electronics All Rights Reserved.
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 ******************************************************************/
22 * @file simulator_collection_resource.h
24 * @brief This file provides a class and API to access simulated collection resource.
27 #ifndef SIMULATOR_COLLECTION_RESOURCE_H_
28 #define SIMULATOR_COLLECTION_RESOURCE_H_
30 #include "simulator_resource.h"
33 * @class SimulatorCollectionResource
34 * @brief This class provides a set of APIs for handling simulated collection resource.
36 class SimulatorCollectionResource : public SimulatorResource
41 * API to get list of resources types which collection supports.
43 * @return List of supported resources types.
45 virtual std::vector<std::string> getSupportedResources() = 0;
48 * API to add a child resource to collection.
50 * @param resource - SimulatorResource shared object.
52 virtual void addChildResource(const std::shared_ptr<SimulatorResource> &resource) = 0;
55 * API to remove a child resource from collection.
57 * @param resource - SimulatorResource shared object.
59 virtual void removeChildResource(const std::shared_ptr<SimulatorResource> &resource) = 0;
62 * API to remove a child resource from collection.
64 * @param uri - URI of child resource to be removed.
66 virtual void removeChildResource(const std::string &uri) = 0;
69 * API to get child resources of collection.
71 * @return List of child resources of collection.
73 virtual std::vector<SimulatorResourceSP> getChildResources() = 0;
76 typedef std::shared_ptr<SimulatorCollectionResource> SimulatorCollectionResourceSP;