summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/collab/sendfunc.cxx8
-rw-r--r--tubes/source/conference.cxx10
-rw-r--r--tubes/source/manager.cxx6
3 files changed, 13 insertions, 11 deletions
diff --git a/sc/source/ui/collab/sendfunc.cxx b/sc/source/ui/collab/sendfunc.cxx
index cbc37873b28e..7c2e1f3d2de7 100644
--- a/sc/source/ui/collab/sendfunc.cxx
+++ b/sc/source/ui/collab/sendfunc.cxx
@@ -47,9 +47,6 @@
namespace css = ::com::sun::star;
-// FIXME: this is only meant for demo I think
-extern void TeleManager_fileReceived( const OUString& );
-
void ScDocFuncSend::RecvMessage( const rtl::OString &rString )
{
try {
@@ -135,10 +132,7 @@ void ScDocFuncSend::SendFile( TpContact* pContact, const rtl::OUString &sUuid )
fprintf( stderr, "Temp file is '%s'\n",
rtl::OUStringToOString( aFileURL, RTL_TEXTENCODING_UTF8 ).getStr() );
- if (pContact)
- mpConference->sendFile( pContact, aFileURL, file_sent_cb, NULL );
- else
- TeleManager_fileReceived( aFileURL );
+ mpConference->sendFile( pContact, aFileURL, file_sent_cb, NULL );
// FIXME: unlink the file after send ...
}
diff --git a/tubes/source/conference.cxx b/tubes/source/conference.cxx
index 76fb0ae5b750..6203685a5b1b 100644
--- a/tubes/source/conference.cxx
+++ b/tubes/source/conference.cxx
@@ -526,11 +526,19 @@ static void TeleConference_FTReady( EmpathyFTHandler *handler, GError *error, gp
}
}
-
+// TODO: move sending file to TeleManager
+extern void TeleManager_fileReceived( const OUString& );
void TeleConference::sendFile( TpContact* pContact, rtl::OUString &localUri, FileSentCallback pCallback, void* pUserData)
{
INFO_LOGGER( "TeleConference::sendFile");
+ if (!pContact)
+ {
+ // used in demo mode
+ TeleManager_fileReceived( localUri );
+ return;
+ }
+
SAL_WARN_IF( ( !mpAccount || !mpChannel), "tubes",
"can't send a file before the tube is set up");
if ( !mpAccount || !mpChannel)
diff --git a/tubes/source/manager.cxx b/tubes/source/manager.cxx
index e8368df62305..6c9007ad72b9 100644
--- a/tubes/source/manager.cxx
+++ b/tubes/source/manager.cxx
@@ -249,8 +249,8 @@ void TeleManager::setCurrentUuid( const OString& rUuid )
pImpl->msCurrentUUID = rUuid;
}
-// FIXME this is exported only because of ScDocFuncDemo
-SAL_DLLPUBLIC_EXPORT void TeleManager_fileReceived( const rtl::OUString &rStr )
+// FIXME: should be static and not used in conference.cxx
+void TeleManager_fileReceived( const rtl::OUString &rStr )
{
SAL_INFO( "tubes", "TeleManager_fileReceived: incoming file: " << rStr );
@@ -291,7 +291,7 @@ SAL_DLLPUBLIC_EXPORT void TeleManager_fileReceived( const rtl::OUString &rStr )
}
}
-void TeleManager_TransferDone( EmpathyFTHandler *handler, TpFileTransferChannel *, gpointer )
+static void TeleManager_TransferDone( EmpathyFTHandler *handler, TpFileTransferChannel *, gpointer )
{
SAL_INFO( "tubes", "TeleManager_TransferDone: hooray!");
GFile *gfile = empathy_ft_handler_get_gfile( handler);