-
Notifications
You must be signed in to change notification settings - Fork 15
XPC Internals
Aditya Vaidyam edited this page Jan 14, 2019
·
1 revision
// serializer: for data with/without OOL, for description
XPC_ACTIVITY_APP_REFRESH
XPC_ACTIVITY_CPU_INTENSIVE
XPC_ACTIVITY_DO_IT_LATER
XPC_ACTIVITY_DUET_ATTRIBUTE_COST
XPC_ACTIVITY_DUET_ATTRIBUTE_NAME
XPC_ACTIVITY_DUET_ATTRIBUTE_VALUE
XPC_ACTIVITY_EXCLUSIVE
XPC_ACTIVITY_MAY_REBOOT_DEVICE
XPC_ACTIVITY_MEMORY_INTENSIVE
XPC_ACTIVITY_POWER_NAP
XPC_ACTIVITY_REPLY_ENDPOINT
XPC_ACTIVITY_REPLY_PERCENTAGE
XPC_ACTIVITY_REQUIRES_CLASS_A
XPC_ACTIVITY_REQUIRES_CLASS_C
XPC_ACTIVITY_REQUIRE_USER_INACTIVE
XPC_ACTIVITY_SEQUENCE_NUMBER
XPC_ACTIVITY_SHOULD_WAKE_DEVICE
XPC_ACTIVITY_USES_DUET_POWER_BUDGETING
xpc_activity_copy_dispatch_queue
xpc_activity_defer_until_network_change
xpc_activity_defer_until_percentage
xpc_activity_get_percentage
xpc_activity_list
xpc_activity_run
xpc_activity_set_network_threshold
xpc_connection_copy_bundle_id
xpc_connection_copy_entitlement_value
xpc_connection_create_listener // xpc_connection_t (const char *, dispatch_queue_t)
xpc_connection_get_audit_token
xpc_connection_get_instance
xpc_connection_is_extension
xpc_connection_kill // (conn, int signal)
xpc_connection_send_notification // identical to send_message, but "no importance" (!!)
xpc_connection_set_bootstrap
xpc_copy_bootstrap // xpc_object_t (conn? void?)
xpc_connection_set_instance // void (conn, uuid from getUUIDBytes)
xpc_connection_set_legacy // int?? (conn)
xpc_connection_set_oneshot_instance // same as set_instance, but "process per request" (!!)
xpc_connection_set_privileged // int?? (conn)
xpc_connection_set_target_uid
xpc_generate_audit_token
xpc_copy_entitlement_for_token
xpc_copy_entitlements_for_pid
xpc_create_from_plist
xpc_create_from_plist_descriptor // same as above with an fd
xpc_create_reply_with_format // same as below
xpc_create_reply_with_format_and_arguments // same as below but with args
xpc_create_with_format // xpc_create_with_format("{ body:[[%uuid, %array]] }", var_28, arg2);
xpc_create_with_format_and_arguments // same as above but with args
xpc_date_create_absolute
xpc_date_get_value_absolute
xpc_date_is_int64_range
xpc_transaction_exit_clean
xpc_transaction_interrupt_clean_exit
xpc_track_activity // init only
xpc_transactions_enable // init only
xpc_string_create_no_copy
xpc_strerror // likely used with pipes
xpc_copy_event
xpc_copy_event_entitlements
xpc_event_stream_check_in
xpc_get_event_name
xpc_set_event // xpc_set_event("com.apple.locationd-events", "RequiredItems", mydict);
xpc_set_event_with_flags // same as ^ with flags
xpc_set_event_state
xpc_activate_endpoint // returns the mach recv
xpc_look_up_endpoint // returns the mach send
xpc_make_serialization_with_ool
xpc_make_serialization
xpc_create_from_serialization_with_ool
xpc_create_from_serialization
// TODO: macOS 14+ only: see rapportd
xpc_event_publisher_create
xpc_event_publisher_activate
xpc_event_publisher_set_subscriber_keepalive
xpc_event_publisher_set_handler
xpc_event_publisher_set_error_handler
xpc_event_publisher_fire
xpc_event_publisher_fire_noboost
xpc_event_publisher_fire_with_reply
// TODO: xpc_bundle?
// TODO: (along with xpc_filetransfer, xpc_service, xpc_service_instance)
xpc_bootstrap_process
xpc_bootstrap_system
xpc_copy_domain
xpc_init_services // pluginkit
xpc_handle_service // nsxpclistener + pluginkit?
xpc_handle_subservice // viewbridge
xpc_unbootstrap_system
xpc_impersonate_user
xpc_create_cache_entry_from_bundle
// SOME OF THEM:
void xpc_transaction_exit_clean();
void xpc_track_activity();
xpc_object_t xpc_connection_copy_entitlement_value(xpc_connection_t, const char* entitlement);
void xpc_connection_get_audit_token(xpc_connection_t, audit_token_t*);
void xpc_connection_kill(xpc_connection_t, int);
void xpc_connection_set_instance(xpc_connection_t, uuid_t);
void xpc_connection_set_bootstrap(xpc_connection_t, xpc_object_t bootstrap);
xpc_object_t xpc_copy_bootstrap(void);
void xpc_connection_set_oneshot_instance(xpc_connection_t, uuid_t instance);
void xpc_connection_set_target_uid(xpc_connection_t, uid_t);
xpc_object_t xpc_create_from_plist(void *, size_t);
xpc_object_t xpc_create_with_format(const char * format, ...);
xpc_object_t xpc_create_reply_with_format(xpc_object_t original, const char * format, ...);
xpc_bundle_t xpc_bundle_create(const char *path, int /* XPC_BUNDLE_FROM_PATH = 0x1? */);
xpc_object_t xpc_bundle_get_info_dictionary(xpc_bundle_t);
///
xpc_event_publisher_t xpc_event_publisher_create("com.apple.rapport.matching", dispatch_queue_t);
void xpc_event_publisher_set_handler(xpc_event_publisher_t, id /*unknown*/ (^)(id /*publisher maybe*/, id action, id token, id event));
void xpc_event_publisher_set_error_handler(xpc_event_publisher_t, id /*unknown*/ (^)(id /*publisher maybe*/, id error));
void xpc_event_publisher_activate(xpc_event_publisher_t);
id /*unknown*/ xpc_event_publisher_set_subscriber_keepalive(xpc_event_publisher_t, uint64_t token, boolean_t state);
boolean_t xpc_event_publisher_fire(xpc_event_publisher_t, uint64_t token, 0x0);
///
xpc_handle_service(const char *service_name, void (^)(xpc_connection_t), 0x0);