Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
jami-daemon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
130
Issues
130
List
Boards
Labels
Service Desk
Milestones
Iterations
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
savoirfairelinux
jami-daemon
Commits
fdd135d5
Commit
fdd135d5
authored
May 16, 2012
by
Alexandre Savard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'no_globals_in_calltree_experiment'
parents
236cbb4b
3953fce2
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
467 additions
and
687 deletions
+467
-687
daemon/src/dbus/callmanager-introspec.xml
daemon/src/dbus/callmanager-introspec.xml
+18
-0
daemon/src/dbus/callmanager.cpp
daemon/src/dbus/callmanager.cpp
+6
-0
daemon/src/dbus/callmanager.h
daemon/src/dbus/callmanager.h
+1
-0
daemon/src/managerimpl.cpp
daemon/src/managerimpl.cpp
+23
-11
daemon/src/managerimpl.h
daemon/src/managerimpl.h
+2
-0
gnome/src/actions.c
gnome/src/actions.c
+20
-24
gnome/src/callable_obj.c
gnome/src/callable_obj.c
+1
-5
gnome/src/callable_obj.h
gnome/src/callable_obj.h
+1
-2
gnome/src/conference_obj.c
gnome/src/conference_obj.c
+0
-11
gnome/src/contacts/calltab.c
gnome/src/contacts/calltab.c
+2
-2
gnome/src/contacts/calltree.c
gnome/src/contacts/calltree.c
+357
-615
gnome/src/contacts/calltree.h
gnome/src/contacts/calltree.h
+1
-14
gnome/src/dbus/callmanager-introspec.xml
gnome/src/dbus/callmanager-introspec.xml
+18
-0
gnome/src/dbus/dbus.c
gnome/src/dbus/dbus.c
+10
-3
gnome/src/dbus/dbus.h
gnome/src/dbus/dbus.h
+6
-0
gnome/src/uimanager.c
gnome/src/uimanager.c
+1
-0
No files found.
daemon/src/dbus/callmanager-introspec.xml
View file @
fdd135d5
...
...
@@ -313,6 +313,24 @@
</arg>
</method>
<method
name=
"getConferenceId"
tp:name-for-bindings=
"getConferenceId"
>
<tp:added
version=
"1.1.0"
/>
<tp:docstring>
If thsi call participate to a conference, return the conference id.
Return an empty string elsewhere.
</tp:docstring>
<arg
type=
"s"
name=
"callID"
direction=
"in"
>
<tp:docstring>
The call id.
</tp:docstring>
</arg>
<arg
type=
"s"
name=
"confID"
direction=
"out"
>
<tp:docstring>
A string containing the conference ID, or an empty string.
</tp:docstring>
</arg>
</method>
<method
name=
"setRecording"
tp:name-for-bindings=
"setRecording"
>
<tp:docstring>
Start recording a call.
...
...
daemon/src/dbus/callmanager.cpp
View file @
fdd135d5
...
...
@@ -232,6 +232,12 @@ CallManager::getParticipantList(const std::string& confID)
return
Manager
::
instance
().
getParticipantList
(
confID
);
}
std
::
string
CallManager
::
getConferenceId
(
const
std
::
string
&
callID
)
{
return
Manager
::
instance
().
getConferenceId
(
callID
);
}
bool
CallManager
::
startRecordedFilePlayback
(
const
std
::
string
&
filepath
)
{
...
...
daemon/src/dbus/callmanager.h
View file @
fdd135d5
...
...
@@ -99,6 +99,7 @@ class CallManager
void
unholdConference
(
const
std
::
string
&
confID
);
std
::
vector
<
std
::
string
>
getConferenceList
();
std
::
vector
<
std
::
string
>
getParticipantList
(
const
std
::
string
&
confID
);
std
::
string
getConferenceId
(
const
std
::
string
&
callID
);
std
::
map
<
std
::
string
,
std
::
string
>
getConferenceDetails
(
const
std
::
string
&
callID
);
/* File Playback methods */
...
...
daemon/src/managerimpl.cpp
View file @
fdd135d5
...
...
@@ -1144,27 +1144,25 @@ void ManagerImpl::processRemainingParticipants(const std::string ¤t_call_i
void
ManagerImpl
::
joinConference
(
const
std
::
string
&
conf_id1
,
const
std
::
string
&
conf_id2
)
{
ConferenceMap
::
iterator
iter
(
conferenceMap_
.
find
(
conf_id1
));
DEBUG
(
"Join conferences %s and %s"
,
conf_id1
.
c_str
(),
conf_id2
.
c_str
(
));
if
(
iter
==
conferenceMap_
.
end
())
{
if
(
conferenceMap_
.
find
(
conf_id1
)
==
conferenceMap_
.
end
())
{
ERROR
(
"Not a valid conference ID: %s"
,
conf_id1
.
c_str
());
return
;
}
if
(
conferenceMap_
.
find
(
conf_id2
)
!
=
conferenceMap_
.
end
())
{
if
(
conferenceMap_
.
find
(
conf_id2
)
=
=
conferenceMap_
.
end
())
{
ERROR
(
"Not a valid conference ID: %s"
,
conf_id2
.
c_str
());
return
;
}
if
(
iter
->
second
)
{
Conference
*
conf
=
iter
->
second
;
ParticipantSet
participants
(
conf
->
getParticipantList
());
Conference
*
conf
=
conferenceMap_
.
find
(
conf_id1
)
->
second
;
ParticipantSet
participants
(
conf
->
getParticipantList
());
for
(
ParticipantSet
::
const_iterator
p
=
participants
.
begin
();
p
!=
participants
.
end
();
++
p
)
{
detachParticipant
(
*
p
,
""
);
addParticipant
(
*
p
,
conf_id2
);
}
for
(
ParticipantSet
::
const_iterator
p
=
participants
.
begin
();
p
!=
participants
.
end
();
++
p
)
{
detachParticipant
(
*
p
,
""
);
addParticipant
(
*
p
,
conf_id2
);
}
}
...
...
@@ -2855,6 +2853,20 @@ std::vector<std::string> ManagerImpl::getParticipantList(const std::string& conf
return
v
;
}
std
::
string
ManagerImpl
::
getConferenceId
(
const
std
::
string
&
callID
)
{
std
::
string
account_id
=
getAccountFromCall
(
callID
);
Call
*
call
=
getAccountLink
(
account_id
)
->
getCall
(
callID
);
if
(
call
==
NULL
)
{
ERROR
(
"Get conference id"
);
return
""
;
}
std
::
string
confID
=
call
->
getConfId
();
return
confID
;
}
void
ManagerImpl
::
saveHistory
()
{
if
(
!
history_
.
save
())
...
...
daemon/src/managerimpl.h
View file @
fdd135d5
...
...
@@ -458,6 +458,8 @@ class ManagerImpl {
*/
std
::
vector
<
std
::
string
>
getParticipantList
(
const
std
::
string
&
confID
)
const
;
std
::
string
getConferenceId
(
const
std
::
string
&
callID
);
/**
* Save the details of an existing account, given the account ID
* This will load the configuration map with the given data.
...
...
gnome/src/actions.c
View file @
fdd135d5
...
...
@@ -152,9 +152,6 @@ sflphone_quit()
calllist_clean
(
current_calls_tab
);
calllist_clean
(
contacts_tab
);
calllist_clean
(
history_tab
);
gtk_tree_store_clear
(
history_tab
->
store
);
gtk_tree_store_clear
(
current_calls_tab
->
store
);
gtk_tree_store_clear
(
contacts_tab
->
store
);
gtk_main_quit
();
}
}
...
...
@@ -186,11 +183,6 @@ sflphone_hung_up(callable_obj_t * c)
call_remove_all_errors
(
c
);
update_actions
();
if
(
c
->
_confID
)
{
g_free
(
c
->
_confID
);
c
->
_confID
=
NULL
;
}
// test whether the widget contains text, if not remove it
if
((
im_window_get_nb_tabs
()
>
1
)
&&
c
->
_im_widget
&&
!
(
IM_WIDGET
(
c
->
_im_widget
)
->
containText
))
im_window_remove_tab
(
c
->
_im_widget
);
...
...
@@ -396,6 +388,7 @@ sflphone_pick_up()
dbus_transfer
(
selectedCall
);
time
(
&
selectedCall
->
_time_stop
);
calltree_remove_call
(
current_calls_tab
,
selectedCall
->
_callID
);
update_actions
();
calllist_remove_call
(
current_calls_tab
,
selectedCall
->
_callID
);
break
;
case
CALL_STATE_CURRENT
:
...
...
@@ -615,8 +608,12 @@ sflphone_new_call()
callable_obj_t
*
current_selected_call
=
calltab_get_selected_call
(
current_calls_tab
);
if
((
current_selected_call
!=
NULL
)
&&
(
current_selected_call
->
_confID
==
NULL
))
sflphone_on_hold
();
if
(
current_selected_call
!=
NULL
)
{
gchar
*
confID
=
dbus_get_conference_id
(
current_selected_call
->
_callID
);
if
(
g_strcmp0
(
confID
,
""
)
!=
0
)
{
sflphone_on_hold
();
}
}
// Play a tone when creating a new call
if
(
calllist_get_size
(
current_calls_tab
)
==
0
)
...
...
@@ -695,6 +692,7 @@ sflphone_keypad(guint keyval, gchar * key)
dbus_transfer
(
c
);
time
(
&
c
->
_time_stop
);
calltree_remove_call
(
current_calls_tab
,
c
->
_callID
);
update_actions
();
break
;
case
GDK_Escape
:
sflphone_unset_transfer
();
...
...
@@ -814,11 +812,6 @@ sflphone_detach_participant(const gchar* callID)
DEBUG
(
"Detach participant %s"
,
selectedCall
->
_callID
);
if
(
selectedCall
->
_confID
)
{
g_free
(
selectedCall
->
_confID
);
selectedCall
->
_confID
=
NULL
;
}
im_widget_update_state
(
IM_WIDGET
(
selectedCall
->
_im_widget
),
TRUE
);
calltree_remove_call
(
current_calls_tab
,
selectedCall
->
_callID
);
calltree_add_call
(
current_calls_tab
,
selectedCall
,
NULL
);
...
...
@@ -947,20 +940,23 @@ void sflphone_fill_codec_list_per_account(account_t *account)
void
sflphone_fill_call_list
(
void
)
{
gchar
**
list
=
dbus_get_call_list
();
gchar
**
call_
list
=
dbus_get_call_list
();
for
(
gchar
**
call
s
=
list
;
calls
&&
*
calls
;
++
calls
)
{
gchar
*
callID
=
*
call
s
;
for
(
gchar
**
call
p
=
call_list
;
callp
&&
*
callp
;
++
callp
)
{
gchar
*
callID
=
*
call
p
;
if
(
!
calllist_get_call
(
current_calls_tab
,
callID
))
{
callable_obj_t
*
c
=
create_new_call_from_details
(
*
calls
,
dbus_get_call_details
(
*
calls
));
c
->
_zrtp_confirmed
=
FALSE
;
calllist_add_call
(
current_calls_tab
,
c
);
if
(
!
c
->
_confID
||
strlen
(
c
->
_confID
)
==
0
)
calltree_add_call
(
current_calls_tab
,
c
,
NULL
);
callable_obj_t
*
call
=
create_new_call_from_details
(
*
callp
,
dbus_get_call_details
(
*
callp
));
call
->
_zrtp_confirmed
=
FALSE
;
calllist_add_call
(
current_calls_tab
,
call
);
// add in treeview only if does not participate to a conference
gchar
*
confID
=
dbus_get_conference_id
(
call
->
_callID
);
if
(
g_strcmp0
(
confID
,
""
)
==
0
)
calltree_add_call
(
current_calls_tab
,
call
,
NULL
);
}
}
g_strfreev
(
list
);
g_strfreev
(
call_
list
);
}
...
...
gnome/src/callable_obj.c
View file @
fdd135d5
...
...
@@ -146,7 +146,6 @@ callable_obj_t *create_new_call_from_details(const gchar *call_id, GHashTable *d
const
gchar
*
const
peer_number
=
g_hash_table_lookup
(
details
,
"PEER_NUMBER"
);
const
gchar
*
const
display_name
=
g_hash_table_lookup
(
details
,
"DISPLAY_NAME"
);
const
gchar
*
const
state_str
=
g_hash_table_lookup
(
details
,
"CALL_STATE"
);
const
gchar
*
const
conf_id
=
g_hash_table_lookup
(
details
,
"CONF_ID"
);
if
(
utf8_case_equal
(
state_str
,
"CURRENT"
))
state
=
CALL_STATE_CURRENT
;
...
...
@@ -163,7 +162,6 @@ callable_obj_t *create_new_call_from_details(const gchar *call_id, GHashTable *d
gchar
*
number
=
call_get_peer_number
(
peer_number
);
callable_obj_t
*
c
=
create_new_call
(
CALL
,
state
,
call_id
,
accountID
,
display_name
,
number
);
c
->
_confID
=
g_strdup
(
conf_id
);
g_free
(
number
);
return
c
;
}
...
...
@@ -199,8 +197,7 @@ callable_obj_t *create_history_entry_from_hashtable(GHashTable *entry)
value
=
g_hash_table_lookup
(
entry
,
TIMESTAMP_STOP_KEY
);
new_call
->
_time_stop
=
value
?
atoi
(
value
)
:
0
;
new_call
->
_recordfile
=
g_strdup
(
g_hash_table_lookup
(
entry
,
RECORDING_PATH_KEY
));
new_call
->
_confID
=
g_strdup
(
g_hash_table_lookup
(
entry
,
CONFID_KEY
));
new_call
->
_historyConfID
=
g_strdup
(
new_call
->
_confID
);
new_call
->
_historyConfID
=
g_strdup
(
g_hash_table_lookup
(
entry
,
CONFID_KEY
));
new_call
->
_record_is_playing
=
FALSE
;
return
new_call
;
...
...
@@ -209,7 +206,6 @@ callable_obj_t *create_history_entry_from_hashtable(GHashTable *entry)
void
free_callable_obj_t
(
callable_obj_t
*
c
)
{
g_free
(
c
->
_callID
);
g_free
(
c
->
_confID
);
g_free
(
c
->
_historyConfID
);
g_free
(
c
->
_accountID
);
g_free
(
c
->
_srtp_cipher
);
...
...
gnome/src/callable_obj.h
View file @
fdd135d5
...
...
@@ -96,8 +96,7 @@ typedef struct {
int
_state_code
;
// The numeric state code as defined in SIP or IAX
gchar
*
_state_code_description
;
// A textual description of _state_code
gchar
*
_callID
;
// The call ID
gchar
*
_confID
;
// The conference ID (NULL if don't participate to a conference)
gchar
*
_historyConfID
;
// Persistent conf id to be stored in history
gchar
*
_historyConfID
;
// Persistent conf id to be stored in history
gchar
*
_accountID
;
// The account the call is made with
time_t
_time_start
;
// The timestamp the call was initiating
time_t
_time_stop
;
// The timestamp the call was over
...
...
gnome/src/conference_obj.c
View file @
fdd135d5
...
...
@@ -143,16 +143,6 @@ void conference_participant_list_update(gchar** participants, conference_obj_t*
return
;
}
for
(
gchar
**
part
=
participants
;
part
&&
*
part
;
++
part
)
{
const
gchar
*
call_id
=
(
const
gchar
*
)
(
*
part
);
callable_obj_t
*
call
=
calllist_get_call
(
current_calls_tab
,
call_id
);
if
(
call
)
{
g_free
(
call
->
_confID
);
call
->
_confID
=
NULL
;
}
}
if
(
conf
->
participant_list
)
{
g_slist_free
(
conf
->
participant_list
);
conf
->
participant_list
=
NULL
;
...
...
@@ -165,7 +155,6 @@ void conference_participant_list_update(gchar** participants, conference_obj_t*
restore_call
(
call_id
);
call
=
calllist_get_call
(
current_calls_tab
,
call_id
);
}
call
->
_confID
=
g_strdup
(
conf
->
_confID
);
conference_add_participant
(
call_id
,
conf
);
}
}
...
...
gnome/src/contacts/calltab.c
View file @
fdd135d5
...
...
@@ -98,9 +98,9 @@ calltab_create_searchbar(calltab_t* tab)
{
g_assert
(
tab
);
if
(
utf8_case_equal
(
tab
->
_name
,
HISTORY
)
)
if
(
g_strcmp0
(
tab
->
_name
,
HISTORY
)
==
0
)
tab
->
searchbar
=
history_searchbar_new
();
else
if
(
utf8_case_equal
(
tab
->
_name
,
CONTACTS
)
)
else
if
(
g_strcmp0
(
tab
->
_name
,
CONTACTS
)
==
0
)
tab
->
searchbar
=
contacts_searchbar_new
();
else
ERROR
(
"Current calls tab does not need a searchbar
\n
"
);
...
...
gnome/src/contacts/calltree.c
View file @
fdd135d5
This diff is collapsed.
Click to expand it.
gnome/src/contacts/calltree.h
View file @
fdd135d5
...
...
@@ -35,12 +35,10 @@
/** @file calltree.h
* @brief The GtkTreeView that list calls in the main window.
*/
typedef
enum
{
A_CALL
,
A_CONFERENCE
,
A_INVALID
}
CallType
;
}
CallType
;
/**
* Tags used to identify display type in calltree
...
...
@@ -102,21 +100,10 @@ calltree_remove_conference(calltab_t *, const conference_obj_t *);
void
calltree_display
(
calltab_t
*
);
void
row_activated
(
GtkTreeView
*
,
GtkTreePath
*
,
GtkTreeViewColumn
*
,
void
*
);
/**
* Update elapsed time based on selected calltree's call
*/
gboolean
calltree_update_clock
(
gpointer
);
/**
* @param The calltab (current_calls, history, contacts)
* @param The call
* @param The callID/confID
*/
void
calltree_
(
calltab_t
*
,
callable_obj_t
*
,
const
gchar
*
const
);
#endif
gnome/src/dbus/callmanager-introspec.xml
View file @
fdd135d5
...
...
@@ -313,6 +313,24 @@
</arg>
</method>
<method
name=
"getConferenceId"
tp:name-for-bindings=
"getConferenceId"
>
<tp:added
version=
"1.1.0"
/>
<tp:docstring>
If thsi call participate to a conference, return the conference id.
Return an empty string elsewhere.
</tp:docstring>
<arg
type=
"s"
name=
"callID"
direction=
"in"
>
<tp:docstring>
The call id.
</tp:docstring>
</arg>
<arg
type=
"s"
name=
"confID"
direction=
"out"
>
<tp:docstring>
A string containing the conference ID, or an empty string.
</tp:docstring>
</arg>
</method>
<method
name=
"setRecording"
tp:name-for-bindings=
"setRecording"
>
<tp:docstring>
Start recording a call.
...
...
gnome/src/dbus/dbus.c
View file @
fdd135d5
...
...
@@ -338,7 +338,6 @@ conference_created_cb(DBusGProxy *proxy UNUSED, const gchar *confID, void *foo U
if
(
call
->
_state
==
CALL_STATE_RECORD
)
new_conf
->
_state
=
CONFERENCE_STATE_ACTIVE_ATTACHED_RECORD
;
call
->
_confID
=
g_strdup
(
confID
);
call
->
_historyConfID
=
g_strdup
(
confID
);
}
...
...
@@ -365,8 +364,6 @@ conference_removed_cb(DBusGProxy *proxy UNUSED, const gchar *confID,
callable_obj_t
*
call
=
calllist_get_call
(
current_calls_tab
,
p
->
data
);
if
(
call
)
{
g_free
(
call
->
_confID
);
call
->
_confID
=
NULL
;
im_widget_update_state
(
IM_WIDGET
(
call
->
_im_widget
),
TRUE
);
}
}
...
...
@@ -1723,6 +1720,16 @@ dbus_get_participant_list(const gchar *confID)
return
list
;
}
gchar
*
dbus_get_conference_id
(
const
gchar
*
callID
)
{
gchar
*
confID
=
NULL
;
GError
*
error
=
NULL
;
org_sflphone_SFLphone_CallManager_get_conference_id
(
call_proxy
,
callID
,
&
confID
,
&
error
);
check_error
(
error
);
return
confID
;
}
GHashTable
*
dbus_get_conference_details
(
const
gchar
*
confID
)
{
...
...
gnome/src/dbus/dbus.h
View file @
fdd135d5
...
...
@@ -388,6 +388,12 @@ void dbus_add_participant(const gchar *callID, const gchar *confID);
*/
gchar
**
dbus_get_participant_list
(
const
gchar
*
confID
);
/**
* If thsi call participate to a conference, return the conference id
* Return an empty string elsewhere
*/
gchar
*
dbus_get_conference_id
(
const
gchar
*
callID
);
/**
* Toggle recording for this instance, may be call or conference
*/
...
...
gnome/src/uimanager.c
View file @
fdd135d5
...
...
@@ -847,6 +847,7 @@ remove_from_history(void * foo UNUSED)
}
calllist_remove_from_history
(
call
);
update_actions
();
}
static
void
...
...
Write
Preview
Markdown
is supported
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