Name

local host name, client.localhostname, kPMRPCClientLocalHostName, kPMObserveClientLocalHostName — Computer's local host name.

Synopsis

string client.localhostname( );

Description

Computer's local host name.

local host name is derived from the computer name. The derived name is suitable for use as a URL and within the Domain Name System (DNS).

You can see the local host name in the Sharing System Preferences panel.

Returns

local host name is a string.

Observable

Changes to local host name can be observed, without polling, using client.localhostname, kPMObserveClientLocalHostName.

Security

local host name can be requested by any authenticated client.

Unauthenticated clients are authorized using the uk.co.dssw.powermanager.client.localhostname right. By default, any local process can request local host name.

Availablility

pmdctl

Examples

Example 36. C: client.localhostname

CFMutableDictionaryRef myRequest = PMRequestCreate(kCFAllocatorDefault,kPMRPCClientLocalHostName);


Example 37. Objective-C: client.localhostname

DSSWPMRequest* myRequest = [DSSWPMRequest requestWithRequest:kPMRPCClientLocalHostName];


Example 38. AppleScript: client.localhostname

tell application "Power Manager Scripting"
    set myResult to local host name of Client
end tell


Example 39. Shell: client.localhostname

./pmctl client.localhostname