Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
savoirfairelinux
jami-daemon
Commits
a8daf5e0
Commit
a8daf5e0
authored
Mar 27, 2009
by
Julien Bonjean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved dbus stuff in dbus directory
parent
d4a07fc0
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
202 additions
and
108 deletions
+202
-108
.gitignore
.gitignore
+1
-0
sflphone-gtk/configure.ac
sflphone-gtk/configure.ac
+2
-1
sflphone-gtk/globals.mak
sflphone-gtk/globals.mak
+1
-0
sflphone-gtk/src/Makefile.am
sflphone-gtk/src/Makefile.am
+5
-6
sflphone-gtk/src/actions.c
sflphone-gtk/src/actions.c
+1
-1
sflphone-gtk/src/config/accountwindow.c
sflphone-gtk/src/config/accountwindow.c
+37
-37
sflphone-gtk/src/config/configwindow.c
sflphone-gtk/src/config/configwindow.c
+3
-3
sflphone-gtk/src/dbus/Makefile.am
sflphone-gtk/src/dbus/Makefile.am
+9
-0
sflphone-gtk/src/dbus/README
sflphone-gtk/src/dbus/README
+8
-0
sflphone-gtk/src/dbus/callmanager-glue.h
sflphone-gtk/src/dbus/callmanager-glue.h
+0
-0
sflphone-gtk/src/dbus/configurationmanager-glue.h
sflphone-gtk/src/dbus/configurationmanager-glue.h
+75
-0
sflphone-gtk/src/dbus/dbus.c
sflphone-gtk/src/dbus/dbus.c
+0
-0
sflphone-gtk/src/dbus/dbus.h
sflphone-gtk/src/dbus/dbus.h
+0
-0
sflphone-gtk/src/dbus/instance-glue.h
sflphone-gtk/src/dbus/instance-glue.h
+0
-0
sflphone-gtk/src/main.c
sflphone-gtk/src/main.c
+21
-21
sflphone-gtk/src/menus.c
sflphone-gtk/src/menus.c
+2
-2
sflphone-gtk/src/sflnotify.h
sflphone-gtk/src/sflnotify.h
+11
-11
sflphone-gtk/src/sliders.c
sflphone-gtk/src/sliders.c
+26
-26
No files found.
.gitignore
View file @
a8daf5e0
...
...
@@ -85,6 +85,7 @@ libs/utilspp/singleton/Makefile
sflphone-gtk/Makefile
sflphone-gtk/src/Makefile
sflphone-gtk/src/config/Makefile
sflphone-gtk/src/dbus/Makefile
sflphone-gtk/src/contacts/Makefile
sflphone-gtk/src/contacts/addressbook/Makefile
sflphone-gtk/pixmaps/Makefile
...
...
sflphone-gtk/configure.ac
View file @
a8daf5e0
...
...
@@ -43,7 +43,8 @@ AC_SUBST(DEPS_LIBS)
AC_OUTPUT([
Makefile
src/Makefile
src/config/Makefile
src/config/Makefile
src/dbus/Makefile
src/contacts/Makefile
src/contacts/addressbook/Makefile
pixmaps/Makefile
...
...
sflphone-gtk/globals.mak
View file @
a8daf5e0
...
...
@@ -5,6 +5,7 @@ src = $(top_srcdir)
AM_CPPFLAGS
=
$(DEPS_CFLAGS)
\
-I
$(src)
/src
\
-I
$(src)
/src/config
\
-I
$(src)
/src/dbus
\
-I
$(src)
/src/contacts
\
-I
$(src)
/src/addressbook
\
-DICONS_DIR
=
\"
"
$(prefix)
/share/sflphone"
\"
\
...
...
sflphone-gtk/src/Makefile.am
View file @
a8daf5e0
...
...
@@ -2,17 +2,16 @@ include ../globals.mak
bin_PROGRAMS
=
sflphone-gtk
SUBDIRS
=
config contacts
SUBDIRS
=
config contacts
dbus
NOFIFY_LIBS
=
-lnotify
SEXY_LIBS
=
-lsexy
SFLPHONEGTK_LIBS
=
./contacts/libcontacts.la ./config/libconfig.la
SFLPHONEGTK_LIBS
=
./contacts/libcontacts.la ./config/libconfig.la
./dbus/libdbus.la
sflphone_gtk_SOURCES
=
\
main.c
\
errors.c
\
dbus.c
\
sflnotify.c
\
assistant.c
\
mainwindow.c
\
...
...
@@ -29,9 +28,9 @@ sflphone_gtk_SOURCES = \
timestamp.c
\
reqaccount.c
noinst_HEADERS
=
actions.h
dbus.h
sflnotify.h mainwindow.h dialpad.h codeclist.h
assistant.h timestamp.h reqaccount.h
\
callmanager-glue.h errors.h sflphone_const.h configurationmanager-glue.h instance-glue.h menus
.h
\
accountlist.h marshaller.h sliders.h statusicon.h call.h toolbar.h
noinst_HEADERS
=
actions.h sflnotify.h mainwindow.h dialpad.h codeclist.h
\
assistant.h timestamp.h reqaccount.h errors.h sflphone_const
.h
\
menus.h
accountlist.h marshaller.h sliders.h statusicon.h call.h toolbar.h
EXTRA_DIST
=
marshaller.list
...
...
sflphone-gtk/src/actions.c
View file @
a8daf5e0
...
...
@@ -19,7 +19,7 @@
*/
#include <actions.h>
#include <dbus.h>
#include <dbus
/dbus
.h>
#include <mainwindow.h>
#include <menus.h>
#include <statusicon.h>
...
...
sflphone-gtk/src/config/accountwindow.c
View file @
a8daf5e0
...
...
@@ -2,17 +2,17 @@
* Copyright (C) 2007-2008 Savoir-Faire Linux inc.
* Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
* Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
...
...
@@ -24,7 +24,7 @@
#include <libsexy/sexy-icon-entry.h>
#include <string.h>
#include <dbus.h>
#include <dbus
/dbus
.h>
#include <config.h>
#include <gtk/gtk.h>
...
...
@@ -52,13 +52,13 @@ change_protocol (account_t * currentAccount UNUSED)
(
gchar
*
)
gtk_combo_box_get_active_text
(
GTK_COMBO_BOX
(
entryProtocol
));
}
int
int
is_iax_enabled
(
void
)
{
int
res
=
dbus_is_iax2_enabled
();
if
(
res
==
1
)
if
(
res
==
1
)
return
TRUE
;
else
else
return
FALSE
;
}
...
...
@@ -123,7 +123,7 @@ show_account_window (account_t * a)
gtk_container_add
(
GTK_CONTAINER
(
frame
)
,
table
);
#ifdef DEBUG
#ifdef DEBUG
label
=
gtk_label_new_with_mnemonic
(
"ID:"
);
gtk_table_attach
(
GTK_TABLE
(
table
),
label
,
0
,
1
,
0
,
1
,
GTK_EXPAND
|
GTK_FILL
,
GTK_EXPAND
|
GTK_FILL
,
0
,
0
);
gtk_misc_set_alignment
(
GTK_MISC
(
label
),
0
,
0
.
5
);
...
...
@@ -132,11 +132,11 @@ show_account_window (account_t * a)
gtk_entry_set_text
(
GTK_ENTRY
(
entryID
),
curAccountID
);
gtk_widget_set_sensitive
(
GTK_WIDGET
(
entryID
),
FALSE
);
gtk_table_attach
(
GTK_TABLE
(
table
),
entryID
,
1
,
2
,
0
,
1
,
GTK_EXPAND
|
GTK_FILL
,
GTK_EXPAND
|
GTK_FILL
,
0
,
0
);
#endif
#endif
entryEnabled
=
gtk_check_button_new_with_mnemonic
(
_
(
"_Enabled"
));
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
entryEnabled
),
g_strcasecmp
(
curAccountEnabled
,
"TRUE"
)
==
0
?
TRUE
:
FALSE
);
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
entryEnabled
),
g_strcasecmp
(
curAccountEnabled
,
"TRUE"
)
==
0
?
TRUE
:
FALSE
);
gtk_table_attach
(
GTK_TABLE
(
table
),
entryEnabled
,
0
,
2
,
1
,
2
,
GTK_EXPAND
|
GTK_FILL
,
GTK_EXPAND
|
GTK_FILL
,
0
,
0
);
gtk_widget_set_sensitive
(
GTK_WIDGET
(
entryEnabled
)
,
TRUE
);
...
...
@@ -167,7 +167,7 @@ show_account_window (account_t * a)
{
/* Should never come here, add debug message. */
gtk_combo_box_append_text
(
GTK_COMBO_BOX
(
entryProtocol
),
_
(
"Unknown"
));
gtk_combo_box_set_active
(
GTK_COMBO_BOX
(
entryProtocol
),
2
);
gtk_combo_box_set_active
(
GTK_COMBO_BOX
(
entryProtocol
),
2
);
}
gtk_table_attach
(
GTK_TABLE
(
table
),
entryProtocol
,
1
,
2
,
4
,
5
,
GTK_EXPAND
|
GTK_FILL
,
GTK_EXPAND
|
GTK_FILL
,
0
,
0
);
...
...
@@ -190,7 +190,7 @@ show_account_window (account_t * a)
entryUsername
=
sexy_icon_entry_new
();
//image = gtk_image_new_from_stock( GTK_STOCK_DIALOG_AUTHENTICATION , GTK_ICON_SIZE_SMALL_TOOLBAR );
image
=
gtk_image_new_from_file
(
ICONS_DIR
"/stock_person.svg"
);
sexy_icon_entry_set_icon
(
SEXY_ICON_ENTRY
(
entryUsername
),
SEXY_ICON_ENTRY_PRIMARY
,
GTK_IMAGE
(
image
)
);
sexy_icon_entry_set_icon
(
SEXY_ICON_ENTRY
(
entryUsername
),
SEXY_ICON_ENTRY_PRIMARY
,
GTK_IMAGE
(
image
)
);
gtk_label_set_mnemonic_widget
(
GTK_LABEL
(
label
),
entryUsername
);
gtk_entry_set_text
(
GTK_ENTRY
(
entryUsername
),
curUsername
);
gtk_table_attach
(
GTK_TABLE
(
table
),
entryUsername
,
1
,
2
,
6
,
7
,
GTK_EXPAND
|
GTK_FILL
,
GTK_EXPAND
|
GTK_FILL
,
0
,
0
);
...
...
@@ -200,7 +200,7 @@ show_account_window (account_t * a)
gtk_misc_set_alignment
(
GTK_MISC
(
label
),
0
,
0
.
5
);
entryPassword
=
sexy_icon_entry_new
();
image
=
gtk_image_new_from_stock
(
GTK_STOCK_DIALOG_AUTHENTICATION
,
GTK_ICON_SIZE_SMALL_TOOLBAR
);
sexy_icon_entry_set_icon
(
SEXY_ICON_ENTRY
(
entryPassword
),
SEXY_ICON_ENTRY_PRIMARY
,
GTK_IMAGE
(
image
)
);
sexy_icon_entry_set_icon
(
SEXY_ICON_ENTRY
(
entryPassword
),
SEXY_ICON_ENTRY_PRIMARY
,
GTK_IMAGE
(
image
)
);
gtk_entry_set_visibility
(
GTK_ENTRY
(
entryPassword
),
FALSE
);
gtk_label_set_mnemonic_widget
(
GTK_LABEL
(
label
),
entryPassword
);
gtk_entry_set_text
(
GTK_ENTRY
(
entryPassword
),
curPassword
);
...
...
@@ -216,10 +216,10 @@ show_account_window (account_t * a)
gtk_widget_show_all
(
table
);
gtk_container_set_border_width
(
GTK_CONTAINER
(
table
),
10
);
// Toggle enabled/disabled widgets
if
(
strcmp
(
curAccountType
,
"SIP"
)
==
0
)
{
//gtk_widget_set_sesitive( GTK_WIDGET(entryUserPart), TRUE);<
//gtk_widget_set_sesitive( GTK_WIDGET(entryUserPart), TRUE);<
}
else
if
(
strcmp
(
curAccountType
,
"IAX"
)
==
0
)
{
//gtk_widget_set_sensitive( GTK_WIDGET(stunEnable), FALSE);
...
...
@@ -235,32 +235,32 @@ show_account_window (account_t * a)
{
gchar
*
proto
=
(
gchar
*
)
gtk_combo_box_get_active_text
(
GTK_COMBO_BOX
(
entryProtocol
));
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_ENABLED
),
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_ENABLED
),
g_strdup
(
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
entryEnabled
))
?
"TRUE"
:
"FALSE"
));
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_ALIAS
),
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_ALIAS
),
g_strdup
((
gchar
*
)
gtk_entry_get_text
(
GTK_ENTRY
(
entryAlias
))));
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_TYPE
),
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_TYPE
),
g_strdup
(
proto
));
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_HOSTNAME
),
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_HOSTNAME
),
g_strdup
((
gchar
*
)
gtk_entry_get_text
(
GTK_ENTRY
(
entryHostname
))));
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_USERNAME
),
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_USERNAME
),
g_strdup
((
gchar
*
)
gtk_entry_get_text
(
GTK_ENTRY
(
entryUsername
))));
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_PASSWORD
),
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_PASSWORD
),
g_strdup
((
gchar
*
)
gtk_entry_get_text
(
GTK_ENTRY
(
entryPassword
))));
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_MAILBOX
),
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_MAILBOX
),
g_strdup
((
gchar
*
)
gtk_entry_get_text
(
GTK_ENTRY
(
entryMailbox
))));
if
(
strcmp
(
proto
,
"SIP"
)
==
0
)
{
if
(
strcmp
(
proto
,
"SIP"
)
==
0
)
{
guint
i
,
size
;
account_t
*
account
;
gchar
*
stun_srv
;
gchar
*
stun_srv
;
gchar
*
stun_enable
;
gboolean
flag
=
FALSE
;
...
...
@@ -272,26 +272,26 @@ show_account_window (account_t * a)
{
stun_srv
=
g_hash_table_lookup
(
account
->
properties
,
ACCOUNT_SIP_STUN_SERVER
);
stun_enable
=
g_hash_table_lookup
(
account
->
properties
,
ACCOUNT_SIP_STUN_ENABLED
);
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_SIP_STUN_SERVER
),
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_SIP_STUN_SERVER
),
g_strdup
(
stun_srv
));
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_SIP_STUN_ENABLED
),
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_SIP_STUN_ENABLED
),
g_strdup
(
stun_enable
));
flag
=
TRUE
;
break
;
}
}
// Otherelse set a default value
if
(
!
flag
)
{
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_SIP_STUN_SERVER
),
(
gchar
*
)
""
);
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_SIP_STUN_ENABLED
),
g_hash_table_replace
(
currentAccount
->
properties
,
g_strdup
(
ACCOUNT_SIP_STUN_ENABLED
),
"FALSE"
);
}
config_window_set_stun_visible
();
}
/** @todo Verify if it's the best condition to check */
if
(
currentAccount
->
accountID
==
NULL
)
{
dbus_add_account
(
currentAccount
);
...
...
sflphone-gtk/src/config/configwindow.c
View file @
a8daf5e0
...
...
@@ -26,7 +26,7 @@
#include <actions.h>
#include <config.h>
#include <toolbar.h>
#include <dbus.h>
#include <dbus
/dbus
.h>
#include <mainwindow.h>
#include <audioconf.h>
#include <addressbook-config.h>
...
...
@@ -849,9 +849,9 @@ show_accounts_window( void )
gtk_dialog_run
(
dialog
);
status_bar_display_account
();
accDialogOpen
=
FALSE
;
gtk_widget_destroy
(
GTK_WIDGET
(
dialog
));
if
(
account_list_get_size
()
>
0
&&
account_list_get_current
()
==
NULL
)
account_list_set_current_pos
(
0
);
...
...
sflphone-gtk/src/dbus/Makefile.am
0 → 100644
View file @
a8daf5e0
include
../../globals.mak
noinst_LTLIBRARIES
=
libdbus.la
libdbus_la_SOURCES
=
dbus.c
libdbus_la_LDFLAGS
=
@DEPS_LDFLAGS@
libdbus_la_CFLAGS
=
@DEPS_CFLAGS@
sflphone-gtk/src/dbus/README
0 → 100644
View file @
a8daf5e0
CallManager, ConfigurationManager and ContactManager dbus APIs.
These files are generated by dbus-binding-tool using the server's files named *-introspec.xml:
* dbus-binding-tool --mode=glib-client "../../../src/dbus/callmanager-introspec.xml" > callmanager-glue.h
* dbus-binding-tool --mode=glib-client "../../../src/dbus/configurationmanager-introspec.xml" > configurationmanager-glue.h
* dbus-binding-tool --mode=glib-client "../../../src/dbus/contactmanager-introspec.xml" > contactmanager-glue.h
These files dbus call wrapper functions to simplify access to dbus API.
\ No newline at end of file
sflphone-gtk/src/callmanager-glue.h
→
sflphone-gtk/src/
dbus/
callmanager-glue.h
View file @
a8daf5e0
File moved
sflphone-gtk/src/configurationmanager-glue.h
→
sflphone-gtk/src/
dbus/
configurationmanager-glue.h
View file @
a8daf5e0
...
...
@@ -2305,6 +2305,81 @@ static
inline
#endif
gboolean
org_sflphone_SFLphone_ConfigurationManager_get_addressbook_list
(
DBusGProxy
*
proxy
,
char
***
OUT_settings
,
GError
**
error
)
{
return
dbus_g_proxy_call
(
proxy
,
"getAddressbookList"
,
error
,
G_TYPE_INVALID
,
G_TYPE_STRV
,
OUT_settings
,
G_TYPE_INVALID
);
}
typedef
void
(
*
org_sflphone_SFLphone_ConfigurationManager_get_addressbook_list_reply
)
(
DBusGProxy
*
proxy
,
char
*
*
OUT_settings
,
GError
*
error
,
gpointer
userdata
);
static
void
org_sflphone_SFLphone_ConfigurationManager_get_addressbook_list_async_callback
(
DBusGProxy
*
proxy
,
DBusGProxyCall
*
call
,
void
*
user_data
)
{
DBusGAsyncData
*
data
=
(
DBusGAsyncData
*
)
user_data
;
GError
*
error
=
NULL
;
char
**
OUT_settings
;
dbus_g_proxy_end_call
(
proxy
,
call
,
&
error
,
G_TYPE_STRV
,
&
OUT_settings
,
G_TYPE_INVALID
);
(
*
(
org_sflphone_SFLphone_ConfigurationManager_get_addressbook_list_reply
)
data
->
cb
)
(
proxy
,
OUT_settings
,
error
,
data
->
userdata
);
return
;
}
static
#ifdef G_HAVE_INLINE
inline
#endif
DBusGProxyCall
*
org_sflphone_SFLphone_ConfigurationManager_get_addressbook_list_async
(
DBusGProxy
*
proxy
,
org_sflphone_SFLphone_ConfigurationManager_get_addressbook_list_reply
callback
,
gpointer
userdata
)
{
DBusGAsyncData
*
stuff
;
stuff
=
g_new
(
DBusGAsyncData
,
1
);
stuff
->
cb
=
G_CALLBACK
(
callback
);
stuff
->
userdata
=
userdata
;
return
dbus_g_proxy_begin_call
(
proxy
,
"getAddressbookList"
,
org_sflphone_SFLphone_ConfigurationManager_get_addressbook_list_async_callback
,
stuff
,
g_free
,
G_TYPE_INVALID
);
}
static
#ifdef G_HAVE_INLINE
inline
#endif
gboolean
org_sflphone_SFLphone_ConfigurationManager_set_addressbook_list
(
DBusGProxy
*
proxy
,
const
char
**
IN_settings
,
GError
**
error
)
{
return
dbus_g_proxy_call
(
proxy
,
"setAddressbookList"
,
error
,
G_TYPE_STRV
,
IN_settings
,
G_TYPE_INVALID
,
G_TYPE_INVALID
);
}
typedef
void
(
*
org_sflphone_SFLphone_ConfigurationManager_set_addressbook_list_reply
)
(
DBusGProxy
*
proxy
,
GError
*
error
,
gpointer
userdata
);
static
void
org_sflphone_SFLphone_ConfigurationManager_set_addressbook_list_async_callback
(
DBusGProxy
*
proxy
,
DBusGProxyCall
*
call
,
void
*
user_data
)
{
DBusGAsyncData
*
data
=
(
DBusGAsyncData
*
)
user_data
;
GError
*
error
=
NULL
;
dbus_g_proxy_end_call
(
proxy
,
call
,
&
error
,
G_TYPE_INVALID
);
(
*
(
org_sflphone_SFLphone_ConfigurationManager_set_addressbook_list_reply
)
data
->
cb
)
(
proxy
,
error
,
data
->
userdata
);
return
;
}
static
#ifdef G_HAVE_INLINE
inline
#endif
DBusGProxyCall
*
org_sflphone_SFLphone_ConfigurationManager_set_addressbook_list_async
(
DBusGProxy
*
proxy
,
const
char
**
IN_settings
,
org_sflphone_SFLphone_ConfigurationManager_set_addressbook_list_reply
callback
,
gpointer
userdata
)
{
DBusGAsyncData
*
stuff
;
stuff
=
g_new
(
DBusGAsyncData
,
1
);
stuff
->
cb
=
G_CALLBACK
(
callback
);
stuff
->
userdata
=
userdata
;
return
dbus_g_proxy_begin_call
(
proxy
,
"setAddressbookList"
,
org_sflphone_SFLphone_ConfigurationManager_set_addressbook_list_async_callback
,
stuff
,
g_free
,
G_TYPE_STRV
,
IN_settings
,
G_TYPE_INVALID
);
}
static
#ifdef G_HAVE_INLINE
inline
#endif
gboolean
org_sflphone_SFLphone_ConfigurationManager_get_hook_settings
(
DBusGProxy
*
proxy
,
GHashTable
**
OUT_settings
,
GError
**
error
)
{
...
...
sflphone-gtk/src/dbus.c
→
sflphone-gtk/src/dbus
/dbus
.c
View file @
a8daf5e0
File moved
sflphone-gtk/src/dbus.h
→
sflphone-gtk/src/dbus
/dbus
.h
View file @
a8daf5e0
File moved
sflphone-gtk/src/instance-glue.h
→
sflphone-gtk/src/
dbus/
instance-glue.h
View file @
a8daf5e0
File moved
sflphone-gtk/src/main.c
View file @
a8daf5e0
/*
* Copyright (C) 2007 Savoir-Faire Linux inc.
* Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <actions.h>
#include <calllist.h>
#include <config.h>
#include <dbus.h>
#include <dbus
/dbus
.h>
#include <mainwindow.h>
#include <statusicon.h>
...
...
@@ -31,15 +31,15 @@ int
main
(
int
argc
,
char
*
argv
[])
{
gtk_init
(
&
argc
,
&
argv
);
g_print
(
"%s
\n
"
,
PACKAGE_STRING
);
g_print
(
"Copyright (c) 2005 2006 2007 2008 2009 Savoir-faire Linux Inc.
\n
"
);
g_print
(
"This is free software. You may redistribute copies of it under the terms of
\n
\
the GNU General Public License Version 3 <http://www.gnu.org/licenses/gpl.html>.
\n
\
There is NO WARRANTY, to the extent permitted by law.
\n\n
"
);
srand
(
time
(
NULL
)
);
// Internationalization
bindtextdomain
(
"sflphone"
,
"/usr/share/locale"
);
textdomain
(
"sflphone"
);
...
...
@@ -50,7 +50,7 @@ There is NO WARRANTY, to the extent permitted by law.\n\n");
show_status_icon
();
#endif
create_main_window
();
#if GTK_CHECK_VERSION(2,10,0)
if
(
dbus_is_start_hidden
()
)
{
...
...
@@ -67,18 +67,18 @@ There is NO WARRANTY, to the extent permitted by law.\n\n");
return
0
;
}
/** @mainpage SFLphone GTK+ Client Documentation
/** @mainpage SFLphone GTK+ Client Documentation
* SFLphone GTK+ Client was started as a debuging tool for the new dbus API but
* ended being a full featured client.
* ended being a full featured client.
* @section intro_sec Architecture
* SFLphone respects the MVC principle. Since the internal workings and the UI
* SFLphone respects the MVC principle. Since the internal workings and the UI
* are too different programs, dbus is used to exchange data between them. Dbus
* is thereby inforcing MVC by only allowing access to high level functions and data.
*
* Therefore, when a button is clicked, a direct dbus API call should happen
* (defined in dbus.h). The UI should only be updated when signals are received
* Therefore, when a button is clicked, a direct dbus API call should happen
* (defined in dbus.h). The UI should only be updated when signals are received
* from dbus. The call back to those signals are defined in dbus.c, but they call
* functions in actions.h. This makes things cleaner as one signal could have many
* functions in actions.h. This makes things cleaner as one signal could have many
* actions.
*
* Accounts are stored in form of a account_t in an account list with access functions
...
...
@@ -89,24 +89,24 @@ There is NO WARRANTY, to the extent permitted by law.\n\n");
*
*/
// This doc is for generated files that get overridden by tools.
// This doc is for generated files that get overridden by tools.
/** @file marshaller.h
* @brief This file contains marshallers functions for dbus signals.
* This file is generated by glib-genmarshall.
* Every dbus signal has to have a marshaller. To generate a new marshaller function,
* This file is generated by glib-genmarshall.
* Every dbus signal has to have a marshaller. To generate a new marshaller function,
* add its signature to the marshaller.list. Then run :
* <pre>glib-genmarshal --body --g-fatal-warnings marshaller.list > marshaller.c
* glib-genmarshal --header --g-fatal-warnings marshaller.list > marshaller.h</pre>
* to get the generated marshallers.
* Just before connecting to the dbus signal, register the marshaller with:
* Just before connecting to the dbus signal, register the marshaller with:
* dbus_g_object_register_marshaller().
*/
/** @file callmanager-glue.h, configurationmanager-glue.h, contactmanager-glue.h
* @brief CallManager, ConfigurationManager and ContactManager dbus APIs.
* These files are generated by dbus-binding-tool using the server's files named *-introspec.xml:
* <pre>dbus-binding-tool --mode=glib-client "../../src/dbus/callmanager-introspec.xml" > callmanager-glue.h</pre>
* <pre>dbus-binding-tool --mode=glib-client "../../src/dbus/configurationmanager-introspec.xml" > configurationmanager-glue.h</pre>
* <pre>dbus-binding-tool --mode=glib-client "../../src/dbus/contactmanager-introspec.xml" > contactmanager-glue.h</pre>
* These files dbus call wrapper functions to simplify access to dbus API.
* These files dbus call wrapper functions to simplify access to dbus API.
*/
sflphone-gtk/src/menus.c
View file @
a8daf5e0
...
...
@@ -21,7 +21,7 @@
#include <menus.h>
#include <config.h>
#include <configwindow.h>
#include <dbus.h>
#include <dbus
/dbus
.h>
#include <mainwindow.h>
#include <assistant.h>
#include <gtk/gtk.h>
...
...
@@ -982,7 +982,7 @@ void add_registered_accounts_to_menu (GtkWidget *menu) {
unsigned
int
i
;
account_t
*
acc
;
gchar
*
alias
;
menu_items
=
gtk_separator_menu_item_new
();
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
menu
),
menu_items
);
gtk_widget_show
(
menu_items
);
...
...
sflphone-gtk/src/sflnotify.h
View file @
a8daf5e0
/*
* Copyright (C) 2008 Savoir-Faire Linux inc.
* Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
...
...
@@ -28,21 +28,21 @@
#include <libnotify/notify.h>
#include <accountlist.h>
#include <calllist.h>
#include <dbus.h>
#include <dbus
/dbus
.h>
#include <actions.h>
#include <statusicon.h>
#include <configwindow.h>
#include <sflphone_const.h>
/**
* Notify an incoming call
* Notify an incoming call
* A dialog box is attached to the status icon
* @param c The incoming call
*/
void
notify_incoming_call
(
call_t
*
c
);
/**
* Notify voice mails count
* Notify voice mails count
* An info box is attached to the status icon
* @param count The number of voice mails
* @param acc The account that received the notification
...
...
@@ -66,8 +66,8 @@ void notify_no_accounts( );
void
notify_no_registered_accounts
(
);
/**
* Callback when answer button is pressed.
* Action associated: Pick up the incoming call
* Callback when answer button is pressed.
* Action associated: Pick up the incoming call
* @param notification The pointer on the notification structure
* @param data The data associated. Here: call_t*
*/
...
...
@@ -75,7 +75,7 @@ void answer_call_cb( NotifyNotification *notification, gpointer data );
/**
* Callback when refuse button is pressed
* Action associated: Hang up the incoming call
* Action associated: Hang up the incoming call
* @param notification The pointer on the notification structure
* @param data The data associated. Here: call_t*
*/
...
...
@@ -83,14 +83,14 @@ void refuse_call_cb( NotifyNotification *notification, gpointer data );
/**
* Callback when ignore button is pressed
* Action associated: Nothing - The call continues ringing
* Action associated: Nothing - The call continues ringing
* @param notification The pointer on the notification structure
* @param data The data associated. Here: call_t*
*/
void
ignore_call_cb
(
NotifyNotification
*
notification
,
gpointer
data
);
/**
* Callback when you try to make a call without accounts setup and 'setup account' button is clicked.
* Callback when you try to make a call without accounts setup and 'setup account' button is clicked.
* Action associated: Open the account window
* @param notification The pointer on the notification structure
* @param data The data associated. Here: account_t*
...
...
sflphone-gtk/src/sliders.c
View file @
a8daf5e0
/*
* Copyright (C) 2007 Savoir-Faire Linux inc.
* Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*