Beta merge 2
[profile/ivi/wrt-plugins-tizen.git] / src / standards / Tizen / Call / JSCallHistory.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17
18 #ifndef TIZEN_APIS_JS_CALLHISTORY_H_
19 #define TIZEN_APIS_JS_CALLHISTORY_H_
20
21 #include <JavaScriptCore/JavaScript.h>
22 #include <CommonsJavaScript/PrivateObject.h>
23 #include <API/Call/ICallHistory.h>
24
25 namespace TizenApis {
26 namespace Tizen1_0 {
27
28 typedef WrtDeviceApis::CommonsJavaScript::PrivateObjectT<Api::Call::ICallHistoryPtr>::Type JSCallHistoryPriv;
29
30 class JSCallHistory
31 {
32 public:
33         static const JSClassDefinition* getClassInfo();
34
35         static const JSClassRef getClassRef();
36
37         static JSObjectRef createJSObject(JSContextRef context, JSObjectRef object);
38 private:
39         static void initialize(JSContextRef context, JSObjectRef object);
40
41         static void finalize(JSObjectRef object);
42
43         static JSValueRef getProperty(JSContextRef context, JSObjectRef object,
44                         JSStringRef propertyName, JSValueRef* exception);
45
46         static bool hasInstance(JSContextRef context, JSObjectRef constructor,
47                         JSValueRef possibleInstance, JSValueRef* exception);
48
49
50         static JSValueRef find(JSContextRef context, JSObjectRef object,
51                         JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
52                         JSValueRef* exception);
53
54         static JSValueRef remove(JSContextRef context, JSObjectRef object,
55                         JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
56                         JSValueRef* exception);
57
58         static JSValueRef removeBatch(JSContextRef context, JSObjectRef object,
59                         JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
60                         JSValueRef* exception);
61
62         static JSValueRef removeAll(JSContextRef context, JSObjectRef object,
63                         JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
64                         JSValueRef* exception);
65
66         static JSValueRef deleteRecording(JSContextRef context, JSObjectRef object,
67                         JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
68                         JSValueRef* exception);
69
70         static JSValueRef addListener(JSContextRef context, JSObjectRef object,
71                         JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
72                         JSValueRef* exception);
73
74         static JSValueRef removeListener(JSContextRef context, JSObjectRef object,
75                         JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
76                         JSValueRef* exception);
77
78         static JSClassDefinition m_classInfo;
79
80         static JSStaticValue m_property[];
81
82         static JSStaticFunction m_function[];
83
84         static JSClassRef m_jsClassRef;
85
86 };
87
88 }
89 }
90
91 #endif
92