Update change log and spec for wrt-plugins-tizen_0.4.46
[platform/framework/web/wrt-plugins-tizen.git] / src / Callhistory / JSCallHistory.h
1 //
2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18
19 #ifndef TIZEN_APIS_JS_CALLHISTORY_H_
20 #define TIZEN_APIS_JS_CALLHISTORY_H_
21
22 #include <JavaScriptCore/JavaScript.h>
23 #include <CommonsJavaScript/PrivateObject.h>
24 #include "ICallHistory.h"
25
26 namespace DeviceAPI {
27 namespace CallHistory {
28
29 typedef WrtDeviceApis::CommonsJavaScript::PrivateObjectT<ICallHistoryPtr>::Type JSCallHistoryPriv;
30
31 class JSCallHistory
32 {
33 public:
34         static const JSClassDefinition* getClassInfo();
35
36         static const JSClassRef getClassRef();
37
38         static JSObjectRef createJSObject(JSContextRef context, JSObjectRef object);
39 private:
40         static void initialize(JSContextRef context, JSObjectRef object);
41
42         static void finalize(JSObjectRef object);
43
44         static JSValueRef getProperty(JSContextRef context, JSObjectRef object,
45                         JSStringRef propertyName, JSValueRef* exception);
46
47         static bool hasInstance(JSContextRef context, JSObjectRef constructor,
48                         JSValueRef possibleInstance, JSValueRef* exception);
49
50
51         static JSValueRef find(JSContextRef context, JSObjectRef object,
52                         JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
53                         JSValueRef* exception);
54
55         static JSValueRef remove(JSContextRef context, JSObjectRef object,
56                         JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
57                         JSValueRef* exception);
58
59         static JSValueRef removeBatch(JSContextRef context, JSObjectRef object,
60                         JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
61                         JSValueRef* exception);
62
63         static JSValueRef removeAll(JSContextRef context, JSObjectRef object,
64                         JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
65                         JSValueRef* exception);
66
67         static JSValueRef addChangeListener(JSContextRef context, JSObjectRef object,
68                         JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
69                         JSValueRef* exception);
70
71         static JSValueRef removeChangeListener(JSContextRef context, JSObjectRef object,
72                         JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
73                         JSValueRef* exception);
74
75         static JSClassDefinition m_classInfo;
76
77         static JSStaticValue m_property[];
78
79         static JSStaticFunction m_function[];
80
81         static JSClassRef m_jsClassRef;
82
83 };
84
85 }
86 }
87
88 #endif
89