Contents

ColorSyncIterateInstalledProfiles(_:_:_:_:)

Iterates over the installed profiles.

Declaration

func ColorSyncIterateInstalledProfiles(_ callBack: ColorSyncProfileIterateCallback?, _ seed: UnsafeMutablePointer<UInt32>?, _ userInfo: UnsafeMutableRawPointer?, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>?)

Parameters

  • callBack:

    A pointer to a client-provided function (can be NULL).

  • seed:

    A pointer to a cache seed owned by the client (can be NULL).

  • userInfo:

    User-defined data passed to the callback.

  • error:

    On failure, a pointer to an error describing the problem. Optional.

Discussion

When called for the first time, this function returns only system profiles, because profile iteration is a slow process requiring multiple accesses to the file system. Clients are advised to register for kColorSyncProfileRepositoryChangeNotification using CFNotificationCenter or NSNotificationCenter to obtain all installed profiles. The notification callback receives, if possible, a CFDictionary containing a new seed value of the profile cache (key kColorSyncProfileCacheSeed / value kCFNumberSInt32Type). Comparing old and new seed values may prevent unnecessary calls to iterate installed profiles. Alternatively, call ColorSyncIterateInstalledProfilesWithOptions(_:_:_:_:_:) with the kColorSyncWaitForCacheReply option set to kCFBooleanTrue to obtain all installed profiles in one call.

See Also

Finding installed profiles