コード例 #1
0
ファイル: XmppSip.cpp プロジェクト: RedScreen/tomahawk
void
XmppSipPlugin::sendSipInfos( const Tomahawk::peerinfo_ptr& receiver, const QList<SipInfo>& info )
{
    tDebug( LOGVERBOSE ) << Q_FUNC_INFO << receiver << info;

    if ( !m_client )
        return;

    TomahawkXmppMessage* sipMessage = new TomahawkXmppMessage( info );
    tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Send sip messsage to" << receiver;
    Jreen::IQ iq( Jreen::IQ::Set, receiver->id() );
    iq.addExtension( sipMessage );
    Jreen::IQReply *reply = m_client->send( iq );
    reply->setData( SipMessageSent );
    connect( reply, SIGNAL( received( Jreen::IQ ) ), SLOT( onNewIq( Jreen::IQ ) ) );
}
コード例 #2
0
ファイル: XmppSip.cpp プロジェクト: dsqmoore/tomahawk
void
XmppSipPlugin::sendSipInfo( const Tomahawk::peerinfo_ptr& receiver, const SipInfo& info )
{
    tDebug( LOGVERBOSE ) << Q_FUNC_INFO << receiver << info;

    if ( !m_client )
        return;

    TomahawkXmppMessage *sipMessage;
    if ( info.isVisible() )
    {
        sipMessage = new TomahawkXmppMessage( info.host(), info.port(), info.nodeId(), info.key() );
    }
    else
        sipMessage = new TomahawkXmppMessage();

    qDebug() << "Send sip messsage to" << receiver;
    Jreen::IQ iq( Jreen::IQ::Set, receiver->id() );
    iq.addExtension( sipMessage );
    Jreen::IQReply *reply = m_client->send( iq );
    reply->setData( SipMessageSent );
    connect( reply, SIGNAL( received( Jreen::IQ ) ), SLOT( onNewIq( Jreen::IQ ) ) );
}