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.
19 // @ Project : Access Control Engine
20 // @ File Name : Request.h
21 // @ Date : 2009-05-06
33 #include <ace-dao-ro/IRequest.h>
34 #include <ace/WRT_INTERFACE.h>
36 class Request : public AceDB::IRequest
39 typedef std::string DeviceCapability;
40 typedef std::set<DeviceCapability> DeviceCapabilitySet;
42 enum ApplicationType {
48 Request(WidgetHandle widgetHandle,
49 WidgetExecutionPhase phase,
50 IFunctionParam *functionParam = 0)
51 : m_widgetHandle(widgetHandle)
53 , m_functionParam(functionParam)
54 , m_appType(APP_TYPE_UNKNOWN)
57 WidgetHandle getWidgetHandle() const
59 return m_widgetHandle;
62 WidgetExecutionPhase getExecutionPhase() const
67 IFunctionParam *getFunctionParam() const
69 return m_functionParam;
72 void addDeviceCapability(const std::string& device)
74 m_devcapSet.insert(device);
77 DeviceCapabilitySet getDeviceCapabilitySet() const
82 void setAppType(ApplicationType appType)
87 ApplicationType getAppType() const
93 WidgetHandle m_widgetHandle;
94 WidgetExecutionPhase m_phase;
95 //! \brief list of function param (only for intercept)
96 IFunctionParam *m_functionParam;
97 //! \brief Set of defice capabilities
98 DeviceCapabilitySet m_devcapSet;
99 ApplicationType m_appType;
102 typedef std::vector <Request> Requests;