本文整理汇总了C++中YMSGTransfer::setId方法的典型用法代码示例。如果您正苦于以下问题:C++ YMSGTransfer::setId方法的具体用法?C++ YMSGTransfer::setId怎么用?C++ YMSGTransfer::setId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类YMSGTransfer
的用法示例。
在下文中一共展示了YMSGTransfer::setId方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onGo
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();
}
示例2: addInvite
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 );
}
示例3: onGo
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();
}
示例4: onGo
void PingTask::onGo()
{
kDebug(YAHOO_RAW_DEBUG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServicePing);
t->setId( client()->sessionID() );
send( t );
setSuccess();
}
示例5: onGo
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();
}
示例6: registerWebcam
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 );
}
示例7: leaveConference
void ConferenceTask::leaveConference( const QString &room, const QStringList &members )
{
kdDebug(YAHOO_RAW_DEBUG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfLogoff);
t->setId( client()->sessionID() );
t->setParam( 1, client()->userId().local8Bit() );
for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it )
t->setParam( 3, (*it).local8Bit() );
t->setParam( 57, room.local8Bit() );
send( t );
}
示例8: requestWebcam
void WebcamTask::requestWebcam( const QString &who )
{
kDebug(YAHOO_RAW_DEBUG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceWebcam);
t->setId( client()->sessionID() );
t->setParam( 1, client()->userId().toLocal8Bit());
if (!who.isEmpty())
t->setParam( 5, who.toLocal8Bit() );
keysPending.append(who);
send( t );
}
示例9: declineConference
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 );
}
示例10: inviteConference
void ConferenceTask::inviteConference( const QString &room, const QStringList &members, const QString &msg )
{
kdDebug(YAHOO_RAW_DEBUG) ;
YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfInvite);
t->setId( client()->sessionID() );
t->setParam( 1, client()->userId().local8Bit() );
t->setParam( 50, client()->userId().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( 13, "0" );
send( t );
}