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 #ifndef TIZEN_APIS_JS_CALLHISTORY_H_
19 #define TIZEN_APIS_JS_CALLHISTORY_H_
21 #include <JavaScriptCore/JavaScript.h>
22 #include <CommonsJavaScript/PrivateObject.h>
23 #include <API/Call/ICallHistory.h>
28 typedef WrtDeviceApis::CommonsJavaScript::PrivateObjectT<Api::Call::ICallHistoryPtr>::Type JSCallHistoryPriv;
33 static const JSClassDefinition* getClassInfo();
35 static const JSClassRef getClassRef();
37 static JSObjectRef createJSObject(JSContextRef context, JSObjectRef object);
39 static void initialize(JSContextRef context, JSObjectRef object);
41 static void finalize(JSObjectRef object);
43 static JSValueRef getProperty(JSContextRef context, JSObjectRef object,
44 JSStringRef propertyName, JSValueRef* exception);
46 static bool hasInstance(JSContextRef context, JSObjectRef constructor,
47 JSValueRef possibleInstance, JSValueRef* exception);
50 static JSValueRef find(JSContextRef context, JSObjectRef object,
51 JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
52 JSValueRef* exception);
54 static JSValueRef remove(JSContextRef context, JSObjectRef object,
55 JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
56 JSValueRef* exception);
58 static JSValueRef removeBatch(JSContextRef context, JSObjectRef object,
59 JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
60 JSValueRef* exception);
62 static JSValueRef removeAll(JSContextRef context, JSObjectRef object,
63 JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
64 JSValueRef* exception);
66 static JSValueRef deleteRecording(JSContextRef context, JSObjectRef object,
67 JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
68 JSValueRef* exception);
70 static JSValueRef addListener(JSContextRef context, JSObjectRef object,
71 JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
72 JSValueRef* exception);
74 static JSValueRef removeListener(JSContextRef context, JSObjectRef object,
75 JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
76 JSValueRef* exception);
78 static JSClassDefinition m_classInfo;
80 static JSStaticValue m_property[];
82 static JSStaticFunction m_function[];
84 static JSClassRef m_jsClassRef;