[Libreoffice-commits] .: 4 commits - sc/source tubes/inc tubes/prj tubes/source

Matus Kukan mkukan at kemper.freedesktop.org
Mon Jul 23 12:45:50 PDT 2012


 sc/source/ui/collab/contacts.cxx |    2 
 tubes/inc/tubes/conference.hxx   |   53 +++++----------
 tubes/inc/tubes/contact-list.hxx |    6 +
 tubes/inc/tubes/manager.hxx      |   18 +----
 tubes/prj/build.lst              |    2 
 tubes/source/conference.cxx      |  131 ++++++++++++++++++++++-----------------
 tubes/source/manager.cxx         |   16 ++--
 7 files changed, 116 insertions(+), 112 deletions(-)

New commits:
commit db9630667061789106a5864300ca73d83d04aa73
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Mon Jul 23 20:48:47 2012 +0200

    tubes: do not include telepathy-glib.h in public headers
    
    Change-Id: Ib2c88f2f1fc1c9ebffbbdc9896045c3d1e5b719c

diff --git a/sc/source/ui/collab/contacts.cxx b/sc/source/ui/collab/contacts.cxx
index 02240d9..84f73e1 100644
--- a/sc/source/ui/collab/contacts.cxx
+++ b/sc/source/ui/collab/contacts.cxx
@@ -39,6 +39,8 @@
 #include <vcl/dialog.hxx>
 #include <svx/simptabl.hxx>
 
+#include <telepathy-glib/telepathy-glib.h>
+
 #define CONTACTS_DLG
 
 #ifdef CONTACTS_DLG
diff --git a/tubes/inc/tubes/conference.hxx b/tubes/inc/tubes/conference.hxx
index a66d65b..fc495e5 100644
--- a/tubes/inc/tubes/conference.hxx
+++ b/tubes/inc/tubes/conference.hxx
@@ -32,11 +32,14 @@
 #include <sal/config.h>
 #include "tubes/tubesdllapi.h"
 #include <rtl/ustring.hxx>
-#include <telepathy-glib/telepathy-glib.h>
 #include <tubes/warnings_guard_boost_signals2.hpp>
 
 class TeleManager;
 class TeleConferenceImpl;
+typedef struct _TpAccount TpAccount;
+typedef struct _TpContact TpContact;
+typedef struct _TpDBusTubeChannel TpDBusTubeChannel;
+typedef struct _GDBusConnection GDBusConnection;
 
 /** Conference setup by TeleManager */
 class TeleConference
diff --git a/tubes/inc/tubes/contact-list.hxx b/tubes/inc/tubes/contact-list.hxx
index a17b110..9c48ab7 100644
--- a/tubes/inc/tubes/contact-list.hxx
+++ b/tubes/inc/tubes/contact-list.hxx
@@ -32,10 +32,12 @@
 #include <utility>
 #include <vector>
 
-#include <telepathy-glib/telepathy-glib.h>
-
 #include "tubes/tubesdllapi.h"
 
+typedef struct _TpAccount TpAccount;
+typedef struct _TpContact TpContact;
+typedef struct _TpAccountManager TpAccountManager;
+
 typedef ::std::pair< TpAccount *, TpContact * > AccountContactPair;
 typedef ::std::vector< AccountContactPair > AccountContactPairV;
 
diff --git a/tubes/inc/tubes/manager.hxx b/tubes/inc/tubes/manager.hxx
index 8e39e65..a112b61 100644
--- a/tubes/inc/tubes/manager.hxx
+++ b/tubes/inc/tubes/manager.hxx
@@ -37,7 +37,6 @@
 #include <salhelper/thread.hxx>
 #include <rtl/ref.hxx>
 #include <tools/link.hxx>
-#include <telepathy-glib/telepathy-glib.h>
 
 // For testing purposes, we might need more in future.
 #define LIBO_TUBES_DBUS_INTERFACE "org.libreoffice.calc"
@@ -46,6 +45,10 @@
 
 namespace osl { class Mutex; }
 class TeleManagerImpl;
+typedef struct _TpAccount TpAccount;
+typedef struct _TpContact TpContact;
+typedef struct _GMainLoop GMainLoop;
+typedef struct _GMainContext GMainContext;
 
 /** Interface to Telepathy DBus Tubes.
 
diff --git a/tubes/source/conference.cxx b/tubes/source/conference.cxx
index a2fafd2..d28ffc3 100644
--- a/tubes/source/conference.cxx
+++ b/tubes/source/conference.cxx
@@ -31,6 +31,7 @@
 #include <tubes/constants.h>
 #include <tubes/file-transfer-helper.h>
 
+#include <telepathy-glib/telepathy-glib.h>
 #include <queue>
 
 #if defined SAL_LOG_INFO
diff --git a/tubes/source/manager.cxx b/tubes/source/manager.cxx
index 4abed6b..d16422d 100644
--- a/tubes/source/manager.cxx
+++ b/tubes/source/manager.cxx
@@ -39,6 +39,8 @@
 #include <osl/mutex.hxx>
 #include <rtl/strbuf.hxx>
 #include <rtl/uuid.h>
+
+#include <telepathy-glib/telepathy-glib.h>
 #include <map>
 
 namespace css = ::com::sun::star;
commit abeb02c02d6d2cf5ac48d75b04563d3376d71677
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Mon Jul 23 19:50:19 2012 +0200

    tubes: create TeleConferenceImpl to hide more details from public
    
    Change-Id: If1be001e336991218893e3bc455a16e73ecaab0f

diff --git a/tubes/inc/tubes/conference.hxx b/tubes/inc/tubes/conference.hxx
index 8954457..a66d65b 100644
--- a/tubes/inc/tubes/conference.hxx
+++ b/tubes/inc/tubes/conference.hxx
@@ -33,10 +33,10 @@
 #include "tubes/tubesdllapi.h"
 #include <rtl/ustring.hxx>
 #include <telepathy-glib/telepathy-glib.h>
-#include <queue>
 #include <tubes/warnings_guard_boost_signals2.hpp>
 
 class TeleManager;
+class TeleConferenceImpl;
 
 /** Conference setup by TeleManager */
 class TeleConference
@@ -52,17 +52,11 @@ public:
     /// Unrefs, unregisters from manager and calls dtor if last reference!
     void                    finalize();
 
-    TeleManager*            getManager() const  { return mpManager; }
-
     TUBES_DLLPUBLIC bool    sendPacket( const OString& rPacket );
 
     /** Pop a received packet. */
     bool                    popPacket( OString& rPacket );
 
-    /** Queue incoming data as OString */
-    void                    queue( const char* pPacket, int nSize );
-    void                    queue( const OString& rPacket );
-
     TUBES_DLLPUBLIC void    invite( TpContact *pContact );
 
     /** Emitted when a packet is received. */
@@ -71,37 +65,36 @@ public:
     typedef void          (*FileSentCallback)( bool aSuccess, void* pUserData);
     TUBES_DLLPUBLIC void    sendFile( rtl::OUString &localUri, FileSentCallback pCallback, void* pUserData);
     TUBES_DLLPUBLIC const OString& getUuid() const { return msUuid; }
-    void                    setUuid( const OString& rUuid ) { msUuid = rUuid; }
 
     // --- following only to be called only by manager's callbacks ---
     // TODO: make friends instead
-
     void                    setChannel( TpAccount* pAccount, TpDBusTubeChannel* pChannel );
-    TpDBusTubeChannel*      getChannel() const  { return mpChannel; }
     bool                    offerTube();
     bool                    acceptTube();
-    bool                    setTube( GDBusConnection* pTube );
-    /// got tube accepted on other end as well?
-    bool                    isTubeOpen() const { return mpTube != NULL; }
+    TeleManager*            getManager() const  { return mpManager; }
 
     // Only for callbacks.
