SCDynamicStoreCopySpecific Reference
| Framework | |
| Declared in | SCDynamicStoreCopySpecific.h |
Overview
The functions of the SCDynamicStoreCopySpecific programming interface allow an application to determine specific configuration information about the current system (for example, the computer or sharing name or the currently logged-in user). Note that these functions follow Core Foundation function-name conventions. A function that has "Create" or "Copy" in its name returns a reference you must release with the CFRelease function.
Functions
SCDynamicStoreCopyComputerName
Returns the current computer name.
CFStringRef SCDynamicStoreCopyComputerName ( SCDynamicStoreRef store, CFStringEncoding *nameEncoding );
Parameters
- store
The dynamic store session that should be used for communication with the server. Pass
NULLto use a temporary session.- nameEncoding
A pointer to memory that, on output, is filled with the encoding associated with the computer or host name, if it is non-
NULL.
Return Value
The current computer name, or NULL if the name has not been set or if an error occurred. You must release the return value.
Availability
- Available in OS X v10.1 and later.
Declared In
SCDynamicStoreCopySpecific.hSCDynamicStoreCopyConsoleUser
Returns information about the user currently logged into the system.
CFStringRef SCDynamicStoreCopyConsoleUser ( SCDynamicStoreRef store, uid_t *uid, gid_t *gid );
Parameters
- store
The dynamic store session that should be used for communication with the server. Pass
NULLto use a temporary session.- uid
A pointer to memory that, on output, is filled with the user ID of the currently logged-in user. If
NULL, this value is not returned.- gid
A pointer to memory that, on output, is filled with the group ID of the currently logged-in user. If
NULL, this value is not returned.
Return Value
Returns the name, user ID, and group ID of the user currently logged into the system, or NULL if no user is logged in or if an error occurred. You must release the returned values.
Discussion
Note that this function only provides information about the primary console. It does not provide any details about console sessions that have fast user switched out or about other consoles.
Availability
- Available in OS X v10.1 and later.
Declared In
SCDynamicStoreCopySpecific.hSCDynamicStoreCopyLocalHostName
Returns the current local host name.
CFStringRef SCDynamicStoreCopyLocalHostName ( SCDynamicStoreRef store );
Parameters
- store
The dynamic store session that should be used for communication with the server. Pass
NULLto use a temporary session.
Return Value
Returns the current local host name, or NULL if the name has not been set or if an error occurred. You must release the return value.
Availability
- Available in OS X v10.2 and later.
Declared In
SCDynamicStoreCopySpecific.hSCDynamicStoreCopyLocation
Returns the current location identifier.
CFStringRef SCDynamicStoreCopyLocation ( SCDynamicStoreRef store );
Parameters
- store
The dynamic store session that should be used for communication with the server. Pass
NULLto use a temporary session.
Return Value
Returns the current location identifier, or NULL if no location identifier has been defined or if an error occurred. You must release the returned value.
Availability
- Available in OS X v10.2 and later.
Declared In
SCDynamicStoreCopySpecific.hSCDynamicStoreCopyProxies
Returns the key-value pairs that represent the current internet proxy settings.
CFDictionaryRef SCDynamicStoreCopyProxies ( SCDynamicStoreRef store );
Parameters
- store
The dynamic store session that should be used for communication with the server. Pass
NULLto use a temporary session.
Return Value
A dictionary of key-value pairs that represent the current internet proxy settings, or NULL if no proxy settings have been defined or if an error occurred. You must release the returned value.
Discussion
The returned proxy settings dictionary can include the following key-value pairs:
Key | Type | Description |
|---|---|---|
| A | Host name patterns that should bypass the proxy |
| A | Enables or disables the use of an HTTP proxy |
|
| The proxy host |
|
| The proxy port number |
| A | Enables or disables the use of an HTTPS proxy |
|
| The proxy host |
|
| The proxy port number |
| A | Enables or disables the use of an FTP proxy |
|
| The proxy host |
|
| The proxy port number |
| A | Enables or disables passive mode operation for use behind connection filtering firewalls |
Availability
- Available in OS X v10.1 and later.
Declared In
SCDynamicStoreCopySpecific.h© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-03-02)