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.
20 * @author Sang-tai Kim(sangtai.kim@samsung.com)
25 #ifndef _JS_TIZEN_LOG_H_
26 #define _JS_TIZEN_LOG_H_
28 #include <JavaScriptCore/JavaScript.h>
33 class DeviceController;
37 * @brief This class is javascript extenstion
43 static const JSClassDefinition* getClassInfo();
46 * Gets class definition reference.
47 * @remarks New instance of JSClassRef is created (only once) if none was
48 * @remarks set before.
49 * @return Class reference.
51 static const JSClassRef getClassRef();
55 * The callback invoked when an object is first created.
57 static void initialize(JSContextRef context, JSObjectRef object);
60 * The callback invoked when an object is finalized.
62 static void finalize(JSObjectRef object);
65 * This structure describes a statically declared function.
67 static JSStaticFunction m_function[];
70 * This structure contains properties and callbacks that define a type of object.
72 static JSClassDefinition m_classInfo;
75 * Class definition reference.
78 static JSClassRef m_jsClassRef;
80 static JSValueRef logDebug(JSContextRef context,
82 JSObjectRef thisObject,
84 const JSValueRef argv[],
85 JSValueRef* exception);
87 static JSValueRef logInfo(JSContextRef context,
89 JSObjectRef thisObject,
91 const JSValueRef argv[],
92 JSValueRef* exception);
94 static JSValueRef logWarning(JSContextRef context,
96 JSObjectRef thisObject,
98 const JSValueRef argv[],
99 JSValueRef* exception);
101 static JSValueRef logError(JSContextRef context,
103 JSObjectRef thisObject,
105 const JSValueRef argv[],
106 JSValueRef* exception);
114 #endif // _JS_TIZEN_LOG_H_