Update app.js, defaultService.js

This commit is contained in:
Namhyeon Go 2024-09-09 15:28:33 +09:00
parent 40edee2b83
commit c24166b36d
2 changed files with 5 additions and 11 deletions

2
app.js
View File

@ -629,7 +629,7 @@ function dispatchServiceEvent(name, eventType, w_args, argl) {
messageReceived: bind("MessageReceived"),
screenTime: bind("ServiceScreenTime"),
fileCreated: bind("FileCreated"),
fileRuleMatched: bind("FileRuleMatched")
networkConnected: bind("NetworkConnected");
});
} else {
console.error("Could not find", name + ".js");

View File

@ -1,13 +1,6 @@
var SYS = require("lib/system");
function main(args) {
console.log("WelsonJS.Service required.");
}
function getDeviceID() {
return SYS.getUUID();
}
function onServiceStart() {
return "onServiceStart recevied";
}
@ -32,15 +25,16 @@ function onFileCreated(args) {
return "onFileCreated recevied. " + args.join(', ');
}
function onFileRuleMatched(args) {
return "onFileCreated recevied. " + args.join(', ');
function onNetworkConnected(args) {
return "onNetworkConnected recevied. " + args.join(', ');
}
exports.main = main;
exports.getDeviceID = getDeviceID;
exports.onServiceStart = onServiceStart;
exports.onServiceStop = onServiceStop;
exports.onServiceElapsedTime = onServiceElapsedTime;
exports.onServiceScreenTime = onServiceScreenTime;
exports.onFileCreated = onFileCreated;
exports.onFileRuleMatched = onFileRuleMatched;
exports.onNetworkConnected = onNetworkConnected;