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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
66c4ff56
Commit
66c4ff56
authored
Jan 23, 2012
by
Tristan Matthews
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
git+ssh://git.sflphone.org/var/repos/sflphone/git/sflphone
parents
39a2eb3f
ae8c4c31
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
gnome/src/contacts/calltree.c
+1
-1
1 addition, 1 deletion
gnome/src/contacts/calltree.c
gnome/src/dbus/dbus.c
+94
-46
94 additions, 46 deletions
gnome/src/dbus/dbus.c
with
95 additions
and
47 deletions
gnome/src/contacts/calltree.c
+
1
−
1
View file @
66c4ff56
...
@@ -748,7 +748,7 @@ calltree_update_call_recursive(calltab_t* tab, callable_obj_t * c, GtkTreeIter *
...
@@ -748,7 +748,7 @@ calltree_update_call_recursive(calltab_t* tab, callable_obj_t * c, GtkTreeIter *
void
calltree_update_call
(
calltab_t
*
tab
,
callable_obj_t
*
c
)
void
calltree_update_call
(
calltab_t
*
tab
,
callable_obj_t
*
c
)
{
{
return
calltree_update_call_recursive
(
tab
,
c
,
NULL
);
calltree_update_call_recursive
(
tab
,
c
,
NULL
);
}
}
void
calltree_add_call
(
calltab_t
*
tab
,
callable_obj_t
*
c
,
GtkTreeIter
*
parent
)
void
calltree_add_call
(
calltab_t
*
tab
,
callable_obj_t
*
c
,
GtkTreeIter
*
parent
)
...
...
This diff is collapsed.
Click to expand it.
gnome/src/dbus/dbus.c
+
94
−
46
View file @
66c4ff56
...
@@ -145,13 +145,21 @@ incoming_message_cb(DBusGProxy *proxy UNUSED, const gchar* callID UNUSED, const
...
@@ -145,13 +145,21 @@ incoming_message_cb(DBusGProxy *proxy UNUSED, const gchar* callID UNUSED, const
im_widget_add_message
(
IM_WIDGET
(
*
widget
),
from
,
msg
,
0
);
im_widget_add_message
(
IM_WIDGET
(
*
widget
),
from
,
msg
,
0
);
}
}
static
void
/**
call_state_cb
(
DBusGProxy
*
proxy
UNUSED
,
const
gchar
*
callID
,
const
gchar
*
state
,
* Perform the right sflphone action based on the requested state
void
*
foo
UNUSED
)
*/
static
void
process_existant_call_state_change
(
callable_obj_t
*
c
,
const
gchar
*
state
)
{
{
callable_obj_t
*
c
=
calllist_get_call
(
current_calls_tab
,
callID
);
if
(
c
==
NULL
)
{
ERROR
(
"Pointer to call is NULL in %s
\n
"
,
__func__
);
return
;
}
if
(
state
==
NULL
)
{
ERROR
(
"Pointer to state is NULL in %s
\n
"
,
__func__
);
return
;
}
if
(
c
)
{
if
(
g_strcmp0
(
state
,
"HUNGUP"
)
==
0
)
{
if
(
g_strcmp0
(
state
,
"HUNGUP"
)
==
0
)
{
if
(
c
->
_state
==
CALL_STATE_CURRENT
)
{
if
(
c
->
_state
==
CALL_STATE_CURRENT
)
{
time
(
&
c
->
_time_stop
);
time
(
&
c
->
_time_stop
);
...
@@ -178,8 +186,30 @@ call_state_cb(DBusGProxy *proxy UNUSED, const gchar* callID, const gchar* state,
...
@@ -178,8 +186,30 @@ call_state_cb(DBusGProxy *proxy UNUSED, const gchar* callID, const gchar* state,
}
else
if
(
g_strcmp0
(
state
,
"BUSY"
)
==
0
)
{
}
else
if
(
g_strcmp0
(
state
,
"BUSY"
)
==
0
)
{
sflphone_busy
(
c
);
sflphone_busy
(
c
);
}
}
}
else
{
ERROR
(
"DBUS: Error: Call is NULL in %s"
,
__func__
);
return
;
}
/**
* This function process call state changes in case the call have not been created yet.
* This mainly occurs when anotehr SFLphone client takes actions.
*/
static
void
process_inexistant_call_state_change
(
const
gchar
*
callID
,
const
gchar
*
state
)
{
if
(
callID
==
NULL
)
{
ERROR
(
"Pointer to call id is NULL in %s
\n
"
,
__func__
);
return
;
}
if
(
state
==
NULL
)
{
ERROR
(
"Pointer to state is NULL in %s
\n
"
,
__func__
);
return
;
}
// Could occur if a user picked up the phone and hung up without making a call
if
(
g_strcmp0
(
state
,
"HUNGUP"
)
==
0
)
return
;
// The callID is unknow, threat it like a new call
// The callID is unknow, threat it like a new call
// If it were an incoming call, we won't be here
// If it were an incoming call, we won't be here
...
@@ -202,6 +232,24 @@ call_state_cb(DBusGProxy *proxy UNUSED, const gchar* callID, const gchar* state,
...
@@ -202,6 +232,24 @@ call_state_cb(DBusGProxy *proxy UNUSED, const gchar* callID, const gchar* state,
update_actions
();
update_actions
();
calltree_display
(
current_calls_tab
);
calltree_display
(
current_calls_tab
);
}
}
}
/**
* Callback called when a
*/
static
void
call_state_cb
(
DBusGProxy
*
proxy
UNUSED
,
const
gchar
*
callID
,
const
gchar
*
state
,
void
*
foo
UNUSED
)
{
callable_obj_t
*
c
=
calllist_get_call
(
current_calls_tab
,
callID
);
if
(
c
)
{
process_existant_call_state_change
(
c
,
state
);
}
else
{
WARN
(
"DBUS: Call does not exist in %s"
,
__func__
);
process_inexistant_call_state_change
(
callID
,
state
);
}
}
}
}
...
...
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