[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdenetwork/kopete/protocols/qq
From: Hui Jin <blueangel.jin () gmail ! com>
Date: 2006-08-22 15:00:37
Message-ID: 1156258837.553482.25059.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 575927 by blueangel:
Add UserInfo packet to fetch the detailed information from server.
TODO: add handler for the reply packet. Add a new signal from QQNotifySocket, a slot \
in QQAccount, to update the detailed info for myself or contacts.
M +8 -0 libeva.cpp
M +1 -0 libeva.h
M +13 -2 qqeditaccountui.ui
M +0 -3 qqeditaccountwidget.cpp
M +7 -0 qqnotifysocket.cpp
M +1 -0 qqnotifysocket.h
--- trunk/KDE/kdenetwork/kopete/protocols/qq/libeva.cpp #575926:575927
@@ -272,6 +272,14 @@
return buildPacket(id, ChangeStatus, sequence, key, text );
}
+ ByteArray userInfo( int id, short const sequence, ByteArray& key, int qqId )
+ {
+ ByteArray text(20);
+ snprintf( text.data(), 19, "%d", qqId );
+ text.setSize( strlen( text.data() ) );
+ return buildPacket(id, UserInfo, sequence, key, text );
+ }
+
ByteArray getGroupNames( int id, short const sequence, ByteArray& key )
{
ByteArray text(6);
--- trunk/KDE/kdenetwork/kopete/protocols/qq/libeva.h #575926:575927
@@ -372,6 +372,7 @@
ByteArray login( int id, short const sequence, const ByteArray& key,
const ByteArray& token, char const loginMode );
ByteArray changeStatus( int id, short const sequence, ByteArray& key, char status \
); + ByteArray userInfo( int id, short const sequence, ByteArray& key, int qqId );
ByteArray requestTransferKey( int id, short const sequence, const ByteArray& key );
ByteArray contactList( int id, short const sequence, const ByteArray& key, short \
pos = 0); ByteArray getGroupNames( int id, short const sequence, ByteArray& key );
--- trunk/KDE/kdenetwork/kopete/protocols/qq/qqeditaccountui.ui #575926:575927
@@ -42,7 +42,7 @@
<enum>QTabWidget::Rounded</enum>
</property>
<property name="currentIndex" >
- <number>1</number>
+ <number>2</number>
</property>
<widget class="QWidget" name="tab_connection" >
<attribute name="title" >
@@ -737,7 +737,18 @@
</widget>
</item>
<item>
- <widget class="QComboBox" name="Gender" />
+ <widget class="QComboBox" name="Gender" >
+ <item>
+ <property name="text" >
+ <string>Male</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>Female</string>
+ </property>
+ </item>
+ </widget>
</item>
<item>
<widget class="QLabel" name="label_3" >
--- trunk/KDE/kdenetwork/kopete/protocols/qq/qqeditaccountwidget.cpp #575926:575927
@@ -93,8 +93,6 @@
d->ui->optionOverrideServer->setChecked( true );
}
- // d->ui->optionUseHttpMethod->setChecked( \
static_cast<QQAccount*>(account)->useHttpMethod() );
-
QQContact *myself = static_cast<QQContact *>( account->myself() );
d->ui->m_nickName->setText( myself->property( \
Kopete::Global::Properties::self()->nickName()).value().toString() ); @@ -117,7 \
+115,6 @@
QStringList blockList = config->readEntry( "blockList", QStringList() );
QStringList allowList = config->readEntry( "allowList", QStringList() );
- //QStringList reverseList = config->readListEntry("reverseList" );
for ( QStringList::Iterator it = blockList.begin(); it != blockList.end(); ++it )
d->ui->m_BL->insertItem( *it );
--- trunk/KDE/kdenetwork/kopete/protocols/qq/qqnotifysocket.cpp #575926:575927
@@ -404,6 +404,13 @@
sendPacket( QByteArray( data.data(), data.size()) );
}
+void QQNotifySocket::sendUserInfo(int qqId)
+{
+ Eva::ByteArray packet = Eva::userInfo( m_qqId, m_id++, m_sessionKey, qqId);
+ sendPacket( QByteArray( packet.data(), packet.size()) );
+}
+
+
void QQNotifySocket::sendChangeStatus( char status )
{
Eva::ByteArray packet = Eva::changeStatus( m_qqId, m_id++, m_sessionKey, status );
--- trunk/KDE/kdenetwork/kopete/protocols/qq/qqnotifysocket.h #575926:575927
@@ -92,6 +92,7 @@
void sendLogin();
void sendContactList( short pos );
void sendChangeStatus( char status );
+ void sendUserInfo(int qqId);
void sendRequestTransferKey();
void sendGoodbye() { return; }
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic