System Configuration Reference
| Framework | |
| Declared in | SystemConfiguration.h |
Overview
The SystemConfiguration programming interface provides functions you can use to get and interpret status and error codes generated as a result of calling functions of the System Configuration framework.
Functions
SCCopyLastError
Returns an error or status code associated with the most recent function call.
CFErrorRef SCCopyLastError ( void );
Return Value
The most recent status or error code generated as the result of calling a function defined by the System Configuration framework. The code is represented by a Core Foundation CFErrorRef opaque type.
Discussion
Call the CFErrorGetCode function on the returned object to get the underlying error-code integer. See “Status and Error Codes” for descriptions of these codes. For more on CFErrorRef objects, see CFError Reference.
Availability
- Available in iOS 2.0 and later.
Declared In
SystemConfiguration.hSCError
Returns an error or status code associated with the most recent function call.
int SCError ( void );
Return Value
The most recent status or error code generated as the result of calling a function defined by the System Configuration framework. See “Status and Error Codes” for descriptions of these codes.
Availability
- Available in iOS 2.0 and later.
Declared In
SystemConfiguration.hSCErrorString
Returns a string describing the specified status code or error code.
const char * SCErrorString ( int status );
Parameters
- status
A status or error code described in “Status and Error Codes.” You typically get this code by calling
SCErrororSCCopyLastError.
Return Value
The message string associated with the status or error identified by status.
Availability
- Available in iOS 2.0 and later.
Declared In
SystemConfiguration.hConstants
Status and Error Codes
The status or error code generated by the most recent System Configuration function call.
enum {
kSCStatusOK = 0,
kSCStatusFailed = 1001,
kSCStatusInvalidArgument = 1002,
kSCStatusAccessError = 1003,
kSCStatusNoKey = 1004,
kSCStatusKeyExists = 1005,
kSCStatusLocked = 1006,
kSCStatusNeedLock = 1007,
kSCStatusNoStoreSession = 2001,
kSCStatusNoStoreServer = 2002,
kSCStatusNotifierActive = 2003,
kSCStatusNoPrefsSession = 3001,
kSCStatusPrefsBusy = 3002,
kSCStatusNoConfigFile = 3003,
kSCStatusNoLink = 3004,
kSCStatusStale = 3005,
kSCStatusMaxLink = 3006,
kSCStatusReachabilityUnknown = 4001,
kSCStatusConnectionNoService = 5001
};
Constants
kSCStatusOKThe call was successful.
Available in iOS 2.0 and later.
Declared in
SystemConfiguration.h.kSCStatusFailedA nonspecific failure occurred.
Available in iOS 2.0 and later.
Declared in
SystemConfiguration.h.kSCStatusInvalidArgumentAn invalid argument was specified.
Available in iOS 2.0 and later.
Declared in
SystemConfiguration.h.kSCStatusAccessErrorPermission is denied; you must be root to obtain a lock. As a result, the function could not create or access preferences.
Available in iOS 2.0 and later.
Declared in
SystemConfiguration.h.kSCStatusNoKeyNo such key.
Available in iOS 2.0 and later.
Declared in
SystemConfiguration.h.kSCStatusKeyExistsThe key is already defined.
Available in iOS 2.0 and later.
Declared in
SystemConfiguration.h.kSCStatusLockedA lock is already held.
Available in iOS 2.0 and later.
Declared in
SystemConfiguration.h.kSCStatusNeedLockA lock is required for this operation.
Available in iOS 2.0 and later.
Declared in
SystemConfiguration.h.kSCStatusNoStoreSessionThe configuration daemon session is not active.
Available in iOS 2.0 and later.
Declared in
SystemConfiguration.h.kSCStatusNoStoreServerThe configuration daemon is not available or no longer available.
Available in iOS 2.0 and later.
Declared in
SystemConfiguration.h.kSCStatusNotifierActiveNotifier is currently active.
Available in iOS 2.0 and later.
Declared in
SystemConfiguration.h.kSCStatusNoPrefsSessionThe preferences session is not active.
Available in iOS 2.0 and later.
Declared in
SystemConfiguration.h.kSCStatusPrefsBusyA preferences update is currently in progress.
Available in iOS 2.0 and later.
Declared in
SystemConfiguration.h.kSCStatusNoConfigFileThe configuration file cannot be found.
Available in iOS 2.0 and later.
Declared in
SystemConfiguration.h.kSCStatusNoLinkNo such link exists.
Available in iOS 2.0 and later.
Declared in
SystemConfiguration.h.kSCStatusStaleA write was attempted on a stale version of the object.
Available in iOS 2.0 and later.
Declared in
SystemConfiguration.h.kSCStatusMaxLinkThe maximum link count is exceeded.
Available in iOS 2.0 and later.
Declared in
SystemConfiguration.h.kSCStatusReachabilityUnknownNetwork reachability cannot be determined.
Available in iOS 2.0 and later.
Declared in
SystemConfiguration.h.kSCStatusConnectionNoServiceNetwork service for the connection is not available.
Available in iOS 2.0 and later.
Declared in
SystemConfiguration.h.
Error Domain
The error domain associated with errors reported by the System Configuration framework.
const CFStringRef kCFErrorDomainSystemConfiguration;
Constants
kCFErrorDomainSystemConfigurationA string constant identifying a Core Foundation error domain. See CFError Reference for further information on error domains.
Available in iOS 2.0 and later.
Declared in
SystemConfiguration.h.
© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-03-18)