summaryrefslogtreecommitdiff
path: root/src/controls/js-bridge-plugin-tizen/FWebCtrl_JsBridgePlugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/controls/js-bridge-plugin-tizen/FWebCtrl_JsBridgePlugin.h')
-rw-r--r--src/controls/js-bridge-plugin-tizen/FWebCtrl_JsBridgePlugin.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/controls/js-bridge-plugin-tizen/FWebCtrl_JsBridgePlugin.h b/src/controls/js-bridge-plugin-tizen/FWebCtrl_JsBridgePlugin.h
new file mode 100644
index 0000000..3f037c0
--- /dev/null
+++ b/src/controls/js-bridge-plugin-tizen/FWebCtrl_JsBridgePlugin.h
@@ -0,0 +1,68 @@
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// 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 FWebCtrl_JsBridgePlugin.h
+ * @brief The file contains the implmentation of npapi plugin callbacks.
+ *
+ * The file contains the implmentation of npapi plugin callbacks.
+ */
+
+#ifndef FWEBCTRL_JSBRIDGEPLUGIN_H_
+#define FWEBCTRL_JSBRIDGEPLUGIN_H_
+
+#include <NPAPI/npapi.h>
+#include <NPAPI/npfunctions.h>
+#include <FOspConfig.h>
+
+static NPNetscapeFuncs* g_pBrowserFuncs = NULL;
+static NPIdentifier requestToNativeScriptPlayer = NULL;
+
+typedef struct _RuntimeObject
+{
+ NPObject object;
+ NPP instance;
+} RuntimeObject;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+_OSP_EXPORT_ NPError NP_Initialize(NPNetscapeFuncs* pBrowserFuncs, NPPluginFuncs* pFuncs);
+_OSP_EXPORT_ NPError NP_Shutdown(void);
+_OSP_EXPORT_ char* NP_GetMIMEDescription(void);
+_OSP_EXPORT_ NPError NP_GetValue(void* pFuture, NPPVariable variable, void* pValue);
+
+NPError Plugin_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData * saved);
+NPError Plugin_Destroy(NPP instance, NPSavedData** save);
+NPError Plugin_SetWindow(NPP instance, NPWindow* window);
+NPError Plugin_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype);
+NPError Plugin_DestroyStream(NPP instance, NPStream* stream, NPReason reason);
+
+int32_t Plugin_WriteReady(NPP instance, NPStream* stream);
+int32_t Plugin_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer);
+void Plugin_StreamAsFile(NPP instance, NPStream* stream, const char* fname);
+void Plugin_Print(NPP instance, NPPrint* platformPrint);
+int16_t Plugin_HandleEvent(NPP instance, void* event);
+void Plugin_URLNotify(NPP instance, const char* URL, NPReason reason, void* notifyData);
+NPError Plugin_GetValue(NPP instance, NPPVariable variable, void* value);
+NPError Plugin_SetValue(NPP instance, NPNVariable variable, void* value);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // FWEBCTRL_JSBRIDGEPLUGIN_H_