• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ YMSGTransfer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中YMSGTransfer的典型用法代码示例。如果您正苦于以下问题:C++ YMSGTransfer类的具体用法?C++ YMSGTransfer怎么用?C++ YMSGTransfer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了YMSGTransfer类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: kDebug

void PingTask::onGo()
{
	kDebug(YAHOO_RAW_DEBUG) ;

	YMSGTransfer *t = new YMSGTransfer(Yahoo::ServicePing);
	t->setId( client()->sessionID() );
	send( t );
	
	setSuccess();
}
开发者ID:Jtalk,项目名称:kopete-fork-xep0136,代码行数:10,代码来源:pingtask.cpp


示例2: kDebug

void ClientStreamTest::slotConnected()
{
	kDebug(14180) << " connection is up";
	connected = true;
	YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceLogon);
	t->setParam( 1, "kopetetest");
	
	myTestObject->write(t);
	while(1);
}
开发者ID:Jtalk,项目名称:kopete-fork-xep0136,代码行数:10,代码来源:clientstream_test.cpp


示例3: kdDebug

void ConferenceTask::addInvite( const QString &room, const QStringList &who, const QStringList &members, const QString &msg )
{
	kdDebug(YAHOO_RAW_DEBUG) ;

	YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfAddInvite);
	t->setId( client()->sessionID() );
	t->setParam( 1, client()->userId().local8Bit() );

	QString whoList = who.first();
	for( int i = 1; i < who.size(); i++ )
		whoList += QString(",%1").arg( who[i] );
	t->setParam( 51, whoList.local8Bit() );

	t->setParam( 57, room.local8Bit() );
	t->setParam( 58, msg.local8Bit() );
	t->setParam( 97, 1 );
	for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it )
	{
		t->setParam( 52, (*it).local8Bit() );
		t->setParam( 53, (*it).local8Bit() );	// Note: this field should only be set if the buddy has already joined the conference, but no harm is done this way
	}
	t->setParam( 13, "0" );

	send( t );
}
开发者ID:serghei,项目名称:kde3-kdenetwork,代码行数:25,代码来源:conferencetask.cpp


示例4: YMSGTransfer

void RequestPictureTask::onGo()
{
	YMSGTransfer *t = new YMSGTransfer(Yahoo::ServicePicture);
	t->setId( client()->sessionID() );
	t->setParam( 1, client()->userId().toLocal8Bit());
	t->setParam( 5, m_target.toLocal8Bit() );
	t->setParam( 13, "1" );
	send( t );
	
	setSuccess();
}
开发者ID:Jtalk,项目名称:kopete-fork-xep0136,代码行数:11,代码来源:requestpicturetask.cpp


示例5: kDebug

void WebcamTask::registerWebcam()
{	
	kDebug(YAHOO_RAW_DEBUG) ;
	
	YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceWebcam);
	t->setId( client()->sessionID() );
	t->setParam( 1, client()->userId().toLocal8Bit());
	keysPending.append(client()->userId());

	send( t );
}
开发者ID:Jtalk,项目名称:kopete-fork-xep0136,代码行数:11,代码来源:webcamtask.cpp


示例6: kDebug

void SendMessageTask::onGo()
{
	kDebug(YAHOO_RAW_DEBUG) ;

	if( m_text.isEmpty() )
	{
		kDebug(YAHOO_RAW_DEBUG) << "Text to send is empty.";
		client()->notifyError( i18n( "An error occurred while sending the message" ), i18n( "The message is empty." ), Client::Debug );
		return;
	}	
	int pos=0;
	
	// split messages that are longer than 800 chars. they get dropped otherwise
	while( pos < m_text.length() )
	{
		YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceMessage, Yahoo::StatusOffline);
		t->setId( client()->sessionID() );
		t->setParam( 1, client()->userId().toLocal8Bit() );
		t->setParam( 5, m_target.toLocal8Bit() );
		t->setParam( 14, m_text.mid( pos, 700).toUtf8() );
		t->setParam( 63, ";0" );
		t->setParam( 64, "0"  );	
		t->setParam( 97, 1 );	// UTF-8
		t->setParam( 206, client()->pictureFlag() );	
		send( t );

		pos += 700;
	}
	
	setSuccess();
}
开发者ID:Jtalk,项目名称:kopete-fork-xep0136,代码行数:31,代码来源:sendmessagetask.cpp


示例7: take

bool WebcamTask::take( Transfer* transfer )
{
	if ( !forMe( transfer ) )
		return false;

	YMSGTransfer *t = static_cast<YMSGTransfer*>(transfer);
	
 	if( t->service() == Yahoo::ServiceWebcam )
 		parseWebcamInformation( t );
// 	else
// 		parseMessage( transfer );

	return true;
}
开发者ID:Jtalk,项目名称:kopete-fork-xep0136,代码行数:14,代码来源:webcamtask.cpp


