Add DRAFT stubs for Vehicle plugin
[profile/ivi/wrt-plugins-tizen.git] / src / standards / Tizen / Mediacontent / JSMedia.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  
19 #ifndef _JS_TIZEN_MEDIA_H_
20 #define _JS_TIZEN_MEDIA_H_
21
22 #include <JavaScriptCore/JavaScript.h>
23 #include <CommonsJavaScript/PrivateObject.h>
24 #include <API/Mediacontent/MediacontentMedia.h>
25
26
27 using namespace TizenApis::Api::Mediacontent;
28 using namespace WrtDeviceApis::Commons;
29 using namespace WrtDeviceApis::CommonsJavaScript;
30
31 namespace TizenApis {
32 namespace Tizen1_0 {
33 namespace Mediacontent {
34
35 typedef PrivateObject<Api::Mediacontent::MediacontentMediaPtr, NoOwnership> MediaPrivObject;
36
37 class JSMedia
38 {
39         public:
40
41         static const JSClassDefinition* getClassInfo();
42
43         static const JSClassRef getClassRef();
44
45         static Api::Mediacontent::MediacontentMediaPtr getMediaObject(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
80         /**
81         * Getters and setters for properties
82         */
83         static JSValueRef       getPropertyId(
84                                                 JSContextRef context,
85                                                 JSObjectRef object,
86                                                 JSStringRef propertyName,
87                                                 JSValueRef* exception);
88
89         static JSValueRef       getPropertyType(
90                                                 JSContextRef context,
91                                                 JSObjectRef object,
92                                                 JSStringRef propertyName,
93                                                 JSValueRef* exception);
94
95         static JSValueRef       getPropertyMimeType(
96                                                 JSContextRef context,
97                                                 JSObjectRef object,
98                                                 JSStringRef propertyName,
99                                                 JSValueRef* exception);
100         
101         static JSValueRef       getPropertyDisplayName(
102                                                 JSContextRef context,
103                                                 JSObjectRef object,
104                                                 JSStringRef propertyName,
105                                                 JSValueRef* exception);
106
107         static JSValueRef       getPropertyFilePath(
108                                                 JSContextRef context,
109                                                 JSObjectRef object,
110                                                 JSStringRef propertyName,
111                                                 JSValueRef* exception);
112
113         static JSValueRef   getPropertyDescription(
114                                                 JSContextRef context,
115                                                 JSObjectRef object, 
116                                                 JSStringRef propertyName, 
117                                                 JSValueRef* exception);
118
119         static JSValueRef       getPropertyThumbnailPath(
120                                                 JSContextRef context,
121                                                 JSObjectRef object,
122                                                 JSStringRef propertyName,
123                                                 JSValueRef* exception);
124
125         static JSValueRef       getPropertyReleasedDate(
126                                                 JSContextRef context,
127                                                 JSObjectRef object,
128                                                 JSStringRef propertyName,
129                                                 JSValueRef* exception);
130
131         static JSValueRef       getPropertyModifiedDate(
132                                                 JSContextRef context,
133                                                 JSObjectRef object,
134                                                 JSStringRef propertyName,
135                                                 JSValueRef* exception);
136
137         static JSValueRef       getPropertyRating(
138                                                 JSContextRef context,
139                                                 JSObjectRef object,
140                                                 JSStringRef propertyName,
141                                                 JSValueRef* exception);  
142
143         static JSValueRef getPropertySize(
144                                                 JSContextRef context,
145                                                 JSObjectRef object,
146                                                 JSStringRef propertyName,
147                                                 JSValueRef* exception);
148
149         
150         static JSValueRef       getPropertyEditableAttr(
151                                                 JSContextRef context,
152                                                 JSObjectRef object,
153                                                 JSStringRef propertyName,
154                                                 JSValueRef* exception);
155                                         
156         static bool                     setPropertyRating(
157                                                 JSContextRef context,
158                                                 JSObjectRef object,
159                                                 JSStringRef propertyName,
160                                     JSValueRef value,
161                                                 JSValueRef* exception);  
162
163         static bool                     setPropertyDisplayName(
164                                                 JSContextRef context,
165                                                 JSObjectRef object,
166                                                 JSStringRef propertyName,
167                                     JSValueRef value,
168                                                 JSValueRef* exception); 
169
170         static bool                     setPropertyDescription(
171                                                 JSContextRef context,
172                                                 JSObjectRef object,
173                                                 JSStringRef propertyName,
174                                     JSValueRef value,
175                                                 JSValueRef* exception);  
176         
177  
178 };
179
180 }
181 }
182 }
183
184 #endif /* _JS_TIZEN_MEDIA_H_ */