1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #ifndef INCLUDED_TUBES_CONFERENCE_HXX
11 #define INCLUDED_TUBES_CONFERENCE_HXX
13 #include <sal/config.h>
14 #include <rtl/ustring.hxx>
17 class TeleConferenceImpl
;
18 typedef struct _TpAccount TpAccount
;
19 typedef struct _TpContact TpContact
;
20 typedef struct _TpDBusTubeChannel TpDBusTubeChannel
;
21 typedef struct _GDBusConnection GDBusConnection
;
23 /** Conference setup by TeleManager */
28 TeleConference( TpAccount
* pAccount
,
29 TpDBusTubeChannel
* pChannel
,
30 const OString sUuid
= OString(),
31 bool bMaster
= false );
34 /// Close channel and call finalize()
37 /// Unrefs, unregisters from manager and calls dtor if last reference!
40 bool sendPacket( const OString
& rPacket
);
42 void invite( TpContact
*pContact
);
44 typedef void (*FileSentCallback
)( bool aSuccess
, void* pUserData
);
45 void sendFile( TpContact
* pContact
, const OUString
& rURL
, FileSentCallback pCallback
, void* pUserData
);
46 const OString
& getUuid() const { return msUuid
; }
48 Collaboration
* getCollaboration() const;
49 void setCollaboration( Collaboration
* pCollaboration
);
51 // --- following only to be called only by manager's callbacks ---
52 // TODO: make friends instead
53 void setChannel( TpAccount
* pAccount
, TpDBusTubeChannel
* pChannel
);
57 // Only for callbacks.
58 bool setTube( GDBusConnection
* pTube
);
59 void setTubeOfferedHandlerInvoked( bool b
);
60 bool isTubeOfferedHandlerInvoked() const;
61 bool isMaster() const;
62 void setUuid( const OString
& rUuid
) { msUuid
= rUuid
; }
65 friend class TeleManager
;
66 // Used only by TeleManager:
67 /// got tube accepted on other end as well?
71 bool spinUntilTubeEstablished();
73 Collaboration
* mpCollaboration
;
75 TpDBusTubeChannel
* mpChannel
;
78 TeleConferenceImpl
* pImpl
;
81 #endif // INCLUDED_TUBES_CONFERENCE_HXX
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */