Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
cce6169e
Commit
cce6169e
authored
Aug 25, 2009
by
Alexandre Savard
Browse files
[#2006] Add getConferenceDetails call on dbus
parent
e3dde95d
Changes
6
Hide whitespace changes
Inline
Side-by-side
sflphone-client-gnome/src/dbus/callmanager-introspec.xml
View file @
cce6169e
...
...
@@ -119,6 +119,9 @@
<arg
type=
"s"
name=
"callID"
direction=
"out"
/>
<arg
type=
"s"
name=
"state"
direction=
"out"
/>
</signal>
<signal
name=
"conferenceChanged"
>
</signal>
<signal
name=
"voiceMailNotify"
>
<arg
type=
"s"
name=
"accountID"
direction=
"out"
/>
...
...
sflphone-client-gnome/src/dbus/dbus.c
View file @
cce6169e
...
...
@@ -1796,6 +1796,20 @@ gchar** dbus_get_conference_list (void)
return
list
;
}
GHashTable
*
dbus_get_conference_details
(
const
gchar
*
confID
)
{
GError
*
error
=
NULL
;
GHashTable
*
details
=
NULL
;
org_sflphone_SFLphone_CallManager_get_conference_details
(
callManagerProxy
,
confID
,
&
details
,
&
error
);
if
(
error
){
ERROR
(
"Error calling org_sflphone_SFLphone_CallManager_get_conference_details"
);
g_error_free
(
error
);
}
return
details
;
}
void
dbus_set_accounts_order
(
const
gchar
*
order
)
{
GError
*
error
=
NULL
;
...
...
sflphone-common/src/conference.cpp
View file @
cce6169e
...
...
@@ -38,6 +38,19 @@ Conference::~Conference()
}
int
Conference
::
getState
()
{
return
_confState
;
}
void
Conference
::
setState
(
ConferenceState
state
)
{
_confState
=
state
;
}
void
Conference
::
add
(
CallID
participant_id
)
{
...
...
@@ -90,23 +103,46 @@ void Conference::remove(CallID participant_id)
void
Conference
::
bindParticipant
(
CallID
participant_id
)
{
if
(
_nbParticipant
>=
1
)
{
if
(
_nbParticipant
>=
1
)
{
ParticipantSet
::
iterator
iter
=
_participants
.
begin
();
while
(
iter
!=
_participants
.
end
())
{
if
(
participant_id
!=
(
*
iter
))
{
while
(
iter
!=
_participants
.
end
())
{
if
(
participant_id
!=
(
*
iter
))
{
_debug
(
"---- Conference:: bind callid %s with %s in conference add
\n
"
,
participant_id
.
c_str
(),
(
*
iter
).
c_str
());
Manager
::
instance
().
getAudioDriver
()
->
getMainBuffer
()
->
bindCallID
(
participant_id
,
*
iter
);
}
iter
++
;
}
}
_debug
(
"---- Conference::
bind callid %s with default_id in conference add
\n
"
,
participant_id
.
c_str
());
_debug
(
"---- Conference::bind callid %s with default_id in conference add
\n
"
,
participant_id
.
c_str
());
Manager
::
instance
().
getAudioDriver
()
->
getMainBuffer
()
->
bindCallID
(
participant_id
);
}
std
::
string
Conference
::
getStateStr
()
{
std
::
string
state_str
;
switch
(
_confState
)
{
case
Active
:
state_str
=
"ACTIVE"
;
break
;
case
Hold
:
state_str
=
"HOLD"
;
break
;
default:
break
;
}
return
state_str
;
}
sflphone-common/src/conference.h
View file @
cce6169e
...
...
@@ -26,6 +26,7 @@
// class ManagerImpl;
// class Call;
typedef
std
::
string
ConfID
;
typedef
std
::
set
<
CallID
>
ParticipantSet
;
...
...
@@ -33,10 +34,18 @@ class Conference{
public:
enum
ConferenceState
{
Active
,
Hold
};
Conference
();
~
Conference
();
int
getState
();
void
setState
(
ConferenceState
state
);
std
::
string
getStateStr
();
int
getNbParticipants
()
{
return
_nbParticipant
;
}
void
add
(
CallID
participant_id
);
...
...
@@ -50,6 +59,8 @@ class Conference{
/** Unique ID of the call */
CallID
_id
;
ConferenceState
_confState
;
ParticipantSet
_participants
;
int
_nbParticipant
;
...
...
sflphone-common/src/dbus/callmanager-introspec.xml
View file @
cce6169e
...
...
@@ -119,6 +119,9 @@
<arg
type=
"s"
name=
"callID"
direction=
"out"
/>
<arg
type=
"s"
name=
"state"
direction=
"out"
/>
</signal>
<signal
name=
"conferenceChanged"
>
</signal>
<signal
name=
"voiceMailNotify"
>
<arg
type=
"s"
name=
"accountID"
direction=
"out"
/>
...
...
sflphone-common/src/managerimpl.cpp
View file @
cce6169e
...
...
@@ -3481,51 +3481,23 @@ ManagerImpl::getCallList (void)
std
::
map
<
std
::
string
,
std
::
string
>
ManagerImpl
::
getConferenceDetails
(
const
C
all
ID
&
c
all
ID
)
ManagerImpl
::
getConferenceDetails
(
const
C
onf
ID
&
c
onf
ID
)
{
std
::
map
<
std
::
string
,
std
::
string
>
call_details
;
AccountID
accountid
;
Account
*
account
;
VoIPLink
*
link
;
Call
*
call
=
NULL
;
std
::
stringstream
type
;
std
::
map
<
std
::
string
,
std
::
string
>
conf_details
;
ConferenceMap
::
iterator
iter_conf
;
// We need here to retrieve the call information attached to the call ID
// To achieve that, we need to get the voip link attached to the call
// But to achieve that, we need to get the account the call was made with
iter_conf
=
_conferencemap
.
find
(
confID
);
// So first we fetch the account
accountid
=
getAccountFromCall
(
callID
);
_debug
(
"%s
\n
"
,
callID
.
c_str
());
// Then the VoIP link this account is linked with (IAX2 or SIP)
if
(
(
account
=
getAccount
(
accountid
))
!=
0
)
{
link
=
account
->
getVoIPLink
();
if
(
link
)
{
call
=
link
->
getCall
(
callID
);
}
}
Conference
*
conf
;
if
(
iter_conf
!=
_conferencemap
.
end
())
{
if
(
call
)
{
type
<<
call
->
getCallType
();
call_details
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
"ACCOUNTID"
,
accountid
));
call_details
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
"PEER_NUMBER"
,
call
->
getPeerNumber
()));
call_details
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
"PEER_NAME"
,
call
->
getPeerName
()));
call_details
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
"CALL_STATE"
,
call
->
getStateStr
()));
call_details
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
"CALL_TYPE"
,
type
.
str
()));
}
else
{
_debug
(
"Error: Managerimpl - getCallDetails ()
\n
"
);
call_details
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
"ACCOUNTID"
,
AccountNULL
));
call_details
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
"PEER_NUMBER"
,
"Unknown"
));
call_details
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
"PEER_NAME"
,
"Unknown"
));
call_details
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
"CALL_STATE"
,
"UNKNOWN"
));
call_details
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
"CALL_TYPE"
,
"0"
));
conf_details
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
"CONFID"
,
confID
));
conf_details
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
"CONF_STATE"
,
conf
->
getStateStr
()));
}
return
c
all
_details
;
return
c
onf
_details
;
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment