Re: Review Request 130161: Replace KDebug by Qt's categorical logging in Kopete's protocols

2017-06-19 Thread Laurent Montel


> On June 19, 2017, 4:51 a.m., Laurent Montel wrote:
> > protocols/gadu/gaduaccount.cpp, line 287
> > 
> >
> > it's not debug categories changes no ?:)
> 
> Paulo Lieuthier wrote:
> I had to change it for it to compile.

So why it compiles before ?


> On June 19, 2017, 4:51 a.m., Laurent Montel wrote:
> > protocols/gadu/gaduaccount.cpp, line 1043
> > 
> >
> > same here
> 
> Paulo Lieuthier wrote:
> Same here.

same answer from previous comment :)


> On June 19, 2017, 4:51 a.m., Laurent Montel wrote:
> > protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp, line 22
> > 
> >
> > why renamed it ?
> 
> Paulo Lieuthier wrote:
> Same here.

So why it compiled before ?:)


- Laurent


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130161/#review103341
---


On June 18, 2017, 2:09 p.m., Paulo Lieuthier wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/130161/
> ---
> 
> (Updated June 18, 2017, 2:09 p.m.)
> 
> 
> Review request for Kopete, Laurent Montel and Pali Rohár.
> 
> 
> Repository: kopete
> 
> 
> Description
> ---
> 
> This was done mostly using regex, and now KDebug is no longer needed to link 
> the protocols.
> 
> Pull from here: 
> https://github.com/paulolieuthier/kopete/commits/protocols-categoric-logging
> 
> 
> Diffs
> -
> 
>   protocols/bonjour/CMakeLists.txt ebe86af6a 
>   protocols/bonjour/bonjouraccount.cpp 0ea32aca3 
>   protocols/bonjour/bonjouraddcontactpage.cpp 85156eca9 
>   protocols/bonjour/bonjourcontact.cpp 0bb91e703 
>   protocols/bonjour/bonjourcontactconnection.cpp 94f07a1e2 
>   protocols/bonjour/bonjoureditaccountwidget.cpp 50d420204 
>   protocols/bonjour/bonjourprotocol.cpp fb265f2af 
>   protocols/gadu/CMakeLists.txt 4734b6258 
>   protocols/gadu/gaduaccount.cpp 830016eb1 
>   protocols/gadu/gaduaddcontactpage.cpp 431c5c8af 
>   protocols/gadu/gaducommands.cpp 94d4b5bc7 
>   protocols/gadu/gaducontact.h cacc598c9 
>   protocols/gadu/gaducontact.cpp 3ebb270bb 
>   protocols/gadu/gaducontactlist.cpp e80025cce 
>   protocols/gadu/gadudcc.cpp 19bef1a4d 
>   protocols/gadu/gadudccserver.cpp 85d26b1aa 
>   protocols/gadu/gadudcctransaction.cpp 27d501867 
>   protocols/gadu/gadueditaccount.cpp 21e111545 
>   protocols/gadu/gadueditcontact.cpp 691acb1e6 
>   protocols/gadu/gaduprotocol.cpp 4c102f6a2 
>   protocols/gadu/gadupubdir.h 45761facd 
>   protocols/gadu/gadupubdir.cpp c73fa0741 
>   protocols/gadu/gaduregisteraccount.cpp 56cfca52a 
>   protocols/gadu/gadurichtextformat.cpp 1974dfe0c 
>   protocols/gadu/gadusession.cpp 4b9d02747 
>   protocols/groupwise/CMakeLists.txt 33f7e435e 
>   protocols/groupwise/gwaccount.cpp 43220e984 
>   protocols/groupwise/gwbytestream.cpp 0ae83090c 
>   protocols/groupwise/gwconnector.cpp 1677fe3bc 
>   protocols/groupwise/gwcontact.cpp 831af63c6 
>   protocols/groupwise/gwcontactlist.cpp a54773588 
>   protocols/groupwise/gwmessagemanager.cpp 9075a7014 
>   protocols/groupwise/gwprotocol.cpp 8251921f3 
>   protocols/groupwise/libgroupwise/CMakeLists.txt c36311fcd 
>   protocols/groupwise/libgroupwise/bytestream.cpp df0c711c3 
>   protocols/groupwise/libgroupwise/chatroommanager.cpp ff6ba0b59 
>   protocols/groupwise/libgroupwise/client.cpp 4cfa5dd04 
>   protocols/groupwise/libgroupwise/compress.cpp 1069db9c7 
>   protocols/groupwise/libgroupwise/compressionhandler.cpp ac2657bb8 
>   protocols/groupwise/libgroupwise/coreprotocol.cpp f2fbbf8c7 
>   protocols/groupwise/libgroupwise/gwerror.h 31d576902 
>   protocols/groupwise/libgroupwise/gwfield.cpp e88499a75 
>   protocols/groupwise/libgroupwise/inputprotocolbase.cpp b31a98a65 
>   protocols/groupwise/libgroupwise/rtf.cc 7c1ee8519 
>   protocols/groupwise/libgroupwise/rtf.ll 3b84a30c7 
>   protocols/groupwise/libgroupwise/rtf2html.h 53952c694 
>   protocols/groupwise/libgroupwise/tasks/chatcountstask.cpp 8a7f307fa 
>   protocols/groupwise/libgroupwise/tasks/chatpropertiestask.cpp 48c045c0e 
>   protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.cpp 
> a6432353c 
>   protocols/groupwise/libgroupwise/tasks/logintask.cpp 756c662d6 
>   protocols/groupwise/libgroupwise/tasks/searchchattask.cpp f597721b4 
>   protocols/groupwise/libgroupwise/tasks/searchusertask.cpp 9f8614472 
>   protocols/groupwise/libgroupwise/tests/clientstream_test.cpp 24a07ecd9 
>   protocols/groupwise/libgroupwise/userdetailsmanager.cpp 2850c0d65 
>   protocols/groupwise/ui/gwaddcontactpage.cpp 2c1b8b084 
>   

