[grilo-plugins] lua-factory: Add support for operation-id option



commit 1a9c913ce8ae07eebe16ead7c8fe3344bb8f06b8
Author: Bastien Nocera <hadess hadess net>
Date:   Sat Mar 1 20:42:25 2014 +0100

    lua-factory: Add support for operation-id option
    
    This is necessary to allow chaining calls while keeping state
    between them using global variable.

 src/lua-factory/grl-lua-library.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/lua-factory/grl-lua-library.c b/src/lua-factory/grl-lua-library.c
index 89bd7dd..e7479b6 100644
--- a/src/lua-factory/grl-lua-library.c
+++ b/src/lua-factory/grl-lua-library.c
@@ -460,6 +460,11 @@ grl_l_operation_get_options (lua_State *L)
     return 2;
   }
 
+  if (g_strcmp0 (option, "operation-id") == 0) {
+    lua_pushnumber (L, (gint) os->operation_id);
+    return 1;
+  }
+
   luaL_error (L, "'%s' is not available nor implemented.", option);
   return 0;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]