-    void                    setTubeOfferedHandlerInvoked( bool b ) { mbTubeOfferedHandlerInvoked = b; }
-    bool                    isTubeOfferedHandlerInvoked() const { return mbTubeOfferedHandlerInvoked; }
+    bool                    setTube( GDBusConnection* pTube );
+    void                    setTubeOfferedHandlerInvoked( bool b );
+    bool                    isTubeOfferedHandlerInvoked() const;
+    /** Queue incoming data as OString */
+    void                    queue( const OString& rPacket );
+    void                    setUuid( const OString& rUuid ) { msUuid = rUuid; }
 
 private:
-    typedef ::std::queue<OString> TelePacketQueue;
+    friend class TeleManager;
+    // Used only by TeleManager:
+    /// got tube accepted on other end as well?
+    bool                    isReady() const;
+
+    // Private:
     bool                    spinUntilTubeEstablished();
 
     TeleManager*            mpManager;
     TpAccount*              mpAccount;
     TpDBusTubeChannel*      mpChannel;
     OString                 msUuid;
-    gchar*                  mpAddress;
-    GDBusConnection*        mpTube;
-    guint                   maObjectRegistrationId;
-    TelePacketQueue         maPacketQueue;
-
-    bool                    mbTubeOfferedHandlerInvoked : 1;
+    TeleConferenceImpl*     pImpl;
 };
 
 #endif // INCLUDED_TUBES_CONFERENCE_HXX
diff --git a/tubes/source/conference.cxx b/tubes/source/conference.cxx
index 7dc531d..a2fafd2 100644
--- a/tubes/source/conference.cxx
+++ b/tubes/source/conference.cxx
@@ -31,6 +31,8 @@
 #include <tubes/constants.h>
 #include <tubes/file-transfer-helper.h>
 
+#include <queue>
+
 #if defined SAL_LOG_INFO
 namespace
 {
@@ -58,6 +60,24 @@ struct InfoLogger
 #define INFO_LOGGER(s)
 #endif // SAL_LOG_INFO
 
+class TeleConferenceImpl
+{
+    typedef ::std::queue<OString> TelePacketQueue;
+
+public:
+    guint                   maObjectRegistrationId;
+    TelePacketQueue         maPacketQueue;
+    GDBusConnection*        mpTube;
+    bool                    mbTubeOfferedHandlerInvoked : 1;
+
+    TeleConferenceImpl() :
+        mpTube( NULL ),
+        mbTubeOfferedHandlerInvoked( false )
+    {}
+
+    ~TeleConferenceImpl() {}
+};
+
 static void TeleConference_MethodCallHandler(
     GDBusConnection*       /*pConnection*/,
     const gchar*           pSender,
@@ -110,7 +130,7 @@ static void TeleConference_MethodCallHandler(
 
     SAL_INFO( "tubes", "TeleConference_MethodCallHandler: received packet from sender "
             << (pSender ? pSender : "(null)") << " with size " << nPacketSize);
-    pConference->queue( pPacketData, nPacketSize );
+    pConference->queue( OString( pPacketData, nPacketSize ) );
     g_dbus_method_invocation_return_value( pInvocation, 0 );
 
     g_variant_unref( ay);
@@ -211,9 +231,7 @@ TeleConference::TeleConference( TeleManager* pManager, TpAccount* pAccount, TpDB
         mpAccount( NULL),
         mpChannel( NULL),
         msUuid( sUuid),
-        mpAddress( NULL),
-        mpTube( NULL),
-        mbTubeOfferedHandlerInvoked( false)
+        pImpl( new TeleConferenceImpl() )
 {
     setChannel( pAccount, pChannel );
 }
@@ -221,7 +239,8 @@ TeleConference::TeleConference( TeleManager* pManager, TpAccount* pAccount, TpDB
 
 TeleConference::~TeleConference()
 {
-    // Do nothing here, we're destructed from finalize()
+    // We're destructed from finalize()
+    delete pImpl;
 }
 
 
@@ -247,7 +266,7 @@ bool TeleConference::spinUntilTubeEstablished()
 {
     mpManager->iterateLoop( this, &TeleConference::isTubeOfferedHandlerInvoked);
 
-    bool bOpen = isTubeOpen();
+    bool bOpen = pImpl->mpTube != NULL;
     SAL_INFO( "tubes", "TeleConference::spinUntilTubeEstablished: tube open: " << bOpen);
     return bOpen;
 }
@@ -258,8 +277,8 @@ bool TeleConference::acceptTube()
     INFO_LOGGER( "TeleConference::acceptTube");
 
     SAL_WARN_IF( !mpChannel, "tubes", "TeleConference::acceptTube: no channel setup");
-    SAL_WARN_IF( mpTube, "tubes", "TeleConference::acceptTube: already tubed");
-    if (!mpChannel || mpTube)
+    SAL_WARN_IF( pImpl->mpTube, "tubes", "TeleConference::acceptTube: already tubed");
+    if (!mpChannel || pImpl->mpTube)
         return false;
 
     tp_dbus_tube_channel_accept_async( mpChannel,
@@ -295,12 +314,11 @@ bool TeleConference::setTube( GDBusConnection* pTube)
 {
     INFO_LOGGER( "TeleConference::setTube");
 
-    OSL_ENSURE( !mpTube, "TeleConference::setTube: already tubed");
+    OSL_ENSURE( !pImpl->mpTube, "TeleConference::setTube: already tubed");
 
-    mpTube = pTube;
+    pImpl->mpTube = pTube;
 
     GDBusNodeInfo *introspection_data;
-    guint registration_id;
     static const GDBusInterfaceVTable interface_vtable =
     {
         TeleConference_MethodCallHandler,
@@ -320,16 +338,30 @@ bool TeleConference::setTube( GDBusConnection* pTube)
     introspection_data = g_dbus_node_info_new_for_xml (introspection_xml, NULL);
     g_assert (introspection_data != NULL);
 
-    registration_id = g_dbus_connection_register_object( mpTube,
+    pImpl->maObjectRegistrationId = g_dbus_connection_register_object( pImpl->mpTube,
             LIBO_TUBES_DBUS_PATH, introspection_data->interfaces[0],
             &interface_vtable, this, NULL, NULL);
-    g_assert (registration_id > 0);
+    g_assert (pImpl->maObjectRegistrationId > 0);
 
     g_dbus_node_info_unref (introspection_data);
 
     return true;
 }
 
+void TeleConference::setTubeOfferedHandlerInvoked( bool b )
+{
+    pImpl->mbTubeOfferedHandlerInvoked = b;
+}
+
+bool TeleConference::isTubeOfferedHandlerInvoked() const
+{
+    return pImpl->mbTubeOfferedHandlerInvoked;
+}
+
+bool TeleConference::isReady() const
+{
+    return mpChannel && pImpl->mpTube;
+}
 
 void TeleConference::close()
 {
@@ -358,18 +390,12 @@ void TeleConference::finalize()
         mpAccount = NULL;
     }
 
-    if (mpTube)
+    if (pImpl->mpTube)
     {
-        g_dbus_connection_unregister_object( mpTube, maObjectRegistrationId);
-        g_dbus_connection_close_sync( mpTube, NULL, NULL );
-        g_object_unref( mpTube );
-        mpTube = NULL;
-    }
-
-    if (mpAddress)
-    {
-        g_free( mpAddress);
-        mpAddress = NULL;
+        g_dbus_connection_unregister_object( pImpl->mpTube, pImpl->maObjectRegistrationId);
+        g_dbus_connection_close_sync( pImpl->mpTube, NULL, NULL );
+        g_object_unref( pImpl->mpTube );
+        pImpl->mpTube = NULL;
     }
 
     //! *this gets destructed here!
@@ -381,8 +407,8 @@ bool TeleConference::sendPacket( const OString& rPacket )
     INFO_LOGGER( "TeleConference::sendPacket");
 
     OSL_ENSURE( mpManager, "tubes: TeleConference::sendPacket: no TeleManager");
-    SAL_WARN_IF( !mpTube, "tubes", "TeleConference::sendPacket: no tube");
-    if (!(mpManager && mpTube))
+    SAL_WARN_IF( !pImpl->mpTube, "tubes", "TeleConference::sendPacket: no tube");
+    if (!(mpManager && pImpl->mpTube))
         return false;
 
     /* FIXME: in GLib 2.32 we can use g_variant_new_fixed_array(). It does
@@ -394,7 +420,7 @@ bool TeleConference::sendPacket( const OString& rPacket )
             FALSE,
             g_free, pData);
 
-    g_dbus_connection_call( mpTube,
+    g_dbus_connection_call( pImpl->mpTube,
             NULL, /* bus name; in multi-user case we'd address this to the master. */
             LIBO_TUBES_DBUS_PATH,
             LIBO_TUBES_DBUS_INTERFACE,
@@ -415,18 +441,12 @@ void TeleConference::queue( const OString &rPacket )
 {
     INFO_LOGGER( "TeleConference::queue");
 
-    maPacketQueue.push( rPacket);
+    pImpl->maPacketQueue.push( rPacket);
 
     sigPacketReceived( rPacket );
 }
 
 
-void TeleConference::queue( const char* pPacketData, int nPacketSize )
-{
-    OString aPacket( pPacketData, nPacketSize );
-    queue( aPacket );
-}
-
 void TeleConference::invite( TpContact *pContact )
 {
     INFO_LOGGER( "TeleConference::invite" );
@@ -514,10 +534,10 @@ bool TeleConference::popPacket( OString& rPacket )
 {
     INFO_LOGGER( "TeleConference::popPacket");
 
-    if (maPacketQueue.empty())
+    if (pImpl->maPacketQueue.empty())
         return false;
-    rPacket = maPacketQueue.front();
-    maPacketQueue.pop();
+    rPacket = pImpl->maPacketQueue.front();
+    pImpl->maPacketQueue.pop();
     return true;
 }
 
diff --git a/tubes/source/manager.cxx b/tubes/source/manager.cxx
index 86d2f5d..4abed6b 100644
--- a/tubes/source/manager.cxx
+++ b/tubes/source/manager.cxx
@@ -619,7 +619,7 @@ TeleConference* TeleManager::startGroupSession( TpAccount *pAccount,
     g_object_unref( pChannelRequest);
     g_hash_table_unref( pRequest);
 
-    if (!pConference->getChannel() || !pConference->isTubeOpen())
+    if (!pConference->isReady())
         return NULL;
 
     return pConference;
@@ -694,7 +694,7 @@ TeleConference* TeleManager::startBuddySession( TpAccount *pAccount, TpContact *
     g_object_unref( pChannelRequest);
     g_hash_table_unref( pRequest);
 
-    if (!pConference->getChannel() || !pConference->isTubeOpen())
+    if (!pConference->isReady())
         return NULL;
 
     return pConference;
commit 955bbbb54c153dc50daca1f35d738acfe1d823a5
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Mon Jul 23 16:20:48 2012 +0200

    tubes: get local callbacks out of class
    
    Change-Id: I7e43d9990827c4c7d86d947e7d71a94b686642fc

diff --git a/tubes/inc/tubes/conference.hxx b/tubes/inc/tubes/conference.hxx
index ab6db92..8954457 100644
--- a/tubes/inc/tubes/conference.hxx
+++ b/tubes/inc/tubes/conference.hxx
@@ -71,6 +71,7 @@ public:
     typedef void          (*FileSentCallback)( bool aSuccess, void* pUserData);
     TUBES_DLLPUBLIC void    sendFile( rtl::OUString &localUri, FileSentCallback pCallback, void* pUserData);
     TUBES_DLLPUBLIC const OString& getUuid() const { return msUuid; }
+    void                    setUuid( const OString& rUuid ) { msUuid = rUuid; }
 
     // --- following only to be called only by manager's callbacks ---
     // TODO: make friends instead
@@ -79,6 +80,7 @@ public:
     TpDBusTubeChannel*      getChannel() const  { return mpChannel; }
     bool                    offerTube();
     bool                    acceptTube();
+    bool                    setTube( GDBusConnection* pTube );
     /// got tube accepted on other end as well?
     bool                    isTubeOpen() const { return mpTube != NULL; }
 
@@ -86,22 +88,9 @@ public:
     void                    setTubeOfferedHandlerInvoked( bool b ) { mbTubeOfferedHandlerInvoked = b; }
     bool                    isTubeOfferedHandlerInvoked() const { return mbTubeOfferedHandlerInvoked; }
 
-    static void             TubeOfferedHandler(GObject* pSource, GAsyncResult* pResult, gpointer pUserData);
-    static void             TubeAcceptedHandler(GObject* pSource, GAsyncResult* pResult, gpointer pUserData);
-
-    static void             methodCallHandler(GDBusConnection*       pConnection,
-                                              const gchar*           pSender,
-                                              const gchar*           pObjectPath,
-                                              const gchar*           pInterfaceName,
-                                              const gchar*           pMethodName,
-                                              GVariant*              pParameters,
-                                              GDBusMethodInvocation* pInvocation,
-                                              void*                  pUserData);
-
 private:
     typedef ::std::queue<OString> TelePacketQueue;
     bool                    spinUntilTubeEstablished();
-    bool                    setTube( GDBusConnection* pTube);
 
     TeleManager*            mpManager;
     TpAccount*              mpAccount;
diff --git a/tubes/inc/tubes/manager.hxx b/tubes/inc/tubes/manager.hxx
index c8e7b4a..8e39e65 100644
--- a/tubes/inc/tubes/manager.hxx
+++ b/tubes/inc/tubes/manager.hxx
@@ -147,6 +147,7 @@ public:
 
 
     // Only for callbacks.
+    void                    addConference( TeleConference* pConference );
     void                    setChannelReadyHandlerInvoked( bool b ) { mbChannelReadyHandlerInvoked = b; }
     bool                    isChannelReadyHandlerInvoked() const { return mbChannelReadyHandlerInvoked; }
     void                    setAccountManagerReadyHandlerInvoked( bool b );
@@ -192,19 +193,7 @@ public:
 
     TpAccount*              getAccount( const rtl::OString& rAccountID );
 
-/* Callbacks; not for use outside this class. */
-    static void             DBusChannelHandler(
-        TpSimpleHandler*            /*handler*/,
-        TpAccount*                  pAccount,
-        TpConnection*               /*connection*/,
-        GList*                      pChannels,
-        GList*                      /*requests_satisfied*/,
-        gint64                      /*user_action_time*/,
-        TpHandleChannelsContext*    pContext,
-        gpointer                    pUserData);
-
 private:
-    void                    addConference( TeleConference* );
     void                    ensureLegacyChannel( TpAccount* pAccount, TpContact* pBuddy );
 
     bool                    mbChannelReadyHandlerInvoked : 1;
diff --git a/tubes/source/conference.cxx b/tubes/source/conference.cxx
index 5cf1972..7dc531d 100644
--- a/tubes/source/conference.cxx
+++ b/tubes/source/conference.cxx
@@ -58,7 +58,7 @@ struct InfoLogger
 #define INFO_LOGGER(s)
 #endif // SAL_LOG_INFO
 
-void TeleConference::methodCallHandler(
+static void TeleConference_MethodCallHandler(
     GDBusConnection*       /*pConnection*/,
     const gchar*           pSender,
     const gchar*           /*pObjectPath*/,
@@ -68,15 +68,15 @@ void TeleConference::methodCallHandler(
     GDBusMethodInvocation* pInvocation,
     void*                  pUserData)
 {
-    INFO_LOGGER_F( "TeleConference::methodCallHandler");
+    INFO_LOGGER_F( "TeleConference_MethodCallHandler");
 
     TeleConference* pConference = reinterpret_cast<TeleConference*>(pUserData);
-    SAL_WARN_IF( !pConference, "tubes", "TeleConference::methodCallHandler: no conference");
+    SAL_WARN_IF( !pConference, "tubes", "TeleConference_MethodCallHandler: no conference");
     if (!pConference)
         return;
 
     TeleManager* pManager = pConference->getManager();
-    SAL_WARN_IF( !pManager, "tubes", "TeleConference::methodCallHandler: no manager");
+    SAL_WARN_IF( !pManager, "tubes", "TeleConference_MethodCallHandler: no manager");
     if (!pManager)
         return;
 
@@ -104,11 +104,11 @@ void TeleConference::methodCallHandler(
     const char* pPacketData = reinterpret_cast<const char*>( g_variant_get_data( ay));
     gsize nPacketSize = g_variant_get_size( ay);
 
-    SAL_WARN_IF( !pPacketData, "tubes", "TeleConference::methodCallHandler: couldn't get packet data");
+    SAL_WARN_IF( !pPacketData, "tubes", "TeleConference_MethodCallHandler: couldn't get packet data");
     if (!pPacketData)
         return;
 
-    SAL_INFO( "tubes", "TeleConference::methodCallHandler: received packet from sender "
+    SAL_INFO( "tubes", "TeleConference_MethodCallHandler: received packet from sender "
             << (pSender ? pSender : "(null)") << " with size " << nPacketSize);
     pConference->queue( pPacketData, nPacketSize );
     g_dbus_method_invocation_return_value( pInvocation, 0 );
@@ -142,15 +142,15 @@ static void TeleConference_ChannelCloseHandler(
 }
 
 
-void TeleConference::TubeOfferedHandler(
+static void TeleConference_TubeOfferedHandler(
         GObject*      pSource,
         GAsyncResult* pResult,
         gpointer      pUserData)
 {
-    INFO_LOGGER_F( "TeleConference::TubeOfferedHandler");
+    INFO_LOGGER_F( "TeleConference_TubeOfferedHandler");
 
     TeleConference* pConference = reinterpret_cast<TeleConference*>(pUserData);
-    SAL_WARN_IF( !pConference, "tubes", "TeleConference::TubeOfferedHandler: no conference");
+    SAL_WARN_IF( !pConference, "tubes", "TeleConference_TubeOfferedHandler: no conference");
     if (!pConference)
         return;
 
@@ -163,7 +163,7 @@ void TeleConference::TubeOfferedHandler(
 
     // "can't find contact ... presence" means contact is not a contact.
     /* FIXME: detect and handle */
-    SAL_WARN_IF( !pTube, "tubes", "TeleConference::TubeOfferedHandler: entered with error: " << pError->message);
+    SAL_WARN_IF( !pTube, "tubes", "TeleConference_TubeOfferedHandler: entered with error: " << pError->message);
     if (pError) {
         g_error_free( pError);
         return;
@@ -173,15 +173,15 @@ void TeleConference::TubeOfferedHandler(
 }
 
 
-void TeleConference::TubeAcceptedHandler(
+static void TeleConference_TubeAcceptedHandler(
         GObject*      pSource,
         GAsyncResult* pResult,
         gpointer      pUserData)
 {
-    INFO_LOGGER_F( "TeleConference::TubeAcceptedHandler");
+    INFO_LOGGER_F( "TeleConference_TubeAcceptedHandler");
 
     TeleConference* pConference = reinterpret_cast<TeleConference*>(pUserData);
-    SAL_WARN_IF( !pConference, "tubes", "TeleConference::TubeAcceptedHandler: no conference");
+    SAL_WARN_IF( !pConference, "tubes", "TeleConference_TubeAcceptedHandler: no conference");
     if (!pConference)
         return;
 
@@ -192,14 +192,14 @@ void TeleConference::TubeAcceptedHandler(
     GDBusConnection* pTube = tp_dbus_tube_channel_accept_finish(
             pChannel, pResult, &pError);
 
-    SAL_WARN_IF( !pTube, "tubes", "TeleConference::TubeAcceptedHandler: entered with error: " << pError->message);
+    SAL_WARN_IF( !pTube, "tubes", "TeleConference_TubeAcceptedHandler: entered with error: " << pError->message);
     if (pError) {
         g_error_free( pError);
         return;
     }
     GHashTable* pParameters = tp_dbus_tube_channel_get_parameters( pChannel);
     const char* sUuid = tp_asv_get_string( pParameters, LIBO_TUBES_UUID);
-    pConference->msUuid = OString( sUuid);
+    pConference->setUuid( OString( sUuid));
 
     pConference->setTube( pTube);
 }
@@ -263,7 +263,7 @@ bool TeleConference::acceptTube()
         return false;
 
     tp_dbus_tube_channel_accept_async( mpChannel,
-            &TeleConference::TubeAcceptedHandler,
+            TeleConference_TubeAcceptedHandler,
             this);
     return spinUntilTubeEstablished();
 }
@@ -284,7 +284,7 @@ bool TeleConference::offerTube()
     tp_dbus_tube_channel_offer_async(
             mpChannel,
             pParameters,
-            &TeleConference::TubeOfferedHandler,
+            TeleConference_TubeOfferedHandler,
             this);
 
     return spinUntilTubeEstablished();
@@ -303,7 +303,7 @@ bool TeleConference::setTube( GDBusConnection* pTube)
     guint registration_id;
     static const GDBusInterfaceVTable interface_vtable =
     {
-        &TeleConference::methodCallHandler,
+        TeleConference_MethodCallHandler,
         NULL,
         NULL,
         { NULL },
diff --git a/tubes/source/manager.cxx b/tubes/source/manager.cxx
index 49cda03..86d2f5d 100644
--- a/tubes/source/manager.cxx
+++ b/tubes/source/manager.cxx
@@ -104,7 +104,7 @@ public:
 };
 
 
-void TeleManager::DBusChannelHandler(
+void TeleManager_DBusChannelHandler(
         TpSimpleHandler*            /*handler*/,
         TpAccount*                  pAccount,
         TpConnection*               /*connection*/,
@@ -115,10 +115,10 @@ void TeleManager::DBusChannelHandler(
         gpointer                    pUserData)
 {
     bool aAccepted = false;
-    INFO_LOGGER_F( "TeleManager::DBusChannelHandler");
+    INFO_LOGGER_F( "TeleManager_DBusChannelHandler");
 
     TeleManager* pManager = reinterpret_cast<TeleManager*>(pUserData);
-    SAL_WARN_IF( !pManager, "tubes", "TeleManager::DBusChannelHandler: no manager");
+    SAL_WARN_IF( !pManager, "tubes", "TeleManager_DBusChannelHandler: no manager");
     if (!pManager)
         return;
 
@@ -128,7 +128,7 @@ void TeleManager::DBusChannelHandler(
         if (!pChannel)
             continue;
 
-        SAL_INFO( "tubes", "TeleManager::DBusChannelHandler: incoming dbus channel: "
+        SAL_INFO( "tubes", "TeleManager_DBusChannelHandler: incoming dbus channel: "
                 << tp_channel_get_identifier( pChannel));
 
         if (TP_IS_DBUS_TUBE_CHANNEL( pChannel))
@@ -491,7 +491,7 @@ bool TeleManager::registerClients()
             FALSE,                          // requests
             getFullClientName().getStr(),   // name
             FALSE,                          // uniquify
-            &TeleManager::DBusChannelHandler, // callback
+            TeleManager_DBusChannelHandler, // callback
             this,                           // user_data
             NULL                            // destroy
             );
commit a83d916085350cd44dc2d0f575f3a6833404abb0
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Sun Jul 22 11:54:29 2012 +0200

    tubes: update unused build.lst
    
    Change-Id: I98842967fadc26efe8295e3acf3bcfc513b68591

diff --git a/tubes/prj/build.lst b/tubes/prj/build.lst
index 5995a89..4499128 100644
--- a/tubes/prj/build.lst
+++ b/tubes/prj/build.lst
@@ -1,2 +1,2 @@
-tubes   tubes   : solenv TELEPATHY:telepathy sal NULL
+tubes   tubes   : comphelper cppu sal salhelper solenv NULL
 tubes tubes\prj nmake - all tubes_prj NULL


More information about the Libreoffice-commits mailing list