Re: Chat history progress - GSoC 2017

2017-06-19 Thread Paulo Lieuthier
The new iteration:

Conversations:
* id
* subconversation_id
* account
* type (1:1, group, channel)
* entity_identifier (id of contact, group or channel)
* entity_display_name

Messages:
* id
* conversation_id
* subconversation_id
* timestamp
* sender_id (contact id, if available)
* sender_display_name (sender name, if name not available through id)
* type (text, event, file, voice clip)
* content (html)
* importance
* state

On 12-06-2017 07:33, Pali Rohár wrote:> On Sunday 11 June 2017 20:22:24
Pali Rohár wrote:
>> On Sunday 11 June 2017 19:25:52 Paulo Lieuthier wrote:
 Plus there is missing something like "session" information. E.g. in
 jabber you can communicate with one person in more one-to-one
 chats. Every one is identified by jabber roster. Moreover some
 jabber XEP extension supports some another session identifier
 which is not bound to roster.
>>>
>>> Could you please expand on that? I'm not following. A real example or
>>> documentation would help me a lot.
>>
>> Every jabber message is sent from pair (local_user_id, local_roster) to
>> pair (remote_user_id, remote_roster). Roster is string identification
>> needed when you connect to your account from multiple clients at same
>> time. E.g. target user is connected from both laptop and mobile and you
>> want to send message to his laptop (not mobile).
>>
>> So it would be nice to be able to also distinguish where were messages
>> sent, but still able to query all messages for particular user.
>>
>> For other protocols there can be session information (e.g. string) to
>> group some messages together. E.g. messages which was sent from one
>> window until both side closed conversation.

I added a "subconversation_id" field to differentiate conversations from
each other, and that could be used for jabber rosters. What do you think?

> Some more details:
>
> For 1:1 conversations we have those attributes:
>
> * from which contact is message sent
>   - contact identifier (e.g. email address, jabber JID, ICQ number,
IRC nick)
>   - contact display name
>   - client/computer identifier (e.g. roster in jabber; in case it is
> possible to distinguish between multiple clients connected at some
> time from more devices)
>   - session identifier (in case it is possible to have "more" chat
> windows with same person at same time)

Do you think this is necessary? If I'm chatting with the same person
through two windows, I'd like the history to be synchronized. If not,
when I close both windows and open a new one, which history shall be loaded?

> * to which contact is message sent
>   - (same properties as for "from")
> * account via which this message was sent (e.g. jabber JID, ICQ number,
>   IRC server identifier -- Freenode, ...)
> * message body (HTML), maybe subject of message?
> * additional attributes (like state, importance, encryption/signature,
etc.)
>
> And as (SQL?) query for messages which belongs to one contact in 1:1
> conversations needs to be simple, I suggest to store "other" side of
> conversation into same column. So not to have "from" and "to", but
> rather "local side", "remote side" and "direction".
>
> For multi group conversations we have:
>
> One required attribute:
>  * sender of message (again consist of what is in "from" for 1:1
conversations)
>
> And many optional:
>  * human readable identifier of target (room name, e.g. IRC channel,
>jabber JID of conference)
>  * machine identifier of group chat (e.g. some arbitrary string in
>skype)

