From: Markus Jung Date: Thu, 16 Jul 2015 00:20:08 +0000 (+0900) Subject: Add missing public headers of the resource container API X-Git-Tag: 1.2.0+RC1~1430^2~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64ca44484344a0cdb5d4b7194d719f990e661a85;p=platform%2Fupstream%2Fiotivity.git Add missing public headers of the resource container API Change-Id: I54bf4c3dc228ebb1cf9c5c811bb8e1369cc90549 Signed-off-by: Markus Jung Reviewed-on: https://gerrit.iotivity.org/gerrit/1685 Tested-by: jenkins-iotivity Reviewed-by: Uze Choi Reviewed-by: Hun-je Yeon --- diff --git a/service/resource-manipulation/include/BundleInfo.h b/service/resource-manipulation/include/BundleInfo.h new file mode 100644 index 0000000..fba9a08 --- /dev/null +++ b/service/resource-manipulation/include/BundleInfo.h @@ -0,0 +1,57 @@ +//****************************************************************** +// +// Copyright 2015 Samsung Electronics All Rights Reserved. +// +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +#ifndef BUNDLEINFO_H_ +#define BUNDLEINFO_H_ + +#include + +using namespace std; + +namespace OIC +{ + namespace Service + { + /* + * Describes a bundle with resources, that can be loaded dynamically. + */ + class BundleInfo + { + public: + BundleInfo(); + virtual ~BundleInfo(); + virtual void setID(string name) = 0; + virtual string getID() = 0; + virtual void setPath(string path) = 0; + virtual string getPath() = 0; + virtual void setActivatorName(string activator) = 0; + virtual string getActivatorName() = 0; + virtual void setLibraryPath(string libpath) = 0; + virtual string getLibraryPath() = 0; + virtual void setVersion(string version) = 0; + virtual string getVersion() = 0; + static BundleInfo* build(); + protected: + string m_ID, m_path, m_version; + }; + } +} + +#endif /* BUNDLEINFO_H_ */ diff --git a/service/resource-manipulation/include/ResourceContainer.h b/service/resource-manipulation/include/ResourceContainer.h new file mode 100644 index 0000000..5636d39 --- /dev/null +++ b/service/resource-manipulation/include/ResourceContainer.h @@ -0,0 +1,66 @@ +//****************************************************************** +// +// Copyright 2015 Samsung Electronics All Rights Reserved. +// +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +#ifndef RESOURCECONTAINER_H_ +#define RESOURCECONTAINER_H_ + +#include +#include +#include +#include +#include + +#include "BundleInfo.h" + +using namespace std; + +namespace OIC +{ + namespace Service + { + class ResourceContainer + { + public: + ResourceContainer(); + virtual ~ResourceContainer(); + //virtual void initializeResourceContainer() = 0; + virtual void startContainer(string configFile) = 0; + virtual void stopContainer() = 0; + + // list of bundle ids + virtual std::list listBundles() = 0; + virtual void startBundle(string bundleId) = 0; + virtual void stopBundle(string bundleId) = 0; + + // dynamic configuration + virtual void addBundle(string bundleId, string bundleUri, string bundlePath, std::map params) =0; + virtual void removeBundle(string bundleId) = 0; + + virtual void addResourceConfig(string bundleId, string resourceUri, std::map params) = 0; + virtual void removeResourceConfig(string bundleId, string resourceUri) = 0; + + virtual std::list listBundleResources(string bundleId) = 0; + + static ResourceContainer *getInstance(); + }; + } +} + +#endif /* RESOURCECONTAINER_H_ */