/ src / private-frameworks / CoreSimulator / src / CoreSimulator.m
CoreSimulator.m
  1  /*
  2   This file is part of Darling.
  3  
  4   Copyright (C) 2023 Darling Team
  5  
  6   Darling is free software: you can redistribute it and/or modify
  7   it under the terms of the GNU General Public License as published by
  8   the Free Software Foundation, either version 3 of the License, or
  9   (at your option) any later version.
 10  
 11   Darling is distributed in the hope that it will be useful,
 12   but WITHOUT ANY WARRANTY; without even the implied warranty of
 13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 14   GNU General Public License for more details.
 15  
 16   You should have received a copy of the GNU General Public License
 17   along with Darling.  If not, see <http://www.gnu.org/licenses/>.
 18  */
 19  
 20  
 21  #include <CoreSimulator/CoreSimulator.h>
 22  #include <stdlib.h>
 23  #include <stdio.h>
 24  
 25  static int verbose = 0;
 26  __attribute__((constructor))
 27  static void initme(void) {
 28      verbose = getenv("STUB_VERBOSE") != NULL;
 29  }
 30  
 31  
 32  void* const SimDeviceBootKeyBinPref = (void*)0;
 33  void* const SimDeviceBootKeyDeathPort = (void*)0;
 34  void* const SimDeviceBootKeyDeviceType = (void*)0;
 35  void* const SimDeviceBootKeyDisabledJobs = (void*)0;
 36  void* const SimDeviceBootKeyEnvironment = (void*)0;
 37  void* const SimDeviceBootKeyPersist = (void*)0;
 38  void* const SimDeviceBootKeyRuntime = (void*)0;
 39  void* const SimDeviceInstallOptionKeySkipWatchAppInstall = (void*)0;
 40  void* const SimDeviceLaunchApplicationEventTypeKeyBackgroundFetch = (void*)0;
 41  void* const SimDeviceLaunchApplicationKeyArguments = (void*)0;
 42  void* const SimDeviceLaunchApplicationKeyBackgrounded = (void*)0;
 43  void* const SimDeviceLaunchApplicationKeyEnvironment = (void*)0;
 44  void* const SimDeviceLaunchApplicationKeyEventType = (void*)0;
 45  void* const SimDeviceLaunchApplicationKeyStandardErrPath = (void*)0;
 46  void* const SimDeviceLaunchApplicationKeyStandardOutPath = (void*)0;
 47  void* const SimDeviceLaunchApplicationKeyTerminateRunningProcess = (void*)0;
 48  void* const SimDeviceLaunchApplicationKeyWaitForDebugger = (void*)0;
 49  void* const SimDeviceNotificationType_BootStatus = (void*)0;
 50  void* const SimDeviceSetOptionHostPort = (void*)0;
 51  void* const SimDeviceSpawnKeyArguments = (void*)0;
 52  void* const SimDeviceSpawnKeyBinPref = (void*)0;
 53  void* const SimDeviceSpawnKeyEnvironment = (void*)0;
 54  void* const SimDeviceSpawnKeyStandalone = (void*)0;
 55  void* const SimDeviceSpawnKeyStderr = (void*)0;
 56  void* const SimDeviceSpawnKeyStdin = (void*)0;
 57  void* const SimDeviceSpawnKeyStdout = (void*)0;
 58  void* const SimDeviceSpawnKeyWaitForDebugger = (void*)0;
 59  void* const SimNSPasteboardItemResolvedTypes = (void*)0;
 60  void* const kSimDeviceNotification_NewBootStatus = (void*)0;
 61  void* const kSimDeviceNotification_PreviousBootStatus = (void*)0;
 62  void* const kSimDevicePropertyKeyDeviceType = (void*)0;
 63  void* const kSimDevicePropertyKeyIsDeleted = (void*)0;
 64  void* const kSimDevicePropertyKeyIsEphemeral = (void*)0;
 65  void* const kSimDevicePropertyKeyLastBootedAt = (void*)0;
 66  void* const kSimDevicePropertyKeyName = (void*)0;
 67  void* const kSimDevicePropertyKeyRuntime = (void*)0;
 68  void* const kSimDevicePropertyKeyRuntimePolicy = (void*)0;
 69  void* const kSimDevicePropertyKeyRuntimeSpecifier = (void*)0;
 70  void* const kSimDevicePropertyKeyState = (void*)0;
 71  void* const kSimDevicePropertyKeyUDID = (void*)0;
 72  void* const kSimDeviceRuntimePolicyKeyLatest = (void*)0;
 73  void* const kSimDeviceRuntimePolicyKeyNewest = (void*)0;
 74  void* const kSimDeviceRuntimePolicyKeyPinnedToBuild = (void*)0;
 75  void* const kSimDeviceRuntimePolicyKeyPinnedToPath = (void*)0;
 76  void* const kSimDeviceRuntimePolicyKeySystem = (void*)0;
 77  void* const kSimPlatformIdentifierPhone = (void*)0;
 78  void* const kSimPlatformIdentifierTV = (void*)0;
 79  void* const kSimPlatformIdentifierWatch = (void*)0;
 80  void* const kSimPlatformShortNamePhone = (void*)0;
 81  void* const kSimPlatformShortNameTV = (void*)0;
 82  void* const kSimPlatformShortNameWatch = (void*)0;
 83  void* const kUnmountApprovalTimeout = (void*)0;
 84  void* const kUnmountVeryLongTimeout = (void*)0;
 85  
 86  void *SimDiskImageStateDisplayString(void) {
 87      if (verbose) puts("STUB: SimDiskImageStateDisplayString called");
 88      return NULL;
 89  }
 90  
 91  void *SimDiskImageStateIsTerminal(void) {
 92      if (verbose) puts("STUB: SimDiskImageStateIsTerminal called");
 93      return NULL;
 94  }
 95  
 96  void *SimLogFence(void) {
 97      if (verbose) puts("STUB: SimLogFence called");
 98      return NULL;
 99  }
100  
101  void *SimLogSetHandler(void) {
102      if (verbose) puts("STUB: SimLogSetHandler called");
103      return NULL;
104  }
105  
106  void *_DADiskGetVolumePath(void) {
107      if (verbose) puts("STUB: _DADiskGetVolumePath called");
108      return NULL;
109  }
110  
111  void *_GetDiskDescription(void) {
112      if (verbose) puts("STUB: _GetDiskDescription called");
113      return NULL;
114  }
115  
116  void *_ShouldIgnoreDisk(void) {
117      if (verbose) puts("STUB: _ShouldIgnoreDisk called");
118      return NULL;
119  }
120  
121  void *_SimLog(void) {
122      if (verbose) puts("STUB: _SimLog called");
123      return NULL;
124  }
125  
126  void *_SimLogASL(void) {
127      if (verbose) puts("STUB: _SimLogASL called");
128      return NULL;
129  }
130  
131  void *_SimLogCSS(void) {
132      if (verbose) puts("STUB: _SimLogCSS called");
133      return NULL;
134  }
135  
136  void *_SimLogSTDOUT(void) {
137      if (verbose) puts("STUB: _SimLogSTDOUT called");
138      return NULL;
139  }
140  
141  void *pb_promise_support_mig_read_item_promised_data(void) {
142      if (verbose) puts("STUB: pb_promise_support_mig_read_item_promised_data called");
143      return NULL;
144  }
145