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
ee956067
Kaydet (Commit)
ee956067
authored
Tem 13, 2012
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tubes: remove now unused code, when we don't use maConferences
Change-Id: I403253793791236eaf8e9fd3fc72489ebd447d99
üst
53b180a4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
104 deletions
+1
-104
conference.hxx
tubes/inc/tubes/conference.hxx
+1
-10
manager.hxx
tubes/inc/tubes/manager.hxx
+0
-25
conference.cxx
tubes/source/conference.cxx
+0
-3
manager.cxx
tubes/source/manager.cxx
+0
-66
No files found.
tubes/inc/tubes/conference.hxx
Dosyayı görüntüle @
ee956067
...
...
@@ -33,8 +33,6 @@
#include "tubes/tubesdllapi.h"
#include "tubes/packet.hxx"
#include "tubes/file-transfer-helper.h"
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <rtl/ustring.hxx>
#include <telepathy-glib/telepathy-glib.h>
#include <queue>
...
...
@@ -45,7 +43,7 @@ typedef ::std::queue<TelePacket> TelePacketQueue;
class
TeleManager
;
/** Conference setup by TeleManager */
class
TeleConference
:
public
boost
::
enable_shared_from_this
<
TeleConference
>
class
TeleConference
{
public
:
...
...
@@ -118,15 +116,8 @@ private:
TelePacketQueue
maPacketQueue
;
bool
mbTubeOfferedHandlerInvoked
:
1
;
// hide from the public
using
boost
::
enable_shared_from_this
<
TeleConference
>::
shared_from_this
;
};
typedef
boost
::
shared_ptr
<
TeleConference
>
TeleConferencePtr
;
#endif // INCLUDED_TUBES_CONFERENCE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
tubes/inc/tubes/manager.hxx
Dosyayı görüntüle @
ee956067
...
...
@@ -39,7 +39,6 @@
#include <rtl/ref.hxx>
#include <tools/link.hxx>
#include <telepathy-glib/telepathy-glib.h>
#include <vector>
#include <tubes/warnings_guard_boost_signals2.hpp>
// For testing purposes, we might need more in future.
...
...
@@ -47,8 +46,6 @@
#define LIBO_TUBES_DBUS_MSG_METHOD "LibOMsg"
#define LIBO_TUBES_DBUS_PATH "/org/libreoffice/calc"
typedef
::
std
::
vector
<
TeleConferencePtr
>
TeleConferenceVector
;
namespace
osl
{
class
Mutex
;
}
class
TeleManagerImpl
;
...
...
@@ -135,28 +132,8 @@ public:
*/
TeleConference
*
startBuddySession
(
TpAccount
*
pAccount
,
TpContact
*
pBuddy
);
void
unregisterConference
(
TeleConferencePtr
pConference
);
void
disconnect
();
/** Send data to all registered conferences.
@returns to how many conferences the packet was send
*/
sal_uInt32
sendPacket
(
const
TelePacket
&
rPacket
)
const
;
/** Pop a received data packet.
XXX This needs to be elaborated to pop from a specific conference, or
for a specific document. Currently the conferences are simply iterated
and the first non-empty queue is popped.
@returns whether there was any packet to pop
*/
bool
popPacket
(
TelePacket
&
rPacket
);
void
sendFile
(
rtl
::
OUString
&
localUri
,
TeleConference
::
FileSentCallback
pCallback
,
void
*
pUserData
);
boost
::
signals2
::
signal
<
void
(
const
rtl
::
OUString
&
localUri
)
>
sigFileReceived
;
boost
::
signals2
::
signal
<
void
(
TeleConference
*
)
>
sigConferenceCreated
;
...
...
@@ -231,8 +208,6 @@ public:
private
:
void
ensureLegacyChannel
(
TpAccount
*
pAccount
,
TpContact
*
pBuddy
);
TeleConferenceVector
maConferences
;
bool
mbChannelReadyHandlerInvoked
:
1
;
static
TeleManagerImpl
*
pImpl
;
...
...
tubes/source/conference.cxx
Dosyayı görüntüle @
ee956067
...
...
@@ -363,9 +363,6 @@ void TeleConference::finalize()
mpAddress
=
NULL
;
}
TeleConferencePtr
pThis
(
shared_from_this
());
mpManager
->
unregisterConference
(
pThis
);
//! *this gets destructed here!
}
...
...
tubes/source/manager.cxx
Dosyayı görüntüle @
ee956067
...
...
@@ -733,58 +733,6 @@ TpAccount* TeleManager::getAccount( const rtl::OString& rAccountID )
return
pAccount
;
}
sal_uInt32
TeleManager
::
sendPacket
(
const
TelePacket
&
rPacket
)
const
{
INFO_LOGGER
(
"TeleManager::sendPacket"
);
sal_uInt32
nSent
=
0
;
// Access to data ByteStream array forces reference count of one, provide
// non-const instance here before passing it down to each conference.
TelePacket
aPacket
(
rPacket
);
for
(
TeleConferenceVector
::
const_iterator
it
=
maConferences
.
begin
();
it
!=
maConferences
.
end
();
++
it
)
{
if
((
*
it
)
->
sendPacket
(
aPacket
))
++
nSent
;
/* TODO: what if failed? */
}
return
nSent
;
}
bool
TeleManager
::
popPacket
(
TelePacket
&
rPacket
)
{
INFO_LOGGER
(
"TeleManager::popPacket"
);
for
(
TeleConferenceVector
::
const_iterator
it
=
maConferences
.
begin
();
it
!=
maConferences
.
end
();
++
it
)
{
if
((
*
it
)
->
popPacket
(
rPacket
))
return
true
;
}
return
false
;
}
void
TeleManager
::
sendFile
(
rtl
::
OUString
&
localUri
,
TeleConference
::
FileSentCallback
pCallback
,
void
*
pUserData
)
{
INFO_LOGGER
(
"TeleManager::sendFile"
);
/* TODO: pluralize */
for
(
TeleConferenceVector
::
const_iterator
it
=
maConferences
.
begin
();
it
!=
maConferences
.
end
();
++
it
)
{
(
*
it
)
->
sendFile
(
localUri
,
pCallback
,
pUserData
);
return
;
}
}
void
TeleManager
::
unregisterConference
(
TeleConferencePtr
pConference
)
{
INFO_LOGGER
(
"TeleManager::unregisterConference"
);
TeleConferenceVector
::
iterator
it
=
::
std
::
find
(
maConferences
.
begin
(),
maConferences
.
end
(),
pConference
);
if
(
it
!=
maConferences
.
end
())
maConferences
.
erase
(
it
);
}
void
TeleManager
::
disconnect
()
{
INFO_LOGGER
(
"TeleManager::disconnect"
);
...
...
@@ -797,20 +745,6 @@ void TeleManager::disconnect()
tp_base_client_unregister
(
pImpl
->
mpFileTransferClient
);
pImpl
->
mpFileTransferClient
=
NULL
;
size_t
nSize
=
maConferences
.
size
();
for
(
size_t
i
=
0
;
i
<
nSize
;
/*nop*/
)
{
maConferences
[
i
]
->
close
();
// close() may remove the conference from the vector and move following
// elements to this position (hence we don't use an iterator here),
// adjust accordingly.
size_t
n
=
maConferences
.
size
();
if
(
n
<
nSize
)
nSize
=
n
;
else
++
i
;
}
}
...
...
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