2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 #ifndef TIZENAPIS_TIZEN_JSFILESYSTEMMANAGER_H_
20 #define TIZENAPIS_TIZEN_JSFILESYSTEMMANAGER_H_
22 #include <JavaScriptCore/JavaScript.h>
23 #include <CommonsJavaScript/PrivateObject.h>
26 namespace Filesystem {
27 class JSFilesystemManager
30 typedef WrtDeviceApis::CommonsJavaScript::PrivateObjectT<void>::Type PrivateObject;
33 static const JSClassDefinition* getClassInfo();
35 static const JSClassRef getClassRef();
40 * The callback invoked when an object is first created.
42 static void initialize(JSContextRef context,
46 * The callback invoked when an object is finalized.
48 static void finalize(JSObjectRef object);
51 * The callback invoked when getting a property's value.
53 static JSValueRef getMaxPathLength(JSContextRef context,
55 JSStringRef propertyName,
56 JSValueRef* exception);
59 * Resolves a location to a File handle.
61 static JSValueRef resolve(JSContextRef context,
63 JSObjectRef thisObject,
65 const JSValueRef argv[],
66 JSValueRef* exception);
69 * Get information about a storage based on it's label.
71 static JSValueRef getStorage(JSContextRef context,
73 JSObjectRef thisObject,
75 const JSValueRef argv[],
76 JSValueRef* exception);
79 * List the available storages on the device.
80 * Get the list of available internal and external storage devices.
82 static JSValueRef getStorageList(JSContextRef context,
84 JSObjectRef thisObject,
86 const JSValueRef argv[],
87 JSValueRef* exception);
89 static JSValueRef addStorageStateListener(JSContextRef context,
91 JSObjectRef thisObject,
93 const JSValueRef argv[],
94 JSValueRef* exception) ;
96 static JSValueRef removeStorageStateListener(JSContextRef context,
98 JSObjectRef thisObject,
100 const JSValueRef argv[],
101 JSValueRef* exception);
105 * This structure describes a statically declared function property.
107 static JSStaticFunction m_functions[];
110 * This structure describes a statically declared value property.
112 static JSStaticValue m_properties[];
115 * This structure contains properties and callbacks that define a type of object.
117 static JSClassDefinition m_classInfo;
119 static JSClassRef m_classRef;