Skip to content

Commit 66db4a6

Browse files
authored
Merge pull request #546 from dongcarl/2023-12-ServiceManagement
Add `ServiceManagement` framework
2 parents 7c7f4fb + 8b66dbe commit 66db4a6

File tree

7 files changed

+49
-2
lines changed

7 files changed

+49
-2
lines changed

crates/header-translator/framework-includes.h

+2
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@
8787

8888
#import <QuartzCore/CoreAnimation.h>
8989

90+
#import <ServiceManagement/ServiceManagement.h>
91+
9092
#import <SoundAnalysis/SoundAnalysis.h>
9193

9294
#import <Speech/Speech.h>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
data! {
2+
}

crates/header-translator/src/data/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ data! {
4848
mod MetricKit;
4949
mod OSAKit;
5050
mod PhotoKit;
51+
mod ServiceManagement;
5152
mod SoundAnalysis;
5253
mod Speech;
5354
mod StoreKit;

crates/header-translator/src/main.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,9 @@ fn parse_sdk(index: &Index<'_>, sdk: &SdkPath, llvm_target: &str, config: &Confi
277277
}
278278
preprocessing = false;
279279
// No more includes / macro expansions after this line
280-
let file = library.files.get_mut(&file_name).expect("file");
280+
let mut maybe_file = library.files.get_mut(&file_name);
281281
for stmt in Stmt::parse(&entity, &context) {
282+
let file: &mut File = maybe_file.as_mut().expect("file");
282283
file.add_stmt(stmt);
283284
}
284285
}

crates/header-translator/translation-config.toml

+32
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,14 @@ maccatalyst = "13.0"
404404
ios = "2.0"
405405
tvos = "9.0"
406406

407+
[library.ServiceManagement]
408+
imports = ["Foundation"]
409+
macos = "10.6"
410+
maccatalyst = "13.0"
411+
ios = "12.1"
412+
tvos = "12.1"
413+
watchos = "5.1"
414+
407415
[library.SoundAnalysis]
408416
imports = ["Foundation"]
409417
macos = "10.15"
@@ -1734,3 +1742,27 @@ skipped = true
17341742
skipped = true
17351743
[class.CWInterface.methods.associateToEnterpriseNetwork_identity_username_password_error]
17361744
skipped = true
1745+
1746+
# Items from ServiceManagement that uses types from CoreFoundation
1747+
[fn.SMJobBless]
1748+
skipped = true
1749+
[fn.SMLoginItemSetEnabled]
1750+
skipped = true
1751+
[static.kSMDomainSystemLaunchd]
1752+
skipped = true
1753+
[static.kSMDomainUserLaunchd]
1754+
skipped = true
1755+
[static.kSMErrorDomainFramework]
1756+
skipped = true
1757+
[static.kSMErrorDomainIPC]
1758+
skipped = true
1759+
[static.kSMErrorDomainLaunchd]
1760+
skipped = true
1761+
[fn.SMCopyAllJobDictionaries]
1762+
skipped = true
1763+
[fn.SMJobCopyDictionary]
1764+
skipped = true
1765+
[fn.SMJobRemove]
1766+
skipped = true
1767+
[fn.SMJobSubmit]
1768+
skipped = true

crates/icrate/Cargo.toml

+9
Original file line numberDiff line numberDiff line change
@@ -4797,6 +4797,14 @@ PhotoKit_all = [
47974797
"PhotoKit_PHProjectChangeRequest",
47984798
"PhotoKit_PHVideoRequestOptions",
47994799
]
4800+
ServiceManagement = [
4801+
"Foundation",
4802+
]
4803+
ServiceManagement_SMAppService = []
4804+
ServiceManagement_all = [
4805+
"ServiceManagement",
4806+
"ServiceManagement_SMAppService",
4807+
]
48004808
SoundAnalysis = [
48014809
"Foundation",
48024810
]
@@ -5602,6 +5610,7 @@ unstable-frameworks-macos-10-12 = [
56025610
"Metal_all",
56035611
"OSAKit_all",
56045612
"PhotoKit_all",
5613+
"ServiceManagement_all",
56055614
"StoreKit_all",
56065615
"WebKit_all",
56075616
"unstable-example-basic_usage",

crates/icrate/src/generated

0 commit comments

Comments
 (0)