rogora / hangish

A Google Hangouts native client for Sailfish
38 stars 7 forks source link

New parsing #8

Closed lukedirtwalker closed 9 years ago

lukedirtwalker commented 9 years ago

This introduces a more robust and faster parser.

Note that I also changed to require c++11, but that should only bring advantages.

There might still be some testing needed, for example it seems notifications are no longer triggered.

However it seems more stable than previous approaches (e.g. PR #6)

rogora commented 9 years ago

Thank you very much for the contribution; before merging I'll test it and check the notifications

lukedirtwalker commented 9 years ago

The notifications I have now fixed. I still need to look into typing information which is also not correct atm

rogora commented 9 years ago

I'm giving this PR a try; in text messages quotation marks appear with a backslash just before them. Could you fix this?

lukedirtwalker commented 9 years ago

I will see what I can do, I think at the same time I'll also check if I can fix the unicodes.

Any other regressions found?

lukedirtwalker commented 9 years ago

So I fixed displaying of unicode " \ and new lines please check it and tell me how you feel about it.

rogora commented 9 years ago

Thank you again for your effort. I'm testing this; I experienced a missed incoming message, I'll try to replicate it to check what happened and if the new parser had some role in the problem.

rogora commented 9 years ago

I'm sorry for the long delay, but I confirm that this parser introduces some problems receiving messages from the channel; don't you have the problem? Anyway I had a bit of time to read your code and I quite like it, so I'd like to merge it, but unfortunately I don't have time now to debug.

lukedirtwalker commented 9 years ago

Yeah I have seen it just yesterday. I don't know why that happens. Are you sure that did not happen before? Currently I don't have much time either.

rogora commented 9 years ago

Yes, I never miss a message with the old parser. I'll try to go over this when I'll have time

lukedirtwalker commented 9 years ago

I think we should look at the parseChannelData function. I think you have better insight of data that can come there, and I left many comments like "is that senseful?". In the meantime I will rebase the PR to latest master so you can easily test it.

lukedirtwalker commented 9 years ago

So I rebased everything.

rogora commented 9 years ago

Ok, I know what's wrong: a parcel received from the channel, parsed in parseChannelData, may contain many "data sets". As example it may have a structure like size [data] size [data] ...

Your implementation currently parses only the first part [only a part of the first part actually :) ]; I'll fix the problem asap, but I have to study a bit more your parsing methods first.