Beta merge 2
[profile/ivi/wrt-plugins-tizen.git] / src / standards / Tizen / Mediacontent / JSMediacontent.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_MEDIACONTENT_H_
20 #define _JS_TIZEN_MEDIACONTENT_H_
21
22 #include <vector>
23 #include <string>
24 #include <JavaScriptCore/JavaScript.h>
25 #include <CommonsJavaScript/PrivateObject.h>
26 #include <CommonsJavaScript/JSCallbackManager.h>
27 #include <API/Mediacontent/IMediacontent.h>
28
29 using namespace TizenApis::Api::Mediacontent;
30 using namespace WrtDeviceApis::Commons;
31 using namespace WrtDeviceApis::CommonsJavaScript;
32
33 namespace TizenApis {
34 namespace Tizen1_0 {
35 namespace Mediacontent {
36
37
38 typedef PrivateObject<IMediacontentPtr, NoOwnership> MediacontentPrivObject;
39
40 class JSMediacontent
41 {
42         public:
43
44         static const JSClassDefinition* getClassInfo();
45
46         static const JSClassRef getClassRef();
47
48         static IMediacontentPtr getMediacontentObject(
49                         JSContextRef ctx,
50                         const JSObjectRef object,
51                         JSValueRef* exception);
52
53         private:
54         /**
55         * This member variable contains the values which has to be passed
56         * when the this class is embedded into JS Engine.
57         */
58         static JSClassDefinition m_classInfo;
59
60         /**
61         * This structure describes a statically declared function property.
62         */
63         static JSStaticFunction m_function[];
64
65         /**
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
69         */
70         static JSStaticValue m_property[];
71
72         static JSClassRef m_jsClassRef;
73
74         /**
75         * The callback invoked when an object is first created.
76         */
77         static void initialize(JSContextRef context, JSObjectRef object);
78
79         /**
80         * The callback invoked when an object is finalized.
81         */
82         static void finalize(JSObjectRef object);
83
84         static JSValueRef findMedia(
85                         JSContextRef context, 
86                         JSObjectRef object,
87                         JSObjectRef thisObject, 
88                         size_t argumentCount,
89                         const JSValueRef arguments[], 
90                         JSValueRef* exception);
91
92         static JSValueRef findFolders(
93                         JSContextRef context, 
94                         JSObjectRef object,
95                         JSObjectRef thisObject, 
96                         size_t argumentCount,
97                         const JSValueRef arguments[], 
98                         JSValueRef* exception);
99
100         static JSValueRef updateItem(
101                         JSContextRef context,
102                         JSObjectRef object,
103                         JSObjectRef thisObject,
104                         size_t argumentCount,
105                         const JSValueRef arguments[],
106                         JSValueRef* exception);
107         
108 /*
109         static JSValueRef findPlaylist(
110                         JSContextRef context,
111                         JSObjectRef object,
112                         JSObjectRef thisObject,
113                         size_t argumentCount,
114                         const JSValueRef arguments[],
115                         JSValueRef* exception );
116
117
118     static JSValueRef addPlaylist(
119                         JSContextRef context,
120             JSObjectRef object,
121             JSObjectRef thisObject,
122             size_t argumentCount,
123             const JSValueRef arguments[],
124             JSValueRef* exception);
125
126         static JSValueRef deletePlaylist(
127                         JSContextRef context,
128                         JSObjectRef object,
129                         JSObjectRef thisObject,
130                         size_t argumentCount,
131                         const JSValueRef arguments[],
132                         JSValueRef* exception);
133
134         static JSValueRef addAudioToPlaylist(
135                         JSContextRef context,
136                         JSObjectRef object,
137                         JSObjectRef thisObject,
138                         size_t argumentCount,
139                         const JSValueRef arguments[],
140                         JSValueRef* exception);
141
142         static JSValueRef deleteAudioToPlaylist(
143                         JSContextRef context,
144                         JSObjectRef object,
145                         JSObjectRef thisObject,
146                         size_t argumentCount,
147                         const JSValueRef arguments[],
148                         JSValueRef* exception); 
149
150 */
151 };
152
153 }
154 }
155 }
156
157 #endif /* _JS_TIZEN_MEDIACONTENT_H_ */
158