2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @file JSContactManager.h
19 * @author Kisub Song (kisubs.song@samsung.com)
24 #ifndef _TIZEN_CONTACT_JS_CONTACT_MANAGER_H_
25 #define _TIZEN_CONTACT_JS_CONTACT_MANAGER_H_
27 #include <JavaScriptCore/JavaScript.h>
28 #include <CommonsJavaScript/PrivateObject.h>
29 #include <API/Contact/IContactManager.h>
35 class JSContactManager
38 static const JSClassDefinition* getClassInfo();
41 * This method initializes this in the JS Engine.
43 static JSClassRef getClassRef();
47 * The callback invoked when an object is first created.
49 static void Initialize(JSContextRef context,
53 * The callback invoked when an object is finalized.
55 static void Finalize(JSObjectRef object);
58 * Getter for const properties
60 static JSValueRef getConstProperty(JSContextRef context,
62 JSStringRef jsPropertyName,
63 JSValueRef* exception);
68 static JSValueRef getAddressBooks(JSContextRef context,
70 JSObjectRef thisObject,
72 const JSValueRef arguments[],
73 JSValueRef* exception);
76 * Get Default Address Books.
78 static JSValueRef getDefaultAddressBook(JSContextRef context,
80 JSObjectRef thisObject,
82 const JSValueRef arguments[],
83 JSValueRef* exception);
86 * This structure describes a statically declared value property.
88 static JSStaticValue m_property[];
91 * This structure describes a statically declared function property.
93 static JSStaticFunction m_function[];
96 * This structure contains properties and callbacks that define a type of object.
98 static JSClassDefinition m_classInfo;
100 static JSClassRef m_classRef;
107 #endif //_TIZEN_CONTACT_JS_CONTACT_MANAGER_H_