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.
19 #ifndef _JS_TIZEN_MEDIACONTENT_H_
20 #define _JS_TIZEN_MEDIACONTENT_H_
24 #include <JavaScriptCore/JavaScript.h>
25 #include <CommonsJavaScript/PrivateObject.h>
26 #include <CommonsJavaScript/JSCallbackManager.h>
27 #include <API/Mediacontent/IMediacontent.h>
29 using namespace TizenApis::Api::Mediacontent;
30 using namespace WrtDeviceApis::Commons;
31 using namespace WrtDeviceApis::CommonsJavaScript;
35 namespace Mediacontent {
38 typedef PrivateObject<IMediacontentPtr, NoOwnership> MediacontentPrivObject;
44 static const JSClassDefinition* getClassInfo();
46 static const JSClassRef getClassRef();
48 static IMediacontentPtr getMediacontentObject(
50 const JSObjectRef object,
51 JSValueRef* exception);
55 * This member variable contains the values which has to be passed
56 * when the this class is embedded into JS Engine.
58 static JSClassDefinition m_classInfo;
61 * This structure describes a statically declared function property.
63 static JSStaticFunction m_function[];
66 * This member variable contains the initialization values for the
67 * properties of this class. The values are given according to
68 * the data structure JSPropertySpec
70 static JSStaticValue m_property[];
72 static JSClassRef m_jsClassRef;
75 * The callback invoked when an object is first created.
77 static void initialize(JSContextRef context, JSObjectRef object);
80 * The callback invoked when an object is finalized.
82 static void finalize(JSObjectRef object);
84 static JSValueRef findMedia(
87 JSObjectRef thisObject,
89 const JSValueRef arguments[],
90 JSValueRef* exception);
92 static JSValueRef findFolders(
95 JSObjectRef thisObject,
97 const JSValueRef arguments[],
98 JSValueRef* exception);
100 static JSValueRef updateItem(
101 JSContextRef context,
103 JSObjectRef thisObject,
104 size_t argumentCount,
105 const JSValueRef arguments[],
106 JSValueRef* exception);
109 static JSValueRef findPlaylist(
110 JSContextRef context,
112 JSObjectRef thisObject,
113 size_t argumentCount,
114 const JSValueRef arguments[],
115 JSValueRef* exception );
118 static JSValueRef addPlaylist(
119 JSContextRef context,
121 JSObjectRef thisObject,
122 size_t argumentCount,
123 const JSValueRef arguments[],
124 JSValueRef* exception);
126 static JSValueRef deletePlaylist(
127 JSContextRef context,
129 JSObjectRef thisObject,
130 size_t argumentCount,
131 const JSValueRef arguments[],
132 JSValueRef* exception);
134 static JSValueRef addAudioToPlaylist(
135 JSContextRef context,
137 JSObjectRef thisObject,
138 size_t argumentCount,
139 const JSValueRef arguments[],
140 JSValueRef* exception);
142 static JSValueRef deleteAudioToPlaylist(
143 JSContextRef context,
145 JSObjectRef thisObject,
146 size_t argumentCount,
147 const JSValueRef arguments[],
148 JSValueRef* exception);
157 #endif /* _JS_TIZEN_MEDIACONTENT_H_ */