sys: messageport: Sort functions, add error codes
Sorts all functions of CFMessagePort in Apple docs order, adds constants of CFMessagePortSendRequest Error Codes.
CFCharacterSet (sys): Add missing functions & sorting
Adds missing functions and sorts them in Apple docs order. CFMutableCharacterSetRef is a mutable pointer now as it should be, according to CFCharacterSet.h.
CFBundle (sys): Add funcs & consts, sorting
Adds missing functions, types and constants from CFBundle.h. Several inline functions are also rewritten as unsafe Rust functions. All of them are sorted in Apple docs order.
Adds missing functions and sorts them in Apple docs order.
CFMutableCharacterSetRef is a mutable pointer now as it should be,
according to CFCharacterSet.h.
Adds missing functions, types and constants from CFBundle.h.
Several inline functions are also rewritten as unsafe Rust functions.
All of them are sorted in Apple docs order.
The function pointers can be null so should be wrapped in Option.
This struct was basically unusable before so I think we should
be fine making this change while only bumping the patch version.
I was unable to find any uses of it on github.
feat(CFNumber): change `CFNumberType` from static to const, to improve match expression ergonomics
this PR changes the `CFNumberType` values like `kCFNumberSInt64Type` from `static` to `const`.
That way it is possible to simplify match expressions like this:
before:
```rust
let type_id = unsafe { CFNumberGetType(value) };
match type_id {
si64 if si64 == kCFNumberSInt64Type => {},
si32 if si32 == kCFNumberSInt32Type => {},
_ => {},
}
```
after:
```rust
let type_id = unsafe { CFNumberGetType(value) };
match type_id {
kCFNumberSInt64Type => {},
kCFNumberSInt32Type => {},
_ => {},
}
```
Note: function call `CFNumberGetType(value)` is implemented in PR #411
add `CFNumberGetType` to determine specific number type
this PR adds support for `CFNumberGetType` that is needed if there is a `CFNumberRef` and it is not clear what sort of number it is.
Now it would be possible to do such a thing:
```rust
let type_id = unsafe { CFNumberGetType(value) };
match type_id {
si64 if si64 == kCFNumberSInt64Type => {},
si32 if si32 == kCFNumberSInt32Type => {},
_ => {},
}
```
Add a `name` method to `CFTimeZone` to get the time zone ID (e.g.,
"America/Los_Angeles") of the current time zone.
Core Foundation calls this "name" instead of "id" in its method
signatures, but acknowledges it in the closely-related NSTimeZone
related docs. Since most of the other methods in this library match
closely with CF naming, also use `name` here.
> Time zone database entries such as “America/Los_Angeles” are IDs, not
> names. An example of a time zone name is “Pacific Daylight Time”.
> Although many NSTimeZone symbols include the word “name”, they
> actually refer to IDs.