summaryrefslogtreecommitdiff
path: root/mobile_src/SecureElement/JSSEReader.h
diff options
context:
space:
mode:
Diffstat (limited to 'mobile_src/SecureElement/JSSEReader.h')
-rwxr-xr-xmobile_src/SecureElement/JSSEReader.h112
1 files changed, 112 insertions, 0 deletions
diff --git a/mobile_src/SecureElement/JSSEReader.h b/mobile_src/SecureElement/JSSEReader.h
new file mode 100755
index 0000000..86eb28e
--- /dev/null
+++ b/mobile_src/SecureElement/JSSEReader.h
@@ -0,0 +1,112 @@
+//
+// Tizen Web Device API
+// 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.
+//
+
+
+
+#ifndef _JS_TIZEN_SEREADER_H_
+#define _JS_TIZEN_SEREADER_H_
+
+#include <JavaScriptCore/JavaScript.h>
+#include <CommonsJavaScript/PrivateObject.h>
+#include "ISEReader.h"
+
+namespace DeviceAPI {
+namespace SecureElement {
+
+typedef WrtDeviceApis::CommonsJavaScript::PrivateObject<ISEReaderPtr, WrtDeviceApis::CommonsJavaScript::NoOwnership> SEReaderPrivObject;
+
+class JSSEReader
+{
+public:
+
+ static const JSClassDefinition* getClassInfo();
+
+ static const JSClassRef getClassRef();
+
+ static JSObjectRef createJSObject(JSContextRef context, void *SecureElement);
+
+private:
+ /**
+ * This member variable contains the values which has to be passed when
+ * the this class is embedded into JS Engine.
+ */
+ static JSClassDefinition m_classInfo;
+
+ /**
+ * This structure describes a statically declared function property.
+ */
+ static JSStaticFunction m_function[];
+
+ /**
+ * This member variable contains the initialization values for the
+ * properties of this class. The values are given according to the
+ * data structure JSPropertySpec.
+ */
+ static JSStaticValue m_property[];
+
+ static JSClassRef m_jsClassRef;
+
+ /**
+ * The callback invoked when an object is first created.
+ */
+ static void initialize(JSContextRef context, JSObjectRef object);
+
+ /**
+ * The callback invoked when an object is finalized.
+ */
+ static void finalize(JSObjectRef object);
+
+ /**
+ * Getters for properties
+ */
+ static JSValueRef getProperty(JSContextRef context, JSObjectRef object,
+ JSStringRef propertyName, JSValueRef* exception);
+
+ /**
+ * The callback invoked when an object is used as the target of an 'instanceof' expression.
+ */
+ static bool hasInstance(JSContextRef context,
+ JSObjectRef constructor,
+ JSValueRef possibleInstance,
+ JSValueRef* exception);
+
+ static JSValueRef getName(JSContextRef context,
+ JSObjectRef object,
+ JSObjectRef thisObject,
+ size_t argumentCount,
+ const JSValueRef arguments[],
+ JSValueRef* exception);
+
+ static JSValueRef openSession(JSContextRef context,
+ JSObjectRef object,
+ JSObjectRef thisObject,
+ size_t argumentCount,
+ const JSValueRef arguments[],
+ JSValueRef* exception);
+
+ static JSValueRef closeSessions(JSContextRef context,
+ JSObjectRef object,
+ JSObjectRef thisObject,
+ size_t argumentCount,
+ const JSValueRef arguments[],
+ JSValueRef* exception);
+};
+
+}
+}
+
+#endif /* _JS_TIZEN_SEREADER_H_ */