2 * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @author Grzegorz Krawczyk (g.krawczyk@samgsung.com)
23 #ifndef _WRT_PLUGINS_COMMON_PLUGIN_API_SUPPORT_OBJECT_H_
24 #define _WRT_PLUGINS_COMMON_PLUGIN_API_SUPPORT_OBJECT_H_
30 #include <dpl/optional.h>
32 namespace WrtPluginsApi {
34 typedef std::shared_ptr<Object> ObjectPtr;
38 DPL::Optional<bool> overlayedMode;
40 typedef std::shared_ptr<ObjectOption> ObjectOptionPtr;
42 class Object : public IObject
45 Object(const char* name,
47 IObjectType type = IObjectType::Object);
49 Object(const char* name,
51 const char* parentName = IObject::WINDOW_OBJECT(),
52 IObjectType type = IObjectType::Object);
54 Object(const char* name,
55 ClassRef interfaceRef,
56 const char* interfaceName,
57 ClassRef constructorRef,
58 const char* parentName = IObject::WINDOW_OBJECT(),
59 IObjectType type = IObjectType::Object);
63 void AddChild(const IObjectPtr&);
65 void setBoolOption(IObjectOption option, bool value);
67 IObjectsListPtr GetChildren() const;
69 ClassRef GetClass() const;
72 * Available only for object with type InterfaceInstance
74 ClassRef GetClassConstructor() const;
76 const char* GetInterfaceName() const;
78 const char* GetName() const;
80 IObjectType GetType() const;
82 const char* GetParentName() const;
84 ObjectOptionPtr GetOptions() const;
90 const char* m_parentName;
94 ClassRef m_interfaceRef;
95 const char* m_interfaceName;
96 ClassRef m_constructorRef;
98 ObjectOptionPtr m_options;
100 IObjectsListPtr m_children;