Beta merge 2
[profile/ivi/wrt-plugins-tizen.git] / src / standards / Tizen / Mediacontent / JSFolder.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_FOLDER_H_
19 #define _JS_TIZEN_FOLDER_H_
20
21 #include <JavaScriptCore/JavaScript.h>
22 #include <CommonsJavaScript/PrivateObject.h>
23 #include <API/Mediacontent/MediacontentFolder.h>
24
25 using namespace TizenApis::Api::Mediacontent;
26 using namespace WrtDeviceApis::Commons;
27 using namespace WrtDeviceApis::CommonsJavaScript;
28
29
30 namespace TizenApis {
31 namespace Tizen1_0 {
32 namespace Mediacontent {
33
34
35 typedef PrivateObject<MediacontentFolderPtr, NoOwnership> FolderPrivObject;
36
37 class JSFolder
38 {
39         public:
40
41         static const JSClassDefinition* getClassInfo();
42
43         static const JSClassRef getClassRef();
44
45         static MediacontentFolderPtr getFolderObject(JSObjectRef object);
46
47         private:
48         /**
49         * This member variable contains the values which has to be passed when 
50         * the this class is embedded into JS Engine.
51         */
52         static JSClassDefinition m_classInfo;
53
54         /**
55         * This structure describes a statically declared function property.
56         */
57         static JSStaticFunction m_function[];
58
59         /**
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.
63         */
64         static JSStaticValue m_property[];
65
66         static JSClassRef m_jsClassRef;
67
68         /**
69         * The callback invoked when an object is first created.
70         */
71         static void initialize(JSContextRef context, JSObjectRef object);
72
73         /**
74         * The callback invoked when an object is finalized.
75         */
76         static void finalize(JSObjectRef object);
77
78         /**
79         * Getters and setters for properties
80         */
81         static JSValueRef       getPropertyId(
82                         JSContextRef context,
83                         JSObjectRef object,
84                         JSStringRef propertyName,
85                         JSValueRef* exception);
86         static JSValueRef       getPropertyPath(
87                         JSContextRef context,
88                         JSObjectRef object,
89                         JSStringRef propertyName,
90                         JSValueRef* exception);
91
92         static JSValueRef       getPropertyName(
93                         JSContextRef context,
94                         JSObjectRef object,
95                         JSStringRef propertyName,
96                         JSValueRef* exception);
97
98         static JSValueRef       getPropertyStorageType(
99                         JSContextRef context,
100                         JSObjectRef object,
101                         JSStringRef propertyName,
102                         JSValueRef* exception);
103
104         static JSValueRef       getPropertyModifiedDate(
105                         JSContextRef context,
106                         JSObjectRef object,
107                         JSStringRef propertyName,
108                         JSValueRef* exception);
109
110         static JSValueRef       getPropertyMediaId(
111                         JSContextRef context,
112                         JSObjectRef object,
113                         JSStringRef propertyName,
114                         JSValueRef* exception);
115         
116         static JSValueRef       getPropertyEditableAttr(
117                         JSContextRef context,
118                         JSObjectRef object,
119                         JSStringRef propertyName,
120                         JSValueRef* exception);
121
122 /*      static JSValueRef       findMedia(
123                         JSContextRef context, 
124                         JSObjectRef object,
125                         JSObjectRef thisObject,
126                         size_t argumentCount,
127                         const JSValueRef arguments[],
128                         JSValueRef* exception );
129 */
130
131
132 };
133
134 }
135 }
136 }
137
138 #endif /* _JS_TIZEN_FOLDER_H_ */