nsICancelable asyncResolveTXT(in AUTF8String aHostName, in nsIDNSTXTListener aListener, in nsIEventTarget aListenerTarget);
/* SRV Record */
nsIDNSSRVListener resolveSRV(in AUTF8String aHostName, in AUTF8String aService, in AUTF8String aProtocol);
nsICancelable asyncResolveSRV(in AUTF8String aHostName, in AUTF8String aService, in AUTF8String aProtocol, in nsIDNSSRVListener aListener, in nsIEventTarget aListenerTarget);
/* A Record (unchanged) */
nsICancelable asyncResolve(in AUTF8String aHostName, in unsigned long aFlags, in nsIDNSListener aListener, in nsIEventTarget aListenerTarget);
nsIDNSRecord resolve(in AUTF8String aHostName, in unsigned long aFlags);
};
interface nsIDNSSRVRecord : nsISupports
{
/* weight and priority are just informational because
* nsIDNSSRVRecord sorts the records beforehand
*/
readonly attribute long weight;
readonly attribute long priority;
readonly attribute ACString host;
boolean hasMore();
void rewind();
};
(In reply to comment #51)
> (From update of attachment 242044 [edit])
> Can you please document the API proposed for nsIDNSService?
>
what about this?
This approach adds 2 methods and an interface per record type.
I added SRV and TXT as examples. The old A record stays untouched.
interface nsIDNSService : nsISupports stener resolveTXT(in AUTF8String aHostName);
{
/* TXT Record */
nsIDNSTXTLi
nsICancelable asyncResolveTXT(in AUTF8String aHostName,
in nsIDNSTXTListener aListener,
in nsIEventTarget aListenerTarget); stener resolveSRV(in AUTF8String aHostName,
in AUTF8String aService,
in AUTF8String aProtocol);
/* SRV Record */
nsIDNSSRVLi
nsICancelable asyncResolveSRV(in AUTF8String aHostName,
in AUTF8String aService,
in AUTF8String aProtocol,
in nsIDNSSRVListener aListener,
in nsIEventTarget aListenerTarget);
in unsigned long aFlags,
in nsIDNSListener aListener,
in nsIEventTarget aListenerTarget);
/* A Record (unchanged) */
nsICancelable asyncResolve(in AUTF8String aHostName,
nsIDNSRecord resolve(in AUTF8String aHostName,
in unsigned long aFlags);
};
interface nsIDNSTXTRecord : nsISupports
{
readonly attribute ACString text;
boolean hasMore();
void rewind();
};
interface nsIDNSSRVRecord : nsISupports
{
/* weight and priority are just informational because
* nsIDNSSRVRecord sorts the records beforehand
*/
readonly attribute long weight;
readonly attribute long priority;
readonly attribute ACString host;
boolean hasMore();
void rewind();
};