Le Nov 3, 2011 à 7:10 PM, Peter Hartmann a écrit : > On 11/03/2011 04:12 PM, ext Thiago Macieira wrote: >> (...) >> The DNS query is not the problem. A query is always composed of a domain name >> being queried, along with the DNS class (Internet, no one uses anything else >> for real purposes) and the record type. For the record type, it's very easy >> to >> just list all types and also say that the user can use other types from the >> DNS documentation. See the ns_type enum in /usr/include/arpa/nameser.h [1]. > > Yes, the query is quite simple, that is why I was wondering whether we > need a class for it at all. >
Probably not. In the end I ended just storing the request type and encoded query domain in QDnsReplyPrivate. I have not yet exposed it for lack of a good accessor name. Any suggestions? >> >> The problem is the DNS reply. Each query type contains a different kind of >> data >> structure that would need to be parsed. It gets very complex very quickly if >> we want to present the data in a nice, C++ class. > > I am wondering: According to Jeremy it would be best to have separate > classes for different record types; however the way QDnsReply is > designed it looks like a generic class for DNS replies with special > accessors for specific records like serviceRecords(). I changed my mind about the replies after all, I find having a single QDnsReply class works well so far (as you probably noticed, I added support for MX and TXT records). Do you see a compelling reason to change this? Thanks to Shane's feedback the win32 code now compiles and passes all tests. Jeremy _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