"entity_identifier" and "entity_display_name" are meant for that.

>  * list of receivers of message (again may consist of what is in
"from" for 1:1)

For which protocol do you think that would be necessary? For IRC and
Jabber MUCs, "groups" have an identifier, so there would be no need for
such field.

>  * topic of group conversation
>
> And same message body/subject/account... attributes as for 1:1.
>
> When thinking about it, things like "session identifier" or
> "client/computer" identifier may not be defined/set and for some
> protocols they are even not supported (e.g. ICQ).

It'll be really hard to get the schema perfect as the first step with so
many different protocols. We'll fine-tune it in the process.

Pualo



signature.asc
Description: OpenPGP digital signature


Chat history improvements - GSoC 2017 - Progress

2017-06-19 Thread Paulo Lieuthier
Hi all,

In the past days I have been working on isolating the XML storage
backend in the history plugin. This is meant to set the path for the
creation of the new SQLite-based backend.

Please, give me feedback and any possible hints. I created a new review
request [1], which will be updated from a new branch in Github [2].

Paulo Lieuthier

[1] https://git.reviewboard.kde.org/r/130164/
[2] https://github.com/paulolieuthier/kopete/commits/initial-facade



signature.asc
Description: OpenPGP digital signature


Review Request 130164: Initial work on creating a backend façade for history and isolating XML-related code as a specific implementation

2017-06-19 Thread Paulo Lieuthier

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130164/
---

Review request for Kopete, Laurent Montel and Pali Rohár.


Repository: kopete


Description
---

This is done on top of [1], I don't know how to upload a diff only for this 
current branch.

This patch sets the initial work to separate the history plugin interface from 
its actual storage implementation details. I think isolating the XML backend is 
a good idea, because it may continue to be used and it'll be easier to test the 
new backend, comparing to the XML one.

There are much more to do here, I will update the diff soon.

Pull from here: https://github.com/paulolieuthier/kopete/commits/initial-facade

[1] https://git.reviewboard.kde.org/r/130154/


Diffs
-

  libkopete/ui/kopeteview.h 070a3b8a227acadc21aab28bcc29223585c81862 
  plugins/CMakeLists.txt 6216058ef93d1c4ae7860331b6e7ef0d8be8fce2 
  plugins/history/CMakeLists.txt ce90b84a3b60a15db725c29cdb8b721545503ada 
  plugins/history/backends/historybackend.h PRE-CREATION 
  plugins/history/backends/historybackendfactory.h PRE-CREATION 
  plugins/history/backends/historybackendfactory.cpp PRE-CREATION 
  plugins/history/backends/xml/xmlhistorybackend.h PRE-CREATION 
  plugins/history/backends/xml/xmlhistorybackend.cpp PRE-CREATION 
  plugins/history/converter.cpp 3175beac164b673201dff785890bc4d8b1cc68df 
  plugins/history/historydialog.cpp c88ce515ec11844ea1c1c1c4451fdeeab2616439 
  plugins/history/historyguiclient.cpp 41745bfe090eeda437c4fca3072f9039b2af52a8 
  plugins/history/historylogger.h ad60896108d5d02e390d09db49d121fdf2f8517b 
  plugins/history/historylogger.cpp 66b627030f9baf78d98c010c3cc2dc3e7cc08c99 
  plugins/history/historyplugin.cpp 48cd98010c2f3e65ff76ce3b6e5a43c92e988478 
  plugins/history/historypreferences.cpp 
9c64b44184923aa92fe9fb252bfc5dc4d868b908 

Diff: https://git.reviewboard.kde.org/r/130164/diff/


Testing
---


Thanks,

Paulo Lieuthier



Re: Review Request 130161: Replace KDebug by Qt's categorical logging in Kopete's protocols

2017-06-19 Thread Paulo Lieuthier


> On June 19, 2017, 1:51 a.m., Laurent Montel wrote:
> > protocols/gadu/gaduaccount.cpp, line 287
> > 
> >
> > it's not debug categories changes no ?:)

I had to change it for it to compile.


> On June 19, 2017, 1:51 a.m., Laurent Montel wrote:
> > protocols/gadu/gaduaccount.cpp, line 326
> > 
> >
> > same here etc.

Same here.


