1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-29 07:27:44 +00:00

LibDNS: Remove the 'DNS' prefix from the various type and class names

Since all types and class names live in the DNS namespace, we don't
need to spell it out twice each time.
This commit is contained in:
Tom 2022-04-14 16:58:40 -06:00 committed by Linus Groh
parent a3a1fe833b
commit 49de4d5f33
17 changed files with 219 additions and 219 deletions

View file

@ -11,8 +11,8 @@
#include "MulticastDNS.h"
#include <LibCore/FileWatcher.h>
#include <LibCore/Object.h>
#include <LibDNS/DNSName.h>
#include <LibDNS/DNSPacket.h>
#include <LibDNS/Name.h>
#include <LibDNS/Packet.h>
#include <LibIPC/MultiServer.h>
namespace LookupServer {
@ -24,23 +24,23 @@ class LookupServer final : public Core::Object {
public:
static LookupServer& the();
ErrorOr<Vector<DNSAnswer>> lookup(DNSName const& name, DNSRecordType record_type);
ErrorOr<Vector<Answer>> lookup(Name const& name, RecordType record_type);
private:
LookupServer();
void load_etc_hosts();
void put_in_cache(DNSAnswer const&);
void put_in_cache(Answer const&);
ErrorOr<Vector<DNSAnswer>> lookup(DNSName const& hostname, String const& nameserver, bool& did_get_response, DNSRecordType record_type, ShouldRandomizeCase = ShouldRandomizeCase::Yes);
ErrorOr<Vector<Answer>> lookup(Name const& hostname, String const& nameserver, bool& did_get_response, RecordType record_type, ShouldRandomizeCase = ShouldRandomizeCase::Yes);
OwnPtr<IPC::MultiServer<ConnectionFromClient>> m_server;
RefPtr<DNSServer> m_dns_server;
RefPtr<MulticastDNS> m_mdns;
Vector<String> m_nameservers;
RefPtr<Core::FileWatcher> m_file_watcher;
HashMap<DNSName, Vector<DNSAnswer>, DNSName::Traits> m_etc_hosts;
HashMap<DNSName, Vector<DNSAnswer>, DNSName::Traits> m_lookup_cache;
HashMap<Name, Vector<Answer>, Name::Traits> m_etc_hosts;
HashMap<Name, Vector<Answer>, Name::Traits> m_lookup_cache;
};
}