2 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
4 * Copyright (C) 2004-2007 Apple Inc. All rights reserved.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
23 #ifndef WMLPageState_h
24 #define WMLPageState_h
27 #include <wtf/Forward.h>
28 #include <wtf/HashMap.h>
29 #include <wtf/text/StringHash.h>
36 typedef HashMap<String, String> WMLVariableMap;
41 virtual ~WMLPageState();
47 // Reset the browser context
51 void storeVariable(const String& name, const String& value) { m_variables.set(name, value); }
52 void storeVariables(WMLVariableMap& variables) { m_variables = variables; }
53 String getVariable(const String& name) const { return m_variables.get(name); }
54 bool hasVariables() const { return !m_variables.isEmpty(); }
56 Page* page() const { return m_page; }
58 // Deck access control
59 bool processAccessControlData(const String& dmain, const String& path);
60 void resetAccessControlData();
62 bool canAccessDeck() const;
65 bool hostIsAllowedToAccess(const String&) const;
66 bool pathIsAllowedToAccess(const String&) const;
70 WMLVariableMap m_variables;
71 String m_accessDomain;
73 bool m_hasAccessControlData;