On Wednesday 24 June 2015 20:07:01 Joshua Joseph wrote: > On Wed, Jun 24, 2015 at 9:01 PM, Joshua Joseph <joejo...@gmail.com> > wrote: > > On Wed, Jun 24, 2015 at 3:14 PM, Pali Rohár <pali.ro...@gmail.com> > > wrote: > >> (now breaking email thread) > >> > >> On Wednesday 24 June 2015 14:23:52 Joshua Joseph wrote: > >> > It is fixed now. > >> > >> I do not thing so... > >> > >> void logMessage(Kopete::Message *message, Kopete::Protocol > >> *protocol, > >> > >> bool isGroup = false); > >> > >> Why are there protocol and isGroup variables? > >> > >> QList<Kopete::Message> search(Kopete::Contact *contact, bool > >> showFrom = > >> > >> true); > >> > >> Do you think that such function API describes for what is > >> designed? And is easy to use? Have you tried to imagine some code > >> which will use it? > >> > >> If I write something like that: > >> messages = history->search(account->myself(), true); > >> > >> Without deep knowledge of what method search is doing and how is > >> implemented I have really no idea what will be to "messages" set. > > > > Check it now, Pali. > > So now we can use: > messages = history->search(account->myself(), SentMessages); > to search for all sent messages. >
Hm... and now try to imagine what is output from this command... It is list of all sent messages (by me), right? So it looks like: Pali at time1 sent message1 to contact1 Pali at time2 sent message2 to contact2 Pali at time3 sent message3 to contact3 ... I have no idea why this can be useful... Rather I would like to see 1 vs 1 discussion: Pali at time1 sent message1 to contact1 contact1 at time2 sent message2 to Pali contact1 at time3 sent message3 to Pali Pali at time4 sent message4 to contact1 ... So before sending your API for review again, please think about it! Look at your database schema, how it can be used and which API could be useful for it. What about something like that? messages = search(account, remote_contact, datebegin, dateend, string); insert(message); insert(messages); -- Pali Rohár pali.ro...@gmail.com
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ kopete-devel mailing list kopete-devel@kde.org https://mail.kde.org/mailman/listinfo/kopete-devel