summaryrefslogtreecommitdiffstats
path: root/src/template.d/test/afb-test/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'src/template.d/test/afb-test/fixtures')
-rw-r--r--src/template.d/test/afb-test/fixtures/CMakeLists.txt.in31
-rw-r--r--src/template.d/test/afb-test/fixtures/mapi_helloworld.lua.in31
2 files changed, 62 insertions, 0 deletions
diff --git a/src/template.d/test/afb-test/fixtures/CMakeLists.txt.in b/src/template.d/test/afb-test/fixtures/CMakeLists.txt.in
new file mode 100644
index 0000000..fb85b3f
--- /dev/null
+++ b/src/template.d/test/afb-test/fixtures/CMakeLists.txt.in
@@ -0,0 +1,31 @@
+###########################################################################
+# Copyright 2015 - 2019 IoT.bzh
+#
+# author: @PROJECT_AUTHOR@ <@PROJECT_AUTHOR_MAIL@>
+#
+# 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, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###########################################################################
+
+
+##################################################
+# @PROJECT_NAME@ Lua Scripts
+##################################################
+PROJECT_TARGET_ADD(fixture-files)
+
+ file(GLOB LUA_FILES "*.lua")
+ add_input_files("${LUA_FILES}")
+
+ SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
+ LABELS "TEST-DATA"
+ OUTPUT_NAME ${TARGET_NAME}
+ )
diff --git a/src/template.d/test/afb-test/fixtures/mapi_helloworld.lua.in b/src/template.d/test/afb-test/fixtures/mapi_helloworld.lua.in
new file mode 100644
index 0000000..9f93074
--- /dev/null
+++ b/src/template.d/test/afb-test/fixtures/mapi_helloworld.lua.in
@@ -0,0 +1,31 @@
+--[[
+ Copyright (C) 2019 "IoT.bzh"
+ Author @PROJECT_AUTHOR@ <@PROJECT_AUTHOR_MAIL@>
+
+ 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, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+ NOTE: strict mode: every global variables should be prefixed by '_'
+--]]
+
+function _subscribe(source, args)
+ AFB:success(source)
+end
+
+function _unsubscribe(source, args)
+ AFB:success(source)
+end
+
+function _list(source, args)
+ AFB:success(source)
+end
f0 } /* 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) 2015-2019 IoT.bzh

 author: José Bollo <jose.bollo@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, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
*/

struct afm_udb;
struct json_object;

extern struct afm_udb *afm_udb_create(int sys, int usr, const char *prefix);
extern void afm_udb_addref(struct afm_udb *afdb);
extern void afm_udb_unref(struct afm_udb *afdb);
extern int afm_udb_update(struct afm_udb *afdb);
extern void afm_udb_set_default_lang(const char *lang);
extern struct json_object *afm_udb_applications_private(struct afm_udb *afdb, int all, int uid);
extern struct json_object *afm_udb_get_application_private(struct afm_udb *afdb, const char *id, int uid);
extern struct json_object *afm_udb_applications_public(struct afm_udb *afdb, int all, int uid, const char *lang);
extern struct json_object *afm_udb_get_application_public(struct afm_udb *afdb, const char *id, int uid, const char *lang);