Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
10f6af46
Commit
10f6af46
authored
7 years ago
by
Asad Salman
Browse files
Options
Downloads
Patches
Plain Diff
nodejs: changes for electron compatibility
Change-Id: Icfb6ca3858450eaf2b5bbfbb16fcc024c8c9d772
parent
b45d73c9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/nodejs/Makefile.am
+2
-2
2 additions, 2 deletions
bin/nodejs/Makefile.am
bin/nodejs/index.js
+12
-15
12 additions, 15 deletions
bin/nodejs/index.js
with
14 additions
and
17 deletions
bin/nodejs/Makefile.am
+
2
−
2
View file @
10f6af46
...
@@ -9,11 +9,11 @@ ring_wrapper.cpp: nodejs_interface.i configurationmanager.i managerimpl.i
...
@@ -9,11 +9,11 @@ ring_wrapper.cpp: nodejs_interface.i configurationmanager.i managerimpl.i
$(
SWIG
)
-v
-c
++
-javascript
-node
-o
ring_wrapper.cpp nodejs_interface.i
$(
SWIG
)
-v
-c
++
-javascript
-node
-o
ring_wrapper.cpp nodejs_interface.i
build/Makefile
:
ring_wrapper.cpp binding.gyp
build/Makefile
:
ring_wrapper.cpp binding.gyp
node-gyp configure
node-gyp configure
--target
=
1.6.2
--arch
=
x64
--dist-url
=
https://atom.io/download/electron
build/Release/obj.target/dring.node
:
build/Makefile ring_wrapper.cpp callback.h
build/Release/obj.target/dring.node
:
build/Makefile ring_wrapper.cpp callback.h
node-gyp build
node-gyp build
CLEANFILES
=
\
CLEANFILES
=
\
$(
BUILT_SOURCES
)
\
$(
BUILT_SOURCES
)
\
build/Release/dring.node
build/Release/dring.node
\ No newline at end of file
This diff is collapsed.
Click to expand it.
bin/nodejs/index.js
+
12
−
15
View file @
10f6af46
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
class
RingDaemon
{
class
RingDaemon
{
constructor
(
callbackMap
)
{
constructor
(
callbackMap
)
{
if
(
callbackMap
){
if
(
callbackMap
){
this
.
dring
=
require
(
"
./build/Release/dring
"
);
this
.
dring
=
require
(
"
./build/Release/dring
.node
"
);
this
.
dring
.
init
(
callbackMap
);
this
.
dring
.
init
(
callbackMap
);
var
that
=
this
;
var
that
=
this
;
this
.
pollIntervalId
=
setInterval
(
function
()
{
this
.
pollIntervalId
=
setInterval
(
function
()
{
...
@@ -92,16 +92,18 @@ class RingDaemon{
...
@@ -92,16 +92,18 @@ class RingDaemon{
this
.
dring
.
addAccount
(
params
);
this
.
dring
.
addAccount
(
params
);
}
}
stringVectToArr
(
stringvect
){
var
outputArr
=
[];
for
(
var
i
=
0
;
i
<
stringvect
.
size
();
i
++
)
outputArr
.
push
(
stringvect
.
get
(
i
));
return
outputArr
;
}
getAccountList
(){
return
this
.
stringVectToArr
(
this
.
dring
.
getAccountList
());
}
getAudioOutputDeviceList
()
{
getAudioOutputDeviceList
()
{
var
devicesVect
=
this
.
dring
.
getAudioOutputDeviceList
();
return
this
.
stringVectToArr
(
this
.
dring
.
getAudioOutputDeviceList
());
var
outputDevices
=
[];
for
(
var
i
=
0
;
i
<
devicesVect
.
size
();
i
++
)
outputDevices
.
push
(
devicesVect
.
get
(
i
));
return
outputDevices
;
}
}
getVolume
(
deviceName
)
{
getVolume
(
deviceName
)
{
return
this
.
dring
.
getVolume
(
deviceName
);
return
this
.
dring
.
getVolume
(
deviceName
);
}
}
...
@@ -116,9 +118,4 @@ class RingDaemon{
...
@@ -116,9 +118,4 @@ class RingDaemon{
}
}
}
}
var
f
=
function
(){
module
.
exports
=
RingDaemon
;
console
.
log
(
"
RegistrationStateChanged JS
"
);
\ No newline at end of file
};
var
daemon
=
new
RingDaemon
({
"
RegistrationStateChanged
"
:
f
});
//daemon.stop();
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment