Platforms to show: All Mac Windows Linux Cross-Platform

Back to CSDeviceMBS module.

CSDeviceMBS.DeviceInfo(deviceClass as string, deviceID as CFUUIDMBS) as dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Queries information on the device.

Returns a dictionary with the following keys and values resolved for the current host and current user.

kColorSyncDeviceClass: camera, display, printer, scanner
kColorSyncDeviceID: CFUUIDRef registered with ColorSync
kColorSyncDeviceDescription: localized device description
kColorSyncDeviceUserScope: kCFPreferencesAnyUser or kCFPreferencesCurrentUser
kColorSyncDeviceHostScope: kCFPreferencesAnyHost or kCFPreferencesCurrentHost
kColorSyncFactoryProfiles: dictionary with ProfileID and kColorSyncCustomProfiles keys.
kColorSyncCustomProfiles: dictionary with keys ProfileID and values CFURLMBS or nil.

ProfileID is a dictionary with the following keys:

kColorSyncDeviceProfileURL: CFURLMBS or kCFNull
kColorSyncDeviceModeDescription: localized mode description

CSDeviceMBS.DeviceProfiles as dictionary()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Queris the device profiles.

The dictionaries contain the following keys:

kColorSyncDeviceClasscamera, display, printer, scanner
kColorSyncDeviceIDCFUUIDRef registered with ColorSync
kColorSyncDeviceDescriptionlocalized device description
kColorSyncDeviceModeDescriptionlocalized device mode description
kColorSyncDeviceProfileIDProfileID registered with ColorSync
kColorSyncDeviceProfileURLCFURLMBS registered with ColorSync
kColorSyncDeviceProfileIsFactoryBoolean
kColorSyncDeviceProfileIsDefaultBoolean
kColorSyncDeviceProfileIsCurrentBoolean

CSDeviceMBS.kColorSyncCameraDeviceClass as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
A constant for a possible value for the device class.

CSDeviceMBS.kColorSyncCustomProfiles as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

Dictionary containing custom profile info.

CSDeviceMBS.kColorSyncDeviceClass as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

CSDeviceMBS.kColorSyncDeviceDefaultProfileID as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

CSDeviceMBS.kColorSyncDeviceDescription as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

String with a name in current locale.

CSDeviceMBS.kColorSyncDeviceDescriptions as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

Dictionary with localized names.

CSDeviceMBS.kColorSyncDeviceHostScope as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

CSDeviceMBS.kColorSyncDeviceID as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

Value is a CFUUIDMBS for this key.

CSDeviceMBS.kColorSyncDeviceModeDescription as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

String, e.g. Glossy, Best Quality.

CSDeviceMBS.kColorSyncDeviceModeDescriptions as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

Dictionary with localized mode names.

CSDeviceMBS.kColorSyncDeviceProfileID as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

CSDeviceMBS.kColorSyncDeviceProfileIsCurrent as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

CSDeviceMBS.kColorSyncDeviceProfileIsDefault as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

CSDeviceMBS.kColorSyncDeviceProfileIsFactory as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

CSDeviceMBS.kColorSyncDeviceProfilesNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

CSDeviceMBS.kColorSyncDeviceProfileURL as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

CSDeviceMBS.kColorSyncDeviceRegisteredNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

CSDeviceMBS.kColorSyncDeviceUnregisteredNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

CSDeviceMBS.kColorSyncDeviceUserScope as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

CSDeviceMBS.kColorSyncDisplayDeviceClass as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
A constant for a possible value for the device class.

CSDeviceMBS.kColorSyncDisplayDeviceProfilesNotification as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

CSDeviceMBS.kColorSyncFactoryProfiles as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

Dictionary containing factory profile info.

CSDeviceMBS.kColorSyncPrinterDeviceClass as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
A constant for a possible value for the device class.

CSDeviceMBS.kColorSyncProfileHostScope as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

CSDeviceMBS.kColorSyncProfileUserScope as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
One of the key constants for the info/options dictionaries.

CSDeviceMBS.kColorSyncScannerDeviceClass as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
A constant for a possible value for the device class.

CSDeviceMBS.RegisterDevice(deviceClass as string, deviceID as CFUUIDMBS, deviceInfo as dictionary) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Registeres a device.

