Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-libclient
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-libclient
Commits
dc10442a
Commit
dc10442a
authored
10 years ago
by
Emmanuel Lepage Vallee
Browse files
Options
Downloads
Patches
Plain Diff
[ #53051 ] Fix multiple history issues
parent
c915e243
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/call.cpp
+14
-5
14 additions, 5 deletions
src/call.cpp
src/call.h
+4
-0
4 additions, 0 deletions
src/call.h
src/sflphone_const.h
+1
-0
1 addition, 0 deletions
src/sflphone_const.h
with
19 additions
and
5 deletions
src/call.cpp
+
14
−
5
View file @
dc10442a
...
@@ -117,8 +117,8 @@ const TypedStateMachine< TypedStateMachine< Call::State , Call::DaemonState> , C
...
@@ -117,8 +117,8 @@ const TypedStateMachine< TypedStateMachine< Call::State , Call::DaemonState> , C
const
TypedStateMachine
<
TypedStateMachine
<
function
,
Call
::
DaemonState
>
,
Call
::
State
>
Call
::
stateChangedFunctionMap
=
const
TypedStateMachine
<
TypedStateMachine
<
function
,
Call
::
DaemonState
>
,
Call
::
State
>
Call
::
stateChangedFunctionMap
=
{{
{{
// RINGING CURRENT BUSY HOLD HUNGUP FAILURE /**/
// RINGING CURRENT BUSY HOLD HUNGUP FAILURE /**/
/*INCOMING */
{{
&
Call
::
nothing
,
&
Call
::
start
,
&
Call
::
startWeird
,
&
Call
::
startWeird
,
&
Call
::
startStop
,
&
Call
::
start
}},
/**/
/*INCOMING */
{{
&
Call
::
nothing
,
&
Call
::
start
,
&
Call
::
startWeird
,
&
Call
::
startWeird
,
&
Call
::
startStop
,
&
Call
::
failure
}},
/**/
/*RINGING */
{{
&
Call
::
nothing
,
&
Call
::
start
,
&
Call
::
start
,
&
Call
::
start
,
&
Call
::
startStop
,
&
Call
::
start
}},
/**/
/*RINGING */
{{
&
Call
::
nothing
,
&
Call
::
start
,
&
Call
::
start
,
&
Call
::
start
,
&
Call
::
startStop
,
&
Call
::
failure
}},
/**/
/*CURRENT */
{{
&
Call
::
nothing
,
&
Call
::
nothing
,
&
Call
::
warning
,
&
Call
::
nothing
,
&
Call
::
stop
,
&
Call
::
nothing
}},
/**/
/*CURRENT */
{{
&
Call
::
nothing
,
&
Call
::
nothing
,
&
Call
::
warning
,
&
Call
::
nothing
,
&
Call
::
stop
,
&
Call
::
nothing
}},
/**/
/*DIALING */
{{
&
Call
::
nothing
,
&
Call
::
warning
,
&
Call
::
warning
,
&
Call
::
warning
,
&
Call
::
stop
,
&
Call
::
warning
}},
/**/
/*DIALING */
{{
&
Call
::
nothing
,
&
Call
::
warning
,
&
Call
::
warning
,
&
Call
::
warning
,
&
Call
::
stop
,
&
Call
::
warning
}},
/**/
/*HOLD */
{{
&
Call
::
nothing
,
&
Call
::
nothing
,
&
Call
::
warning
,
&
Call
::
nothing
,
&
Call
::
stop
,
&
Call
::
nothing
}},
/**/
/*HOLD */
{{
&
Call
::
nothing
,
&
Call
::
nothing
,
&
Call
::
warning
,
&
Call
::
nothing
,
&
Call
::
stop
,
&
Call
::
nothing
}},
/**/
...
@@ -370,7 +370,7 @@ Call* Call::buildHistoryCall(const QMap<QString,QString>& hc)
...
@@ -370,7 +370,7 @@ Call* Call::buildHistoryCall(const QMap<QString,QString>& hc)
const
QString
&
number
=
hc
[
Call
::
HistoryMapFields
::
PEER_NUMBER
]
;
const
QString
&
number
=
hc
[
Call
::
HistoryMapFields
::
PEER_NUMBER
]
;
const
QString
&
type
=
hc
[
Call
::
HistoryMapFields
::
STATE
]
;
const
QString
&
type
=
hc
[
Call
::
HistoryMapFields
::
STATE
]
;
const
QString
&
direction
=
hc
[
Call
::
HistoryMapFields
::
DIRECTION
]
;
const
QString
&
direction
=
hc
[
Call
::
HistoryMapFields
::
DIRECTION
]
;
const
bool
missed
=
hc
[
Call
::
HistoryMapFields
::
MISSED
]
==
"
true
"
;
const
bool
missed
=
hc
[
Call
::
HistoryMapFields
::
MISSED
]
==
"
1
"
;
time_t
startTimeStamp
=
hc
[
Call
::
HistoryMapFields
::
TIMESTAMP_START
].
toUInt
()
;
time_t
startTimeStamp
=
hc
[
Call
::
HistoryMapFields
::
TIMESTAMP_START
].
toUInt
()
;
time_t
stopTimeStamp
=
hc
[
Call
::
HistoryMapFields
::
TIMESTAMP_STOP
].
toUInt
()
;
time_t
stopTimeStamp
=
hc
[
Call
::
HistoryMapFields
::
TIMESTAMP_STOP
].
toUInt
()
;
QString
accId
=
hc
[
Call
::
HistoryMapFields
::
ACCOUNT_ID
]
;
QString
accId
=
hc
[
Call
::
HistoryMapFields
::
ACCOUNT_ID
]
;
...
@@ -681,7 +681,7 @@ bool Call::isHistory()
...
@@ -681,7 +681,7 @@ bool Call::isHistory()
///Is this call missed
///Is this call missed
bool
Call
::
isMissed
()
const
bool
Call
::
isMissed
()
const
{
{
return
m_Missed
;
return
m_Missed
||
m_HistoryState
==
Call
::
LegacyHistoryState
::
MISSED
;
}
}
///Is the call incoming or outgoing
///Is the call incoming or outgoing
...
@@ -1055,6 +1055,15 @@ void Call::error()
...
@@ -1055,6 +1055,15 @@ void Call::error()
https://projects.savoirfairelinux.com/projects/sflphone/issues"
);
https://projects.savoirfairelinux.com/projects/sflphone/issues"
);
}
}
///Change history state to failure
void
Call
::
failure
()
{
m_Missed
=
true
;
//This is how it always was done
//The main point is to leave the call in the CallList
start
();
}
///Accept the call
///Accept the call
void
Call
::
accept
()
void
Call
::
accept
()
{
{
...
@@ -1673,7 +1682,7 @@ QVariant Call::roleData(int role) const
...
@@ -1673,7 +1682,7 @@ QVariant Call::roleData(int role) const
return
property
(
"dropState"
);
return
property
(
"dropState"
);
break
;
break
;
case
Call
::
Role
::
Missed
:
case
Call
::
Role
::
Missed
:
return
m_
Missed
;
return
is
Missed
()
;
case
Call
::
Role
::
CallLifeCycleState
:
case
Call
::
Role
::
CallLifeCycleState
:
return
static_cast
<
int
>
(
lifeCycleState
());
//TODO Qt5, use the Q_ENUM
return
static_cast
<
int
>
(
lifeCycleState
());
//TODO Qt5, use the Q_ENUM
case
Call
::
Role
::
DTMFAnimState
:
case
Call
::
Role
::
DTMFAnimState
:
...
...
This diff is collapsed.
Click to expand it.
src/call.h
+
4
−
0
View file @
dc10442a
...
@@ -279,6 +279,9 @@ public:
...
@@ -279,6 +279,9 @@ public:
/** @enum Call::LifeCycleState
/** @enum Call::LifeCycleState
* This enum help track the call meta state
* This enum help track the call meta state
* @todo Eventually add a meta state between progress and finished for
* calls that are still relevant enough to be in the main UI, such
* as BUSY OR FAILURE while also finished
*/
*/
enum
class
LifeCycleState
{
enum
class
LifeCycleState
{
INITIALIZATION
=
0
,
/** Anything before the media transfer start */
INITIALIZATION
=
0
,
/** Anything before the media transfer start */
...
@@ -460,6 +463,7 @@ private:
...
@@ -460,6 +463,7 @@ private:
// to know when it is called.
// to know when it is called.
void
nothing
()
__attribute__
((
const
));
void
nothing
()
__attribute__
((
const
));
void
error
()
__attribute__
((
noreturn
));
void
error
()
__attribute__
((
noreturn
));
void
failure
();
void
accept
();
void
accept
();
void
refuse
();
void
refuse
();
void
acceptTransf
();
void
acceptTransf
();
...
...
This diff is collapsed.
Click to expand it.
src/sflphone_const.h
+
1
−
0
View file @
dc10442a
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
#define ICON_HISTORY_INCOMING ":/images/icons/incoming.svg"
#define ICON_HISTORY_INCOMING ":/images/icons/incoming.svg"
#define ICON_HISTORY_OUTGOING ":/images/icons/outgoing.svg"
#define ICON_HISTORY_OUTGOING ":/images/icons/outgoing.svg"
#define ICON_HISTORY_MISSED ":/images/icons/missed.svg"
#define ICON_HISTORY_MISSED ":/images/icons/missed.svg"
#define ICON_HISTORY_MISSED_OUT ":/images/icons/missed_out.svg"
#define ICON_SFLPHONE ":/images/icons/sflphone.svg"
#define ICON_SFLPHONE ":/images/icons/sflphone.svg"
// #define ACCOUNT_TYPES_TAB {QString(Account::ProtocolName::SIP), QString(Account::ProtocolName::IAX)}
// #define ACCOUNT_TYPES_TAB {QString(Account::ProtocolName::SIP), QString(Account::ProtocolName::IAX)}
...
...
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