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 _JS_TIZEN_MEDIACONTENT_H_
19 #define _JS_TIZEN_MEDIACONTENT_H_
21 #include <JavaScriptCore/JavaScript.h>
22 #include <CommonsJavaScript/PrivateObject.h>
23 #include <API/Mediacontent/IMediacontentManager.h>
26 using namespace TizenApis::Api::Mediacontent;
27 using namespace WrtDeviceApis::Commons;
28 using namespace WrtDeviceApis::CommonsJavaScript;
33 namespace Mediacontent {
35 typedef PrivateObject<IMediacontentManagerPtr, NoOwnership> MediacontentManagerPrivObject;
38 class JSMediacontentManager
42 static const JSClassDefinition* getClassInfo();
43 static const JSClassRef getClassRef();
47 static JSValueRef getMediacontent(
50 JSObjectRef thisObject,
52 const JSValueRef arguments[],
53 JSValueRef* exception);
54 static IMediacontentManagerPtr getIMediacontentManager(
56 const JSObjectRef object,
57 JSValueRef* exception);
61 * The callback invoked when an object is first created.
63 static void initialize(JSContextRef context, JSObjectRef object);
66 * The callback invoked when an object is finalized.
68 static void finalize(JSObjectRef object);
73 * The callback invoked when getting a property's value.
75 static JSValueRef getProperty(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);
78 * The callback invoked when an object is used as the target of an 'instanceof' expression.
80 static bool hasInstance(JSContextRef context, JSObjectRef constructor, JSValueRef possibleInstance, JSValueRef* exception);
83 * This structure contains properties and callbacks that define a type of object.
85 static JSClassDefinition m_classInfo;
86 static JSStaticFunction m_function[];
89 * This structure describes a statically declared value property.
91 static JSStaticValue m_property[];
93 static JSClassRef m_jsClassRef;
100 #endif //_JS_TIZEN_MEDIACONTENT_H_