示例8: take

bool MessageReceiverTask::take( Transfer* transfer )
{
	if ( !forMe( transfer ) )
		return false;

	YMSGTransfer *t = 0L;
	t = dynamic_cast<YMSGTransfer*>(transfer);
	if (!t)
		return false;

	if( t->service() == Yahoo::ServiceNotify )
		parseNotify( t );
	else
		parseMessage( t );

	return true;
}
开发者ID:serghei,项目名称:kde3-kdenetwork,代码行数:17,代码来源:messagereceivertask.cpp


示例9: kDebug

void CoreProtocol::outgoingTransfer( Transfer* outgoing )
{
	kDebug(YAHOO_RAW_DEBUG) ;
	if ( outgoing->type() == Transfer::YMSGTransfer )
	{
		kDebug(YAHOO_RAW_DEBUG) << " got YMSGTransfer";
		YMSGTransfer *yt = (YMSGTransfer *) outgoing;
		QByteArray bytesOut = yt->serialize();
		
		//QTextStream dout( bytesOut, QIODevice::WriteOnly );
		//dout.setEncoding( QTextStream::Latin1 );
		//dout.setByteOrder( QDataStream::LittleEndian );
		//dout << bytesOut;
		//kDebug(YAHOO_RAW_DEBUG) << " " << bytesOut;
		emit outgoingData( bytesOut );
		// now convert 
		//fieldsToWire( fields );
	}
	delete outgoing;
}
开发者ID:Jtalk,项目名称:kopete-fork-xep0136,代码行数:20,代码来源:coreprotocol.cpp


示例10: kDebug

void ConferenceTask::declineConference( const QString &room, const QStringList &members, const QString &msg )
{
    kDebug(YAHOO_RAW_DEBUG) ;

    YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfDecline);
    t->setId( client()->sessionID() );
    t->setParam( 1, client()->userId().toLocal8Bit() );
    for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it )
        t->setParam( 3, (*it).toLocal8Bit() );
    t->setParam( 57, room.toLocal8Bit() );
    t->setParam( 14, msg.toUtf8() );
    t->setParam( 97, 1 );

    send( t );
}
开发者ID:roideuniverse,项目名称:kopete,代码行数:15,代码来源:conferencetask.cpp


示例11: take

bool ConferenceTask::take( Transfer* transfer )
{
	if ( !forMe( transfer ) )
		return false;

	YMSGTransfer *t = 0L;
	t = static_cast<YMSGTransfer*>(transfer);

 	if( t->service() == Yahoo::ServiceConfInvite ||
		t->service() == Yahoo::ServiceConfAddInvite)
 		parseInvitation( t );
	else if( t->service() == Yahoo::ServiceConfMsg )
		parseMessage( t );
	else if( t->service() == Yahoo::ServiceConfLogon )
		parseUserJoined( t );
	else if( t->service() == Yahoo::ServiceConfLogoff )
		parseUserLeft( t );
	else if( t->service() == Yahoo::ServiceConfDecline )
		parseUserDeclined( t );

	return true;
}
开发者ID:serghei,项目名称:kde3-kdenetwork,代码行数:22,代码来源:conferencetask.cpp


示例12: YMSGTransfer

void SendNotifyTask::onGo()
{
	YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceNotify);
	t->setId( client()->sessionID() );
	t->setStatus( Yahoo::StatusNotify );

	switch( m_type )
	{
	case NotifyTyping:
		t->setParam( 4, client()->userId().local8Bit() );
		t->setParam( 5, m_target.local8Bit() );
		t->setParam( 13, m_state );
		t->setParam( 14, " " );
		t->setParam( 49, "TYPING" );
	break;
	case NotifyWebcamInvite:

		kdDebug(YAHOO_RAW_DEBUG) << "send invitation set Param" << endl;
		t->setParam( 1, client()->userId().local8Bit() );
		t->setParam( 5, m_target.local8Bit() );
		t->setParam( 13, 0 );
		t->setParam( 14, " " );
		t->setParam( 49, "WEBCAMINVITE" );
	break;
	case NotifyGame:
	default:
		setError();
		delete t;
		return;
	break;
	}
	send( t );

	setSuccess();
}
开发者ID:serghei,项目名称:kde3-kdenetwork,代码行数:35,代码来源:sendnotifytask.cpp



注:本文中的YMSGTransfer类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ YamlNode类代码示例发布时间:2022-05-31
下一篇:
C++ YARPSemaphore类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap