2
0

UTMQemuSystem.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // Copyright © 2020 osy. All rights reserved.
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. //
  16. #import "UTMQemu.h"
  17. /// Specify the backend renderer for this VM
  18. typedef NS_ENUM(NSInteger, UTMQEMURendererBackend) {
  19. kQEMURendererBackendDefault = 0,
  20. kQEMURendererBackendAngleGL = 1,
  21. kQEMURendererBackendAngleMetal = 2,
  22. kQEMURendererBackendMax = 3,
  23. };
  24. /// Specify the sound backend for this VM
  25. typedef NS_ENUM(NSInteger, UTMQEMUSoundBackend) {
  26. kQEMUSoundBackendDefault = 0,
  27. kQEMUSoundBackendSPICE = 1,
  28. kQEMUSoundBackendCoreAudio = 2,
  29. kQEMUSoundBackendMax = 3,
  30. };
  31. NS_ASSUME_NONNULL_BEGIN
  32. @interface UTMQemuSystem : UTMQemu <QEMULauncher>
  33. @property (nonatomic, nullable, copy) NSArray<NSURL *> *resources;
  34. @property (nonatomic, nullable, weak) NSDictionary<NSURL *, NSData *> *remoteBookmarks;
  35. @property (nonatomic) UTMQEMURendererBackend rendererBackend;
  36. @property (nonatomic, weak) id<QEMULauncherDelegate> launcherDelegate;
  37. - (instancetype)init NS_UNAVAILABLE;
  38. - (instancetype)initWithArguments:(NSArray<NSString *> *)arguments NS_UNAVAILABLE;
  39. - (instancetype)initWithArguments:(NSArray<NSString *> *)arguments architecture:(NSString *)architecture NS_DESIGNATED_INITIALIZER;
  40. - (void)startQemuWithCompletion:(void(^)(NSError * _Nullable))completion;
  41. @end
  42. NS_ASSUME_NONNULL_END