FlightGear next
MPServerResolver Class Reference

#include <MPServerResolver.hxx>

Classes

class  MPServerResolver_priv
 

Public Member Functions

 MPServerResolver ()
 
virtual ~MPServerResolver ()
 
void run ()
 
void setTarget (SGPropertyNode_ptr value)
 Set the target property where the server-list gets stored.
 
void setDnsName (const std::string &value)
 Set the dns domain name to query.
 
void setService (const std::string &value)
 Set the service name to use for the query.
 
void setProtocol (const std::string &value)
 Set the protocol name to use for the query.
 
virtual void onSuccess ()
 Handler to be called if the resolver process finishes with success.
 
virtual void onFailure ()
 Handler to be called if the resolver process terminates with an error.
 

Detailed Description

Definition at line 26 of file MPServerResolver.hxx.

Constructor & Destructor Documentation

◆ MPServerResolver()

MPServerResolver::MPServerResolver ( )

Definition at line 64 of file MPServerResolver.cxx.

◆ ~MPServerResolver()

MPServerResolver::~MPServerResolver ( )
virtual

Definition at line 55 of file MPServerResolver.cxx.

Member Function Documentation

◆ onFailure()

virtual void MPServerResolver::onFailure ( )
inlinevirtual

Handler to be called if the resolver process terminates with an error.

Does nothing by default and should be overridden be the user.

Definition at line 72 of file MPServerResolver.hxx.

◆ onSuccess()

virtual void MPServerResolver::onSuccess ( )
inlinevirtual

Handler to be called if the resolver process finishes with success.

Does nothing by default and should be overridden be the user.

Definition at line 67 of file MPServerResolver.hxx.

◆ run()

void MPServerResolver::run ( )

Definition at line 70 of file MPServerResolver.cxx.

◆ setDnsName()

void MPServerResolver::setDnsName ( const std::string & value)
inline

Set the dns domain name to query.

This could be either a full qualified name including the service and the protocol like _fgms._udp.flightgear.org or just the domain name like flightgear.org. Use setService() and setProtocol() in the latter case.

Parameters
valuethe dnsname to use for the query.

Definition at line 46 of file MPServerResolver.hxx.

◆ setProtocol()

void MPServerResolver::setProtocol ( const std::string & value)
inline

Set the protocol name to use for the query.

Don't add the underscore, this gets added automatically. This builds the fully qualified DNS name to query, together with setService() and setDnsName().

Parameters
valuethe protocol name to use for the query sans the leading underscore

Definition at line 62 of file MPServerResolver.hxx.

◆ setService()

void MPServerResolver::setService ( const std::string & value)
inline

Set the service name to use for the query.

Don't add the underscore, this gets added automatically. This builds the fully qualified DNS name to query, together with setProtocol() and setDnsName().

Parameters
valuethe service name to use for the query sans the leading underscore

Definition at line 54 of file MPServerResolver.hxx.

◆ setTarget()

void MPServerResolver::setTarget ( SGPropertyNode_ptr value)
inline

Set the target property where the server-list gets stored.

Parameters
valuethe property node to use as a target

Definition at line 37 of file MPServerResolver.hxx.


The documentation for this class was generated from the following files: