tubes: add invite to Collaboration class

Change-Id: I37463d4365a2fe81e58d5f4bcf9f86d9830e26be
This commit is contained in:
Matúš Kukan
2012-08-07 23:59:07 +02:00
parent c3c2dcf80d
commit 011e348e11
3 changed files with 11 additions and 12 deletions

View File

@@ -32,8 +32,8 @@ public:
virtual void SaveAndSendFile( TpContact* pContact ) const = 0; virtual void SaveAndSendFile( TpContact* pContact ) const = 0;
virtual void StartCollaboration( TeleConference* pConference ) = 0; virtual void StartCollaboration( TeleConference* pConference ) = 0;
TUBES_DLLPRIVATE TeleConference* GetConference() const;
TUBES_DLLPRIVATE sal_uInt64 GetId() const; TUBES_DLLPRIVATE sal_uInt64 GetId() const;
TUBES_DLLPRIVATE void Invite( TpContact* pContact ) const;
void DisplayContacts(); void DisplayContacts();
void SendFile( TpContact* pContact, const OUString& rURL ) const; void SendFile( TpContact* pContact, const OUString& rURL ) const;

View File

@@ -26,16 +26,20 @@ Collaboration::~Collaboration()
mpConference->close(); mpConference->close();
} }
TeleConference* Collaboration::GetConference() const
{
return mpConference;
}
sal_uInt64 Collaboration::GetId() const sal_uInt64 Collaboration::GetId() const
{ {
return reinterpret_cast<sal_uInt64> (this); return reinterpret_cast<sal_uInt64> (this);
} }
void Collaboration::Invite( TpContact* pContact ) const
{
if (mpConference)
{
mpConference->invite( pContact );
SaveAndSendFile( pContact );
}
}
void Collaboration::SendFile( TpContact* pContact, const OUString& rURL ) const void Collaboration::SendFile( TpContact* pContact, const OUString& rURL ) const
{ {
mpConference->sendFile( pContact, rURL, NULL, NULL ); mpConference->sendFile( pContact, rURL, NULL, NULL );

View File

@@ -84,12 +84,7 @@ class TubeContacts : public ModelessDialog
pAC = static_cast<AccountContactPair*> (maList.FirstSelected()->GetUserData()); pAC = static_cast<AccountContactPair*> (maList.FirstSelected()->GetUserData());
if (pAC) if (pAC)
{ {
if (mpCollaboration->GetConference()) mpCollaboration->Invite( pAC->second );
{
TpContact* pContact = pAC->second;
mpCollaboration->GetConference()->invite( pContact );
mpCollaboration->SaveAndSendFile( pContact );
}
} }
} }