Kaydet (Commit) ac0eeb43 authored tarafından Noel Grandin's avatar Noel Grandin

convert Link<> to typed

Change-Id: I2f59aec574ed2c5120c554bdff13a9efab6992df
üst 0535f42e
......@@ -83,12 +83,12 @@ protected:
MediatorListener* m_pListener;
// thread to fill the queue
sal_uLong m_nCurrentID;
sal_uLong m_nCurrentID;
// will be constantly increased with each message sent
bool m_bValid;
Link<> m_aConnectionLostHdl;
Link<> m_aNewMessageHdl;
Link<Mediator*,void> m_aConnectionLostHdl;
Link<Mediator*,void> m_aNewMessageHdl;
public:
Mediator( int nSocket );
virtual ~Mediator();
......@@ -117,25 +117,21 @@ public:
MediatorMessage* GetNextMessage( bool bWait = false );
Link<> SetConnectionLostHdl( const Link<>& rLink )
void SetConnectionLostHdl( const Link<Mediator*,void>& rLink )
{
Link<> aRet = m_aConnectionLostHdl;
m_aConnectionLostHdl = rLink;
return aRet;
}
Link<> SetNewMessageHdl( const Link<>& rLink )
void SetNewMessageHdl( const Link<Mediator*,void>& rLink )
{
Link<> aRet = m_aNewMessageHdl;
m_aNewMessageHdl = rLink;
return aRet;
}
};
class MediatorListener : public osl::Thread
{
friend class Mediator;
private:
private:
Mediator* m_pMediator;
::osl::Mutex m_aMutex;
......
......@@ -132,7 +132,7 @@ protected:
static std::vector<PluginConnector*> allConnectors;
DECL_LINK( NewMessageHdl, Mediator* );
DECL_LINK_TYPED( NewMessageHdl, Mediator*, void );
DECL_LINK_TYPED( WorkOnNewMessageHdl, void*, void );
std::vector<NPStream*> m_aNPWrapStreams;
......
......@@ -64,7 +64,7 @@ PluginConnector::~PluginConnector()
}
}
IMPL_LINK( PluginConnector, NewMessageHdl, Mediator*, /*pMediator*/ )
IMPL_LINK_NOARG_TYPED( PluginConnector, NewMessageHdl, Mediator*, void )
{
osl::MutexGuard aGuard( m_aUserEventMutex );
bool bFound = false;
......@@ -75,9 +75,8 @@ IMPL_LINK( PluginConnector, NewMessageHdl, Mediator*, /*pMediator*/ )
bFound = true;
}
if( ! bFound )
return 0;
return;
Application::PostUserEvent( LINK( this, PluginConnector, WorkOnNewMessageHdl ) );
return 0;
}
IMPL_LINK_NOARG_TYPED( PluginConnector, WorkOnNewMessageHdl, void*, void )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment