Skip to content
Snippets Groups Projects
Commit 1b0247f5 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

bin/nodejs: rename to Jami

Change-Id: Ieb7ee800f2b6f50f7ed2605a50b8dbeb32881645
parent 91a9664a
Branches
No related tags found
No related merge requests found
...@@ -17,27 +17,22 @@ ...@@ -17,27 +17,22 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
"use strict"; "use strict";
class RingDaemon{
class JamiDaemon {
constructor(callbackMap) { constructor(callbackMap) {
if(callbackMap){ if(callbackMap){
this.dring = require("./build/Release/dring.node"); this.dring = require("./build/Release/dring.node");
this.dring.init(callbackMap); this.dring.init(callbackMap);
var that = this;
} }
} }
boolToStr(bool) { boolToStr(bool) {
if(bool) return bool ? "TRUE" : "FALSE";
return "TRUE";
else
return "FALSE";
} }
addAccount(account) { addAccount(account) {
var params = new this.dring.StringMap(); const params = new this.dring.StringMap();
params.set("Account.type", "RING"); params.set("Account.type", "RING");
if(account.archivePassword){ if(account.archivePassword){
params.set("Account.archivePassword", account.archivePassword); params.set("Account.archivePassword", account.archivePassword);
...@@ -89,7 +84,7 @@ class RingDaemon{ ...@@ -89,7 +84,7 @@ class RingDaemon{
this.dring.addAccount(params); this.dring.addAccount(params);
} }
stringVectToArr(stringvect){ stringVectToArr(stringvect){
var outputArr = []; const outputArr = [];
for(var i=0; i<stringvect.size(); i++) for(var i=0; i<stringvect.size(); i++)
outputArr.push(stringvect.get(i)); outputArr.push(stringvect.get(i));
return outputArr; return outputArr;
...@@ -113,4 +108,4 @@ class RingDaemon{ ...@@ -113,4 +108,4 @@ class RingDaemon{
} }
} }
module.exports = RingDaemon; module.exports = JamiDaemon;
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment