-/***********************************
- * Tracing
- **********************************/
-static int trace_start(lua_State *L)
-{
-#ifdef HAVE_TRACING
- TRACE_start();
-#endif
- return 1;
-}
-
-static int trace_category(lua_State * L)
-{
-#ifdef HAVE_TRACING
- TRACE_category(luaL_checkstring(L, 1));
-#endif
- return 1;
-}
-
-static int trace_set_task_category(lua_State *L)
-{
-#ifdef HAVE_TRACING
- TRACE_msg_set_task_category(checkTask(L, -2), luaL_checkstring(L, -1));
-#endif
- return 1;
-}
-
-static int trace_end(lua_State *L)
-{
-#ifdef HAVE_TRACING
- TRACE_end();
-#endif
- return 1;
-}
-
-// *********** Register Methods ******************************************* //
-
-/*
- * Host Methods
- */
-static const luaL_reg Host_methods[] = {
- {"getByName", Host_get_by_name},
- {"name", Host_get_name},
- {"number", Host_number},
- {"at", Host_at},
- {"self", Host_self},
- {"getPropValue", Host_get_property_value},
- {"sleep", Host_sleep},
- {"destroy", Host_destroy},
- // Bypass XML Methods
- {"setFunction", console_set_function},
- {"setProperty", console_host_set_property},
- {NULL, NULL}
-};
-
-static int Host_gc(lua_State * L)
-{
- m_host_t ht = checkHost(L, -1);
- if (ht)
- ht = NULL;
- return 0;
-}
-
-static int Host_tostring(lua_State * L)
-{
- lua_pushfstring(L, "Host :%p", lua_touserdata(L, 1));
- return 1;
-}
-
-static const luaL_reg Host_meta[] = {
- {"__gc", Host_gc},
- {"__tostring", Host_tostring},
- {0, 0}
-};
-
-/*
- * AS Methods
- */
-static const luaL_reg AS_methods[] = {
- {"new", console_add_AS},
- {"addHost", console_add_host},
- {"addLink", console_add_link},
- {"addRoute", console_add_route},
- {NULL, NULL}
-};