Beta merge 2
[profile/ivi/wrt-plugins-tizen.git] / src / standards / Tizen / Call / JSCallManager.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 TIZENAPIS_TIZEN_JS_CALLMANAGER_H_
19 #define TIZENAPIS_TIZEN_JS_CALLMANAGER_H_
20
21 #include <JavaScriptCore/JavaScript.h>
22 #include <CommonsJavaScript/PrivateObject.h>
23 #include <API/Call/ICallManager.h>
24
25 namespace TizenApis {
26 namespace Tizen1_0 {
27
28 typedef WrtDeviceApis::CommonsJavaScript::PrivateObjectT<Api::Call::ICallManagerPtr>::Type JSCallManagerPriv;
29
30 class JSCallManager
31 {
32 public:
33         static const JSClassDefinition* getClassInfo();
34
35         static const JSClassRef getClassRef();
36
37 private:
38         /**
39         * The callback invoked when an object is first created.
40         */
41         static void initialize(JSContextRef context, JSObjectRef object);
42
43         /**
44         * The callback invoked when an object is finalized.
45         */
46         static void finalize(JSObjectRef object);
47
48         /**
49          * The callback invoked when getting a property's value.
50          */
51         static JSValueRef getProperty(JSContextRef context, JSObjectRef object,
52                         JSStringRef propertyName, JSValueRef* exception);
53
54         /**
55         * The callback invoked when an object is used as the target of an 'instanceof' expression.
56         */
57         static bool hasInstance(JSContextRef context, JSObjectRef constructor,
58                         JSValueRef possibleInstance, JSValueRef* exception);
59
60         /**
61         * Tell whether is there is a call going on.
62         */
63         static JSValueRef isCallInProgress(JSContextRef context, JSObjectRef object,
64                         JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
65                         JSValueRef* exception);
66
67         /**
68         * Get call services, with account, call provider, and capabilities.
69         */
70         static JSValueRef getCallServices(JSContextRef context, JSObjectRef object,
71                         JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[],
72                         JSValueRef* exception);
73         
74         /**
75         * This structure contains properties and callbacks that define a type of object.
76         */
77         static JSClassDefinition m_classInfo;
78
79         /**
80          * This structure describes a statically declared value property.
81          */
82         static JSStaticValue m_property[];
83
84         /**
85         * This structure describes a statically declared function property.
86         */
87         static JSStaticFunction m_function[];
88
89         static JSClassRef m_jsClassRef;
90
91 };
92
93
94
95
96 #endif
97