summaryrefslogtreecommitdiff
path: root/tubes/source/collaboration.cxx
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2012-08-06 15:29:17 +0200
committerMatúš Kukan <matus.kukan@gmail.com>2012-08-08 10:04:16 +0200
commit34c6421bddddb2128dd59acc867f73739ac1ca62 (patch)
tree7e7cc03fab695147fefdad5bec7126f59ab07df0 /tubes/source/collaboration.cxx
parent7a597eb6248ef48ebeb23daa40d2c75e5a24d9ee (diff)
tubes: handle TeleConference internally in Collaboration
Hopefully, this simplifies the tubes <-> app interface Change-Id: I8933fde490941b259d5d133972db26a09ab380d5
Diffstat (limited to 'tubes/source/collaboration.cxx')
-rw-r--r--tubes/source/collaboration.cxx50
1 files changed, 50 insertions, 0 deletions
diff --git a/tubes/source/collaboration.cxx b/tubes/source/collaboration.cxx
new file mode 100644
index 000000000000..846f5dc51cc7
--- /dev/null
+++ b/tubes/source/collaboration.cxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <tubes/collaboration.hxx>
+
+#include <tubes/conference.hxx>
+
+Collaboration::Collaboration()
+{
+}
+
+Collaboration::~Collaboration()
+{
+ if (mpConference)
+ mpConference->close();
+}
+
+TeleConference* Collaboration::GetConference() const
+{
+ return mpConference;
+}
+
+sal_uInt64 Collaboration::GetId() const
+{
+ return reinterpret_cast<sal_uInt64> (this);
+}
+
+void Collaboration::SendFile( TpContact* pContact, const OUString& rURL ) const
+{
+ mpConference->sendFile( pContact, rURL, NULL, NULL );
+}
+
+void Collaboration::SendPacket( const OString& rPacket ) const
+{
+ mpConference->sendPacket( rPacket );
+}
+
+void Collaboration::SetConference( TeleConference* pConference )
+{
+ mpConference = pConference;
+ mpConference->setCollaboration( this );
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */