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 : Effect.h
21 // @ Date : 2009-05-06
36 Undetermined=1, // jk mb added this enum, so the ones below are inceremented!!!!!!!
46 struct ExtendedEffect {
48 ExtendedEffect(Effect effect = Error, RuleId ruleId = -1)
53 ExtendedEffect(const ExtendedEffect &second)
54 : m_effect(second.m_effect)
55 , m_ruleId(second.m_ruleId)
58 ExtendedEffect& operator=(const ExtendedEffect &second) {
59 m_effect = second.m_effect;
60 m_ruleId = second.m_ruleId;
64 Effect getEffect() const { return m_effect; }
66 RuleId getRuleId() const { return m_ruleId; }
73 typedef std::list<ExtendedEffect> ExtendedEffectList;
75 inline const char *toString(const ExtendedEffect &effect)
77 const char * temp = "";
79 switch (effect.getEffect()) {
84 temp = "Undetermined";
87 temp = "PromptOneShot";
90 temp = "PromptSession";
93 temp = "PromptBlanket";
99 temp = "Inapplicable";
101 case NotMatchingTarget:
102 temp = "NotMatchingTarget";