summaryrefslogtreecommitdiff
path: root/src/standards/Tizen/Contact/JSAddressBookArray.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/standards/Tizen/Contact/JSAddressBookArray.h')
-rwxr-xr-xsrc/standards/Tizen/Contact/JSAddressBookArray.h182
1 files changed, 182 insertions, 0 deletions
diff --git a/src/standards/Tizen/Contact/JSAddressBookArray.h b/src/standards/Tizen/Contact/JSAddressBookArray.h
new file mode 100755
index 0000000..3c635b9
--- /dev/null
+++ b/src/standards/Tizen/Contact/JSAddressBookArray.h
@@ -0,0 +1,182 @@
+/*
+ * Copyright (c) 2011 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 JSAddressBookArray.h
+ * @author Kisub Song (kisubs.song@samsung.com)
+ * @version 0.1
+ * @brief
+ */
+
+#ifndef _TIZEN_CONTACT_JS_ADDRESS_BOOK_ARRAY_H_
+#define _TIZEN_CONTACT_JS_ADDRESS_BOOK_ARRAY_H_
+
+#include <JavaScriptCore/JavaScript.h>
+#include <CommonsJavaScript/PrivateObject.h>
+#include <API/Contact/IAddressBook.h>
+
+namespace TizenApis {
+namespace Tizen1_0 {
+namespace Contact {
+
+typedef WrtDeviceApis::CommonsJavaScript::PrivateObjectT<TizenApis::Api::Contact::IAddressBookArrayPtr>::Type JSAddressBookArrayPriv;
+
+class JSAddressBookArray
+{
+public:
+
+ static const JSClassDefinition* getClassInfo();
+
+ static JSClassRef getClassRef();
+
+ static JSObjectRef createArray(JSContextRef context,
+ const TizenApis::Api::Contact::IAddressBookArrayPtr &anniversaries);
+
+ static bool isObjectOfClass(JSContextRef context, JSValueRef value);
+
+ static TizenApis::Api::Contact::IAddressBookArrayPtr getAddressBookArray(JSContextRef context, JSValueRef value);
+
+private:
+
+ /**
+ * 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);
+
+ static JSValueRef getLength(JSContextRef context,
+ JSObjectRef object,
+ JSStringRef propertyName,
+ JSValueRef* exception);
+
+ static bool hasProperty(JSContextRef context,
+ JSObjectRef object,
+ JSStringRef propertyName);
+
+ static JSValueRef getProperty(JSContextRef context,
+ JSObjectRef object,
+ JSStringRef propertyName,
+ JSValueRef* exception);
+
+ static bool setProperty(JSContextRef context,
+ JSObjectRef object,
+ JSStringRef propertyName,
+ JSValueRef value,
+ JSValueRef* exception);
+
+ static JSValueRef concat(JSContextRef context,
+ JSObjectRef function,
+ JSObjectRef thisObject,
+ size_t argumentCount,
+ const JSValueRef arguments[],
+ JSValueRef* exception);
+ static JSValueRef join(JSContextRef context,
+ JSObjectRef function,
+ JSObjectRef thisObject,
+ size_t argumentCount,
+ const JSValueRef arguments[],
+ JSValueRef* exception);
+ static JSValueRef pop(JSContextRef context,
+ JSObjectRef function,
+ JSObjectRef thisObject,
+ size_t argumentCount,
+ const JSValueRef arguments[],
+ JSValueRef* exception);
+ static JSValueRef push(JSContextRef context,
+ JSObjectRef function,
+ JSObjectRef thisObject,
+ size_t argumentCount,
+ const JSValueRef arguments[],
+ JSValueRef* exception);
+ static JSValueRef reverse(JSContextRef context,
+ JSObjectRef function,
+ JSObjectRef thisObject,
+ size_t argumentCount,
+ const JSValueRef arguments[],
+ JSValueRef* exception);
+ static JSValueRef shift(JSContextRef context,
+ JSObjectRef function,
+ JSObjectRef thisObject,
+ size_t argumentCount,
+ const JSValueRef arguments[],
+ JSValueRef* exception);
+ static JSValueRef slice(JSContextRef context,
+ JSObjectRef function,
+ JSObjectRef thisObject,
+ size_t argumentCount,
+ const JSValueRef arguments[],
+ JSValueRef* exception);
+ static JSValueRef sort(JSContextRef context,
+ JSObjectRef function,
+ JSObjectRef thisObject,
+ size_t argumentCount,
+ const JSValueRef arguments[],
+ JSValueRef* exception);
+ static JSValueRef splice(JSContextRef context,
+ JSObjectRef function,
+ JSObjectRef thisObject,
+ size_t argumentCount,
+ const JSValueRef arguments[],
+ JSValueRef* exception);
+ static JSValueRef toString(JSContextRef context,
+ JSObjectRef function,
+ JSObjectRef thisObject,
+ size_t argumentCount,
+ const JSValueRef arguments[],
+ JSValueRef* exception);
+ static JSValueRef unshift(JSContextRef context,
+ JSObjectRef function,
+ JSObjectRef thisObject,
+ size_t argumentCount,
+ const JSValueRef arguments[],
+ JSValueRef* exception);
+ static JSValueRef valueOf(JSContextRef context,
+ JSObjectRef function,
+ JSObjectRef thisObject,
+ size_t argumentCount,
+ const JSValueRef arguments[],
+ JSValueRef* exception);
+
+ static bool checkValue(const std::string &value);
+
+ static JSClassRef m_jsClassRef;
+ /**
+ * This structure describes a statically declared function property.
+ */
+ static JSStaticFunction m_function[];
+
+ /**
+ * This structure contains properties and callbacks that define a type of object.
+ */
+ static JSClassDefinition m_classInfo;
+
+ /**
+ * This member variable contains the initialization values for the static properties of this class.
+ * The values are given according to the data structure JSPropertySpec
+ */
+ static JSStaticValue m_property[];
+};
+
+} // Contact
+} // Tizen1_0
+} // TizenApis
+
+#endif // _TIZEN_CONTACT_JS_ADDRESS_BOOK_ARRAY_H_