deviceInfo: A dictionary containing information needed to register a device.

Required keys:

kColorSyncDeviceDescriptions: Dictionary with localized names of the device. Localization keys must be five character strings containing language code and region code in the lc_RG format and it must contain (at least) the "en_US" locale.
kColorSyncFactoryProfiles: Dictionary with factory profile info Dictionaries The keys are the profile IDs and the values are the profile info dictionaries.

Optional keys:

kColorSyncDeviceHostScope: host scope of the device; one of kCFPreferences{Current,Any}Host; if unspecified kCFPreferencesCurrentHost is assumed.
kColorSyncDeviceUserScope: user scope of the device; one of kCFPreferences{Current,Any}User; if unspecified kCFPreferencesCurrentUser is assumed.

factory profiles dictionary - value for the key kColorSyncFactoryProfiles in deviceInfo

Required keys and values:

Each profile is identified by a ProfileID (of String type) which used as the key. Value associated with the key is a profile info dictionary that describes an individual device profile.

kColorSyncDeviceDefaultProfileID: the associated value must be one of the ProfileID present in the dictionary. Presence of this key is not required if there is only one factory profile.

profile info Dictionary

Required keys:

kColorSyncDeviceProfileURL: CFURLMBS of the profile to be registered
kColorSyncDeviceModeDescriptions: Dictionary with localized device mode names for the profile. Localization keys must be five character strings containing language code and region code in the lc_RG format and it must contain (at least) the "en_US" locale. E.g. "en_US" "Glossy Paper with best quality"

Example of deviceInfo dictionary:

kColorSyncDeviceDescriptions:
en_US My Little Printer
de_DE Mein Kleiner Drucker
fr_FR Mon petit immprimeur
...

kColorSyncFactoryProfiles: "Profile 1"
kColorSyncDeviceProfileURL: CFURLMBS
kColorSyncDeviceModeDescriptions:
en_US Glossy Paper
de_DE Glanzpapier
fr_FR Papier glace
...

kColorSyncDeviceDefaultProfileID: "Profile 1"
kColorSyncDeviceUserScope: kCFPreferencesAnyUser
kColorSyncDeviceHostScope: kCFPreferencesCurrentHost

Notes:
1. Scope for factory profiles is exactly the same as the device scope.
2. Pass CFNullRef in lieu of the profile URL or no URl key/value pair at all if factory profile is not available. This will enable setting custom profile.
3. For the reasons of compatibility with legacy API, it is recommended that the profile keys are created as CFStrings from uint32 numbers as follows: key = encodings.UTF32.chr(value)

Returns true on success and false in case of failure

CSDeviceMBS.SetCustomProfiles(deviceClass as string, deviceID as CFUUIDMBS, profileInfo as dictionary) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Sets a custom profile:

profileInfo is a CFDictionary containing the information about custom profiles to be set in lieu of factory profiles.

Required keys:

ProfileIDs which must be the subset of the ProfileIDs that device was registered with or kColorSyncDeviceDefaultProfileID for setting custom default profile.

Required values:

CFURLMBS (folderitem) of the profile to be set as a custom profile.

Optional keys:

kColorSyncProfileHostScope: host scope of the profile; one of kCFPreferences{Current,Any}Host; if unspecified kCFPreferencesCurrentHost is assumed.
kColorSyncProfileUserScope: user scope of the profile; one of kCFPreferences{Current,Any}User; if unspecified kCFPreferencesCurrentUser is assumed.

Notes:
1. Profile scope for custom profiles cannot exceed scope of the factory profiles.
2. There is only one host scope and user scope per dictionary (i.e. per call)
3. Pass CFNullRef in lieu of the profile URL to unset the custom profile and reset the current profile to the factory profile.

Returns true on success and false in case of failure.

CSDeviceMBS.UnregisterDevice(deviceClass as string, deviceID as CFUUIDMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method ColorSync MBS MacCF Plugin 10.5 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Unregisters a device of given deviceClass and deviceID.

Returns true on success and false in case of failure.

The items on this page are in the following plugins: MBS MacCF Plugin.


The biggest plugin in space...