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
36 typedef std::shared_ptr<Object> ObjectPtr;
40 DPL::Optional<bool> overlayedMode;
42 typedef std::shared_ptr<ObjectOption> ObjectOptionPtr;
45 class Object : public IObject
48 Object(const char* name,
50 IObjectType type = IObjectType::Object);
52 Object(const char* name,
54 const char* parentName = IObject::WINDOW_OBJECT(),
55 IObjectType type = IObjectType::Object);
57 Object(const char* name,
58 ClassRef interfaceRef,
59 const char* interfaceName,
60 ClassRef constructorRef,
61 const char* parentName = IObject::WINDOW_OBJECT(),
62 IObjectType type = IObjectType::Object);
66 void AddChild(const IObjectPtr& );
68 void setBoolOption(IObjectOption option, bool value);
70 IObjectsListPtr GetChildren() const ;
72 ClassRef GetClass() const;
75 * Available only for object with type InterfaceInstance
77 ClassRef GetClassConstructor() const;
79 const char* GetInterfaceName() const;
81 const char* GetName() const;
83 IObjectType GetType() const;
85 const char* GetParentName() const;
87 ObjectOptionPtr GetOptions() const;
93 const char* m_parentName;
97 ClassRef m_interfaceRef;
98 const char* m_interfaceName;
99 ClassRef m_constructorRef;
101 ObjectOptionPtr m_options;
103 IObjectsListPtr m_children;