This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <sol-mainloop.h> | |
#include <sol-platform.h> | |
void startup() { | |
printf( "%d\n", sol_platform_get_service_state("sshd")); | |
sol_quit(); | |
} | |
void shutdown(){} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BZIP2 ?= /usr/bin/bzip2 | |
CFLAG_FLOAT_STORE += -ffloat-store | |
COMMON_CFLAGS += -D_GNU_SOURCE=1 -pipe -Wall -W -Wextra -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wno-unused-parameter -Wshadow -Wendif-labels -Wstrict-aliasing=3 -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -Wno-override-init -Wnested-externs -Wchar-subscripts -Wtype-limits -Wuninitialized -fno-common -fdiagnostics-show-option -fvisibility=hidden -ffunction-sections -fdata-sections -fno-asynchronous-unwind-tables | |
COMMON_LDFLAGS += -ldl -lm -Wl,--gc-sections | |
DOXYGEN ?= /usr/bin/doxygen | |
DUKTAPE_SRC_PATH ?= /home/nix/iot/soletta/src/thirdparty/duktape/src | |
DYNAMIC_SANITIZE_ADDRESS_CFLAGS ?= -fsanitize=address | |
DYNAMIC_SANITIZE_ADDRESS_LDFLAGS ?= -fsanitize=address -lasan | |
DYNAMIC_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/data/scripts/dependency-resolver.py b/data/scripts/dependency-resolver.py | |
index 446f5ae..e9ce9a7 100755 | |
--- a/data/scripts/dependency-resolver.py | |
+++ b/data/scripts/dependency-resolver.py | |
@@ -267,6 +267,15 @@ def handle_exec_check(args, conf, context): | |
exit(1) | |
path = which(exe) | |
+ | |
+ if not bool(path): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"targets": [ { | |
"target_name": "npmtmp", | |
"sources": [ "tmp.cc" ], | |
"include_dirs": [ "<!(node -e \"require('nan')\")" ] | |
} ] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <sol-mainloop.h> | |
#include <sol-network.h> | |
#include <sol-oic-client.h> | |
static struct sol_oic_client client = { | |
#ifdef SOL_OIC_CLIENT_API_VERSION | |
SOL_OIC_CLIENT_API_VERSION, | |
#endif /* def SOL_OIC_CLIENT_API_VERSION */ | |
NULL, NULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <sol-coap.h> | |
#include <sol-oic-client.h> | |
#include <sol-mainloop.h> | |
struct sol_oic_client client; | |
static bool no_payload(void *data, struct sol_oic_map_writer *map) { | |
return true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In file included from ../bindings/nodejs/generated/main.cc:7:0: | |
../bindings/nodejs/generated/main.h:8:27: fatal error: sol-platform.h: No such file or directory | |
#include <sol-platform.h> | |
^ | |
compilation terminated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <sol-platform.h> | |
#include <sol-mainloop.h> | |
static void localeHasChanged(void *nothing, enum sol_platform_locale_category category, const char *locale) { | |
printf("%d, %s\n", category, locale); | |
} | |
static void startup() { | |
sol_platform_add_locale_monitor(localeHasChanged, NULL); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
g++ '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' '-DDEBUG' '-D_DEBUG' -I/home/nix/.node-gyp/0.12.3/src -I/home/nix/.node-gyp/0.12.3/deps/uv/include -I/home/nix/.node-gyp/0.12.3/deps/v8/include -I../node_modules/nan -I../build/soletta_sysroot/usr/include/soletta -pthread -Wall -Wextra -Wno-unused-parameter -m32 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -O0 -fno-rtti -fno-exceptions -MMD -MF ./Debug/.deps/Debug/obj.target/soletta/bindings/nodejs/src/mainloop.o.d.raw -c -o Debug/obj.target/soletta/bindings/nodejs/src/mainloop.o ../bindings/nodejs/src/mainloop.cc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var soletta = require( "./index" ); | |
function hostnameChangeHandler( hostname ) { | |
console.log( "hostname has changed. The new name is: " + hostname ); | |
} | |
soletta.sol_platform_add_hostname_monitor( hostnameChangeHandler ); | |
process.on( "SIGINT", function processSIGINT() { | |
soletta.sol_platform_del_hostname_monitor( hostnameChangeHandler ); |