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_MEDIA_LYRICS_H_
20 #define _JS_TIZEN_MEDIA_LYRICS_H_
22 #include <JavaScriptCore/JavaScript.h>
23 #include <CommonsJavaScript/PrivateObject.h>
24 #include <API/Mediacontent/MediacontentLyrics.h>
27 using namespace TizenApis::Api::Mediacontent;
28 using namespace WrtDeviceApis::Commons;
29 using namespace WrtDeviceApis::CommonsJavaScript;
33 namespace Mediacontent {
35 typedef PrivateObject<MediacontentLyricsPtr, NoOwnership> LyricsPrivObject;
41 static const JSClassDefinition* getClassInfo();
43 static const JSClassRef getClassRef();
45 static MediacontentLyricsPtr getLyricsObject(JSObjectRef object);
50 * This member variable contains the values which has to be passed when
51 * the this class is embedded into JS Engine.
53 static JSClassDefinition m_classInfo;
56 * This structure describes a statically declared function property.
58 static JSStaticFunction m_function[];
61 * This member variable contains the initialization values for the
62 * properties of this class. The values are given according to the
63 * data structure JSPropertySpec.
65 static JSStaticValue m_property[];
67 static JSClassRef m_jsClassRef;
70 * The callback invoked when an object is first created.
72 static void initialize(JSContextRef context, JSObjectRef object);
75 * The callback invoked when an object is finalized.
77 static void finalize(JSObjectRef object);
82 * Getters and setters for properties
85 static JSValueRef getPropertyLyricsType(
88 JSStringRef propertyName,
89 JSValueRef* exception);
91 static JSValueRef getPropertyTimeStamps(
94 JSStringRef propertyName,
95 JSValueRef* exception);
97 static JSValueRef getPropertyTexts(
100 JSStringRef propertyName,
101 JSValueRef* exception);
111 #endif /* _JS_TIZEN_MEDIA_LYRICS_H_ */