> On June 19, 2017, 1:51 a.m., Laurent Montel wrote:
> > protocols/gadu/gaduaccount.cpp, line 326
> > 
> >
> > same here etc.

Same here.


> On June 19, 2017, 1:51 a.m., Laurent Montel wrote:
> > protocols/gadu/gaduaccount.cpp, line 1043
> > 
> >
> > same here

Same here.


> On June 19, 2017, 1:51 a.m., Laurent Montel wrote:
> > protocols/gadu/gaduaccount.cpp, line 1087
> > 
> >
> > same here

Same here.


> On June 19, 2017, 1:51 a.m., Laurent Montel wrote:
> > protocols/jabber/jabberformtranslator.cpp, line 23
> > 
> >
> > Why ? why rename include file ?

Same here.


> On June 19, 2017, 1:51 a.m., Laurent Montel wrote:
> > protocols/jabber/jingle/jinglecontentdialog.cpp, line 20
> > 
> >
> > same here

Same here.


> On June 19, 2017, 1:51 a.m., Laurent Montel wrote:
> > protocols/jabber/ui/dlgahcommand.cpp, line 22
> > 
> >
> > same here...

Same here.


> On June 19, 2017, 1:51 a.m., Laurent Montel wrote:
> > protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp, line 22
> > 
> >
> > why renamed it ?

Same here.


> On June 19, 2017, 1:51 a.m., Laurent Montel wrote:
> > protocols/yahoo/libkyahoo/alivetask.cpp, line 38
> > 
> >
> > you removed all debug ?

I removed all empty debugs. Are they worth keeping, even with no message?


> On June 19, 2017, 1:51 a.m., Laurent Montel wrote:
> > protocols/yahoo/libkyahoo/receivefiletask.cpp, line 173
> > 
> >
> > Why removed all debug ?

Same here.


- Paulo


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130161/#review103341
---


On June 18, 2017, 11:09 a.m., Paulo Lieuthier wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/130161/
> ---
> 
> (Updated June 18, 2017, 11:09 a.m.)
> 
> 
> Review request for Kopete, Laurent Montel and Pali Rohár.
> 
> 
> Repository: kopete
> 
> 
> Description
> ---
> 
> This was done mostly using regex, and now KDebug is no longer needed to link 
> the protocols.
> 
> Pull from here: 
> https://github.com/paulolieuthier/kopete/commits/protocols-categoric-logging
> 
> 
> Diffs
> -
> 
>   protocols/bonjour/CMakeLists.txt ebe86af6a 
>   protocols/bonjour/bonjouraccount.cpp 0ea32aca3 
>   protocols/bonjour/bonjouraddcontactpage.cpp 85156eca9 
>   protocols/bonjour/bonjourcontact.cpp 0bb91e703 
>   protocols/bonjour/bonjourcontactconnection.cpp 94f07a1e2 
>   protocols/bonjour/bonjoureditaccountwidget.cpp 50d420204 
>   protocols/bonjour/bonjourprotocol.cpp fb265f2af 
>   protocols/gadu/CMakeLists.txt 4734b6258 
>   protocols/gadu/gaduaccount.cpp 830016eb1 
>   protocols/gadu/gaduaddcontactpage.cpp 431c5c8af 
>   protocols/gadu/gaducommands.cpp 94d4b5bc7 
>   protocols/gadu/gaducontact.h cacc598c9 
>   protocols/gadu/gaducontact.cpp 3ebb270bb 
>   protocols/gadu/gaducontactlist.cpp e80025cce 
>   protocols/gadu/gadudcc.cpp 19bef1a4d 
>   protocols/gadu/gadudccserver.cpp 85d26b1aa 
>   protocols/gadu/gadudcctransaction.cpp 27d501867 
>   protocols/gadu/gadueditaccount.cpp 21e111545 
>   protocols/gadu/gadueditcontact.cpp 691acb1e6 
>   protocols/gadu/gaduprotocol.cpp 4c102f6a2 
>   protocols/gadu/gadupubdir.h 45761facd 
>   protocols/gadu/gadupubdir.cpp c73fa0741 
>   protocols/gadu/gaduregisteraccount.cpp 56cfca52a 
>   protocols/gadu/gadurichtextformat.cpp 1974dfe0c 
>   protocols/gadu/gadusession.cpp 4b9d02747 
>   protocols/groupwise/CMakeLists.txt 33f7e435e 
>   protocols/groupwise/gwaccount.cpp 43220e984 
>   protocols/groupwise/gwbytestream.cpp 0ae83090c