2 * Copyright (c) 2011 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.
16 #ifndef _WRT_INERFACE_4_ACE_EXAMPLE_H_
17 #define _WRT_INERFACE_4_ACE_EXAMPLE_H_
23 #include <dpl/ace-dao-ro/wrt_db_types.h>
27 enum WidgetExecutionPhase
29 WidgetExecutionPhase_Unknown = 0,
30 WidgetExecutionPhase_WidgetInstall = 1 << 0,
31 WidgetExecutionPhase_WidgetInstantiate = 1 << 1,
32 WidgetExecutionPhase_WebkitBind = 1 << 2,
33 WidgetExecutionPhase_Invoke = 1 << 3
38 const WidgetHandle Handle;
39 WidgetExecutionPhase Phase;
41 RequestContext(WidgetHandle handle,
42 WidgetExecutionPhase phase) :
49 // Pair of pointer to attribute name and pointer to list of value for
50 // this attribute name
51 typedef std::pair< const std::string* const, std::list<std::string>* >
55 * Each function should return 0 as success and positive value as error
57 * Possible return value:
59 * 1 - subjectId/resourceId name unknown
60 * 2 - unknown attribute name
64 /************** Web Runtime ********************/
71 * gather and set attributes values for specified subjectId
73 * @param subjectId is a name of subject (widget or internet site URI )
74 * @param attributes is a list of pairs(
75 * first: pointer to attribute name
76 * second: list of values for attribute (std::string) -
77 * its a list of string (BONDI requirement), but usually there will
80 virtual int getAttributesValues(const Request &request,
81 std::list<ATTRIBUTE> *attributes) = 0;
83 /*return current sessionId */
84 virtual std::string getSessionId(const Request &request) = 0;
86 virtual ~IWebRuntime()
91 /************** Resource Information ********************/
92 class IResourceInformation
96 * gather and set attributes values for specified resourceId
98 * @param resourceId is a name of subject (widget or internet site URI )
99 * @param attributes is a list of pairs(
100 * first: pointer to attribute name
101 * second: list of values for attribute (std::string) -
102 * its a list of string (BONDI requirement), but usually there will
105 virtual int getAttributesValues(const Request &request,
106 std::list<ATTRIBUTE> *attributes) = 0;
108 virtual ~IResourceInformation()
113 /************** Operation System ********************/
114 class IOperationSystem
119 * gather and set attributes values for specified attribute name
120 * @param attributes is a list of pairs(
121 * first: pointer to attribute name
122 * second: list of values for attribute (std::string) -
123 * its a list of string (BONDI requirement), but usually
124 * there will be only one string
126 virtual int getAttributesValues(const Request &request,
127 std::list<ATTRIBUTE> *attributes) = 0;
129 virtual ~IOperationSystem()
137 virtual int getAttributesValues(const Request &request,
138 std::list<ATTRIBUTE> *attributes) = 0;
139 virtual ~IFunctionParam()
144 #endif //_WRT_INERFACE_4_ACE_EXAMPLE_H_