#import <sys/param.h>
#import "MiscMoreAppExtensions.h"

@implementation Application(MiscMoreAppExtensions)

- (NXAtom)domainName 
{
	// returns the domain part of the host the app seems to be running on when
	// using NXHosting 
	// But the NXHost info has to be enough in every case...so this method is
	// quite useless.
	
	return [self realDomainName];
}

- (NXAtom)realDomainName 
{
	// returns the domain part of the host the application is really
	// running on.
	
	char realDomainName[MAXHOSTNAMELEN];	
	getdomainname( realDomainName, MAXHOSTNAMELEN );
	return NXUniqueString( realDomainName );
}

@end