+/*
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * @file webkit_csp_support_mock.h
+ * @author Andrzej Surdej (a.surdej@samsung.com)
+ * @brief Mock file for webkit csp api. File will be removed.
+ */
+
+#ifndef WRT_SRC_API_NEW_WEBKIT_CSP_SUPPORT_H
+#define WRT_SRC_API_NEW_WEBKIT_CSP_SUPPORT_H
+
+#include <EWebKit2.h>
+#include <dpl/log/log.h>
+#include <WebKit2/WKString.h>
+
+enum Algorithm {
+ INTERSECTION = 0, // only entries existing in both directives are used
+ SUM, // a sum of both directives is used
+ OVERWRITE, // applied directive overwrites existing one
+ IGNORE // ignore provided policy
+};
+
+typedef struct _CSP_Rules{
+ Algorithm default_src; //algorithm used to combine default-src
+ Algorithm other_src; //algorithm used to merge rest of policy
+ Algorithm sandbox; //algorithm used to merge sandbox policy
+ bool allow_unsafe; //are unsafe directives alloved
+}CSP_Rules;
+
+/*
+ * The function is used to parse and merge given policy with existing one. The lifetime * of such policy is equal to the lifetime of the context. For report-uri the latest
+ * existing directive is used. It also used to set http/meta csp combining algorithm.
+ * @param context – the context for which the policy is applied
+ * @param policy – applied policy in form of a string
+ * @param CSP_Rules *local – defines CSP apply rules to combine default or manifest
+ * defined policy
+ * @param CSP_Rules *http_meta– defines CSP apply rules to combine http header csp
+ * poicy. If NULL provided use default algorithm - INTERSECTION.
+ * @return – error code returned if policy is malformed or some other argument is
+ * invalid
+ *
+ */
+int apply_csp(Ewk_Context* context, WKStringRef policy, CSP_Rules *local, CSP_Rules *http_meta)
+{
+ LogDebug("Setting csp policy");
+ return 0;
+}
+
+#endif /* WRT_SRC_API_NEW_WEBKIT_CSP_SUPPORT_H */
+