Název projektu: QXMPP

Domovská stránka projektu: http://code.google.com/p/qxmpp/

Zadání

XMPP RPC v knihovně QXMPP. Aktuální implementace víceméně není.

—cut—

Comment #2 on issue 76 by jeremy.laine: Pass QXmppRpcInvokeIq to called method if requested http://code.google.com/p/qxmpp/issues/detail?id=76

Hi Josef,

I will not be applying your patch for now, as the whole RPC code in QXmpp is pretty dodgy in my opinion. I have several concerns regarding this code:

  • the code is intrusive: all RPC related stuff should be in a QXmppRpcManager class, not in QXmppClient. I have introduced the QXmppRpcManager class, and started moving code to it, but it still needs polishing.

  • poor class names: „QXmppInvokable“ and „QXmppRemoteMethod“ do not clearly indicate they are related to RPC, I think all RPC-related class should start with QXmppRpc

  • last but not least, I realised that the RPC code spins its own event loop to simulate a blocking behaviour. This is really, really bad as it can lead to losing XMPP packets. I think the way to go would probably be to have the „callRemoteMethod“ return a QXmppRpcReply* pointer, which would be akin to QNetworkAccessReply: it would be an object containing the result of the RPC request, which would emit a „finished()“ signal when the reply is actually received or times out.

So far I have not pulled the RPC methods from QXmppClient but would be in favour of dropping them before the 0.3.0 release to buy us some time to do things right.

Odkazy dokládající výsledky mé práce

Zde přidám odkazy podobně jako v příkladu níže a popíšu na co jednotlivé odkazy odkazují.

Prezentace

Ohloh

Ohloh profile for Josef Kufner