ADC Home > Reference Library > Reference > Networking > System Configuration Framework Reference

 


SCDynamicStoreCopySpecific.h

Include Path:
<SystemConfiguration/SCDynamicStoreCopySpecific.h>
Path:
/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/Headers/SCDynamicStoreCopySpecific.h
Includes:
<sys/cdefs.h>
<sys/types.h>
<CoreFoundation/CoreFoundation.h>
<SystemConfiguration/SCDynamicStore.h>

Overview

The functions of the SCDynamicStoreCopySpecific API allow an application to determine specific configuration information about the current system (for example, the computer or sharing name, the currently logged-in user, etc.). Note that these functions follow Core Foundation function-name conventions in that a function that has "Create" or "Copy" in its name returns a reference you must release with CFRelease.

For more information on using System Configuration framework APIs, see System Configuration Programming Guidelines.



Functions

SCDynamicStoreCopyComputerName
SCDynamicStoreCopyConsoleUser
SCDynamicStoreCopyLocalHostName
SCDynamicStoreCopyLocation
SCDynamicStoreCopyProxies

SCDynamicStoreCopyComputerName


CFStringRef SCDynamicStoreCopyComputerName ( 
    SCDynamicStoreRef store, 
    CFStringEncoding *nameEncoding );  
Parameters
store
An SCDynamicStoreRef representing the dynamic store session that should be used for communication with the server. If NULL, a temporary session will be used.
nameEncoding
A pointer to memory that, if non-NULL, will be filled with the encoding associated with the computer or host name.
Return Value

Returns the current computer name; NULL if the name has not been set or if an error was encountered. You must release the returned value.

Discussion

Gets the current computer name.


SCDynamicStoreCopyConsoleUser


CFStringRef SCDynamicStoreCopyConsoleUser ( 
    SCDynamicStoreRef store, 
    uid_t *uid, 
    gid_t *gid );  
Parameters
store
An SCDynamicStoreRef representing the dynamic store session that should be used for communication with the server. If NULL, a temporary session will be used.
uid
A pointer to memory that will be filled with the user ID of the current console user. If NULL, this value will not be returned.
gid
A pointer to memory that will be filled with the group ID of the current console user. If NULL, this value will not be returned.
Return Value

Returns the user currently logged into the system; NULL if no user is logged in or if an error was encountered. You must release the returned value.

Discussion

Gets the name, user ID, and group ID of the currently logged-in user.

Note: 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.


SCDynamicStoreCopyLocalHostName


CFStringRef SCDynamicStoreCopyLocalHostName ( 
    SCDynamicStoreRef store );  
Parameters
store
An SCDynamicStoreRef representing the dynamic store session that should be used for communication with the server. If NULL, a temporary session will be used.
Return Value

Returns the current local host name; NULL if the name has not been set or if an error was encountered. You must release the returned value.

Discussion

Gets the current local host name.


SCDynamicStoreCopyLocation


CFStringRef SCDynamicStoreCopyLocation ( 
    SCDynamicStoreRef store );  
Parameters
store
An SCDynamicStoreRef representing the dynamic store session that should be used for communication with the server. If NULL, a temporary session will be used.
Return Value

Returns a string representing the current location identifier; NULL if no location identifier has been defined or if an error was encountered. You must release the returned value.

Discussion

Gets the current location identifier.


SCDynamicStoreCopyProxies


CFDictionaryRef SCDynamicStoreCopyProxies ( 
    SCDynamicStoreRef store );  
Parameters
store
An SCDynamicStoreRef representing the dynamic store session that should be used for communication with the server. If NULL, a temporary session will be used.
Return Value

Returns a dictionary containing key-value pairs that represent the current internet proxy settings; NULL if no proxy settings have been defined or if an error was encountered. You must release the returned value.

Discussion

Gets the current internet proxy settings. The returned proxy settings dictionary includes:

key type description
kSCPropNetProxiesExceptionsList CFArray[CFString] Host name patterns which should bypass the proxy
kSCPropNetProxiesHTTPEnable CFNumber (0 or 1) Enables/disables the use of an HTTP proxy
kSCPropNetProxiesHTTPProxy CFString The proxy host
kSCPropNetProxiesHTTPPort CFNumber The proxy port number
kSCPropNetProxiesHTTPSEnable CFNumber (0 or 1) Enables/disables the use of an HTTPS proxy
kSCPropNetProxiesHTTPSProxy CFString The proxy host
kSCPropNetProxiesHTTPSPort CFNumber The proxy port number
kSCPropNetProxiesFTPEnable CFNumber (0 or 1) Enables/disables the use of an FTP proxy
kSCPropNetProxiesFTPProxy CFString The proxy host
kSCPropNetProxiesFTPPort CFNumber The proxy port number
kSCPropNetProxiesFTPPassive CFNumber (0 or 1) Enable passive mode operation for use behind connection filter-ing firewalls.


Other key-value pairs are defined in the SCSchemaDefinitions.h header file.


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.
Last Updated: 2008-03-11