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
8aef9f40
Kaydet (Commit)
8aef9f40
authored
Agu 03, 2012
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tubes: stop collaborating when the contact leaves
Change-Id: I779aededb95eac6cbfb2fec3e97d207704244e25
üst
374fb913
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
49 additions
and
3 deletions
+49
-3
sccollaboration.cxx
sc/source/ui/collab/sccollaboration.cxx
+11
-0
sendfunc.cxx
sc/source/ui/collab/sendfunc.cxx
+3
-1
sccollaboration.hxx
sc/source/ui/inc/sccollaboration.hxx
+1
-0
collaboration.hxx
tubes/inc/tubes/collaboration.hxx
+1
-0
conference.hxx
tubes/inc/tubes/conference.hxx
+5
-0
contact-list.cxx
tubes/source/contact-list.cxx
+1
-2
contacts.cxx
tubes/source/contacts.cxx
+2
-0
manager.cxx
tubes/source/manager.cxx
+25
-0
No files found.
sc/source/ui/collab/sccollaboration.cxx
Dosyayı görüntüle @
8aef9f40
...
@@ -21,6 +21,17 @@ ScCollaboration::~ScCollaboration()
...
@@ -21,6 +21,17 @@ ScCollaboration::~ScCollaboration()
{
{
}
}
void
ScCollaboration
::
ContactLeft
()
{
SAL_INFO
(
"sc.tubes"
,
"Contact has left the collaboration"
);
ScDocFuncSend
*
pSender
=
GetScDocFuncSend
();
if
(
pSender
)
{
delete
pSender
;
mpScDocShell
->
SetDocFunc
(
new
ScDocFuncDirect
(
*
mpScDocShell
)
);
}
}
TeleConference
*
ScCollaboration
::
GetConference
()
TeleConference
*
ScCollaboration
::
GetConference
()
{
{
ScDocFuncSend
*
pSender
=
GetScDocFuncSend
();
ScDocFuncSend
*
pSender
=
GetScDocFuncSend
();
...
...
sc/source/ui/collab/sendfunc.cxx
Dosyayı görüntüle @
8aef9f40
...
@@ -356,7 +356,9 @@ ScDocFunc *ScDocShell::CreateDocFunc()
...
@@ -356,7 +356,9 @@ ScDocFunc *ScDocShell::CreateDocFunc()
ScDocFuncDirect
*
pDirect
=
new
ScDocFuncDirect
(
*
this
);
ScDocFuncDirect
*
pDirect
=
new
ScDocFuncDirect
(
*
this
);
ScDocFuncRecv
*
pReceiver
=
new
ScDocFuncRecv
(
pDirect
);
ScDocFuncRecv
*
pReceiver
=
new
ScDocFuncRecv
(
pDirect
);
ScDocFuncSend
*
pSender
=
new
ScDocFuncSend
(
*
this
,
pReceiver
);
ScDocFuncSend
*
pSender
=
new
ScDocFuncSend
(
*
this
,
pReceiver
);
pSender
->
SetCollaboration
(
TeleManager
::
getConference
()
);
TeleConference
*
pConference
=
TeleManager
::
getConference
();
pConference
->
setCollaboration
(
mpCollaboration
);
pSender
->
SetCollaboration
(
pConference
);
return
pSender
;
return
pSender
;
}
}
else
else
...
...
sc/source/ui/inc/sccollaboration.hxx
Dosyayı görüntüle @
8aef9f40
...
@@ -21,6 +21,7 @@ public:
...
@@ -21,6 +21,7 @@ public:
ScCollaboration
(
ScDocShell
*
pScDocShell
);
ScCollaboration
(
ScDocShell
*
pScDocShell
);
virtual
~
ScCollaboration
();
virtual
~
ScCollaboration
();
virtual
void
ContactLeft
();
virtual
TeleConference
*
GetConference
();
virtual
TeleConference
*
GetConference
();
virtual
sal_uInt64
GetId
();
virtual
sal_uInt64
GetId
();
virtual
void
SetCollaboration
(
TeleConference
*
pConference
);
virtual
void
SetCollaboration
(
TeleConference
*
pConference
);
...
...
tubes/inc/tubes/collaboration.hxx
Dosyayı görüntüle @
8aef9f40
...
@@ -23,6 +23,7 @@ public:
...
@@ -23,6 +23,7 @@ public:
Collaboration
()
{}
Collaboration
()
{}
virtual
~
Collaboration
()
{}
virtual
~
Collaboration
()
{}
virtual
void
ContactLeft
()
=
0
;
virtual
TeleConference
*
GetConference
()
=
0
;
virtual
TeleConference
*
GetConference
()
=
0
;
virtual
sal_uInt64
GetId
()
=
0
;
virtual
sal_uInt64
GetId
()
=
0
;
virtual
void
SetCollaboration
(
TeleConference
*
pConference
)
=
0
;
virtual
void
SetCollaboration
(
TeleConference
*
pConference
)
=
0
;
...
...
tubes/inc/tubes/conference.hxx
Dosyayı görüntüle @
8aef9f40
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
#include <rtl/ustring.hxx>
#include <rtl/ustring.hxx>
#include <tubes/warnings_guard_boost_signals2.hpp>
#include <tubes/warnings_guard_boost_signals2.hpp>
class
Collaboration
;
class
TeleManager
;
class
TeleManager
;
class
TeleConferenceImpl
;
class
TeleConferenceImpl
;
typedef
struct
_TpAccount
TpAccount
;
typedef
struct
_TpAccount
TpAccount
;
...
@@ -73,6 +74,9 @@ public:
...
@@ -73,6 +74,9 @@ public:
TUBES_DLLPUBLIC
void
sendFile
(
TpContact
*
pContact
,
rtl
::
OUString
&
localUri
,
FileSentCallback
pCallback
,
void
*
pUserData
);
TUBES_DLLPUBLIC
void
sendFile
(
TpContact
*
pContact
,
rtl
::
OUString
&
localUri
,
FileSentCallback
pCallback
,
void
*
pUserData
);
const
OString
&
getUuid
()
const
{
return
msUuid
;
}
const
OString
&
getUuid
()
const
{
return
msUuid
;
}
Collaboration
*
getCollaboration
()
const
{
return
mpCollaboration
;
}
void
setCollaboration
(
Collaboration
*
pCollaboration
)
{
mpCollaboration
=
pCollaboration
;
}
// --- 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
,
TpDBusTubeChannel
*
pChannel
);
void
setChannel
(
TpAccount
*
pAccount
,
TpDBusTubeChannel
*
pChannel
);
...
@@ -98,6 +102,7 @@ private:
...
@@ -98,6 +102,7 @@ private:
// Private:
// Private:
bool
spinUntilTubeEstablished
();
bool
spinUntilTubeEstablished
();
Collaboration
*
mpCollaboration
;
TeleManager
*
mpManager
;
TeleManager
*
mpManager
;
TpAccount
*
mpAccount
;
TpAccount
*
mpAccount
;
TpDBusTubeChannel
*
mpChannel
;
TpDBusTubeChannel
*
mpChannel
;
...
...
tubes/source/contact-list.cxx
Dosyayı görüntüle @
8aef9f40
...
@@ -71,8 +71,7 @@ ContactList::~ContactList()
...
@@ -71,8 +71,7 @@ ContactList::~ContactList()
mpAccountManager
=
NULL
;
mpAccountManager
=
NULL
;
}
}
static
bool
bool
tb_contact_is_online
(
TpContact
*
contact
)
tb_contact_is_online
(
TpContact
*
contact
)
{
{
switch
(
tp_contact_get_presence_type
(
contact
))
switch
(
tp_contact_get_presence_type
(
contact
))
{
{
...
...
tubes/source/contacts.cxx
Dosyayı görüntüle @
8aef9f40
...
@@ -124,6 +124,7 @@ class TubeContacts : public ModelessDialog
...
@@ -124,6 +124,7 @@ class TubeContacts : public ModelessDialog
tp_contact_get_identifier
(
pContact
)
);
tp_contact_get_identifier
(
pContact
)
);
else
else
{
{
pConference
->
setCollaboration
(
mpCollaboration
);
mpCollaboration
->
SetCollaboration
(
pConference
);
mpCollaboration
->
SetCollaboration
(
pConference
);
mpCollaboration
->
SendFile
(
pContact
,
OStringToOUString
(
mpCollaboration
->
SendFile
(
pContact
,
OStringToOUString
(
pConference
->
getUuid
(),
RTL_TEXTENCODING_UTF8
)
);
pConference
->
getUuid
(),
RTL_TEXTENCODING_UTF8
)
);
...
@@ -146,6 +147,7 @@ class TubeContacts : public ModelessDialog
...
@@ -146,6 +147,7 @@ class TubeContacts : public ModelessDialog
SAL_WARN
(
"tubes"
,
"Could not start group session."
);
SAL_WARN
(
"tubes"
,
"Could not start group session."
);
else
else
{
{
pConference
->
setCollaboration
(
mpCollaboration
);
mpCollaboration
->
SetCollaboration
(
pConference
);
mpCollaboration
->
SetCollaboration
(
pConference
);
}
}
}
}
...
...
tubes/source/manager.cxx
Dosyayı görüntüle @
8aef9f40
...
@@ -27,6 +27,8 @@
...
@@ -27,6 +27,8 @@
*/
*/
#include <tubes/manager.hxx>
#include <tubes/manager.hxx>
#include <tubes/collaboration.hxx>
#include <tubes/conference.hxx>
#include <tubes/conference.hxx>
#include <tubes/constants.h>
#include <tubes/constants.h>
#include <tubes/contact-list.hxx>
#include <tubes/contact-list.hxx>
...
@@ -103,6 +105,22 @@ public:
...
@@ -103,6 +105,22 @@ public:
~
TeleManagerImpl
();
~
TeleManagerImpl
();
};
};
bool
tb_contact_is_online
(
TpContact
*
pContact
);
static
void
contact_presence_changed_cb
(
TpContact
*
pContact
,
guint
/* type */
,
gchar
*
/* status */
,
gchar
*
/* message */
,
gpointer
pConference
)
{
if
(
!
tb_contact_is_online
(
pContact
))
{
Collaboration
*
pCollaboration
=
reinterpret_cast
<
TeleConference
*>
(
pConference
)
->
getCollaboration
();
if
(
pCollaboration
)
pCollaboration
->
ContactLeft
();
}
}
void
TeleManager_DBusChannelHandler
(
void
TeleManager_DBusChannelHandler
(
TpSimpleHandler
*
/*handler*/
,
TpSimpleHandler
*
/*handler*/
,
...
@@ -139,6 +157,10 @@ void TeleManager_DBusChannelHandler(
...
@@ -139,6 +157,10 @@ void TeleManager_DBusChannelHandler(
TeleConference
*
pConference
=
new
TeleConference
(
pManager
,
pAccount
,
TP_DBUS_TUBE_CHANNEL
(
pChannel
)
);
TeleConference
*
pConference
=
new
TeleConference
(
pManager
,
pAccount
,
TP_DBUS_TUBE_CHANNEL
(
pChannel
)
);
pConference
->
acceptTube
();
pConference
->
acceptTube
();
pManager
->
addConference
(
pConference
);
pManager
->
addConference
(
pConference
);
TpContact
*
pContact
=
tp_channel_get_target_contact
(
pChannel
);
if
(
pContact
)
g_signal_connect
(
pContact
,
"presence-changed"
,
G_CALLBACK
(
contact_presence_changed_cb
),
pConference
);
}
}
else
else
{
{
...
@@ -689,6 +711,9 @@ TeleConference* TeleManager::startBuddySession( TpAccount *pAccount, TpContact *
...
@@ -689,6 +711,9 @@ TeleConference* TeleManager::startBuddySession( TpAccount *pAccount, TpContact *
if
(
!
pConference
->
isReady
())
if
(
!
pConference
->
isReady
())
return
NULL
;
return
NULL
;
g_signal_connect
(
pBuddy
,
"presence-changed"
,
G_CALLBACK
(
contact_presence_changed_cb
),
pConference
);
return
pConference
;
return
pConference
;
}
}
...
...
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