[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-09-10 14:32:48
Message-ID: 1157898768.873354.11893.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 582787 by blueangel:

Move all ui to the ui/, and modify the CMakeLists.txt as well.
Add the myself information to serializatiion, it does not work. Maybe the meta \
information for the account->myself() is supposed to stay in the kopeterc ?




 M  +10 -11    CMakeLists.txt  
 M  +24 -1     README  
 M  +1 -1      libeva.h  
 M  +5 -1      qqaccount.cpp  
 D             qqaddui.ui  
 M  +16 -0     qqcontact.cpp  
 M  +5 -0      qqcontact.h  
 D             qqeditaccountui.ui  
 D             qqeditaccountwidget.cpp  
 D             qqeditaccountwidget.h  
 M  +1 -1      qqprotocol.cpp  
 M  +0 -1      qqsocket.cpp  
 A             ui/qqaddui.ui   qqaddui.ui#582678
 A             ui/qqeditaccountui.ui   qqeditaccountui.ui#582678
 A             ui/qqeditaccountwidget.cpp   qqeditaccountwidget.cpp#582678
 A             ui/qqeditaccountwidget.h   qqeditaccountwidget.h#582678


--- trunk/KDE/kdenetwork/kopete/protocols/qq/CMakeLists.txt #582786:582787
@@ -9,16 +9,24 @@
 
 ########### next target ###############
 
+set(kopete_qq_ui_SRCS
+   ui/qqwebcamdialog.cpp 
+   ui/qqeditaccountwidget.cpp 
+)
+	
+kde4_add_ui_files(kopete_qq_ui_SRCS
+   ui/qqeditaccountui.ui
+   ui/qqaddui.ui
+)
 set(kopete_qq_PART_SRCS 
+   ${kopete_qq_ui_SRCS} 
    qqprotocol.cpp 
    qqcontact.cpp 
    qqaccount.cpp 
    qqaddcontactpage.cpp 
-   qqeditaccountwidget.cpp 
    qqsocket.cpp
    qqnotifysocket.cpp
    qqchatsession.cpp
-   ui/qqwebcamdialog.cpp 
    libeva.cpp
    evautil.cpp
    md5.c
@@ -27,15 +35,6 @@
 
 kde4_automoc(${kopete_qq_PART_SRCS})
 
-kde4_add_ui_files(kopete_qq_PART_SRCS
-qqeditaccountui.ui
-)
-
-kde4_add_ui_files(kopete_qq_PART_SRCS
-qqaddui.ui
-)
-
-
 kde4_add_plugin(kopete_qq ${kopete_qq_PART_SRCS})
 
 kde4_install_libtool_file( ${PLUGIN_INSTALL_DIR} kopete_qq)
--- trunk/KDE/kdenetwork/kopete/protocols/qq/README #582786:582787
@@ -40,8 +40,29 @@
 QQ also supports GroupInfo and GroupNames functions. The former is the \
contactId-GroupId table, the latter is the name of ordered groups.  
 Finding contacts
-=================
+==========
 
+Teenagers and students are QQ's main target market, they still believe cyber love, \
they would like to find some stranger to talk, then start an affair. The exposed meta \
data is essentail to narrow the search process, please check contactDetailIndex to \
find out the full list of meta data: +		"qqId",
+		"nickName",
+		"country",
+		"state",
+		"zipcode",
+		"address",
+		"phone", 
+		"age",
+		"gender",
+		"name",
+		... ...
+
+The contact data is serialized in QQContact, inspired by MSNContact:
+AccountId, ContactId -- account/contact pair is a unique identification.
+Meta data -- include all QQ specific information
+Group list -- TBD
+
+
+Find user supports to find a user via: QQ number or browse the online user.
+
 TBD
 
 Conversation
@@ -72,6 +93,8 @@
 We also need to send heartbeat packet to the server to indicate we are still alive.
 
 
+
+
 =========
 Appendix
 =========
--- trunk/KDE/kdenetwork/kopete/protocols/qq/libeva.h #582786:582787
@@ -114,7 +114,7 @@
 		"state",
 		"zipcode",
 		"address",
-		"Phone", 
+		"phone", 
 		"age",
 		"gender",
 		"name",
--- trunk/KDE/kdenetwork/kopete/protocols/qq/qqaccount.cpp #582786:582787
@@ -503,11 +503,15 @@
 		return;
 	}
 
+	contact->setDetail(map);
+	return;
+
+	//TODO: clean me!
+
 	QQProtocol* proto = static_cast<QQProtocol*> (protocol());
 
 	contact->setProperty( proto->propCountry, m_codec->toUnicode( map["country"] ) );
 	contact->setProperty( proto->propEmail, m_codec->toUnicode( map["email"] ) );
 }
 
