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_FOLDER_H_
19 #define _JS_TIZEN_FOLDER_H_
21 #include <JavaScriptCore/JavaScript.h>
22 #include <CommonsJavaScript/PrivateObject.h>
23 #include <API/Mediacontent/MediacontentFolder.h>
25 using namespace TizenApis::Api::Mediacontent;
26 using namespace WrtDeviceApis::Commons;
27 using namespace WrtDeviceApis::CommonsJavaScript;
32 namespace Mediacontent {
35 typedef PrivateObject<MediacontentFolderPtr, NoOwnership> FolderPrivObject;
41 static const JSClassDefinition* getClassInfo();
43 static const JSClassRef getClassRef();
45 static MediacontentFolderPtr getFolderObject(JSObjectRef object);
49 * This member variable contains the values which has to be passed when
50 * the this class is embedded into JS Engine.
52 static JSClassDefinition m_classInfo;
55 * This structure describes a statically declared function property.
57 static JSStaticFunction m_function[];
60 * This member variable contains the initialization values for the
61 * properties of this class. The values are given according to the
62 * data structure JSPropertySpec.
64 static JSStaticValue m_property[];
66 static JSClassRef m_jsClassRef;
69 * The callback invoked when an object is first created.
71 static void initialize(JSContextRef context, JSObjectRef object);
74 * The callback invoked when an object is finalized.
76 static void finalize(JSObjectRef object);
79 * Getters and setters for properties
81 static JSValueRef getPropertyId(
84 JSStringRef propertyName,
85 JSValueRef* exception);
87 static JSValueRef getPropertyPath(
90 JSStringRef propertyName,
91 JSValueRef* exception);
93 static JSValueRef getPropertyName(
96 JSStringRef propertyName,
97 JSValueRef* exception);
99 static JSValueRef getPropertyStorageType(
100 JSContextRef context,
102 JSStringRef propertyName,
103 JSValueRef* exception);
105 static JSValueRef getPropertyModifiedDate(
106 JSContextRef context,
108 JSStringRef propertyName,
109 JSValueRef* exception);
111 static JSValueRef getPropertyMediaId(
112 JSContextRef context,
114 JSStringRef propertyName,
115 JSValueRef* exception);
117 static JSValueRef getPropertyEditableAttr(
118 JSContextRef context,
120 JSStringRef propertyName,
121 JSValueRef* exception);
129 #endif /* _JS_TIZEN_FOLDER_H_ */