aboutsummaryrefslogtreecommitdiffstats
path: root/lib/model/folder.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-05-18 11:01:13 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-05-18 11:01:13 +0200
commit2c9ae6a5a27ae2f2e23495c613e7a53aed8e786c (patch)
treeb23dbe9051c50a7ed8f666ae71c833fd52823770 /lib/model/folder.go
parent51da3506a296b7d5d4185b17364f188292136888 (diff)
Add Cross SDKs support (part 2)
Diffstat (limited to 'lib/model/folder.go')
-rw-r--r--lib/model/folder.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/model/folder.go b/lib/model/folder.go
index 6687b68..be1bc33 100644
--- a/lib/model/folder.go
+++ b/lib/model/folder.go
@@ -71,13 +71,8 @@ func (c *Folder) UpdateFolder(newFolder xdsconfig.FolderConfig) (xdsconfig.Folde
c.Conf.Folders = c.Conf.Folders.Update(xdsconfig.FoldersConfig{newFolder})
- err := c.SThg.FolderChange(st.FolderChangeArg{
- ID: newFolder.ID,
- Label: newFolder.Label,
- RelativePath: newFolder.RelativePath,
- SyncThingID: newFolder.SyncThingID,
- ShareRootDir: c.Conf.ShareRootDir,
- })
+ err := c.SThg.FolderChange(newFolder)
+
newFolder.BuilderSThgID = c.Conf.Builder.SyncThingID // FIXME - should be removed after local ST config rework
newFolder.Status = xdsconfig.FolderStatusEnable
{ color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 * Copyright (C) 2016 "IoT.bzh"
 * Author Fulup Ar Foll <fulup@iot.bzh>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, something express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Reference:
 *   Json load using json_unpack https://jansson.readthedocs.io/en/2.9/apiref.html#parsing-and-validating-values
 */

#ifndef _LUA_CTL_INCLUDE_
#define _LUA_CTL_INCLUDE_

#ifdef __cplusplus
extern "C" {
#endif

#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif

// default event name used by LUA
#ifndef CONTROL_LUA_EVENT
#define CONTROL_LUA_EVENT "luaevt"
#endif

// standard lua include file
#ifdef CONTROL_SUPPORT_LUA
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
#endif

#include "ctl-timer.h"

int LuaLibInit ();

typedef enum {
    LUA_DOCALL,
    LUA_DOSTRING,
    LUA_DOSCRIPT,
} LuaDoActionT;

extern const char *lua_utils;
int LuaLoadScript(const char *luaScriptPath);
int LuaConfigLoad (AFB_ApiT apiHandle);
void LuaL2cNewLib(luaL_Reg *l2cFunc, int count, const char *prefix);
int Lua2cWrapper(void* luaHandle, char *funcname, Lua2cFunctionT callback);
int LuaCallFunc (CtlSourceT *source, CtlActionT *action, json_object *queryJ) ;
void ctlapi_lua_docall (afb_req request);
void ctlapi_lua_dostring (afb_req request);
void ctlapi_lua_doscript (afb_req request);
int LuaConfigExec(AFB_ApiT apiHandle);

#ifdef __cplusplus
}
#endif

#endif