-
 #include "qqaccount.moc"
--- trunk/KDE/kdenetwork/kopete/protocols/qq/qqcontact.cpp #582786:582787
@@ -378,6 +378,7 @@
 void QQContact::serialize( QMap<QString, QString> &serializedData, QMap<QString, \
QString> & /* addressBookData */ )  {
 	// Contact id and display name are already set for us, only add the rest
+	/*  TODO: use groups later
 	QString groups;
 	for( QMap<QString, Kopete::Group *>::ConstIterator it = m_serverGroups.begin(); it \
!= m_serverGroups.end(); ++it )  {
@@ -394,7 +395,20 @@
 		lists +='A';
 	if(m_reversed)
 		lists +='R';
+	*/
+	if( m_contactDetail.empty() )
+		return;
 
+	int size = sizeof(Eva::contactDetailIndex)/sizeof(Eva::contactDetailIndex[0]);
+
+	for( int i=1; i< size; i++)
+	{
+		serializedData[ Eva::contactDetailIndex[i] ] = m_contactDetail[ \
Eva::contactDetailIndex[i] ]; +	}
+
+	return;
+
+	/* TODO: delete us!
 	serializedData[ "groups" ]  = groups;
 	serializedData[ "PHH" ]  = m_phoneHome;
 	serializedData[ "PHW" ]  = m_phoneWork;
@@ -402,6 +416,7 @@
 	serializedData[ "lists" ] = lists;
 	serializedData[ "obj" ] = m_obj;
 	serializedData[ "contactGuid" ] = guid();
+	*/
 }
 
 
@@ -522,6 +537,7 @@
 	emit displayPictureChanged();
 }
 
+
 void QQContact::setObject(const QString &obj)
 {
 	if(m_obj==obj && (obj.isEmpty() || \
                hasProperty(Kopete::Global::Properties::self()->photo().key())))
--- trunk/KDE/kdenetwork/kopete/protocols/qq/qqcontact.h #582786:582787
@@ -130,6 +130,9 @@
 	void setObject(const QString &obj);
 	QString object() const { return m_obj; }
 
+	void setDetail(const QMap<const char*, QByteArray>& map) 
+	{ m_contactDetail = map; }
+
 public slots:
 	virtual void slotUserInfo();
 	virtual void deleteContact();
@@ -182,6 +185,8 @@
 	KAction *actionWebcamSend;
 
 	QString m_obj; //the QQObject
+	QMap<const char*, QByteArray> m_contactDetail;
+	
 
 	/**
 	 * keep the current status here.  (it's normally already in \
                Kopete::Contact::d->onlineStatus)
--- trunk/KDE/kdenetwork/kopete/protocols/qq/qqprotocol.cpp #582786:582787
@@ -22,7 +22,7 @@
 #include "qqcontact.h"
 #include "qqprotocol.h"
 #include "qqaddcontactpage.h"
-#include "qqeditaccountwidget.h"
+#include "ui/qqeditaccountwidget.h"
 
 typedef KGenericFactory<QQProtocol> QQProtocolFactory;
 K_EXPORT_COMPONENT_FACTORY( kopete_qq, QQProtocolFactory( "kopete_qq" )  )
--- trunk/KDE/kdenetwork/kopete/protocols/qq/qqsocket.cpp #582786:582787
@@ -105,7 +105,6 @@
 	}
 	else
 		slotSocketClosed();
-
 }
 
 void QQSocket::aboutToConnect()


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

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