summaryrefslogtreecommitdiff
path: root/tubes/inc
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/inc
parent7a597eb6248ef48ebeb23daa40d2c75e5a24d9ee (diff)
tubes: handle TeleConference internally in Collaboration
Hopefully, this simplifies the tubes <-> app interface Change-Id: I8933fde490941b259d5d133972db26a09ab380d5
Diffstat (limited to 'tubes/inc')
-rw-r--r--tubes/inc/tubes/collaboration.hxx28
-rw-r--r--tubes/inc/tubes/conference.hxx9
2 files changed, 21 insertions, 16 deletions
diff --git a/tubes/inc/tubes/collaboration.hxx b/tubes/inc/tubes/collaboration.hxx
index 65595cde1143..15d59d4abf66 100644
--- a/tubes/inc/tubes/collaboration.hxx
+++ b/tubes/inc/tubes/collaboration.hxx
@@ -13,23 +13,29 @@
#include <sal/config.h>
#include <rtl/ustring.hxx>
+#include <tubes/tubesdllapi.h>
class TeleConference;
typedef struct _TpContact TpContact;
-class Collaboration
+class TUBES_DLLPUBLIC Collaboration
{
+ TeleConference* mpConference;
public:
- Collaboration() {}
- virtual ~Collaboration() {}
-
- virtual void ContactLeft() = 0;
- virtual TeleConference* GetConference() = 0;
- virtual sal_uInt64 GetId() = 0;
- virtual void PacketReceived( const OString& rPacket ) = 0;
- virtual void SetCollaboration( TeleConference* pConference ) = 0;
- // TODO: I think this could be moved to TeleManager later.
- virtual void SendFile( TpContact* pContact, const OUString& rURL ) = 0;
+ Collaboration();
+ virtual ~Collaboration();
+
+ virtual void ContactLeft() const = 0;
+ virtual void PacketReceived( const OString& rPacket ) const = 0;
+ virtual void SaveAndSendFile( TpContact* pContact, const OUString& rURL ) const = 0;
+ virtual void StartCollaboration( TeleConference* pConference ) = 0;
+
+ TUBES_DLLPRIVATE TeleConference* GetConference() const;
+ TUBES_DLLPRIVATE sal_uInt64 GetId() const;
+
+ void SendFile( TpContact* pContact, const OUString& rURL ) const;
+ void SendPacket( const OString& rPacket ) const;
+ void SetConference( TeleConference* pConference );
};
#endif // INCLUDED_TUBES_COLLABORATION_HXX
diff --git a/tubes/inc/tubes/conference.hxx b/tubes/inc/tubes/conference.hxx
index 3f600e06a650..1514b141cd0b 100644
--- a/tubes/inc/tubes/conference.hxx
+++ b/tubes/inc/tubes/conference.hxx
@@ -30,7 +30,6 @@
#define INCLUDED_TUBES_CONFERENCE_HXX
#include <sal/config.h>
-#include "tubes/tubesdllapi.h"
#include <rtl/ustring.hxx>
class Collaboration;
@@ -52,21 +51,21 @@ public:
~TeleConference();
/// Close channel and call finalize()
- TUBES_DLLPUBLIC void close();
+ void close();
/// Unrefs, unregisters from manager and calls dtor if last reference!
void finalize();
- TUBES_DLLPUBLIC bool sendPacket( const OString& rPacket );
+ bool sendPacket( const OString& rPacket );
void invite( TpContact *pContact );
typedef void (*FileSentCallback)( bool aSuccess, void* pUserData);
- TUBES_DLLPUBLIC void sendFile( TpContact* pContact, rtl::OUString &localUri, FileSentCallback pCallback, void* pUserData);
+ void sendFile( TpContact* pContact, const OUString& rURL, FileSentCallback pCallback, void* pUserData);
const OString& getUuid() const { return msUuid; }
Collaboration* getCollaboration() const;
- TUBES_DLLPUBLIC void setCollaboration( Collaboration* pCollaboration );
+ void setCollaboration( Collaboration* pCollaboration );
// --- following only to be called only by manager's callbacks ---
// TODO: make friends instead