From 4181a8d4985d16e1cb3ba04aaa0a7c1c6bf3fa01 Mon Sep 17 00:00:00 2001 From: Zach Wolfe Date: Mon, 21 Feb 2022 05:24:10 -0600 Subject: [PATCH] Add AssertionServices stubs --- .../AssertionServices/CMakeLists.txt | 29 ++++ .../AssertionServices/AssertionServices.h | 60 ++++++++ .../BKSApplicationStateMonitor.h | 24 +++ .../include/AssertionServices/BKSAssertion.h | 24 +++ .../BKSLaunchdJobSpecification.h | 24 +++ .../include/AssertionServices/BKSProcess.h | 24 +++ .../AssertionServices/BKSProcessAssertion.h | 24 +++ .../AssertionServices/BKSProcessExitContext.h | 24 +++ .../BKSTerminationAssertion.h | 24 +++ .../BKSTerminationAssertionObserverManager.h | 24 +++ .../AssertionServices/BKSTerminationContext.h | 24 +++ .../include/AssertionServices/BKSWorkspace.h | 24 +++ .../BSDescriptionProviding.h | 24 +++ .../include/AssertionServices/BSXPCCoding.h | 24 +++ .../AssertionServices/RBSAssertionObserving.h | 24 +++ .../AssertionServices/RBSServiceDelegate.h | 24 +++ .../AssertionServices/src/AssertionServices.m | 138 ++++++++++++++++++ .../src/BKSApplicationStateMonitor.m | 34 +++++ .../AssertionServices/src/BKSAssertion.m | 34 +++++ .../src/BKSLaunchdJobSpecification.m | 34 +++++ .../AssertionServices/src/BKSProcess.m | 34 +++++ .../src/BKSProcessAssertion.m | 34 +++++ .../src/BKSProcessExitContext.m | 34 +++++ .../src/BKSTerminationAssertion.m | 34 +++++ .../BKSTerminationAssertionObserverManager.m | 34 +++++ .../src/BKSTerminationContext.m | 34 +++++ .../AssertionServices/src/BKSWorkspace.m | 34 +++++ src/private-frameworks/CMakeLists.txt | 1 + .../include/AssertionServices | 1 + 29 files changed, 905 insertions(+) create mode 100644 src/private-frameworks/AssertionServices/CMakeLists.txt create mode 100644 src/private-frameworks/AssertionServices/include/AssertionServices/AssertionServices.h create mode 100644 src/private-frameworks/AssertionServices/include/AssertionServices/BKSApplicationStateMonitor.h create mode 100644 src/private-frameworks/AssertionServices/include/AssertionServices/BKSAssertion.h create mode 100644 src/private-frameworks/AssertionServices/include/AssertionServices/BKSLaunchdJobSpecification.h create mode 100644 src/private-frameworks/AssertionServices/include/AssertionServices/BKSProcess.h create mode 100644 src/private-frameworks/AssertionServices/include/AssertionServices/BKSProcessAssertion.h create mode 100644 src/private-frameworks/AssertionServices/include/AssertionServices/BKSProcessExitContext.h create mode 100644 src/private-frameworks/AssertionServices/include/AssertionServices/BKSTerminationAssertion.h create mode 100644 src/private-frameworks/AssertionServices/include/AssertionServices/BKSTerminationAssertionObserverManager.h create mode 100644 src/private-frameworks/AssertionServices/include/AssertionServices/BKSTerminationContext.h create mode 100644 src/private-frameworks/AssertionServices/include/AssertionServices/BKSWorkspace.h create mode 100644 src/private-frameworks/AssertionServices/include/AssertionServices/BSDescriptionProviding.h create mode 100644 src/private-frameworks/AssertionServices/include/AssertionServices/BSXPCCoding.h create mode 100644 src/private-frameworks/AssertionServices/include/AssertionServices/RBSAssertionObserving.h create mode 100644 src/private-frameworks/AssertionServices/include/AssertionServices/RBSServiceDelegate.h create mode 100644 src/private-frameworks/AssertionServices/src/AssertionServices.m create mode 100644 src/private-frameworks/AssertionServices/src/BKSApplicationStateMonitor.m create mode 100644 src/private-frameworks/AssertionServices/src/BKSAssertion.m create mode 100644 src/private-frameworks/AssertionServices/src/BKSLaunchdJobSpecification.m create mode 100644 src/private-frameworks/AssertionServices/src/BKSProcess.m create mode 100644 src/private-frameworks/AssertionServices/src/BKSProcessAssertion.m create mode 100644 src/private-frameworks/AssertionServices/src/BKSProcessExitContext.m create mode 100644 src/private-frameworks/AssertionServices/src/BKSTerminationAssertion.m create mode 100644 src/private-frameworks/AssertionServices/src/BKSTerminationAssertionObserverManager.m create mode 100644 src/private-frameworks/AssertionServices/src/BKSTerminationContext.m create mode 100644 src/private-frameworks/AssertionServices/src/BKSWorkspace.m create mode 120000 src/private-frameworks/include/AssertionServices diff --git a/src/private-frameworks/AssertionServices/CMakeLists.txt b/src/private-frameworks/AssertionServices/CMakeLists.txt new file mode 100644 index 000000000..afefc03a1 --- /dev/null +++ b/src/private-frameworks/AssertionServices/CMakeLists.txt @@ -0,0 +1,29 @@ +project(AssertionServices) + +set(DYLIB_COMPAT_VERSION "1.0.0") +set(DYLIB_CURRENT_VERSION "223.140.2") + +add_framework(AssertionServices + FAT + CURRENT_VERSION + PRIVATE + VERSION "A" + + SOURCES + src/AssertionServices.m + src/BKSWorkspace.m + src/BKSAssertion.m + src/BKSProcessExitContext.m + src/BKSProcess.m + src/BKSTerminationContext.m + src/BKSProcessAssertion.m + src/BKSTerminationAssertionObserverManager.m + src/BKSTerminationAssertion.m + src/BKSApplicationStateMonitor.m + src/BKSLaunchdJobSpecification.m + + DEPENDENCIES + system + objc + Foundation +) diff --git a/src/private-frameworks/AssertionServices/include/AssertionServices/AssertionServices.h b/src/private-frameworks/AssertionServices/include/AssertionServices/AssertionServices.h new file mode 100644 index 000000000..4ec2d0ab0 --- /dev/null +++ b/src/private-frameworks/AssertionServices/include/AssertionServices/AssertionServices.h @@ -0,0 +1,60 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + + +#ifndef _AssertionServices_H_ +#define _AssertionServices_H_ + +#import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +void* BKSAssertionErrorDescription(void); +void* BKSProcessAssertionBackgroundTimeRemaining(void); +void* BKSProcessAssertionSetExpirationHandler(void); +void* BKSProcessDiagnosticReportTypeDescription(void); +void* BKSProcessVisibilityIsForeground(void); +void* BKSProcessVisibilityMax(void); +void* BKSTerminationAssertionActiveEfficacyForBundleIdentifier(void); +void* BKSTerminationAssertionEfficacyDescription(void); +void* BKSTerminationAssertionHeldForBundleIdentifier(void); +void* BKSTerminationAssertionRegisterObserver(void); +void* BKSTerminationAssertionUnregisterObserver(void); +void* BKSWatchdogAssertionCreateForPID(void); +void* BKSWatchdogAssertionGetTypeID(void); +void* NSStringFromBKSProcessErrorCode(void); +void* NSStringFromBKSProcessExitReason(void); +void* NSStringFromBKSProcessTaskState(void); +void* NSStringFromBKSProcessVisibility(void); +void* RBSProcessLegacyStateDescriptor(void); + +#endif diff --git a/src/private-frameworks/AssertionServices/include/AssertionServices/BKSApplicationStateMonitor.h b/src/private-frameworks/AssertionServices/include/AssertionServices/BKSApplicationStateMonitor.h new file mode 100644 index 000000000..d0c332b4c --- /dev/null +++ b/src/private-frameworks/AssertionServices/include/AssertionServices/BKSApplicationStateMonitor.h @@ -0,0 +1,24 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#include + +@interface BKSApplicationStateMonitor : NSObject + +@end diff --git a/src/private-frameworks/AssertionServices/include/AssertionServices/BKSAssertion.h b/src/private-frameworks/AssertionServices/include/AssertionServices/BKSAssertion.h new file mode 100644 index 000000000..82477dbc2 --- /dev/null +++ b/src/private-frameworks/AssertionServices/include/AssertionServices/BKSAssertion.h @@ -0,0 +1,24 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#include + +@interface BKSAssertion : NSObject + +@end diff --git a/src/private-frameworks/AssertionServices/include/AssertionServices/BKSLaunchdJobSpecification.h b/src/private-frameworks/AssertionServices/include/AssertionServices/BKSLaunchdJobSpecification.h new file mode 100644 index 000000000..aee7588da --- /dev/null +++ b/src/private-frameworks/AssertionServices/include/AssertionServices/BKSLaunchdJobSpecification.h @@ -0,0 +1,24 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#include + +@interface BKSLaunchdJobSpecification : NSObject + +@end diff --git a/src/private-frameworks/AssertionServices/include/AssertionServices/BKSProcess.h b/src/private-frameworks/AssertionServices/include/AssertionServices/BKSProcess.h new file mode 100644 index 000000000..c4a619a71 --- /dev/null +++ b/src/private-frameworks/AssertionServices/include/AssertionServices/BKSProcess.h @@ -0,0 +1,24 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#include + +@interface BKSProcess : NSObject + +@end diff --git a/src/private-frameworks/AssertionServices/include/AssertionServices/BKSProcessAssertion.h b/src/private-frameworks/AssertionServices/include/AssertionServices/BKSProcessAssertion.h new file mode 100644 index 000000000..b1f7e0135 --- /dev/null +++ b/src/private-frameworks/AssertionServices/include/AssertionServices/BKSProcessAssertion.h @@ -0,0 +1,24 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#include + +@interface BKSProcessAssertion : NSObject + +@end diff --git a/src/private-frameworks/AssertionServices/include/AssertionServices/BKSProcessExitContext.h b/src/private-frameworks/AssertionServices/include/AssertionServices/BKSProcessExitContext.h new file mode 100644 index 000000000..7d2aaf68d --- /dev/null +++ b/src/private-frameworks/AssertionServices/include/AssertionServices/BKSProcessExitContext.h @@ -0,0 +1,24 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#include + +@interface BKSProcessExitContext : NSObject + +@end diff --git a/src/private-frameworks/AssertionServices/include/AssertionServices/BKSTerminationAssertion.h b/src/private-frameworks/AssertionServices/include/AssertionServices/BKSTerminationAssertion.h new file mode 100644 index 000000000..d17bd14a3 --- /dev/null +++ b/src/private-frameworks/AssertionServices/include/AssertionServices/BKSTerminationAssertion.h @@ -0,0 +1,24 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#include + +@interface BKSTerminationAssertion : NSObject + +@end diff --git a/src/private-frameworks/AssertionServices/include/AssertionServices/BKSTerminationAssertionObserverManager.h b/src/private-frameworks/AssertionServices/include/AssertionServices/BKSTerminationAssertionObserverManager.h new file mode 100644 index 000000000..0c472c95b --- /dev/null +++ b/src/private-frameworks/AssertionServices/include/AssertionServices/BKSTerminationAssertionObserverManager.h @@ -0,0 +1,24 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#include + +@interface BKSTerminationAssertionObserverManager : NSObject + +@end diff --git a/src/private-frameworks/AssertionServices/include/AssertionServices/BKSTerminationContext.h b/src/private-frameworks/AssertionServices/include/AssertionServices/BKSTerminationContext.h new file mode 100644 index 000000000..66a42dec7 --- /dev/null +++ b/src/private-frameworks/AssertionServices/include/AssertionServices/BKSTerminationContext.h @@ -0,0 +1,24 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#include + +@interface BKSTerminationContext : NSObject + +@end diff --git a/src/private-frameworks/AssertionServices/include/AssertionServices/BKSWorkspace.h b/src/private-frameworks/AssertionServices/include/AssertionServices/BKSWorkspace.h new file mode 100644 index 000000000..62bf7949b --- /dev/null +++ b/src/private-frameworks/AssertionServices/include/AssertionServices/BKSWorkspace.h @@ -0,0 +1,24 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#include + +@interface BKSWorkspace : NSObject + +@end diff --git a/src/private-frameworks/AssertionServices/include/AssertionServices/BSDescriptionProviding.h b/src/private-frameworks/AssertionServices/include/AssertionServices/BSDescriptionProviding.h new file mode 100644 index 000000000..5d340cc14 --- /dev/null +++ b/src/private-frameworks/AssertionServices/include/AssertionServices/BSDescriptionProviding.h @@ -0,0 +1,24 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#include + +@protocol BSDescriptionProviding + +@end diff --git a/src/private-frameworks/AssertionServices/include/AssertionServices/BSXPCCoding.h b/src/private-frameworks/AssertionServices/include/AssertionServices/BSXPCCoding.h new file mode 100644 index 000000000..45f13464d --- /dev/null +++ b/src/private-frameworks/AssertionServices/include/AssertionServices/BSXPCCoding.h @@ -0,0 +1,24 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#include + +@protocol BSXPCCoding + +@end diff --git a/src/private-frameworks/AssertionServices/include/AssertionServices/RBSAssertionObserving.h b/src/private-frameworks/AssertionServices/include/AssertionServices/RBSAssertionObserving.h new file mode 100644 index 000000000..43e019884 --- /dev/null +++ b/src/private-frameworks/AssertionServices/include/AssertionServices/RBSAssertionObserving.h @@ -0,0 +1,24 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#include + +@protocol RBSAssertionObserving + +@end diff --git a/src/private-frameworks/AssertionServices/include/AssertionServices/RBSServiceDelegate.h b/src/private-frameworks/AssertionServices/include/AssertionServices/RBSServiceDelegate.h new file mode 100644 index 000000000..c4a69a995 --- /dev/null +++ b/src/private-frameworks/AssertionServices/include/AssertionServices/RBSServiceDelegate.h @@ -0,0 +1,24 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#include + +@protocol RBSServiceDelegate + +@end diff --git a/src/private-frameworks/AssertionServices/src/AssertionServices.m b/src/private-frameworks/AssertionServices/src/AssertionServices.m new file mode 100644 index 000000000..8085d3e2b --- /dev/null +++ b/src/private-frameworks/AssertionServices/src/AssertionServices.m @@ -0,0 +1,138 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + + +#include +#include +#include + +static int verbose = 0; + +__attribute__((constructor)) +static void initme(void) { + verbose = getenv("STUB_VERBOSE") != NULL; +} + +void* BKSAssertionErrorDescription(void) +{ + if (verbose) puts("STUB: BKSAssertionErrorDescription called"); + return NULL; +} + +void* BKSProcessAssertionBackgroundTimeRemaining(void) +{ + if (verbose) puts("STUB: BKSProcessAssertionBackgroundTimeRemaining called"); + return NULL; +} + +void* BKSProcessAssertionSetExpirationHandler(void) +{ + if (verbose) puts("STUB: BKSProcessAssertionSetExpirationHandler called"); + return NULL; +} + +void* BKSProcessDiagnosticReportTypeDescription(void) +{ + if (verbose) puts("STUB: BKSProcessDiagnosticReportTypeDescription called"); + return NULL; +} + +void* BKSProcessVisibilityIsForeground(void) +{ + if (verbose) puts("STUB: BKSProcessVisibilityIsForeground called"); + return NULL; +} + +void* BKSProcessVisibilityMax(void) +{ + if (verbose) puts("STUB: BKSProcessVisibilityMax called"); + return NULL; +} + +void* BKSTerminationAssertionActiveEfficacyForBundleIdentifier(void) +{ + if (verbose) puts("STUB: BKSTerminationAssertionActiveEfficacyForBundleIdentifier called"); + return NULL; +} + +void* BKSTerminationAssertionEfficacyDescription(void) +{ + if (verbose) puts("STUB: BKSTerminationAssertionEfficacyDescription called"); + return NULL; +} + +void* BKSTerminationAssertionHeldForBundleIdentifier(void) +{ + if (verbose) puts("STUB: BKSTerminationAssertionHeldForBundleIdentifier called"); + return NULL; +} + +void* BKSTerminationAssertionRegisterObserver(void) +{ + if (verbose) puts("STUB: BKSTerminationAssertionRegisterObserver called"); + return NULL; +} + +void* BKSTerminationAssertionUnregisterObserver(void) +{ + if (verbose) puts("STUB: BKSTerminationAssertionUnregisterObserver called"); + return NULL; +} + +void* BKSWatchdogAssertionCreateForPID(void) +{ + if (verbose) puts("STUB: BKSWatchdogAssertionCreateForPID called"); + return NULL; +} + +void* BKSWatchdogAssertionGetTypeID(void) +{ + if (verbose) puts("STUB: BKSWatchdogAssertionGetTypeID called"); + return NULL; +} + +void* NSStringFromBKSProcessErrorCode(void) +{ + if (verbose) puts("STUB: NSStringFromBKSProcessErrorCode called"); + return NULL; +} + +void* NSStringFromBKSProcessExitReason(void) +{ + if (verbose) puts("STUB: NSStringFromBKSProcessExitReason called"); + return NULL; +} + +void* NSStringFromBKSProcessTaskState(void) +{ + if (verbose) puts("STUB: NSStringFromBKSProcessTaskState called"); + return NULL; +} + +void* NSStringFromBKSProcessVisibility(void) +{ + if (verbose) puts("STUB: NSStringFromBKSProcessVisibility called"); + return NULL; +} + +void* RBSProcessLegacyStateDescriptor(void) +{ + if (verbose) puts("STUB: RBSProcessLegacyStateDescriptor called"); + return NULL; +} diff --git a/src/private-frameworks/AssertionServices/src/BKSApplicationStateMonitor.m b/src/private-frameworks/AssertionServices/src/BKSApplicationStateMonitor.m new file mode 100644 index 000000000..1f1114659 --- /dev/null +++ b/src/private-frameworks/AssertionServices/src/BKSApplicationStateMonitor.m @@ -0,0 +1,34 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#import + +@implementation BKSApplicationStateMonitor + +- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector +{ + return [NSMethodSignature signatureWithObjCTypes: "v@:"]; +} + +- (void)forwardInvocation:(NSInvocation *)anInvocation +{ + NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]); +} + +@end diff --git a/src/private-frameworks/AssertionServices/src/BKSAssertion.m b/src/private-frameworks/AssertionServices/src/BKSAssertion.m new file mode 100644 index 000000000..982934925 --- /dev/null +++ b/src/private-frameworks/AssertionServices/src/BKSAssertion.m @@ -0,0 +1,34 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#import + +@implementation BKSAssertion + +- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector +{ + return [NSMethodSignature signatureWithObjCTypes: "v@:"]; +} + +- (void)forwardInvocation:(NSInvocation *)anInvocation +{ + NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]); +} + +@end diff --git a/src/private-frameworks/AssertionServices/src/BKSLaunchdJobSpecification.m b/src/private-frameworks/AssertionServices/src/BKSLaunchdJobSpecification.m new file mode 100644 index 000000000..021f91817 --- /dev/null +++ b/src/private-frameworks/AssertionServices/src/BKSLaunchdJobSpecification.m @@ -0,0 +1,34 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#import + +@implementation BKSLaunchdJobSpecification + +- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector +{ + return [NSMethodSignature signatureWithObjCTypes: "v@:"]; +} + +- (void)forwardInvocation:(NSInvocation *)anInvocation +{ + NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]); +} + +@end diff --git a/src/private-frameworks/AssertionServices/src/BKSProcess.m b/src/private-frameworks/AssertionServices/src/BKSProcess.m new file mode 100644 index 000000000..64c65a599 --- /dev/null +++ b/src/private-frameworks/AssertionServices/src/BKSProcess.m @@ -0,0 +1,34 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#import + +@implementation BKSProcess + +- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector +{ + return [NSMethodSignature signatureWithObjCTypes: "v@:"]; +} + +- (void)forwardInvocation:(NSInvocation *)anInvocation +{ + NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]); +} + +@end diff --git a/src/private-frameworks/AssertionServices/src/BKSProcessAssertion.m b/src/private-frameworks/AssertionServices/src/BKSProcessAssertion.m new file mode 100644 index 000000000..e02fca3df --- /dev/null +++ b/src/private-frameworks/AssertionServices/src/BKSProcessAssertion.m @@ -0,0 +1,34 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#import + +@implementation BKSProcessAssertion + +- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector +{ + return [NSMethodSignature signatureWithObjCTypes: "v@:"]; +} + +- (void)forwardInvocation:(NSInvocation *)anInvocation +{ + NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]); +} + +@end diff --git a/src/private-frameworks/AssertionServices/src/BKSProcessExitContext.m b/src/private-frameworks/AssertionServices/src/BKSProcessExitContext.m new file mode 100644 index 000000000..ccde63034 --- /dev/null +++ b/src/private-frameworks/AssertionServices/src/BKSProcessExitContext.m @@ -0,0 +1,34 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#import + +@implementation BKSProcessExitContext + +- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector +{ + return [NSMethodSignature signatureWithObjCTypes: "v@:"]; +} + +- (void)forwardInvocation:(NSInvocation *)anInvocation +{ + NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]); +} + +@end diff --git a/src/private-frameworks/AssertionServices/src/BKSTerminationAssertion.m b/src/private-frameworks/AssertionServices/src/BKSTerminationAssertion.m new file mode 100644 index 000000000..65b2893d4 --- /dev/null +++ b/src/private-frameworks/AssertionServices/src/BKSTerminationAssertion.m @@ -0,0 +1,34 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#import + +@implementation BKSTerminationAssertion + +- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector +{ + return [NSMethodSignature signatureWithObjCTypes: "v@:"]; +} + +- (void)forwardInvocation:(NSInvocation *)anInvocation +{ + NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]); +} + +@end diff --git a/src/private-frameworks/AssertionServices/src/BKSTerminationAssertionObserverManager.m b/src/private-frameworks/AssertionServices/src/BKSTerminationAssertionObserverManager.m new file mode 100644 index 000000000..7db102ae7 --- /dev/null +++ b/src/private-frameworks/AssertionServices/src/BKSTerminationAssertionObserverManager.m @@ -0,0 +1,34 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#import + +@implementation BKSTerminationAssertionObserverManager + +- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector +{ + return [NSMethodSignature signatureWithObjCTypes: "v@:"]; +} + +- (void)forwardInvocation:(NSInvocation *)anInvocation +{ + NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]); +} + +@end diff --git a/src/private-frameworks/AssertionServices/src/BKSTerminationContext.m b/src/private-frameworks/AssertionServices/src/BKSTerminationContext.m new file mode 100644 index 000000000..d155e17b3 --- /dev/null +++ b/src/private-frameworks/AssertionServices/src/BKSTerminationContext.m @@ -0,0 +1,34 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#import + +@implementation BKSTerminationContext + +- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector +{ + return [NSMethodSignature signatureWithObjCTypes: "v@:"]; +} + +- (void)forwardInvocation:(NSInvocation *)anInvocation +{ + NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]); +} + +@end diff --git a/src/private-frameworks/AssertionServices/src/BKSWorkspace.m b/src/private-frameworks/AssertionServices/src/BKSWorkspace.m new file mode 100644 index 000000000..a055895b1 --- /dev/null +++ b/src/private-frameworks/AssertionServices/src/BKSWorkspace.m @@ -0,0 +1,34 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + +#import + +@implementation BKSWorkspace + +- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector +{ + return [NSMethodSignature signatureWithObjCTypes: "v@:"]; +} + +- (void)forwardInvocation:(NSInvocation *)anInvocation +{ + NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]); +} + +@end diff --git a/src/private-frameworks/CMakeLists.txt b/src/private-frameworks/CMakeLists.txt index 78c39be14..2ce4b80c2 100644 --- a/src/private-frameworks/CMakeLists.txt +++ b/src/private-frameworks/CMakeLists.txt @@ -3,6 +3,7 @@ project(private-frameworks) add_subdirectory(AppleFSCompression) add_subdirectory(AppleSauce) add_subdirectory(AppleSystemInfo) +add_subdirectory(AssertionServices) add_subdirectory(AssetCacheServices) add_subdirectory(AssistantServices) add_subdirectory(AuthKit) diff --git a/src/private-frameworks/include/AssertionServices b/src/private-frameworks/include/AssertionServices new file mode 120000 index 000000000..9941d32a2 --- /dev/null +++ b/src/private-frameworks/include/AssertionServices @@ -0,0 +1 @@ +../AssertionServices/include/AssertionServices \ No newline at end of file