Commit 2e82b778 authored by Pierre-Luc Beaudoin's avatar Pierre-Luc Beaudoin
Browse files

Merge commit 'origin/master'

parents c0ffee7b bf52db50
......@@ -4,4 +4,11 @@
About
=====
SFLphone is a mega phone. We like it.
SFLphone is meant to be a robust enterprise-class desktop phone. It is design
with a hundred-calls-a-day receptionist in mind. It can work for you, too.
SFLphone is released under the *GNU General Public License* (GPLv2 and up).
SFLphone is being developed by the global community, and maintained by
http://www.savoirfairelinux.com[Savoir-faire Linux], a Montreal,
Quebec, Canada-based Linux consulting company.
......@@ -2,16 +2,30 @@
Build notes
-----------
===========
sflphoned
~~~~~~~~~
---------
Instructions to build `sflphoned`:
dbus-c++-bindings
~~~~~~~~~~~~~~~~~
Go to `libs/dbus` and run:
-------------------------
./autogen.sh
./configure --prefix=/usr
make
sudo make install
-------------------------
NOTE: If you have `colorgcc`, configure will *fail* on `libeXpat`. Issue an `unset CC` and `unset CXX` to build the dbus bindings.
libiax2
^^^^^^^
~~~~~~~
Go to `libs/libiax2` and run:
......@@ -22,11 +36,12 @@ sudo make install
-------------------------
the daemon
^^^^^^^^^^
~~~~~~~~~~
Then, go to the root of the repository, and run:
---------------------------------------------------
autoreconf --install
./configure --prefix=/usr (or whatever your prefix)
make
sudo make install
......@@ -34,13 +49,20 @@ sudo make install
sflphone-qt
~~~~~~~~~~~
-----------
`sflphone-qt` gets built with sflphoned, for now.
`sflphone-qt` is *deprecated* and should not be built anymore.
sflphone-gtk
~~~~~~~~~~~~
------------
Merging of `sflphone-gtk` to come.
Compile `sflphone-gtk` by running:
-------------------------
cd sflphone-gtk
gnome-autogen.sh
./configure --prefix=/usr
make
sudo make install
-------------------------
......@@ -15,6 +15,20 @@ libosip2 2.2.2 http://www.gnu.org/software/osip/[website]
portaudio v19 http://www.portaudio.com/[website]
portaudio C++ binds. http://www.portaudio.com/archives/pa_snapshot_v19.tar.gz[archive]
libsamplerate 0.1.2 http://www.mega-nerd.com/SRC/[website]
dbus-c++-1 0.5 See Build notes.
libexpat1 1.95.8 Packaged with your favorite distribution
--------------------------------------------------------------------------------------
Dependencies to compile SFLphone-GTK
------------------------------------
`--------------------`----------`-----------------------------------------------------
Program Version Notes
--------------------------------------------------------------------------------------
libgtk2.0 2.2
dbus-glib 0.35
--------------------------------------------------------------------------------------
// AsciiDoc
Downloads
=========
Latest release:
[grid="all"]
`--------------------`----------`---------------------------
Package Type Link
------------------------------------------------------------
*SFLphone 0.7.2* Sources http://www.sflphone.org/releases/sflphone-0.7.2.tar.gz[Download] sflfile:Build.txt[Build notes]
FC6-RPM http://www.sflphone.org/releases/packages/rpm-fc6/sflphone-0.7.2-1.i386.rpm[Download]
RC6-SRPM http://www.sflphone.org/releases/packages/rpm-fc6/devel/sflphone-0.7.2-1.src.rpm[Download]
*SFLphone 0.7.0* Source http://www.sflphone.org/releases/sflphone-0.7.0.tar.gz[Download]
FC4-RPM http://www.sflphone.org/releases/packages/rpm-fc4/sflphone-0.7.0-1.i386.rpm[Download]
FC4-SRPM http://www.sflphone.org/releases/packages/rpm-fc4/devel/sflphone-0.7.0-1.src.rpm[Download]
------------------------------------------------------------
Latest source code
------------------
See the sflfile:Git_Access.txt[repository access] page for the latest source
code.
......@@ -5,16 +5,14 @@ Git anonymous access
--------------------
To access SFLphone's git repository (read-only):
To grab source code form SFLphone's git repository:
---------------------------------------------
git clone git://sflphone.org/git/sflphone.git
cd sflphone
autoreconf --install
---------------------------------------------
View sflsite:build[build notes] for more details.
......
//AsciiDoc file
Goals
-----
[insert goals]
// AsciiDoc file
IRC
===
Server:: `irc.freenode.org`
Channel:: `#sflphone`
// AsciiDoc file
Mailing lists
=============
sflphone-user
-------------
http://pouetpouet.list.com[subscribe] http://pouetpouet2.list.com[unsubscribe]
http://pouetpouet6.list.com[archives]
sflphone-devel
--------------
http://pouetpouet3.list.com[subscribe] http://pouetpouet4.list.com[unsubscribe]
http://pouetpouet5.list.com[archives]
......@@ -3,5 +3,7 @@
News
====
* News 1
* News 2
September 2007:: A new Gtk+ client is being written, to play with the new D-BUS client/server interface. See sflsite:screenshots[]. Upcoming release 0.8.0.
July 2007:: *Pierre-Luc Beaudoin* and *Alexandre Bourget* have taken the lead of maintenance and development of SFLphone.
// AsciiDoc file
Screenshots
-----------
Screenshots of upcoming releases
--------------------------------
.Screenshot de 2007
sflimage::images/SflphonePOuetpoUEt.png[SFLphone qt3]
This is an upcoming client, to be released with version 0.8.
.Screenshot de SFLphone 0.7
sflimage::images/sflphone0.7.png[SFLphone 0.7]
.New SFLphone-GTK client (ver. 0.8)
sflimage::images/screenshots/sflphone_gtk_0.8.png[New SFLphone GTK client]
Historical screenshots
----------------------
.SFLphone 0.6.2 - Brushed metal skin
sflimage::images/screenshots/sflphone_qt3_0.6.2.png[SFLphone 0.6.2]
.SFLphone 0.6 - Alternate skin
sflimage::images/screenshots/sflphone_metal.png[SFLphone 0.6]
......@@ -16,8 +16,11 @@
#
ifdef::backend-xhtml11[]
[sflink-inlinemacro]
<a href="index.php?f={target}.txt">{0?{0}}{0!{target}}</a>
[sflfile-inlinemacro]
<a href="index.php?file={target}">{0?{0}}{0!{target}}</a>
[sflsite-inlinemacro]
<a href="index.php?mod={target}">{0?{0}}{0!{target}}</a>
endif::backend-xhtml11[]
#
......@@ -28,7 +31,7 @@ endif::backend-xhtml11[]
<a id="{id}"></a>
<div class="content">
<a class="image" href="{link#}">
<img src="index.php?i={target}" alt="{1={target}}"{1? title="{1}"}{width? width="{width}"}{height? height="{height}"}/>
<img src="index.php?img={target}" alt="{1={target}}"{1? title="{1}"}{width? width="{width}"}{height? height="{height}"}/>
{link#}</a>
</div>
<div class="image-title">{title}</div>
......
......@@ -450,7 +450,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = src src/audio src/zeroconf src/config src/gui/server src/gui
INPUT = src src/audio src/zeroconf src/config src/dbus
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
......
......@@ -28,15 +28,16 @@
#define ACCOUNT_REGISTER "Account.autoregister"
#define ACCOUNT_SIP_FULL_NAME "SIP.fullName"
#define ACCOUNT_SIP_HOST_PART "SIP.hostPart"
#define ACCOUNT_SIP_USER_PART "SIP.userPart"
#define ACCOUNT_SIP_AUTH_NAME "SIP.username"
#define ACCOUNT_SIP_PASSWORD "SIP.password"
#define ACCOUNT_SIP_HOST_PART "SIP.hostPart"
#define ACCOUNT_SIP_PROXY "SIP.proxy"
#define ACCOUNT_IAX_HOST "IAX.host"
#define ACCOUNT_IAX_USER "IAX.user"
#define ACCOUNT_IAX_PASS "IAX.pass"
#define ACCOUNT_IAX_FULL_NAME "IAX.fullName"
#define ACCOUNT_IAX_HOST "IAX.host"
#define ACCOUNT_IAX_USER "IAX.user"
#define ACCOUNT_IAX_PASS "IAX.pass"
typedef enum
{
......
......@@ -27,6 +27,21 @@
/** Local variables */
account_t * currentAccount;
GtkDialog * dialog;
GtkWidget * table;
GtkWidget * label;
GtkWidget * entryID;
GtkWidget * entryName;
GtkWidget * entryProtocol;
GtkWidget * entryEnabled;
GtkWidget * entryRegister;
GtkWidget * entryFullName;
GtkWidget * entryUserPart;
GtkWidget * entryHostPart;
GtkWidget * entryUsername;
GtkWidget * entryPassword;
/**
* Delete an account
*/
......@@ -37,26 +52,64 @@ delete_account( GtkWidget *widget, gpointer data )
}*/
/* Signal to entryProtocol 'changed' */
void
change_protocol (account_t * currentAccount)
{
gchar* proto = (gchar *)gtk_combo_box_get_active_text(GTK_COMBO_BOX(entryProtocol));
//g_print("Protocol changed\n");
// toggle sensitivity for: entryUserPart
if (strcmp(proto, "SIP") == 0) {
gtk_widget_set_sensitive( GTK_WIDGET(entryUserPart), TRUE);
}
else if (strcmp(proto, "IAX") == 0) {
gtk_widget_set_sensitive( GTK_WIDGET(entryUserPart), FALSE);
}
else {
// Should not get here.
g_print("Unknown protocol: %s\n", proto);
}
}
void
show_account_window (account_t * a)
{
GtkDialog * dialog;
GtkWidget * table;
GtkWidget * label;
GtkWidget * entryID;
GtkWidget * entryName;
GtkWidget * entryProtocol;
GtkWidget * entryEnabled;
GtkWidget * entryRegister;
GtkWidget * entryFullName;
GtkWidget * entryUserPart;
GtkWidget * entryHostPart;
GtkWidget * entryUsername;
GtkWidget * entryPassword;
guint response;
currentAccount = a;
// Current settings
gchar * curAccountType = NULL;
gchar * curProtocol = NULL;
gchar * curUserPart = NULL;
gchar * curHostPart = NULL;
gchar * curPassword = NULL;
gchar * curUsername = NULL;
gchar * curFullName = NULL;
/* TODO: add curProxy, and add boxes for Proxy support */
// Load from SIP/IAX/Unknown ?
curAccountType = g_hash_table_lookup(currentAccount->properties, ACCOUNT_TYPE);
if (strcmp(curAccountType, "IAX") == 0) {
curHostPart = g_hash_table_lookup(currentAccount->properties, ACCOUNT_IAX_HOST);
curPassword = g_hash_table_lookup(currentAccount->properties, ACCOUNT_IAX_PASS);
curUsername = g_hash_table_lookup(currentAccount->properties, ACCOUNT_IAX_USER);
curFullName = g_hash_table_lookup(currentAccount->properties, ACCOUNT_IAX_FULL_NAME);
}
else if (strcmp(curAccountType, "SIP") == 0) {
curHostPart = g_hash_table_lookup(currentAccount->properties, ACCOUNT_SIP_HOST_PART);
curPassword = g_hash_table_lookup(currentAccount->properties, ACCOUNT_SIP_PASSWORD);
curUsername = g_hash_table_lookup(currentAccount->properties, ACCOUNT_SIP_AUTH_NAME);
curFullName = g_hash_table_lookup(currentAccount->properties, ACCOUNT_SIP_FULL_NAME);
curUserPart = g_hash_table_lookup(currentAccount->properties, ACCOUNT_SIP_USER_PART);
}
else {
// Default values...
curAccountType = "SIP";
}
dialog = GTK_DIALOG(gtk_dialog_new_with_buttons ("Account settings",
GTK_WINDOW(get_main_window()),
......@@ -108,25 +161,36 @@ show_account_window (account_t * a)
gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
entryProtocol = gtk_combo_box_new_text();
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryProtocol);
gtk_widget_set_sensitive( GTK_WIDGET(entryProtocol), FALSE); /* TODO When IAX is ok */
//gtk_widget_set_sensitive( GTK_WIDGET(entryProtocol), TRUE);
gtk_combo_box_append_text(GTK_COMBO_BOX(entryProtocol), "SIP");
gtk_combo_box_append_text(GTK_COMBO_BOX(entryProtocol), "IAX");
if(strcmp(g_hash_table_lookup(a->properties, ACCOUNT_TYPE), "SIP") == 0)
if(strcmp(curAccountType, "SIP") == 0)
{
gtk_combo_box_set_active(GTK_COMBO_BOX(entryProtocol),0);
}
else
else if(strcmp(curAccountType, "IAX") == 0)
{
gtk_combo_box_set_active(GTK_COMBO_BOX(entryProtocol),1);
}
}
else
{
/* 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_table_attach ( GTK_TABLE( table ), entryProtocol, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
/* Link signal 'changed' */
g_signal_connect (G_OBJECT (GTK_COMBO_BOX(entryProtocol)), "changed",
G_CALLBACK (change_protocol),
currentAccount);
label = gtk_label_new_with_mnemonic ("_Full Name:");
gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
entryFullName = gtk_entry_new();
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryFullName);
gtk_entry_set_text(GTK_ENTRY(entryFullName), g_hash_table_lookup(currentAccount->properties, ACCOUNT_SIP_FULL_NAME));
gtk_entry_set_text(GTK_ENTRY(entryFullName), curFullName);
gtk_table_attach ( GTK_TABLE( table ), entryFullName, 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
label = gtk_label_new_with_mnemonic ("_User part:");
......@@ -134,7 +198,7 @@ show_account_window (account_t * a)
gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
entryUserPart = gtk_entry_new();
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryUserPart);
gtk_entry_set_text(GTK_ENTRY(entryUserPart), g_hash_table_lookup(currentAccount->properties, ACCOUNT_SIP_USER_PART));
gtk_entry_set_text(GTK_ENTRY(entryUserPart), curUserPart);
gtk_table_attach ( GTK_TABLE( table ), entryUserPart, 1, 2, 6, 7, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
label = gtk_label_new_with_mnemonic ("_Host part:");
......@@ -142,7 +206,7 @@ show_account_window (account_t * a)
gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
entryHostPart = gtk_entry_new();
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryHostPart);
gtk_entry_set_text(GTK_ENTRY(entryHostPart), g_hash_table_lookup(currentAccount->properties, ACCOUNT_SIP_HOST_PART));
gtk_entry_set_text(GTK_ENTRY(entryHostPart), curHostPart);
gtk_table_attach ( GTK_TABLE( table ), entryHostPart, 1, 2, 7, 8, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
label = gtk_label_new_with_mnemonic ("U_sername:");
......@@ -150,7 +214,7 @@ show_account_window (account_t * a)
gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
entryUsername = gtk_entry_new();
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryUsername);
gtk_entry_set_text(GTK_ENTRY(entryUsername), g_hash_table_lookup(currentAccount->properties, ACCOUNT_SIP_AUTH_NAME));
gtk_entry_set_text(GTK_ENTRY(entryUsername), curUsername);
gtk_table_attach ( GTK_TABLE( table ), entryUsername, 1, 2, 8, 9, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
label = gtk_label_new_with_mnemonic ("_Password:");
......@@ -159,9 +223,21 @@ show_account_window (account_t * a)
entryPassword = gtk_entry_new();
gtk_entry_set_visibility(GTK_ENTRY(entryPassword), FALSE);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryPassword);
gtk_entry_set_text(GTK_ENTRY(entryPassword), g_hash_table_lookup(currentAccount->properties, ACCOUNT_SIP_PASSWORD));
gtk_entry_set_text(GTK_ENTRY(entryPassword), curPassword);
gtk_table_attach ( GTK_TABLE( table ), entryPassword, 1, 2, 9, 10, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
// Toggle enabled/disabled widgets
if (strcmp(curAccountType, "SIP") == 0) {
//gtk_widget_set_sensitive( GTK_WIDGET(entryUserPart), TRUE);<
}
else if (strcmp(curAccountType, "IAX") == 0) {
gtk_widget_set_sensitive( GTK_WIDGET(entryUserPart), FALSE);
}
else {
// Disable everything ! ouch!
// Shouldn't get there.
}
gtk_box_pack_start (GTK_BOX (dialog->vbox), table, TRUE, TRUE, 0);
......@@ -171,7 +247,9 @@ show_account_window (account_t * a)
response = gtk_dialog_run (GTK_DIALOG (dialog));
if(response == GTK_RESPONSE_ACCEPT)
{
{
gchar* proto = (gchar *)gtk_combo_box_get_active_text(GTK_COMBO_BOX(entryProtocol));
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_ENABLED),
g_strdup(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(entryEnabled)) ? "TRUE": "FALSE"));
......@@ -182,21 +260,41 @@ show_account_window (account_t * a)
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_ALIAS),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryName))));
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_SIP_FULL_NAME),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryFullName))));
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_SIP_USER_PART),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryUserPart))));
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_SIP_HOST_PART),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryHostPart))));
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_SIP_AUTH_NAME),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryUsername))));
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_SIP_PASSWORD),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryPassword))));
if (strcmp(proto, "SIP") == 0) { /* Protocol = SIP */
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_SIP_FULL_NAME),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryFullName))));
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_SIP_USER_PART),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryUserPart))));
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_SIP_HOST_PART),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryHostPart))));
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_SIP_AUTH_NAME),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryUsername))));
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_SIP_PASSWORD),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryPassword))));
}
else if (strcmp(proto, "IAX") == 0) { /* Protocol = IAX */
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_IAX_FULL_NAME),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryFullName))));
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_IAX_HOST),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryHostPart))));
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_IAX_USER),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryUsername))));
g_hash_table_replace(currentAccount->properties,
g_strdup(ACCOUNT_IAX_PASS),
g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryPassword))));
}
else {
}
dbus_set_account_details(currentAccount);
}
......
......@@ -160,7 +160,7 @@ create_accounts_tab()
view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(account_store));
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
g_signal_connect (G_OBJECT (sel), "changed",
g_signal_connect (G_OBJECT (sel), "changed",
G_CALLBACK (select_account),
account_store);
......
......@@ -426,13 +426,13 @@ dbus_set_account_details(account_t *a)
&error);
if (error)
{
g_printerr ("Failed to call get_account_details() on ConfigurationManager: %s\n",
g_printerr ("Failed to call set_account_details() on ConfigurationManager: %s\n",
error->message);
g_error_free (error);
}
else
{
g_print ("DBus called get_account_details() on ConfigurationManager\n");
g_print ("DBus called set_account_details() on ConfigurationManager\n");
}
}
......
......@@ -130,12 +130,6 @@ class Account{
bool getState() { return _state; }
private:
/**
* Create a unique VoIPLink() depending on the protocol
* Multiple call to this function do nothing (if the voiplink pointer is 0)
* @return false if an error occurs
*/
virtual bool createVoIPLink() = 0;
protected:
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment