[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-30 3:59:27
Message-ID: 1156910367.457791.29064.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 578741 by blueangel:

Update the README, add some brief information about the development.



 M  +86 -8     README  


--- trunk/KDE/kdenetwork/kopete/protocols/qq/README #578740:578741
@@ -1,8 +1,82 @@
-Network setting:
+=============
+Introduction
+=============
 
-sever:
+QQ protocol plugin aims to develop the a compaticable protocol for Tencent's QQ \
client, which is common used among teenager and students in China based on \
reverse-engineering work, (Eva and OpenQ).  
-UDP
+QQ supports three network transportation: UDP, TCP and HTTP to meet different \
working environment. The official client prefers UDP to relieve the burdent of the \
server. HTTP is specially designed for mobile user with wap data plan. This approach \
takes TCP, so we don't need to maintain the pool of incoming, outgoing message any \
longer. +
+==========
+Protocol
+==========
+
+The protocol details are encapsulated in Eva namespace.(libeva.h, libeva.cpp). As \
far as I know, there is another gtkmm based project is in the progress in the \
community. To reuse the wheel, libeva depends on STL only[1]. A QByteArray \
alternative, Eva::ByteArray is developed as the default container. If the client need \
a specific QQ packet, just call the corresponding libeva function. +
+The state machine of QQ is maintained in QQNotifySocket, in fact it is stateless, \
when the incoming packet arrives, QQNotifySocket::handleIncomingPacket get the last \
request from the header, and drive actions regardless the context. +
+Here is the detail of the communication,
+
+Login
+=======
+
+The client request a login token from the server first, which is 16 byte key used to \
identify the login procedure. QQ account encrypt the password with MD5 twice to \
generate the 16 byte passwordKey, then use this key to encrypt the 16 byte \
zero-filled array as the header. The login text then append some magic number, the \
login token and eventually encrypted with 16 byte 0x01 initKey. +
+There are 3 returned value from the server, success, failure and redirect. Redirect \
package includes another destination server IP:Port, so as for the workload balance. \
The returned package also includes a sessionKey, which is used as encrypt/decrypt the \
following conversation. +
+Then we need to require another key, transferKey. Was Tencent once a vault \
manufacturer before she went to IT? This key is used to identify a text message/file \
transfer converation. +
+End of the Login.
+
+Update Myself
+==============
+
+We need to fetch the meta data stored in the server and update the properites when \
we logged in. This is ContactInfo packet.  +-- Still working on this
+
+List the Buddies
+=================
+
+QQ supports two kinds of lists. List online buddies and list all budies. The \
returned result is a brief of ContactInfo packet. +QQ also supports GroupInfo and \
GroupNames functions. The former is the contactId-GroupId table, the latter is the \
name of ordered groups. +
+Finding contacts
+=================
+
+TBD
+
+Conversation
+=============
+
+This is the fundamental functionality of QQ. QQ suppors offline IM. 
+
+There are two types of conversation: 
+1 to 1 talk, aka Conversation mode; more than 2 contacts are invovled in, Conference \
mode. The system assign an unique identification for the latter talk, which can be \
regardes as the ID of chatSession. To mimic the behavior, the conversation mode is \
assigned "m_qqId:contactId" as the chatSession ID. This is reasonable since there is \
only one conversation between two QQ account if any at all the time. +
+In fact, there is another service for the premium user, you know what premium means, \
right, it is called Qun in Chinese, here is named Special Interest Group, SIP. It can \
be regarded as the named conference mode compared to the previous one. +
+QQ also support voice/video conversation.
+
+By all means, these are not implemented yet right now, current implementation just \
works for the text message in conversation mode. +
+
+Text Message
+=============
+
+QQ's text message use its own customized, the whold paragraph can be rendered with \
different fonts and colors as a whole. You can also embed some emotion picture inside \
it. The extra format information is tailed after the original text message. +
+When a client receives a text message, it needs to send a receipt to the server to \
indicate this message has been accepted. +
+Heartbeat
+==========
+
+We also need to send heartbeat packet to the server to indicate we are still alive.
+
+
+=========
+Appendix
+=========
+
+UDP server listens on port 8000, available servers include:
 -------------------------------
 URL: sz.tencent.com
 URL:sz2.tencent.com
@@ -16,7 +90,7 @@
 IP: 202.96.170.164
 
 
-TCP
+TCP server listens on port 80, available servers include:
 --------------------------------
 URL: tcpconn.tencent.com
 URL:tcpconn2.tencent.com
@@ -25,7 +99,11 @@
 URL:tcpconn5.tencent.com
 URL:tcpconn6.tencent.com
 
-port:
-UDP: 8000
-TCP: 80
-HTTP: 443
+HTTP server listens on port 443, available servers are unknown.
+
+
+==========
+Reference
+==========
+
+[1] libeva is named after Eva project, since it is almost a re-writen Eva library. 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic