diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-08-07 23:59:07 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-08-08 10:04:21 +0200 |
commit | 011e348e114c1cc4ccdf6ce8e17024c81b9a0e6a (patch) | |
tree | 881ec0e95505cf14701e63d8a4353de27423cdab /tubes | |
parent | c3c2dcf80de012b620de8563d7e872c3ae556881 (diff) |
tubes: add invite to Collaboration class
Change-Id: I37463d4365a2fe81e58d5f4bcf9f86d9830e26be
Diffstat (limited to 'tubes')
-rw-r--r-- | tubes/inc/tubes/collaboration.hxx | 2 | ||||
-rw-r--r-- | tubes/source/collaboration.cxx | 12 | ||||
-rw-r--r-- | tubes/source/contacts.cxx | 7 |
3 files changed, 10 insertions, 11 deletions
diff --git a/tubes/inc/tubes/collaboration.hxx b/tubes/inc/tubes/collaboration.hxx index 18a64f0c2708..8aef9378bae6 100644 --- a/tubes/inc/tubes/collaboration.hxx +++ b/tubes/inc/tubes/collaboration.hxx @@ -32,8 +32,8 @@ public: virtual void SaveAndSendFile( TpContact* pContact ) const = 0; virtual void StartCollaboration( TeleConference* pConference ) = 0; - TUBES_DLLPRIVATE TeleConference* GetConference() const; TUBES_DLLPRIVATE sal_uInt64 GetId() const; + TUBES_DLLPRIVATE void Invite( TpContact* pContact ) const; void DisplayContacts(); void SendFile( TpContact* pContact, const OUString& rURL ) const; diff --git a/tubes/source/collaboration.cxx b/tubes/source/collaboration.cxx index 65c24c546ec3..c957091cf042 100644 --- a/tubes/source/collaboration.cxx +++ b/tubes/source/collaboration.cxx @@ -26,14 +26,18 @@ Collaboration::~Collaboration() mpConference->close(); } -TeleConference* Collaboration::GetConference() const +sal_uInt64 Collaboration::GetId() const { - return mpConference; + return reinterpret_cast<sal_uInt64> (this); } -sal_uInt64 Collaboration::GetId() const +void Collaboration::Invite( TpContact* pContact ) const { - return reinterpret_cast<sal_uInt64> (this); + if (mpConference) + { + mpConference->invite( pContact ); + SaveAndSendFile( pContact ); + } } void Collaboration::SendFile( TpContact* pContact, const OUString& rURL ) const diff --git a/tubes/source/contacts.cxx b/tubes/source/contacts.cxx index 1472773f1ec2..2a75f2350ff0 100644 --- a/tubes/source/contacts.cxx +++ b/tubes/source/contacts.cxx @@ -84,12 +84,7 @@ class TubeContacts : public ModelessDialog pAC = static_cast<AccountContactPair*> (maList.FirstSelected()->GetUserData()); if (pAC) { - if (mpCollaboration->GetConference()) - { - TpContact* pContact = pAC->second; - mpCollaboration->GetConference()->invite( pContact ); - mpCollaboration->SaveAndSendFile( pContact ); - } + mpCollaboration->Invite( pAC->second ); } } |