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