I was looking at the LSSharedFileListCreate function in LSSharedFileListQuestion and it’s defined as:
LSSharedFileListCreate(CFAllocatorRef inAllocator, CFStringRef inListType,CFTypeRef listOptions)
inAllocator and listOptions are always set as null. I was wondering if there were any other valid values for them besides null.
LSSharedFileListCreatefollows the same conventions as other Core Foundation functions.The
CFAllocatorRefyou provide can bekCFAllocatorDefault,kCFAllocatorSystemDefault,kCFAllocatorMalloc,kCFAllocatorMallocZone,kCFAllocatorNull, orkCFAllocatorUseContext.The one you want to use in most cases is
kCFAllocatorDefault, which is synonymous withNULL, as explained in the interface file.The value you provide to
listOptionsdepends entirely on which value you provide; some have associated values, and some do not.For example, if you provided
kLSSharedFileListVolumesComputerVisibleininListType, you’d provide aCFBooleanvalue indicatingTRUEorFALSEinlistOptions. If you provided the examplekLSSharedFileListSessionLoginItems, you’d provide NULL, since there’s no associated value.