rocketbootstrap_internal.h 899 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #import <CoreFoundation/CoreFoundation.h>
  2. #import "rocketbootstrap.h"
  3. #define kRocketBootstrapUnlockService "com.rpetrich.rocketbootstrapd"
  4. #define ROCKETBOOTSTRAP_LOOKUP_ID -1
  5. typedef struct {
  6. mach_msg_header_t head;
  7. mach_msg_body_t body;
  8. uint32_t name_length;
  9. char name[];
  10. } _rocketbootstrap_lookup_query_t;
  11. typedef struct {
  12. mach_msg_header_t head;
  13. mach_msg_body_t body;
  14. mach_msg_port_descriptor_t response_port;
  15. } _rocketbootstrap_lookup_response_t;
  16. #import "LightMessaging/LightMessaging.h"
  17. __attribute__((unused))
  18. static LMConnection connection = {
  19. MACH_PORT_NULL,
  20. kRocketBootstrapUnlockService
  21. };
  22. __attribute__((unused))
  23. static inline bool rocketbootstrap_is_passthrough(void)
  24. {
  25. return kCFCoreFoundationVersionNumber < 800.0;
  26. }
  27. kern_return_t _rocketbootstrap_is_unlocked(const name_t service_name); // Errors if not in a privileged process such as SpringBoard or backboardd