Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
1ffa61a4
Kaydet (Commit)
1ffa61a4
authored
Nis 01, 2012
tarafından
Will Thompson
Kaydeden (comit)
Matúš Kukan
Tem 17, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tubes: make conference hold a TpDBusTubeChannel
It already was, actually. :)
üst
d32927c8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
17 deletions
+19
-17
conference.hxx
tubes/inc/tubes/conference.hxx
+4
-4
conference.cxx
tubes/source/conference.cxx
+12
-10
manager.cxx
tubes/source/manager.cxx
+3
-3
No files found.
tubes/inc/tubes/conference.hxx
Dosyayı görüntüle @
1ffa61a4
...
@@ -49,7 +49,7 @@ class TeleConference : public boost::enable_shared_from_this<TeleConference>
...
@@ -49,7 +49,7 @@ class TeleConference : public boost::enable_shared_from_this<TeleConference>
{
{
public
:
public
:
TeleConference
(
TeleManager
*
pManager
,
TpAccount
*
pAccount
,
TpChannel
*
pChannel
,
const
rtl
::
OString
&
rSessionId
);
TeleConference
(
TeleManager
*
pManager
,
TpAccount
*
pAccount
,
Tp
DBusTube
Channel
*
pChannel
,
const
rtl
::
OString
&
rSessionId
);
~
TeleConference
();
~
TeleConference
();
/// Close channel and call finalize()
/// Close channel and call finalize()
...
@@ -79,8 +79,8 @@ public:
...
@@ -79,8 +79,8 @@ public:
// --- following only to be called only by manager's callbacks ---
// --- following only to be called only by manager's callbacks ---
// TODO: make friends instead
// TODO: make friends instead
void
setChannel
(
TpAccount
*
pAccount
,
TpChannel
*
pChannel
);
void
setChannel
(
TpAccount
*
pAccount
,
Tp
DBusTube
Channel
*
pChannel
);
Tp
Channel
*
getChannel
()
const
{
return
mpChannel
;
}
Tp
DBusTubeChannel
*
getChannel
()
const
{
return
mpChannel
;
}
bool
offerTube
();
bool
offerTube
();
bool
acceptTube
();
bool
acceptTube
();
/// got tube accepted on other end as well?
/// got tube accepted on other end as well?
...
@@ -117,7 +117,7 @@ private:
...
@@ -117,7 +117,7 @@ private:
rtl
::
OString
maSessionId
;
rtl
::
OString
maSessionId
;
TeleManager
*
mpManager
;
TeleManager
*
mpManager
;
TpAccount
*
mpAccount
;
TpAccount
*
mpAccount
;
Tp
Channel
*
mpChannel
;
Tp
DBusTubeChannel
*
mpChannel
;
gchar
*
mpAddress
;
gchar
*
mpAddress
;
GDBusConnection
*
mpTube
;
GDBusConnection
*
mpTube
;
guint
maObjectRegistrationId
;
guint
maObjectRegistrationId
;
...
...
tubes/source/conference.cxx
Dosyayı görüntüle @
1ffa61a4
...
@@ -142,7 +142,7 @@ static void TeleConference_ChannelCloseHandler(
...
@@ -142,7 +142,7 @@ static void TeleConference_ChannelCloseHandler(
void
TeleConference
::
TubeOfferedHandler
(
void
TeleConference
::
TubeOfferedHandler
(
TpChannel
*
pChannel
,
TpChannel
*
p
Base
Channel
,
const
gchar
*
pAddress
,
const
gchar
*
pAddress
,
const
GError
*
pError
,
const
GError
*
pError
,
gpointer
pUserData
,
gpointer
pUserData
,
...
@@ -168,8 +168,9 @@ void TeleConference::TubeOfferedHandler(
...
@@ -168,8 +168,9 @@ void TeleConference::TubeOfferedHandler(
if
(
!
pAddress
)
if
(
!
pAddress
)
return
;
return
;
TpDBusTubeChannel
*
pChannel
=
TP_DBUS_TUBE_CHANNEL
(
pBaseChannel
);
SAL_WARN_IF
(
pChannel
!=
pConference
->
getChannel
(),
"tubes"
,
"TeleConference::TubeOfferedHandler: not my channel"
);
SAL_WARN_IF
(
pChannel
!=
pConference
->
getChannel
(),
"tubes"
,
"TeleConference::TubeOfferedHandler: not my channel"
);
if
(
pChannel
!=
pConference
->
getChannel
())
if
(
(
pChannel
)
!=
pConference
->
getChannel
())
return
;
return
;
pConference
->
mpAddress
=
g_strdup
(
pAddress
);
pConference
->
mpAddress
=
g_strdup
(
pAddress
);
...
@@ -192,7 +193,7 @@ bool TeleConference::tryToOpen()
...
@@ -192,7 +193,7 @@ bool TeleConference::tryToOpen()
}
}
void
TeleConference
::
TubeChannelStateChangedHandler
(
void
TeleConference
::
TubeChannelStateChangedHandler
(
TpChannel
*
pChannel
,
TpChannel
*
p
Base
Channel
,
guint
nState
,
guint
nState
,
gpointer
pUserData
,
gpointer
pUserData
,
GObject
*
/*weak_object*/
GObject
*
/*weak_object*/
...
@@ -207,6 +208,7 @@ void TeleConference::TubeChannelStateChangedHandler(
...
@@ -207,6 +208,7 @@ void TeleConference::TubeChannelStateChangedHandler(
if
(
!
pConference
)
if
(
!
pConference
)
return
;
return
;
TpDBusTubeChannel
*
pChannel
=
TP_DBUS_TUBE_CHANNEL
(
pBaseChannel
);
SAL_WARN_IF
(
pChannel
!=
pConference
->
getChannel
(),
"tubes"
,
SAL_WARN_IF
(
pChannel
!=
pConference
->
getChannel
(),
"tubes"
,
"TeleConference::TubeChannelStateChangedHandler: not my channel"
);
"TeleConference::TubeChannelStateChangedHandler: not my channel"
);
if
(
pChannel
!=
pConference
->
getChannel
())
if
(
pChannel
!=
pConference
->
getChannel
())
...
@@ -217,7 +219,7 @@ void TeleConference::TubeChannelStateChangedHandler(
...
@@ -217,7 +219,7 @@ void TeleConference::TubeChannelStateChangedHandler(
}
}
TeleConference
::
TeleConference
(
TeleManager
*
pManager
,
TpAccount
*
pAccount
,
TpChannel
*
pChannel
,
const
rtl
::
OString
&
rSessionId
)
TeleConference
::
TeleConference
(
TeleManager
*
pManager
,
TpAccount
*
pAccount
,
Tp
DBusTube
Channel
*
pChannel
,
const
rtl
::
OString
&
rSessionId
)
:
:
maSessionId
(
rSessionId
),
maSessionId
(
rSessionId
),
mpManager
(
pManager
),
mpManager
(
pManager
),
...
@@ -238,7 +240,7 @@ TeleConference::~TeleConference()
...
@@ -238,7 +240,7 @@ TeleConference::~TeleConference()
}
}
void
TeleConference
::
setChannel
(
TpAccount
*
pAccount
,
TpChannel
*
pChannel
)
void
TeleConference
::
setChannel
(
TpAccount
*
pAccount
,
Tp
DBusTube
Channel
*
pChannel
)
{
{
OSL_ENSURE
(
!
mpChannel
,
"TeleConference::setChannel: already have channel"
);
OSL_ENSURE
(
!
mpChannel
,
"TeleConference::setChannel: already have channel"
);
if
(
mpChannel
)
if
(
mpChannel
)
...
@@ -254,7 +256,7 @@ void TeleConference::setChannel( TpAccount *pAccount, TpChannel* pChannel )
...
@@ -254,7 +256,7 @@ void TeleConference::setChannel( TpAccount *pAccount, TpChannel* pChannel )
GError
*
pError
=
NULL
;
GError
*
pError
=
NULL
;
TpProxySignalConnection
*
pProxySignalConnection
=
TpProxySignalConnection
*
pProxySignalConnection
=
tp_cli_channel_interface_tube_connect_to_tube_channel_state_changed
(
tp_cli_channel_interface_tube_connect_to_tube_channel_state_changed
(
mpChannel
,
TP_CHANNEL
(
mpChannel
)
,
&
TeleConference
::
TubeChannelStateChangedHandler
,
&
TeleConference
::
TubeChannelStateChangedHandler
,
this
,
this
,
NULL
,
NULL
,
...
@@ -295,7 +297,7 @@ bool TeleConference::acceptTube()
...
@@ -295,7 +297,7 @@ bool TeleConference::acceptTube()
if
(
!
mpChannel
||
mpTube
)
if
(
!
mpChannel
||
mpTube
)
return
false
;
return
false
;
tp_cli_channel_type_dbus_tube_call_accept
(
mpChannel
,
-
1
,
tp_cli_channel_type_dbus_tube_call_accept
(
TP_CHANNEL
(
mpChannel
)
,
-
1
,
TP_SOCKET_ACCESS_CONTROL_CREDENTIALS
,
TP_SOCKET_ACCESS_CONTROL_CREDENTIALS
,
&
TeleConference
::
TubeOfferedHandler
,
&
TeleConference
::
TubeOfferedHandler
,
this
,
NULL
,
NULL
);
this
,
NULL
,
NULL
);
...
@@ -318,7 +320,7 @@ bool TeleConference::offerTube()
...
@@ -318,7 +320,7 @@ bool TeleConference::offerTube()
NULL
);
NULL
);
tp_cli_channel_type_dbus_tube_call_offer
(
tp_cli_channel_type_dbus_tube_call_offer
(
mpChannel
,
// proxy
TP_CHANNEL
(
mpChannel
),
// proxy
-
1
,
// timeout_ms
-
1
,
// timeout_ms
pParams
,
// in_parameters
pParams
,
// in_parameters
TP_SOCKET_ACCESS_CONTROL_CREDENTIALS
,
// in_access_control
TP_SOCKET_ACCESS_CONTROL_CREDENTIALS
,
// in_access_control
...
@@ -387,7 +389,7 @@ void TeleConference::close()
...
@@ -387,7 +389,7 @@ void TeleConference::close()
INFO_LOGGER
(
"TeleConference::close"
);
INFO_LOGGER
(
"TeleConference::close"
);
if
(
mpChannel
)
if
(
mpChannel
)
tp_cli_channel_call_close
(
mpChannel
,
5000
,
TeleConference_ChannelCloseHandler
,
this
,
NULL
,
NULL
);
tp_cli_channel_call_close
(
TP_CHANNEL
(
mpChannel
)
,
5000
,
TeleConference_ChannelCloseHandler
,
this
,
NULL
,
NULL
);
else
else
finalize
();
finalize
();
}
}
...
@@ -552,7 +554,7 @@ void TeleConference::sendFile( rtl::OUString &localUri, FileSentCallback pCallba
...
@@ -552,7 +554,7 @@ void TeleConference::sendFile( rtl::OUString &localUri, FileSentCallback pCallba
SendFileRequest
*
pReq
=
new
SendFileRequest
(
this
,
pCallback
,
pUserData
);
SendFileRequest
*
pReq
=
new
SendFileRequest
(
this
,
pCallback
,
pUserData
);
empathy_ft_handler_new_outgoing
(
mpAccount
,
empathy_ft_handler_new_outgoing
(
mpAccount
,
tp_channel_get_target_contact
(
mpChannel
),
tp_channel_get_target_contact
(
TP_CHANNEL
(
mpChannel
)
),
pSource
,
pSource
,
0
,
0
,
&
TeleConference
::
FTReady
,
pReq
);
&
TeleConference
::
FTReady
,
pReq
);
...
...
tubes/source/manager.cxx
Dosyayı görüntüle @
1ffa61a4
...
@@ -119,12 +119,12 @@ void TeleManager::DBusChannelHandler(
...
@@ -119,12 +119,12 @@ void TeleManager::DBusChannelHandler(
SAL_INFO
(
"tubes"
,
"TeleManager::DBusChannelHandler: incoming dbus channel: "
SAL_INFO
(
"tubes"
,
"TeleManager::DBusChannelHandler: incoming dbus channel: "
<<
tp_channel_get_identifier
(
pChannel
));
<<
tp_channel_get_identifier
(
pChannel
));
if
(
tp_channel_get_channel_type_id
(
pChannel
)
==
TP_IFACE_QUARK_CHANNEL_TYPE_DBUS_TUBE
)
if
(
TP_IS_DBUS_TUBE_CHANNEL
(
pChannel
)
)
{
{
SAL_INFO
(
"tubes"
,
"accepting"
);
SAL_INFO
(
"tubes"
,
"accepting"
);
aAccepted
=
true
;
aAccepted
=
true
;
TeleConferencePtr
pConference
(
new
TeleConference
(
pManager
,
pAccount
,
pChannel
,
""
));
TeleConferencePtr
pConference
(
new
TeleConference
(
pManager
,
pAccount
,
TP_DBUS_TUBE_CHANNEL
(
pChannel
)
,
""
));
pManager
->
maConferences
.
push_back
(
pConference
);
pManager
->
maConferences
.
push_back
(
pConference
);
pConference
->
acceptTube
();
pConference
->
acceptTube
();
}
}
...
@@ -283,7 +283,7 @@ static void TeleManager_ChannelReadyHandler(
...
@@ -283,7 +283,7 @@ static void TeleManager_ChannelReadyHandler(
}
}
pConference
->
setChannel
(
tp_account_channel_request_get_account
(
pChannelRequest
),
pConference
->
setChannel
(
tp_account_channel_request_get_account
(
pChannelRequest
),
pChannel
);
TP_DBUS_TUBE_CHANNEL
(
pChannel
)
);
pConference
->
offerTube
();
pConference
->
offerTube
();
}
}
...
...
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