Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
8ceb4332
Commit
8ceb4332
authored
Nov 02, 2007
by
Pierre-Luc Beaudoin
Browse files
Autostart deamon on first dbus method call
parent
19793ffa
Changes
5
Show whitespace changes
Inline
Side-by-side
configure.ac
View file @
8ceb4332
...
...
@@ -273,6 +273,12 @@ dnl Datadir directory
sflphone_datadir=$datadir/sflphone
AC_SUBST(sflphone_datadir)
dnl Dbus Service activation part
DBUS_SERVICES_DIR="$datadir/dbus-1/services"
AC_SUBST(DBUS_SERVICES_DIR)
AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [Where services dir for DBUS is])
dnl QT interface
AC_MSG_CHECKING([whether to enable sflphoneqt])
AC_ARG_ENABLE(sflphoneqt,
...
...
m4/dbus.m4
0 → 100644
View file @
8ceb4332
dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
dnl
dnl example
dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
AC_DEFUN([AS_AC_EXPAND],
[
EXP_VAR=[$1]
FROM_VAR=[$2]
dnl first expand prefix and exec_prefix if necessary
prefix_save=$prefix
exec_prefix_save=$exec_prefix
dnl if no prefix given, then use /usr/local, the default prefix
if test "x$prefix" = "xNONE"; then
prefix=$ac_default_prefix
fi
dnl if no exec_prefix given, then use prefix
if test "x$exec_prefix" = "xNONE"; then
exec_prefix=$prefix
fi
full_var="$FROM_VAR"
dnl loop until it doesn't change anymore
while true; do
new_full_var="`eval echo $full_var`"
if test "x$new_full_var"="x$full_var"; then break; fi
full_var=$new_full_var
done
dnl clean up
full_var=$new_full_var
AC_SUBST([$1], "$full_var")
dnl restore prefix and exec_prefix
prefix=$prefix_save
exec_prefix=$exec_prefix_save
])
sflphone-gtk/src/dbus.c
View file @
8ceb4332
...
...
@@ -166,16 +166,13 @@ dbus_connect ()
/* Create a proxy object for the "bus driver" (name "org.freedesktop.DBus") */
callManagerProxy
=
dbus_g_proxy_new_for_name
_owner
(
connection
,
callManagerProxy
=
dbus_g_proxy_new_for_name
(
connection
,
"org.sflphone.SFLphone"
,
"/org/sflphone/SFLphone/CallManager"
,
"org.sflphone.SFLphone.CallManager"
,
&
error
);
if
(
error
)
"org.sflphone.SFLphone.CallManager"
);
if
(
!
callManagerProxy
)
{
g_printerr
(
"Failed to get proxy to CallManager: %s
\n
"
,
error
->
message
);
g_error_free
(
error
);
g_printerr
(
"Failed to get proxy to CallManagers
\n
"
);
return
FALSE
;
}
...
...
@@ -215,19 +212,16 @@ dbus_connect ()
dbus_g_proxy_connect_signal
(
callManagerProxy
,
"volumeChanged"
,
G_CALLBACK
(
volume_changed_cb
),
NULL
,
NULL
);
configurationManagerProxy
=
dbus_g_proxy_new_for_name
_owner
(
connection
,
configurationManagerProxy
=
dbus_g_proxy_new_for_name
(
connection
,
"org.sflphone.SFLphone"
,
"/org/sflphone/SFLphone/ConfigurationManager"
,
"org.sflphone.SFLphone.ConfigurationManager"
,
&
error
);
if
(
error
)
"org.sflphone.SFLphone.ConfigurationManager"
);
if
(
!
configurationManagerProxy
)
{
g_printerr
(
"Failed to get proxy to ConfigurationManager: %s
\n
"
,
error
->
message
);
g_error_free
(
error
);
g_printerr
(
"Failed to get proxy to ConfigurationManager
\n
"
);
return
FALSE
;
}
g_print
(
"DBus connected to ConfigurationManager
\n
"
);
dbus_g_proxy_add_signal
(
configurationManagerProxy
,
"accountsChanged"
,
G_TYPE_INVALID
);
dbus_g_proxy_connect_signal
(
configurationManagerProxy
,
...
...
@@ -375,12 +369,16 @@ dbus_place_call (const call_t * c)
gchar
**
dbus_account_list
()
{
g_print
(
"Before"
);
GError
*
error
=
NULL
;
char
**
array
;
org_sflphone_SFLphone_ConfigurationManager_get_account_list
(
configurationManagerProxy
,
&
array
,
&
error
);
g_print
(
"After"
);
if
(
error
)
{
g_printerr
(
"Failed to call get_account_list() on ConfigurationManager: %s
\n
"
,
...
...
src/dbus/Makefile.am
View file @
8ceb4332
...
...
@@ -19,3 +19,13 @@ noinst_HEADERS = \
configurationmanager.h
\
dbusmanager.h
\
dbusmanagerimpl.h
# Dbus service file
servicedir
=
$(DBUS_SERVICES_DIR)
service_in_files
=
org.sflphone.SFLphone.service.in
service_DATA
=
$(service_in_files:.service.in=.service)
# Rule to make the service file with bindir expanded
$(service_DATA)
:
$(service_in_files) Makefile
sed
-e
"s|bindir|
$(prefix)
/libexec|"
$<
>
$@
src/dbus/org.sflphone.SFLphone.service.in
0 → 100644
View file @
8ceb4332
[D-BUS Service]
Name=org.sflphone.SFLphone.CallManager
Exec=bindir/sflphoned
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment